diff --git a/src/hoj-springboot/.gitignore b/src/hoj-springboot/.gitignore deleted file mode 100644 index 24cbb6d..0000000 --- a/src/hoj-springboot/.gitignore +++ /dev/null @@ -1,36 +0,0 @@ -*.classpath - -# Package Files -*.jar -*.war -*.ear -*.log -*.iml - -.DS_Store -node_modules -dist/ -target/ -out/ -.idea/ -.classpath -.project - -# local env files -.env.local -.env.*.local - -# Log files -npm-debug.log* -yarn-debug.log* -yarn-error.log* -pnpm-debug.log* - -# Editor directories and files -.idea -.vscode -*.suo -*.ntvs* -*.njsproj -*.sln -*.sw? diff --git a/src/hoj-springboot/DataBackup/pom.xml b/src/hoj-springboot/DataBackup/pom.xml deleted file mode 100644 index 1a0f0a4..0000000 --- a/src/hoj-springboot/DataBackup/pom.xml +++ /dev/null @@ -1,208 +0,0 @@ - - - - hoj-springboot - top.hcode - 1.0-SNAPSHOT - - 4.0.0 - DataBackup - - - - org.springframework.boot - spring-boot-maven-plugin - - - top.hcode.hoj.DataBackupApplication - ZIP - - - - - repackage - - - - - - org.apache.maven.plugins - maven-compiler-plugin - - 8 - 8 - - - - - - src/main/resources - - - src/main/java - - **/*.xml - - - - - - - top.hcode - api - 1.0-SNAPSHOT - - - - org.springframework.boot - spring-boot-starter-mail - - - - org.springframework.retry - spring-retry - - - - com.alibaba.cloud - spring-cloud-starter-alibaba-nacos-config - - - - com.alibaba.nacos - nacos-client - - - - - com.alibaba.nacos - nacos-client - 1.4.2 - - - - com.alibaba.cloud - spring-cloud-starter-alibaba-nacos-discovery - - - org.projectlombok - lombok - true - - - com.alibaba - druid - - - com.alibaba - easyexcel - 2.2.7 - - - com.baomidou - mybatis-plus-boot-starter - - - org.crazycake - shiro-redis-spring-boot-starter - - - org.crazycake - shiro-redis - - - - - org.crazycake - shiro-redis - 3.3.1 - - - mysql - mysql-connector-java - - - - cn.hutool - hutool-all - 5.7.22 - - - - com.github.oshi - oshi-core - 5.6.1 - - - - com.vdurmont - emoji-java - 5.1.1 - - - - - org.springframework.boot - spring-boot-starter-data-redis - - - io.lettuce - lettuce-core - - - - - - - io.jsonwebtoken - jjwt - 0.9.1 - - - - org.springframework.boot - spring-boot-starter-web - - - org.springframework.boot - spring-boot-starter-actuator - - - - - - - - org.springframework.boot - spring-boot-starter-thymeleaf - - - - com.github.whvcse - easy-captcha - 1.6.2 - - - - org.springframework.boot - spring-boot-starter-test - test - - - org.junit.vintage - junit-vintage-engine - - - - - - org.jsoup - jsoup - 1.13.1 - - - - - \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java b/src/hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java deleted file mode 100644 index 663da0b..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java +++ /dev/null @@ -1,2118 +0,0 @@ -// -// Source code recreated from a .class file by IntelliJ IDEA -// (powered by Fernflower decompiler) -// - -package com.alibaba.druid.pool; - -import com.alibaba.druid.DruidRuntimeException; -import com.alibaba.druid.filter.Filter; -import com.alibaba.druid.filter.FilterChainImpl; -import com.alibaba.druid.filter.FilterManager; -import com.alibaba.druid.pool.vendor.NullExceptionSorter; -import com.alibaba.druid.proxy.jdbc.DataSourceProxy; -import com.alibaba.druid.proxy.jdbc.TransactionInfo; -import com.alibaba.druid.stat.JdbcDataSourceStat; -import com.alibaba.druid.stat.JdbcSqlStat; -import com.alibaba.druid.stat.JdbcStatManager; -import com.alibaba.druid.support.logging.Log; -import com.alibaba.druid.support.logging.LogFactory; -import com.alibaba.druid.util.DruidPasswordCallback; -import com.alibaba.druid.util.Histogram; -import com.alibaba.druid.util.JdbcUtils; -import com.alibaba.druid.util.MySqlUtils; -import com.alibaba.druid.util.StringUtils; -import com.alibaba.druid.util.Utils; -import java.io.PrintWriter; -import java.io.Serializable; -import java.sql.Connection; -import java.sql.Driver; -import java.sql.DriverManager; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.sql.SQLFeatureNotSupportedException; -import java.sql.Statement; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.Date; -import java.util.HashMap; -import java.util.HashSet; -import java.util.IdentityHashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Properties; -import java.util.Set; -import java.util.concurrent.CopyOnWriteArrayList; -import java.util.concurrent.ScheduledExecutorService; -import java.util.concurrent.atomic.AtomicIntegerFieldUpdater; -import java.util.concurrent.atomic.AtomicLongFieldUpdater; -import java.util.concurrent.locks.Condition; -import java.util.concurrent.locks.ReentrantLock; -import java.util.logging.Logger; -import javax.management.JMException; -import javax.management.ObjectName; -import javax.management.openmbean.CompositeDataSupport; -import javax.security.auth.callback.NameCallback; -import javax.security.auth.callback.PasswordCallback; -import javax.sql.DataSource; - -public abstract class DruidAbstractDataSource extends WrapperAdapter implements DruidAbstractDataSourceMBean, DataSource, DataSourceProxy, Serializable { - private static final long serialVersionUID = 1L; - private static final Log LOG = LogFactory.getLog(DruidAbstractDataSource.class); - public static final int DEFAULT_INITIAL_SIZE = 0; - public static final int DEFAULT_MAX_ACTIVE_SIZE = 8; - public static final int DEFAULT_MAX_IDLE = 8; - public static final int DEFAULT_MIN_IDLE = 0; - public static final int DEFAULT_MAX_WAIT = -1; - public static final String DEFAULT_VALIDATION_QUERY = null; - public static final boolean DEFAULT_TEST_ON_BORROW = false; - public static final boolean DEFAULT_TEST_ON_RETURN = false; - public static final boolean DEFAULT_WHILE_IDLE = true; - public static final long DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS = 60000L; - public static final long DEFAULT_TIME_BETWEEN_CONNECT_ERROR_MILLIS = 500L; - public static final int DEFAULT_NUM_TESTS_PER_EVICTION_RUN = 3; - public static final long DEFAULT_MIN_EVICTABLE_IDLE_TIME_MILLIS = 1800000L; - public static final long DEFAULT_MAX_EVICTABLE_IDLE_TIME_MILLIS = 25200000L; - public static final long DEFAULT_PHY_TIMEOUT_MILLIS = -1L; - protected volatile boolean defaultAutoCommit = true; - protected volatile Boolean defaultReadOnly; - protected volatile Integer defaultTransactionIsolation; - protected volatile String defaultCatalog = null; - protected String name; - protected volatile String username; - protected volatile String password; - protected volatile String jdbcUrl; - protected volatile String driverClass; - protected volatile ClassLoader driverClassLoader; - protected volatile Properties connectProperties = new Properties(); - protected volatile PasswordCallback passwordCallback; - protected volatile NameCallback userCallback; - protected volatile int initialSize = 0; - protected volatile int maxActive = 8; - protected volatile int minIdle = 0; - protected volatile int maxIdle = 8; - protected volatile long maxWait = -1L; - protected int notFullTimeoutRetryCount = 0; - protected volatile String validationQuery; - protected volatile int validationQueryTimeout; - protected volatile boolean testOnBorrow; - protected volatile boolean testOnReturn; - protected volatile boolean testWhileIdle; - protected volatile boolean poolPreparedStatements; - protected volatile boolean sharePreparedStatements; - protected volatile int maxPoolPreparedStatementPerConnectionSize; - protected volatile boolean inited; - protected volatile boolean initExceptionThrow; - protected PrintWriter logWriter; - protected List filters; - private boolean clearFiltersEnable; - protected volatile ExceptionSorter exceptionSorter; - protected Driver driver; - protected volatile int queryTimeout; - protected volatile int transactionQueryTimeout; - protected long createTimespan; - protected volatile int maxWaitThreadCount; - protected volatile boolean accessToUnderlyingConnectionAllowed; - protected volatile long timeBetweenEvictionRunsMillis; - protected volatile int numTestsPerEvictionRun; - protected volatile long minEvictableIdleTimeMillis; - protected volatile long maxEvictableIdleTimeMillis; - protected volatile long keepAliveBetweenTimeMillis; - protected volatile long phyTimeoutMillis; - protected volatile long phyMaxUseCount; - protected volatile boolean removeAbandoned; - protected volatile long removeAbandonedTimeoutMillis; - protected volatile boolean logAbandoned; - protected volatile int maxOpenPreparedStatements; - protected volatile List connectionInitSqls; - protected volatile String dbType; - protected volatile long timeBetweenConnectErrorMillis; - protected volatile ValidConnectionChecker validConnectionChecker; - protected final Map activeConnections; - protected static final Object PRESENT = new Object(); - protected long id; - protected int connectionErrorRetryAttempts; - protected boolean breakAfterAcquireFailure; - protected long transactionThresholdMillis; - protected final Date createdTime; - protected Date initedTime; - protected volatile long errorCount; - protected volatile long dupCloseCount; - protected volatile long startTransactionCount; - protected volatile long commitCount; - protected volatile long rollbackCount; - protected volatile long cachedPreparedStatementHitCount; - protected volatile long preparedStatementCount; - protected volatile long closedPreparedStatementCount; - protected volatile long cachedPreparedStatementCount; - protected volatile long cachedPreparedStatementDeleteCount; - protected volatile long cachedPreparedStatementMissCount; - static final AtomicLongFieldUpdater errorCountUpdater = AtomicLongFieldUpdater.newUpdater(DruidAbstractDataSource.class, "errorCount"); - static final AtomicLongFieldUpdater dupCloseCountUpdater = AtomicLongFieldUpdater.newUpdater(DruidAbstractDataSource.class, "dupCloseCount"); - static final AtomicLongFieldUpdater startTransactionCountUpdater = AtomicLongFieldUpdater.newUpdater(DruidAbstractDataSource.class, "startTransactionCount"); - static final AtomicLongFieldUpdater commitCountUpdater = AtomicLongFieldUpdater.newUpdater(DruidAbstractDataSource.class, "commitCount"); - static final AtomicLongFieldUpdater rollbackCountUpdater = AtomicLongFieldUpdater.newUpdater(DruidAbstractDataSource.class, "rollbackCount"); - static final AtomicLongFieldUpdater cachedPreparedStatementHitCountUpdater = AtomicLongFieldUpdater.newUpdater(DruidAbstractDataSource.class, "cachedPreparedStatementHitCount"); - static final AtomicLongFieldUpdater preparedStatementCountUpdater = AtomicLongFieldUpdater.newUpdater(DruidAbstractDataSource.class, "preparedStatementCount"); - static final AtomicLongFieldUpdater closedPreparedStatementCountUpdater = AtomicLongFieldUpdater.newUpdater(DruidAbstractDataSource.class, "closedPreparedStatementCount"); - static final AtomicLongFieldUpdater cachedPreparedStatementCountUpdater = AtomicLongFieldUpdater.newUpdater(DruidAbstractDataSource.class, "cachedPreparedStatementCount"); - static final AtomicLongFieldUpdater cachedPreparedStatementDeleteCountUpdater = AtomicLongFieldUpdater.newUpdater(DruidAbstractDataSource.class, "cachedPreparedStatementDeleteCount"); - static final AtomicLongFieldUpdater cachedPreparedStatementMissCountUpdater = AtomicLongFieldUpdater.newUpdater(DruidAbstractDataSource.class, "cachedPreparedStatementMissCount"); - protected final Histogram transactionHistogram; - private boolean dupCloseLogEnable; - private ObjectName objectName; - protected volatile long executeCount; - protected volatile long executeQueryCount; - protected volatile long executeUpdateCount; - protected volatile long executeBatchCount; - static final AtomicLongFieldUpdater executeQueryCountUpdater = AtomicLongFieldUpdater.newUpdater(DruidAbstractDataSource.class, "executeQueryCount"); - static final AtomicLongFieldUpdater executeUpdateCountUpdater = AtomicLongFieldUpdater.newUpdater(DruidAbstractDataSource.class, "executeUpdateCount"); - static final AtomicLongFieldUpdater executeBatchCountUpdater = AtomicLongFieldUpdater.newUpdater(DruidAbstractDataSource.class, "executeBatchCount"); - static final AtomicLongFieldUpdater executeCountUpdater = AtomicLongFieldUpdater.newUpdater(DruidAbstractDataSource.class, "executeCount"); - protected volatile Throwable createError; - protected volatile Throwable lastError; - protected volatile long lastErrorTimeMillis; - protected volatile Throwable lastCreateError; - protected volatile long lastCreateErrorTimeMillis; - protected volatile long lastCreateStartTimeMillis; - protected boolean isOracle; - protected boolean isMySql; - protected boolean useOracleImplicitCache; - protected ReentrantLock lock; - protected Condition notEmpty; - protected Condition empty; - protected ReentrantLock activeConnectionLock; - protected volatile int createErrorCount; - protected volatile int creatingCount; - protected volatile int directCreateCount; - protected volatile long createCount; - protected volatile long destroyCount; - protected volatile long createStartNanos; - static final AtomicIntegerFieldUpdater createErrorCountUpdater = AtomicIntegerFieldUpdater.newUpdater(DruidAbstractDataSource.class, "createErrorCount"); - static final AtomicIntegerFieldUpdater creatingCountUpdater = AtomicIntegerFieldUpdater.newUpdater(DruidAbstractDataSource.class, "creatingCount"); - static final AtomicIntegerFieldUpdater directCreateCountUpdater = AtomicIntegerFieldUpdater.newUpdater(DruidAbstractDataSource.class, "directCreateCount"); - static final AtomicLongFieldUpdater createCountUpdater = AtomicLongFieldUpdater.newUpdater(DruidAbstractDataSource.class, "createCount"); - static final AtomicLongFieldUpdater destroyCountUpdater = AtomicLongFieldUpdater.newUpdater(DruidAbstractDataSource.class, "destroyCount"); - static final AtomicLongFieldUpdater createStartNanosUpdater = AtomicLongFieldUpdater.newUpdater(DruidAbstractDataSource.class, "createStartNanos"); - private Boolean useUnfairLock; - private boolean useLocalSessionState; - protected long timeBetweenLogStatsMillis; - protected DruidDataSourceStatLogger statLogger; - private boolean asyncCloseConnectionEnable; - protected int maxCreateTaskCount; - protected boolean failFast; - protected volatile int failContinuous; - protected volatile long failContinuousTimeMillis; - protected ScheduledExecutorService destroyScheduler; - protected ScheduledExecutorService createScheduler; - static final AtomicLongFieldUpdater failContinuousTimeMillisUpdater = AtomicLongFieldUpdater.newUpdater(DruidAbstractDataSource.class, "failContinuousTimeMillis"); - static final AtomicIntegerFieldUpdater failContinuousUpdater = AtomicIntegerFieldUpdater.newUpdater(DruidAbstractDataSource.class, "failContinuous"); - protected boolean initVariants; - protected boolean initGlobalVariants; - protected volatile boolean onFatalError; - protected volatile int onFatalErrorMaxActive; - protected volatile int fatalErrorCount; - protected volatile int fatalErrorCountLastShrink; - protected volatile long lastFatalErrorTimeMillis; - protected volatile String lastFatalErrorSql; - protected volatile Throwable lastFatalError; - protected volatile long connectionIdSeed; - protected volatile long statementIdSeed; - protected volatile long resultSetIdSeed; - protected volatile long transactionIdSeed; - protected volatile long metaDataIdSeed; - static final AtomicLongFieldUpdater connectionIdSeedUpdater = AtomicLongFieldUpdater.newUpdater(DruidAbstractDataSource.class, "connectionIdSeed"); - static final AtomicLongFieldUpdater statementIdSeedUpdater = AtomicLongFieldUpdater.newUpdater(DruidAbstractDataSource.class, "statementIdSeed"); - static final AtomicLongFieldUpdater resultSetIdSeedUpdater = AtomicLongFieldUpdater.newUpdater(DruidAbstractDataSource.class, "resultSetIdSeed"); - static final AtomicLongFieldUpdater transactionIdSeedUpdater = AtomicLongFieldUpdater.newUpdater(DruidAbstractDataSource.class, "transactionIdSeed"); - static final AtomicLongFieldUpdater metaDataIdSeedUpdater = AtomicLongFieldUpdater.newUpdater(DruidAbstractDataSource.class, "metaDataIdSeed"); - - public DruidAbstractDataSource(boolean lockFair) { - this.validationQuery = DEFAULT_VALIDATION_QUERY; - this.validationQueryTimeout = -1; - this.testOnBorrow = false; - this.testOnReturn = false; - this.testWhileIdle = true; - this.poolPreparedStatements = false; - this.sharePreparedStatements = false; - this.maxPoolPreparedStatementPerConnectionSize = 10; - this.inited = false; - this.initExceptionThrow = true; - this.logWriter = new PrintWriter(System.out); - this.filters = new CopyOnWriteArrayList(); - this.clearFiltersEnable = true; - this.exceptionSorter = null; - this.maxWaitThreadCount = -1; - this.accessToUnderlyingConnectionAllowed = true; - this.timeBetweenEvictionRunsMillis = 60000L; - this.numTestsPerEvictionRun = 3; - this.minEvictableIdleTimeMillis = 1800000L; - this.maxEvictableIdleTimeMillis = 25200000L; - this.keepAliveBetweenTimeMillis = 120000L; - this.phyTimeoutMillis = -1L; - this.phyMaxUseCount = -1L; - this.removeAbandonedTimeoutMillis = 300000L; - this.maxOpenPreparedStatements = -1; - this.timeBetweenConnectErrorMillis = 500L; - this.validConnectionChecker = null; - this.activeConnections = new IdentityHashMap(); - this.connectionErrorRetryAttempts = 1; - this.breakAfterAcquireFailure = false; - this.transactionThresholdMillis = 0L; - this.createdTime = new Date(); - this.errorCount = 0L; - this.dupCloseCount = 0L; - this.startTransactionCount = 0L; - this.commitCount = 0L; - this.rollbackCount = 0L; - this.cachedPreparedStatementHitCount = 0L; - this.preparedStatementCount = 0L; - this.closedPreparedStatementCount = 0L; - this.cachedPreparedStatementCount = 0L; - this.cachedPreparedStatementDeleteCount = 0L; - this.cachedPreparedStatementMissCount = 0L; - this.transactionHistogram = new Histogram(new long[]{1L, 10L, 100L, 1000L, 10000L, 100000L}); - this.dupCloseLogEnable = false; - this.executeCount = 0L; - this.executeQueryCount = 0L; - this.executeUpdateCount = 0L; - this.executeBatchCount = 0L; - this.isOracle = false; - this.isMySql = false; - this.useOracleImplicitCache = true; - this.activeConnectionLock = new ReentrantLock(); - this.createErrorCount = 0; - this.creatingCount = 0; - this.directCreateCount = 0; - this.createCount = 0L; - this.destroyCount = 0L; - this.createStartNanos = 0L; - this.useUnfairLock = null; - this.useLocalSessionState = true; - this.statLogger = new DruidDataSourceStatLoggerImpl(); - this.asyncCloseConnectionEnable = false; - this.maxCreateTaskCount = 3; - this.failFast = false; - this.failContinuous = 0; - this.failContinuousTimeMillis = 0L; - this.initVariants = false; - this.initGlobalVariants = false; - this.onFatalError = false; - this.onFatalErrorMaxActive = 0; - this.fatalErrorCount = 0; - this.fatalErrorCountLastShrink = 0; - this.lastFatalErrorTimeMillis = 0L; - this.lastFatalErrorSql = null; - this.lastFatalError = null; - this.connectionIdSeed = 10000L; - this.statementIdSeed = 20000L; - this.resultSetIdSeed = 50000L; - this.transactionIdSeed = 60000L; - this.metaDataIdSeed = 80000L; - this.lock = new ReentrantLock(lockFair); - this.notEmpty = this.lock.newCondition(); - this.empty = this.lock.newCondition(); - } - - public boolean isUseLocalSessionState() { - return this.useLocalSessionState; - } - - public void setUseLocalSessionState(boolean useLocalSessionState) { - this.useLocalSessionState = useLocalSessionState; - } - - public DruidDataSourceStatLogger getStatLogger() { - return this.statLogger; - } - - public void setStatLoggerClassName(String className) { - try { - Class clazz = Class.forName(className); - DruidDataSourceStatLogger statLogger = (DruidDataSourceStatLogger)clazz.newInstance(); - this.setStatLogger(statLogger); - } catch (Exception var4) { - throw new IllegalArgumentException(className, var4); - } - } - - public void setStatLogger(DruidDataSourceStatLogger statLogger) { - this.statLogger = statLogger; - } - - public long getTimeBetweenLogStatsMillis() { - return this.timeBetweenLogStatsMillis; - } - - public void setTimeBetweenLogStatsMillis(long timeBetweenLogStatsMillis) { - this.timeBetweenLogStatsMillis = timeBetweenLogStatsMillis; - } - - public boolean isOracle() { - return this.isOracle; - } - - public void setOracle(boolean isOracle) { - if (this.inited) { - throw new IllegalStateException(); - } else { - this.isOracle = isOracle; - } - } - - public boolean isUseUnfairLock() { - return this.lock.isFair(); - } - - public void setUseUnfairLock(boolean useUnfairLock) { - if (this.lock.isFair() != !useUnfairLock) { - if (!this.inited) { - ReentrantLock lock = this.lock; - lock.lock(); - - try { - if (!this.inited) { - this.lock = new ReentrantLock(!useUnfairLock); - this.notEmpty = this.lock.newCondition(); - this.empty = this.lock.newCondition(); - this.useUnfairLock = useUnfairLock; - } - } finally { - lock.unlock(); - } - } - - } - } - - public boolean isUseOracleImplicitCache() { - return this.useOracleImplicitCache; - } - - public void setUseOracleImplicitCache(boolean useOracleImplicitCache) { - if (this.useOracleImplicitCache != useOracleImplicitCache) { - this.useOracleImplicitCache = useOracleImplicitCache; - boolean isOracleDriver10 = this.isOracle() && this.driver != null && this.driver.getMajorVersion() == 10; - if (isOracleDriver10 && useOracleImplicitCache) { - this.getConnectProperties().setProperty("oracle.jdbc.FreeMemoryOnEnterImplicitCache", "true"); - } else { - this.getConnectProperties().remove("oracle.jdbc.FreeMemoryOnEnterImplicitCache"); - } - } - - } - - public Throwable getLastCreateError() { - return this.lastCreateError; - } - - public Throwable getLastError() { - return this.lastError; - } - - public long getLastErrorTimeMillis() { - return this.lastErrorTimeMillis; - } - - public Date getLastErrorTime() { - return this.lastErrorTimeMillis <= 0L ? null : new Date(this.lastErrorTimeMillis); - } - - public long getLastCreateErrorTimeMillis() { - return this.lastCreateErrorTimeMillis; - } - - public Date getLastCreateErrorTime() { - return this.lastCreateErrorTimeMillis <= 0L ? null : new Date(this.lastCreateErrorTimeMillis); - } - - public int getTransactionQueryTimeout() { - return this.transactionQueryTimeout <= 0 ? this.queryTimeout : this.transactionQueryTimeout; - } - - public void setTransactionQueryTimeout(int transactionQueryTimeout) { - this.transactionQueryTimeout = transactionQueryTimeout; - } - - public long getExecuteCount() { - return this.executeCount + this.executeQueryCount + this.executeUpdateCount + this.executeBatchCount; - } - - public long getExecuteUpdateCount() { - return this.executeUpdateCount; - } - - public long getExecuteQueryCount() { - return this.executeQueryCount; - } - - public long getExecuteBatchCount() { - return this.executeBatchCount; - } - - public long getAndResetExecuteCount() { - return executeCountUpdater.getAndSet(this, 0L) + executeQueryCountUpdater.getAndSet(this, 0L) + executeUpdateCountUpdater.getAndSet(this, 0L) + executeBatchCountUpdater.getAndSet(this, 0L); - } - - public long getExecuteCount2() { - return this.executeCount; - } - - public void incrementExecuteCount() { - executeCountUpdater.incrementAndGet(this); - } - - public void incrementExecuteUpdateCount() { - ++this.executeUpdateCount; - } - - public void incrementExecuteQueryCount() { - ++this.executeQueryCount; - } - - public void incrementExecuteBatchCount() { - ++this.executeBatchCount; - } - - public boolean isDupCloseLogEnable() { - return this.dupCloseLogEnable; - } - - public void setDupCloseLogEnable(boolean dupCloseLogEnable) { - this.dupCloseLogEnable = dupCloseLogEnable; - } - - public ObjectName getObjectName() { - return this.objectName; - } - - public void setObjectName(ObjectName objectName) { - this.objectName = objectName; - } - - public Histogram getTransactionHistogram() { - return this.transactionHistogram; - } - - public void incrementCachedPreparedStatementCount() { - cachedPreparedStatementCountUpdater.incrementAndGet(this); - } - - public void decrementCachedPreparedStatementCount() { - cachedPreparedStatementCountUpdater.decrementAndGet(this); - } - - public void incrementCachedPreparedStatementDeleteCount() { - cachedPreparedStatementDeleteCountUpdater.incrementAndGet(this); - } - - public void incrementCachedPreparedStatementMissCount() { - cachedPreparedStatementMissCountUpdater.incrementAndGet(this); - } - - public long getCachedPreparedStatementMissCount() { - return this.cachedPreparedStatementMissCount; - } - - public long getCachedPreparedStatementAccessCount() { - return this.cachedPreparedStatementMissCount + this.cachedPreparedStatementHitCount; - } - - public long getCachedPreparedStatementDeleteCount() { - return this.cachedPreparedStatementDeleteCount; - } - - public long getCachedPreparedStatementCount() { - return this.cachedPreparedStatementCount; - } - - public void incrementClosedPreparedStatementCount() { - closedPreparedStatementCountUpdater.incrementAndGet(this); - } - - public long getClosedPreparedStatementCount() { - return this.closedPreparedStatementCount; - } - - public void incrementPreparedStatementCount() { - preparedStatementCountUpdater.incrementAndGet(this); - } - - public long getPreparedStatementCount() { - return this.preparedStatementCount; - } - - public void incrementCachedPreparedStatementHitCount() { - cachedPreparedStatementHitCountUpdater.incrementAndGet(this); - } - - public long getCachedPreparedStatementHitCount() { - return this.cachedPreparedStatementHitCount; - } - - public long getTransactionThresholdMillis() { - return this.transactionThresholdMillis; - } - - public void setTransactionThresholdMillis(long transactionThresholdMillis) { - this.transactionThresholdMillis = transactionThresholdMillis; - } - - public abstract void logTransaction(TransactionInfo var1); - - public long[] getTransactionHistogramValues() { - return this.transactionHistogram.toArray(); - } - - public long[] getTransactionHistogramRanges() { - return this.transactionHistogram.getRanges(); - } - - public long getCommitCount() { - return this.commitCount; - } - - public void incrementCommitCount() { - commitCountUpdater.incrementAndGet(this); - } - - public long getRollbackCount() { - return this.rollbackCount; - } - - public void incrementRollbackCount() { - rollbackCountUpdater.incrementAndGet(this); - } - - public long getStartTransactionCount() { - return this.startTransactionCount; - } - - public void incrementStartTransactionCount() { - startTransactionCountUpdater.incrementAndGet(this); - } - - public boolean isBreakAfterAcquireFailure() { - return this.breakAfterAcquireFailure; - } - - public void setBreakAfterAcquireFailure(boolean breakAfterAcquireFailure) { - this.breakAfterAcquireFailure = breakAfterAcquireFailure; - } - - public int getConnectionErrorRetryAttempts() { - return this.connectionErrorRetryAttempts; - } - - public void setConnectionErrorRetryAttempts(int connectionErrorRetryAttempts) { - this.connectionErrorRetryAttempts = connectionErrorRetryAttempts; - } - - public long getDupCloseCount() { - return this.dupCloseCount; - } - - public int getMaxPoolPreparedStatementPerConnectionSize() { - return this.maxPoolPreparedStatementPerConnectionSize; - } - - public void setMaxPoolPreparedStatementPerConnectionSize(int maxPoolPreparedStatementPerConnectionSize) { - if (maxPoolPreparedStatementPerConnectionSize > 0) { - this.poolPreparedStatements = true; - } else { - this.poolPreparedStatements = false; - } - - this.maxPoolPreparedStatementPerConnectionSize = maxPoolPreparedStatementPerConnectionSize; - } - - public boolean isSharePreparedStatements() { - return this.sharePreparedStatements; - } - - public void setSharePreparedStatements(boolean sharePreparedStatements) { - this.sharePreparedStatements = sharePreparedStatements; - } - - public void incrementDupCloseCount() { - dupCloseCountUpdater.incrementAndGet(this); - } - - public ValidConnectionChecker getValidConnectionChecker() { - return this.validConnectionChecker; - } - - public void setValidConnectionChecker(ValidConnectionChecker validConnectionChecker) { - this.validConnectionChecker = validConnectionChecker; - } - - public String getValidConnectionCheckerClassName() { - return this.validConnectionChecker == null ? null : this.validConnectionChecker.getClass().getName(); - } - - public void setValidConnectionCheckerClassName(String validConnectionCheckerClass) throws Exception { - Class clazz = Utils.loadClass(validConnectionCheckerClass); - ValidConnectionChecker validConnectionChecker = null; - if (clazz != null) { - validConnectionChecker = (ValidConnectionChecker)clazz.newInstance(); - this.validConnectionChecker = validConnectionChecker; - } else { - LOG.error("load validConnectionCheckerClass error : " + validConnectionCheckerClass); - } - - } - - public String getDbType() { - return this.dbType; - } - - public void setDbType(String dbType) { - this.dbType = dbType; - } - - public void addConnectionProperty(String name, String value) { - if (!StringUtils.equals(this.connectProperties.getProperty(name), value)) { - if (this.inited) { - throw new UnsupportedOperationException(); - } else { - this.connectProperties.put(name, value); - } - } - } - - public Collection getConnectionInitSqls() { - Collection result = this.connectionInitSqls; - return result == null ? Collections.emptyList() : result; - } - - public void setConnectionInitSqls(Collection connectionInitSqls) { - if (connectionInitSqls != null && connectionInitSqls.size() > 0) { - ArrayList newVal = null; - Iterator var3 = connectionInitSqls.iterator(); - - while(var3.hasNext()) { - Object o = var3.next(); - if (o != null) { - String s = o.toString(); - s = s.trim(); - if (s.length() != 0) { - if (newVal == null) { - newVal = new ArrayList(); - } - - newVal.add(s); - } - } - } - - this.connectionInitSqls = newVal; - } else { - this.connectionInitSqls = null; - } - - } - - public long getTimeBetweenConnectErrorMillis() { - return this.timeBetweenConnectErrorMillis; - } - - public void setTimeBetweenConnectErrorMillis(long timeBetweenConnectErrorMillis) { - this.timeBetweenConnectErrorMillis = timeBetweenConnectErrorMillis; - } - - public int getMaxOpenPreparedStatements() { - return this.maxPoolPreparedStatementPerConnectionSize; - } - - public void setMaxOpenPreparedStatements(int maxOpenPreparedStatements) { - this.setMaxPoolPreparedStatementPerConnectionSize(maxOpenPreparedStatements); - } - - public boolean isLogAbandoned() { - return this.logAbandoned; - } - - public void setLogAbandoned(boolean logAbandoned) { - this.logAbandoned = logAbandoned; - } - - public int getRemoveAbandonedTimeout() { - return (int)(this.removeAbandonedTimeoutMillis / 1000L); - } - - public void setRemoveAbandonedTimeout(int removeAbandonedTimeout) { - this.removeAbandonedTimeoutMillis = (long)removeAbandonedTimeout * 1000L; - } - - public void setRemoveAbandonedTimeoutMillis(long removeAbandonedTimeoutMillis) { - this.removeAbandonedTimeoutMillis = removeAbandonedTimeoutMillis; - } - - public long getRemoveAbandonedTimeoutMillis() { - return this.removeAbandonedTimeoutMillis; - } - - public boolean isRemoveAbandoned() { - return this.removeAbandoned; - } - - public void setRemoveAbandoned(boolean removeAbandoned) { - this.removeAbandoned = removeAbandoned; - } - - public long getMinEvictableIdleTimeMillis() { - return this.minEvictableIdleTimeMillis; - } - - public void setMinEvictableIdleTimeMillis(long minEvictableIdleTimeMillis) { - if (minEvictableIdleTimeMillis < 30000L) { - LOG.error("minEvictableIdleTimeMillis should be greater than 30000"); - } - - this.minEvictableIdleTimeMillis = minEvictableIdleTimeMillis; - } - - public long getKeepAliveBetweenTimeMillis() { - return this.keepAliveBetweenTimeMillis; - } - - public void setKeepAliveBetweenTimeMillis(long keepAliveBetweenTimeMillis) { - if (keepAliveBetweenTimeMillis < 30000L) { - LOG.error("keepAliveBetweenTimeMillis should be greater than 30000"); - } - - this.keepAliveBetweenTimeMillis = keepAliveBetweenTimeMillis; - } - - public long getMaxEvictableIdleTimeMillis() { - return this.maxEvictableIdleTimeMillis; - } - - public void setMaxEvictableIdleTimeMillis(long maxEvictableIdleTimeMillis) { - if (maxEvictableIdleTimeMillis < 30000L) { - LOG.error("maxEvictableIdleTimeMillis should be greater than 30000"); - } - - if (maxEvictableIdleTimeMillis < this.minEvictableIdleTimeMillis) { - throw new IllegalArgumentException("maxEvictableIdleTimeMillis must be grater than minEvictableIdleTimeMillis"); - } else { - this.maxEvictableIdleTimeMillis = maxEvictableIdleTimeMillis; - } - } - - public long getPhyTimeoutMillis() { - return this.phyTimeoutMillis; - } - - public void setPhyTimeoutMillis(long phyTimeoutMillis) { - this.phyTimeoutMillis = phyTimeoutMillis; - } - - public long getPhyMaxUseCount() { - return this.phyMaxUseCount; - } - - public void setPhyMaxUseCount(long phyMaxUseCount) { - this.phyMaxUseCount = phyMaxUseCount; - } - - public int getNumTestsPerEvictionRun() { - return this.numTestsPerEvictionRun; - } - - /** @deprecated */ - @Deprecated - public void setNumTestsPerEvictionRun(int numTestsPerEvictionRun) { - this.numTestsPerEvictionRun = numTestsPerEvictionRun; - } - - public long getTimeBetweenEvictionRunsMillis() { - return this.timeBetweenEvictionRunsMillis; - } - - public void setTimeBetweenEvictionRunsMillis(long timeBetweenEvictionRunsMillis) { - this.timeBetweenEvictionRunsMillis = timeBetweenEvictionRunsMillis; - } - - public int getMaxWaitThreadCount() { - return this.maxWaitThreadCount; - } - - public void setMaxWaitThreadCount(int maxWaithThreadCount) { - this.maxWaitThreadCount = maxWaithThreadCount; - } - - public String getValidationQuery() { - return this.validationQuery; - } - - public void setValidationQuery(String validationQuery) { - this.validationQuery = validationQuery; - } - - public int getValidationQueryTimeout() { - return this.validationQueryTimeout; - } - - public void setValidationQueryTimeout(int validationQueryTimeout) { - if (validationQueryTimeout < 0 && "sqlserver".equals(this.dbType)) { - LOG.error("validationQueryTimeout should be >= 0"); - } - - this.validationQueryTimeout = validationQueryTimeout; - } - - public boolean isAccessToUnderlyingConnectionAllowed() { - return this.accessToUnderlyingConnectionAllowed; - } - - public void setAccessToUnderlyingConnectionAllowed(boolean accessToUnderlyingConnectionAllowed) { - this.accessToUnderlyingConnectionAllowed = accessToUnderlyingConnectionAllowed; - } - - public boolean isTestOnBorrow() { - return this.testOnBorrow; - } - - public void setTestOnBorrow(boolean testOnBorrow) { - this.testOnBorrow = testOnBorrow; - } - - public boolean isTestOnReturn() { - return this.testOnReturn; - } - - public void setTestOnReturn(boolean testOnReturn) { - this.testOnReturn = testOnReturn; - } - - public boolean isTestWhileIdle() { - return this.testWhileIdle; - } - - public void setTestWhileIdle(boolean testWhileIdle) { - this.testWhileIdle = testWhileIdle; - } - - public boolean isDefaultAutoCommit() { - return this.defaultAutoCommit; - } - - public void setDefaultAutoCommit(boolean defaultAutoCommit) { - this.defaultAutoCommit = defaultAutoCommit; - } - - public Boolean getDefaultReadOnly() { - return this.defaultReadOnly; - } - - public void setDefaultReadOnly(Boolean defaultReadOnly) { - this.defaultReadOnly = defaultReadOnly; - } - - public Integer getDefaultTransactionIsolation() { - return this.defaultTransactionIsolation; - } - - public void setDefaultTransactionIsolation(Integer defaultTransactionIsolation) { - this.defaultTransactionIsolation = defaultTransactionIsolation; - } - - public String getDefaultCatalog() { - return this.defaultCatalog; - } - - public void setDefaultCatalog(String defaultCatalog) { - this.defaultCatalog = defaultCatalog; - } - - public PasswordCallback getPasswordCallback() { - return this.passwordCallback; - } - - public void setPasswordCallback(PasswordCallback passwordCallback) { - this.passwordCallback = passwordCallback; - } - - public void setPasswordCallbackClassName(String passwordCallbackClassName) throws Exception { - Class clazz = Utils.loadClass(passwordCallbackClassName); - if (clazz != null) { - this.passwordCallback = (PasswordCallback)clazz.newInstance(); - } else { - LOG.error("load passwordCallback error : " + passwordCallbackClassName); - this.passwordCallback = null; - } - - } - - public NameCallback getUserCallback() { - return this.userCallback; - } - - public void setUserCallback(NameCallback userCallback) { - this.userCallback = userCallback; - } - - public boolean isInitVariants() { - return this.initVariants; - } - - public void setInitVariants(boolean initVariants) { - this.initVariants = initVariants; - } - - public boolean isInitGlobalVariants() { - return this.initGlobalVariants; - } - - public void setInitGlobalVariants(boolean initGlobalVariants) { - this.initGlobalVariants = initGlobalVariants; - } - - public int getQueryTimeout() { - return this.queryTimeout; - } - - public void setQueryTimeout(int seconds) { - this.queryTimeout = seconds; - } - - public String getName() { - return this.name != null ? this.name : "DataSource-" + System.identityHashCode(this); - } - - public void setName(String name) { - this.name = name; - } - - public boolean isPoolPreparedStatements() { - return this.poolPreparedStatements; - } - - public abstract void setPoolPreparedStatements(boolean var1); - - public long getMaxWait() { - return this.maxWait; - } - - public void setMaxWait(long maxWaitMillis) { - if (maxWaitMillis != this.maxWait) { - if (maxWaitMillis > 0L && this.useUnfairLock == null && !this.inited) { - ReentrantLock lock = this.lock; - lock.lock(); - - try { - if (!this.inited && !lock.isFair()) { - this.lock = new ReentrantLock(true); - this.notEmpty = this.lock.newCondition(); - this.empty = this.lock.newCondition(); - } - } finally { - lock.unlock(); - } - } - - if (this.inited) { - LOG.error("maxWait changed : " + this.maxWait + " -> " + maxWaitMillis); - } - - this.maxWait = maxWaitMillis; - } - } - - public int getNotFullTimeoutRetryCount() { - return this.notFullTimeoutRetryCount; - } - - public void setNotFullTimeoutRetryCount(int notFullTimeoutRetryCount) { - this.notFullTimeoutRetryCount = notFullTimeoutRetryCount; - } - - public int getMinIdle() { - return this.minIdle; - } - - public void setMinIdle(int value) { - if (value != this.minIdle) { - if (this.inited && value > this.maxActive) { - throw new IllegalArgumentException("minIdle greater than maxActive, " + this.maxActive + " < " + this.minIdle); - } else if (this.minIdle < 0) { - throw new IllegalArgumentException("minIdle must > 0"); - } else { - this.minIdle = value; - } - } - } - - public int getMaxIdle() { - return this.maxIdle; - } - - /** @deprecated */ - @Deprecated - public void setMaxIdle(int maxIdle) { - LOG.error("maxIdle is deprecated"); - this.maxIdle = maxIdle; - } - - public int getInitialSize() { - return this.initialSize; - } - - public void setInitialSize(int initialSize) { - if (this.initialSize != initialSize) { - if (this.inited) { - throw new UnsupportedOperationException(); - } else { - this.initialSize = initialSize; - } - } - } - - public long getCreateErrorCount() { - return (long)this.createErrorCount; - } - - public int getMaxActive() { - return this.maxActive; - } - - public abstract void setMaxActive(int var1); - - public String getUsername() { - return this.username; - } - - public void setUsername(String username) { - if (!StringUtils.equals(this.username, username)) { -// if (this.inited) { -// throw new UnsupportedOperationException(); -// } else { - this.username = username; -// } - } - } - - public String getPassword() { - return this.password; - } - - public void setPassword(String password) { - if (!StringUtils.equals(this.password, password)) { - if (this.inited) { - LOG.info("password changed"); - } - - this.password = password; - } - } - - public Properties getConnectProperties() { - return this.connectProperties; - } - - public abstract void setConnectProperties(Properties var1); - - public void setConnectionProperties(String connectionProperties) { - if (connectionProperties != null && connectionProperties.trim().length() != 0) { - String[] entries = connectionProperties.split(";"); - Properties properties = new Properties(); - - for(int i = 0; i < entries.length; ++i) { - String entry = entries[i]; - if (entry.length() > 0) { - int index = entry.indexOf(61); - if (index > 0) { - String name = entry.substring(0, index); - String value = entry.substring(index + 1); - properties.setProperty(name, value); - } else { - properties.setProperty(entry, ""); - } - } - } - - this.setConnectProperties(properties); - } else { - this.setConnectProperties((Properties)null); - } - } - - public String getUrl() { - return this.jdbcUrl; - } - - public String getRawJdbcUrl() { - return this.jdbcUrl; - } - - public void setUrl(String jdbcUrl) { - if (!StringUtils.equals(this.jdbcUrl, jdbcUrl)) { -// if (this.inited) { -// throw new UnsupportedOperationException(); -// } else { - if (jdbcUrl != null) { - jdbcUrl = jdbcUrl.trim(); - } - - this.jdbcUrl = jdbcUrl; -// } - } - } - - public String getDriverClassName() { - return this.driverClass; - } - - public void setDriverClassName(String driverClass) { - if (driverClass != null && driverClass.length() > 256) { - throw new IllegalArgumentException("driverClassName length > 256."); - } else { - if ("oracle.jdbc.driver.OracleDriver".equalsIgnoreCase(driverClass)) { - driverClass = "oracle.jdbc.OracleDriver"; - LOG.warn("oracle.jdbc.driver.OracleDriver is deprecated.Having use oracle.jdbc.OracleDriver."); - } - - if (this.inited) { - if (!StringUtils.equals(this.driverClass, driverClass)) { - throw new UnsupportedOperationException(); - } - } else { - this.driverClass = driverClass; - } - } - } - - public ClassLoader getDriverClassLoader() { - return this.driverClassLoader; - } - - public void setDriverClassLoader(ClassLoader driverClassLoader) { - this.driverClassLoader = driverClassLoader; - } - - public PrintWriter getLogWriter() { - return this.logWriter; - } - - public void setLogWriter(PrintWriter out) throws SQLException { - this.logWriter = out; - } - - public void setLoginTimeout(int seconds) { - DriverManager.setLoginTimeout(seconds); - } - - public int getLoginTimeout() { - return DriverManager.getLoginTimeout(); - } - - public Driver getDriver() { - return this.driver; - } - - public void setDriver(Driver driver) { - this.driver = driver; - } - - public int getDriverMajorVersion() { - return this.driver == null ? -1 : this.driver.getMajorVersion(); - } - - public int getDriverMinorVersion() { - return this.driver == null ? -1 : this.driver.getMinorVersion(); - } - - public ExceptionSorter getExceptionSorter() { - return this.exceptionSorter; - } - - public String getExceptionSorterClassName() { - return this.exceptionSorter == null ? null : this.exceptionSorter.getClass().getName(); - } - - public void setExceptionSorter(ExceptionSorter exceptionSoter) { - this.exceptionSorter = exceptionSoter; - } - - public void setExceptionSorterClassName(String exceptionSorter) throws Exception { - this.setExceptionSorter(exceptionSorter); - } - - public void setExceptionSorter(String exceptionSorter) throws SQLException { - if (exceptionSorter == null) { - this.exceptionSorter = NullExceptionSorter.getInstance(); - } else { - exceptionSorter = exceptionSorter.trim(); - if (exceptionSorter.length() == 0) { - this.exceptionSorter = NullExceptionSorter.getInstance(); - } else { - Class clazz = Utils.loadClass(exceptionSorter); - if (clazz == null) { - LOG.error("load exceptionSorter error : " + exceptionSorter); - } else { - try { - this.exceptionSorter = (ExceptionSorter)clazz.newInstance(); - } catch (Exception var4) { - throw new SQLException("create exceptionSorter error", var4); - } - } - - } - } - } - - public List getProxyFilters() { - return this.filters; - } - - public void setProxyFilters(List filters) { - if (filters != null) { - this.filters.addAll(filters); - } - - } - - public String[] getFilterClasses() { - List filterConfigList = this.getProxyFilters(); - List classes = new ArrayList(); - Iterator var3 = filterConfigList.iterator(); - - while(var3.hasNext()) { - Filter filter = (Filter)var3.next(); - classes.add(filter.getClass().getName()); - } - - return (String[])classes.toArray(new String[classes.size()]); - } - - public void setFilters(String filters) throws SQLException { - if (filters != null && filters.startsWith("!")) { - filters = filters.substring(1); - this.clearFilters(); - } - - this.addFilters(filters); - } - - public void addFilters(String filters) throws SQLException { - if (filters != null && filters.length() != 0) { - String[] filterArray = filters.split("\\,"); - String[] var3 = filterArray; - int var4 = filterArray.length; - - for(int var5 = 0; var5 < var4; ++var5) { - String item = var3[var5]; - FilterManager.loadFilter(this.filters, item.trim()); - } - - } - } - - public void clearFilters() { - if (this.isClearFiltersEnable()) { - this.filters.clear(); - } - } - - public void validateConnection(Connection conn) throws SQLException { - String query = this.getValidationQuery(); - if (conn.isClosed()) { - throw new SQLException("validateConnection: connection closed"); - } else if (this.validConnectionChecker != null) { - boolean result = true; - Exception error = null; - - try { - result = this.validConnectionChecker.isValidConnection(conn, this.validationQuery, this.validationQueryTimeout); - if (result && this.onFatalError) { - this.lock.lock(); - - try { - if (this.onFatalError) { - this.onFatalError = false; - } - } finally { - this.lock.unlock(); - } - } - } catch (SQLException var24) { - throw var24; - } catch (Exception var25) { - error = var25; - } - - if (!result) { - SQLException sqlError = error != null ? new SQLException("validateConnection false", error) : new SQLException("validateConnection false"); - throw sqlError; - } - } else { - if (null != query) { - Statement stmt = null; - ResultSet rs = null; - - try { - stmt = conn.createStatement(); - if (this.getValidationQueryTimeout() > 0) { - stmt.setQueryTimeout(this.getValidationQueryTimeout()); - } - - rs = stmt.executeQuery(query); - if (!rs.next()) { - throw new SQLException("validationQuery didn't return a row"); - } - - if (this.onFatalError) { - this.lock.lock(); - - try { - if (this.onFatalError) { - this.onFatalError = false; - } - } finally { - this.lock.unlock(); - } - } - } finally { - JdbcUtils.close(rs); - JdbcUtils.close(stmt); - } - } - - } - } - - /** @deprecated */ - protected boolean testConnectionInternal(Connection conn) { - return this.testConnectionInternal((DruidConnectionHolder)null, conn); - } - - protected boolean testConnectionInternal(DruidConnectionHolder holder, Connection conn) { - String sqlFile = JdbcSqlStat.getContextSqlFile(); - String sqlName = JdbcSqlStat.getContextSqlName(); - if (sqlFile != null) { - JdbcSqlStat.setContextSqlFile((String)null); - } - - if (sqlName != null) { - JdbcSqlStat.setContextSqlName((String)null); - } - - try { - boolean valid; - if (this.validConnectionChecker == null) { - if (conn.isClosed()) { - valid = false; - return valid; - } else if (null == this.validationQuery) { - valid = true; - return valid; - } else { - Statement stmt = null; - ResultSet rset = null; - - boolean var7; - try { - stmt = conn.createStatement(); - if (this.getValidationQueryTimeout() > 0) { - stmt.setQueryTimeout(this.validationQueryTimeout); - } - - rset = stmt.executeQuery(this.validationQuery); - if (!rset.next()) { - var7 = false; - return var7; - } - } finally { - JdbcUtils.close(rset); - JdbcUtils.close(stmt); - } - - if (this.onFatalError) { - this.lock.lock(); - - try { - if (this.onFatalError) { - this.onFatalError = false; - } - } finally { - this.lock.unlock(); - } - } - - var7 = true; - return var7; - } - } else { - valid = this.validConnectionChecker.isValidConnection(conn, this.validationQuery, this.validationQueryTimeout); - long currentTimeMillis = System.currentTimeMillis(); - if (holder != null) { - holder.lastValidTimeMillis = currentTimeMillis; - } - - if (valid && this.isMySql) { - long lastPacketReceivedTimeMs = MySqlUtils.getLastPacketReceivedTimeMs(conn); - if (lastPacketReceivedTimeMs > 0L) { - long mysqlIdleMillis = currentTimeMillis - lastPacketReceivedTimeMs; - if (lastPacketReceivedTimeMs > 0L && mysqlIdleMillis >= this.timeBetweenEvictionRunsMillis) { - this.discardConnection(conn); - String errorMsg = "discard long time none received connection. , jdbcUrl : " + this.jdbcUrl + ", jdbcUrl : " + this.jdbcUrl + ", lastPacketReceivedIdleMillis : " + mysqlIdleMillis; - LOG.error(errorMsg); - boolean var13 = false; - return var13; - } - } - } - - if (valid && this.onFatalError) { - this.lock.lock(); - - try { - if (this.onFatalError) { - this.onFatalError = false; - } - } finally { - this.lock.unlock(); - } - } - - boolean var46 = valid; - return var46; - } - } catch (Throwable var41) { - boolean var6 = false; - return var6; - } finally { - if (sqlFile != null) { - JdbcSqlStat.setContextSqlFile(sqlFile); - } - - if (sqlName != null) { - JdbcSqlStat.setContextSqlName(sqlName); - } - - } - } - - public Set getActiveConnections() { - this.activeConnectionLock.lock(); - - HashSet var1; - try { - var1 = new HashSet(this.activeConnections.keySet()); - } finally { - this.activeConnectionLock.unlock(); - } - - return var1; - } - - public List getActiveConnectionStackTrace() { - List list = new ArrayList(); - Iterator var2 = this.getActiveConnections().iterator(); - - while(var2.hasNext()) { - DruidPooledConnection conn = (DruidPooledConnection)var2.next(); - list.add(Utils.toString(conn.getConnectStackTrace())); - } - - return list; - } - - public long getCreateTimespanNano() { - return this.createTimespan; - } - - public long getCreateTimespanMillis() { - return this.createTimespan / 1000000L; - } - - public Driver getRawDriver() { - return this.driver; - } - - public boolean isClearFiltersEnable() { - return this.clearFiltersEnable; - } - - public void setClearFiltersEnable(boolean clearFiltersEnable) { - this.clearFiltersEnable = clearFiltersEnable; - } - - public long createConnectionId() { - return connectionIdSeedUpdater.incrementAndGet(this); - } - - public long createStatementId() { - return statementIdSeedUpdater.getAndIncrement(this); - } - - public long createMetaDataId() { - return metaDataIdSeedUpdater.getAndIncrement(this); - } - - public long createResultSetId() { - return resultSetIdSeedUpdater.getAndIncrement(this); - } - - public long createTransactionId() { - return transactionIdSeedUpdater.getAndIncrement(this); - } - - void initStatement(DruidPooledConnection conn, Statement stmt) throws SQLException { - boolean transaction = !conn.getConnectionHolder().underlyingAutoCommit; - int queryTimeout = transaction ? this.getTransactionQueryTimeout() : this.getQueryTimeout(); - if (queryTimeout > 0) { - stmt.setQueryTimeout(queryTimeout); - } - - } - - public void handleConnectionException(DruidPooledConnection conn, Throwable t) throws SQLException { - this.handleConnectionException(conn, t, (String)null); - } - - public abstract void handleConnectionException(DruidPooledConnection var1, Throwable var2, String var3) throws SQLException; - - protected abstract void recycle(DruidPooledConnection var1) throws SQLException; - - public Connection createPhysicalConnection(String url, Properties info) throws SQLException { - Object conn; - if (this.getProxyFilters().size() == 0) { - conn = this.getDriver().connect(url, info); - } else { - conn = (new FilterChainImpl(this)).connection_connect(info); - } - - createCountUpdater.incrementAndGet(this); - return (Connection)conn; - } - - public DruidAbstractDataSource.PhysicalConnectionInfo createPhysicalConnection() throws SQLException { - String url = this.getUrl(); - Properties connectProperties = this.getConnectProperties(); - String user; - if (this.getUserCallback() != null) { - user = this.getUserCallback().getName(); - } else { - user = this.getUsername(); - } - - String password = this.getPassword(); - PasswordCallback passwordCallback = this.getPasswordCallback(); - if (passwordCallback != null) { - if (passwordCallback instanceof DruidPasswordCallback) { - DruidPasswordCallback druidPasswordCallback = (DruidPasswordCallback)passwordCallback; - druidPasswordCallback.setUrl(url); - druidPasswordCallback.setProperties(connectProperties); - } - - char[] chars = passwordCallback.getPassword(); - if (chars != null) { - password = new String(chars); - } - } - - Properties physicalConnectProperties = new Properties(); - if (connectProperties != null) { - physicalConnectProperties.putAll(connectProperties); - } - - if (user != null && user.length() != 0) { - physicalConnectProperties.put("user", user); - } - - if (password != null && password.length() != 0) { - physicalConnectProperties.put("password", password); - } - - Connection conn = null; - long connectStartNanos = System.nanoTime(); - Map variables = this.initVariants ? new HashMap() : null; - Map globalVariables = this.initGlobalVariants ? new HashMap() : null; - createStartNanosUpdater.set(this, connectStartNanos); - creatingCountUpdater.incrementAndGet(this); - boolean var27 = false; - - long connectedNanos; - long initedNanos; - long validatedNanos; - try { - var27 = true; - conn = this.createPhysicalConnection(url, physicalConnectProperties); - connectedNanos = System.nanoTime(); - if (conn == null) { - throw new SQLException("connect error, url " + url + ", driverClass " + this.driverClass); - } - - this.initPhysicalConnection(conn, variables, globalVariables); - initedNanos = System.nanoTime(); - this.validateConnection(conn); - validatedNanos = System.nanoTime(); - this.setFailContinuous(false); - this.setCreateError((Throwable)null); - var27 = false; - } catch (SQLException var28) { - this.setCreateError(var28); - JdbcUtils.close(conn); - throw var28; - } catch (RuntimeException var29) { - this.setCreateError(var29); - JdbcUtils.close(conn); - throw var29; - } catch (Error var30) { - createErrorCountUpdater.incrementAndGet(this); - this.setCreateError(var30); - JdbcUtils.close(conn); - throw var30; - } finally { - if (var27) { - long nano = System.nanoTime() - connectStartNanos; - this.createTimespan += nano; - creatingCountUpdater.decrementAndGet(this); - } - } - - long nano = System.nanoTime() - connectStartNanos; - this.createTimespan += nano; - creatingCountUpdater.decrementAndGet(this); - return new DruidAbstractDataSource.PhysicalConnectionInfo(conn, connectStartNanos, connectedNanos, initedNanos, validatedNanos, variables, globalVariables); - } - - protected void setCreateError(Throwable ex) { - if (ex == null) { - this.lock.lock(); - - try { - if (this.createError != null) { - this.createError = null; - } - } finally { - this.lock.unlock(); - } - - } else { - createErrorCountUpdater.incrementAndGet(this); - long now = System.currentTimeMillis(); - this.lock.lock(); - - try { - this.createError = ex; - this.lastCreateError = ex; - this.lastCreateErrorTimeMillis = now; - } finally { - this.lock.unlock(); - } - - } - } - - public boolean isFailContinuous() { - return failContinuousUpdater.get(this) == 1; - } - - protected void setFailContinuous(boolean fail) { - if (fail) { - failContinuousTimeMillisUpdater.set(this, System.currentTimeMillis()); - } else { - failContinuousTimeMillisUpdater.set(this, 0L); - } - - boolean currentState = failContinuousUpdater.get(this) == 1; - if (currentState != fail) { - if (fail) { - failContinuousUpdater.set(this, 1); - if (LOG.isInfoEnabled()) { - LOG.info("{dataSource-" + this.getID() + "} failContinuous is true"); - } - } else { - failContinuousUpdater.set(this, 0); - if (LOG.isInfoEnabled()) { - LOG.info("{dataSource-" + this.getID() + "} failContinuous is false"); - } - } - - } - } - - public void initPhysicalConnection(Connection conn) throws SQLException { - this.initPhysicalConnection(conn, (Map)null, (Map)null); - } - - public void initPhysicalConnection(Connection conn, Map variables, Map globalVariables) throws SQLException { - if (conn.getAutoCommit() != this.defaultAutoCommit) { - conn.setAutoCommit(this.defaultAutoCommit); - } - - if (this.defaultReadOnly != null && conn.isReadOnly() != this.defaultReadOnly) { - conn.setReadOnly(this.defaultReadOnly); - } - - if (this.getDefaultTransactionIsolation() != null && conn.getTransactionIsolation() != this.getDefaultTransactionIsolation()) { - conn.setTransactionIsolation(this.getDefaultTransactionIsolation()); - } - - if (this.getDefaultCatalog() != null && this.getDefaultCatalog().length() != 0) { - conn.setCatalog(this.getDefaultCatalog()); - } - - Collection initSqls = this.getConnectionInitSqls(); - if (initSqls.size() != 0 || variables != null || globalVariables != null) { - Statement stmt = null; - - try { - stmt = conn.createStatement(); - Iterator var6 = initSqls.iterator(); - - String name; - while(var6.hasNext()) { - name = (String)var6.next(); - if (name != null) { - stmt.execute(name); - } - } - - if ("mysql".equals(this.dbType) || "aliyun_ads".equals(this.dbType)) { - ResultSet rs; - Object value; - if (variables != null) { - rs = null; - - try { - rs = stmt.executeQuery("show variables"); - - while(rs.next()) { - name = rs.getString(1); - value = rs.getObject(2); - variables.put(name, value); - } - } finally { - JdbcUtils.close(rs); - } - } - - if (globalVariables != null) { - rs = null; - - try { - rs = stmt.executeQuery("show global variables"); - - while(rs.next()) { - name = rs.getString(1); - value = rs.getObject(2); - globalVariables.put(name, value); - } - } finally { - JdbcUtils.close(rs); - } - } - } - } finally { - JdbcUtils.close(stmt); - } - - } - } - - public abstract int getActivePeak(); - - public CompositeDataSupport getCompositeData() throws JMException { - JdbcDataSourceStat stat = this.getDataSourceStat(); - Map map = new HashMap(); - map.put("ID", this.getID()); - map.put("URL", this.getUrl()); - map.put("Name", this.getName()); - map.put("FilterClasses", this.getFilterClasses()); - map.put("CreatedTime", this.getCreatedTime()); - map.put("RawDriverClassName", this.getDriverClassName()); - map.put("RawUrl", this.getUrl()); - map.put("RawDriverMajorVersion", this.getRawDriverMajorVersion()); - map.put("RawDriverMinorVersion", this.getRawDriverMinorVersion()); - map.put("Properties", this.getProperties()); - map.put("ConnectionActiveCount", (long)this.getActiveCount()); - map.put("ConnectionActiveCountMax", this.getActivePeak()); - map.put("ConnectionCloseCount", this.getCloseCount()); - map.put("ConnectionCommitCount", this.getCommitCount()); - map.put("ConnectionRollbackCount", this.getRollbackCount()); - map.put("ConnectionConnectLastTime", stat.getConnectionStat().getConnectLastTime()); - map.put("ConnectionConnectErrorCount", this.getCreateCount()); - if (this.createError != null) { - map.put("ConnectionConnectErrorLastTime", this.getLastCreateErrorTime()); - map.put("ConnectionConnectErrorLastMessage", this.createError.getMessage()); - map.put("ConnectionConnectErrorLastStackTrace", Utils.getStackTrace(this.createError)); - } else { - map.put("ConnectionConnectErrorLastTime", (Object)null); - map.put("ConnectionConnectErrorLastMessage", (Object)null); - map.put("ConnectionConnectErrorLastStackTrace", (Object)null); - } - - map.put("StatementCreateCount", stat.getStatementStat().getCreateCount()); - map.put("StatementPrepareCount", stat.getStatementStat().getPrepareCount()); - map.put("StatementPreCallCount", stat.getStatementStat().getPrepareCallCount()); - map.put("StatementExecuteCount", stat.getStatementStat().getExecuteCount()); - map.put("StatementRunningCount", stat.getStatementStat().getRunningCount()); - map.put("StatementConcurrentMax", stat.getStatementStat().getConcurrentMax()); - map.put("StatementCloseCount", stat.getStatementStat().getCloseCount()); - map.put("StatementErrorCount", stat.getStatementStat().getErrorCount()); - map.put("StatementLastErrorTime", (Object)null); - map.put("StatementLastErrorMessage", (Object)null); - map.put("StatementLastErrorStackTrace", (Object)null); - map.put("StatementExecuteMillisTotal", stat.getStatementStat().getMillisTotal()); - map.put("StatementExecuteLastTime", stat.getStatementStat().getExecuteLastTime()); - map.put("ConnectionConnectingCount", stat.getConnectionStat().getConnectingCount()); - map.put("ResultSetCloseCount", stat.getResultSetStat().getCloseCount()); - map.put("ResultSetOpenCount", stat.getResultSetStat().getOpenCount()); - map.put("ResultSetOpenningCount", stat.getResultSetStat().getOpeningCount()); - map.put("ResultSetOpenningMax", stat.getResultSetStat().getOpeningMax()); - map.put("ResultSetFetchRowCount", stat.getResultSetStat().getFetchRowCount()); - map.put("ResultSetLastOpenTime", stat.getResultSetStat().getLastOpenTime()); - map.put("ResultSetErrorCount", stat.getResultSetStat().getErrorCount()); - map.put("ResultSetOpenningMillisTotal", stat.getResultSetStat().getAliveMillisTotal()); - map.put("ResultSetLastErrorTime", stat.getResultSetStat().getLastErrorTime()); - map.put("ResultSetLastErrorMessage", (Object)null); - map.put("ResultSetLastErrorStackTrace", (Object)null); - map.put("ConnectionConnectCount", this.getConnectCount()); - if (this.createError != null) { - map.put("ConnectionErrorLastMessage", this.createError.getMessage()); - map.put("ConnectionErrorLastStackTrace", Utils.getStackTrace(this.createError)); - } else { - map.put("ConnectionErrorLastMessage", (Object)null); - map.put("ConnectionErrorLastStackTrace", (Object)null); - } - - map.put("ConnectionConnectMillisTotal", stat.getConnectionStat().getConnectMillis()); - map.put("ConnectionConnectingCountMax", stat.getConnectionStat().getConnectingMax()); - map.put("ConnectionConnectMillisMax", stat.getConnectionStat().getConnectMillisMax()); - map.put("ConnectionErrorLastTime", stat.getConnectionStat().getErrorLastTime()); - map.put("ConnectionAliveMillisMax", stat.getConnectionConnectAliveMillisMax()); - map.put("ConnectionAliveMillisMin", stat.getConnectionConnectAliveMillisMin()); - map.put("ConnectionHistogram", stat.getConnectionHistogramValues()); - map.put("StatementHistogram", stat.getStatementStat().getHistogramValues()); - return new CompositeDataSupport(JdbcStatManager.getDataSourceCompositeType(), map); - } - - public long getID() { - return this.id; - } - - public Date getCreatedTime() { - return this.createdTime; - } - - public abstract int getRawDriverMajorVersion(); - - public abstract int getRawDriverMinorVersion(); - - public abstract String getProperties(); - - public Logger getParentLogger() throws SQLFeatureNotSupportedException { - throw new SQLFeatureNotSupportedException(); - } - - public void closePreapredStatement(PreparedStatementHolder stmtHolder) { - if (stmtHolder != null) { - closedPreparedStatementCountUpdater.incrementAndGet(this); - this.decrementCachedPreparedStatementCount(); - this.incrementCachedPreparedStatementDeleteCount(); - JdbcUtils.close(stmtHolder.statement); - } - } - - protected void cloneTo(DruidAbstractDataSource to) { - to.defaultAutoCommit = this.defaultAutoCommit; - to.defaultReadOnly = this.defaultReadOnly; - to.defaultTransactionIsolation = this.defaultTransactionIsolation; - to.defaultCatalog = this.defaultCatalog; - to.name = this.name; - to.username = this.username; - to.password = this.password; - to.jdbcUrl = this.jdbcUrl; - to.driverClass = this.driverClass; - to.connectProperties = this.connectProperties; - to.passwordCallback = this.passwordCallback; - to.userCallback = this.userCallback; - to.initialSize = this.initialSize; - to.maxActive = this.maxActive; - to.minIdle = this.minIdle; - to.maxIdle = this.maxIdle; - to.maxWait = this.maxWait; - to.validationQuery = this.validationQuery; - to.validationQueryTimeout = this.validationQueryTimeout; - to.testOnBorrow = this.testOnBorrow; - to.testOnReturn = this.testOnReturn; - to.testWhileIdle = this.testWhileIdle; - to.poolPreparedStatements = this.poolPreparedStatements; - to.sharePreparedStatements = this.sharePreparedStatements; - to.maxPoolPreparedStatementPerConnectionSize = this.maxPoolPreparedStatementPerConnectionSize; - to.logWriter = this.logWriter; - if (this.filters != null) { - to.filters = new ArrayList(this.filters); - } - - to.exceptionSorter = this.exceptionSorter; - to.driver = this.driver; - to.queryTimeout = this.queryTimeout; - to.transactionQueryTimeout = this.transactionQueryTimeout; - to.accessToUnderlyingConnectionAllowed = this.accessToUnderlyingConnectionAllowed; - to.timeBetweenEvictionRunsMillis = this.timeBetweenEvictionRunsMillis; - to.numTestsPerEvictionRun = this.numTestsPerEvictionRun; - to.minEvictableIdleTimeMillis = this.minEvictableIdleTimeMillis; - to.removeAbandoned = this.removeAbandoned; - to.removeAbandonedTimeoutMillis = this.removeAbandonedTimeoutMillis; - to.logAbandoned = this.logAbandoned; - to.maxOpenPreparedStatements = this.maxOpenPreparedStatements; - if (this.connectionInitSqls != null) { - to.connectionInitSqls = new ArrayList(this.connectionInitSqls); - } - - to.dbType = this.dbType; - to.timeBetweenConnectErrorMillis = this.timeBetweenConnectErrorMillis; - to.validConnectionChecker = this.validConnectionChecker; - to.connectionErrorRetryAttempts = this.connectionErrorRetryAttempts; - to.breakAfterAcquireFailure = this.breakAfterAcquireFailure; - to.transactionThresholdMillis = this.transactionThresholdMillis; - to.dupCloseLogEnable = this.dupCloseLogEnable; - to.isOracle = this.isOracle; - to.useOracleImplicitCache = this.useOracleImplicitCache; - to.asyncCloseConnectionEnable = this.asyncCloseConnectionEnable; - to.createScheduler = this.createScheduler; - to.destroyScheduler = this.destroyScheduler; - } - - public abstract void discardConnection(Connection var1); - - public boolean isAsyncCloseConnectionEnable() { - return this.isRemoveAbandoned() ? true : this.asyncCloseConnectionEnable; - } - - public void setAsyncCloseConnectionEnable(boolean asyncCloseConnectionEnable) { - this.asyncCloseConnectionEnable = asyncCloseConnectionEnable; - } - - public ScheduledExecutorService getCreateScheduler() { - return this.createScheduler; - } - - public void setCreateScheduler(ScheduledExecutorService createScheduler) { - if (this.isInited()) { - throw new DruidRuntimeException("dataSource inited."); - } else { - this.createScheduler = createScheduler; - } - } - - public ScheduledExecutorService getDestroyScheduler() { - return this.destroyScheduler; - } - - public void setDestroyScheduler(ScheduledExecutorService destroyScheduler) { - if (this.isInited()) { - throw new DruidRuntimeException("dataSource inited."); - } else { - this.destroyScheduler = destroyScheduler; - } - } - - public boolean isInited() { - return this.inited; - } - - public int getMaxCreateTaskCount() { - return this.maxCreateTaskCount; - } - - public void setMaxCreateTaskCount(int maxCreateTaskCount) { - if (maxCreateTaskCount < 1) { - throw new IllegalArgumentException(); - } else { - this.maxCreateTaskCount = maxCreateTaskCount; - } - } - - public boolean isFailFast() { - return this.failFast; - } - - public void setFailFast(boolean failFast) { - this.failFast = failFast; - } - - public int getOnFatalErrorMaxActive() { - return this.onFatalErrorMaxActive; - } - - public void setOnFatalErrorMaxActive(int onFatalErrorMaxActive) { - this.onFatalErrorMaxActive = onFatalErrorMaxActive; - } - - public boolean isOnFatalError() { - return this.onFatalError; - } - - public boolean isInitExceptionThrow() { - return this.initExceptionThrow; - } - - public void setInitExceptionThrow(boolean initExceptionThrow) { - this.initExceptionThrow = initExceptionThrow; - } - - public static class PhysicalConnectionInfo { - private Connection connection; - private long connectStartNanos; - private long connectedNanos; - private long initedNanos; - private long validatedNanos; - private Map vairiables; - private Map globalVairiables; - long createTaskId; - - public PhysicalConnectionInfo(Connection connection, long connectStartNanos, long connectedNanos, long initedNanos, long validatedNanos) { - this(connection, connectStartNanos, connectedNanos, initedNanos, validatedNanos, (Map)null, (Map)null); - } - - public PhysicalConnectionInfo(Connection connection, long connectStartNanos, long connectedNanos, long initedNanos, long validatedNanos, Map vairiables, Map globalVairiables) { - this.connection = connection; - this.connectStartNanos = connectStartNanos; - this.connectedNanos = connectedNanos; - this.initedNanos = initedNanos; - this.validatedNanos = validatedNanos; - this.vairiables = vairiables; - this.globalVairiables = globalVairiables; - } - - public Connection getPhysicalConnection() { - return this.connection; - } - - public long getConnectStartNanos() { - return this.connectStartNanos; - } - - public long getConnectedNanos() { - return this.connectedNanos; - } - - public long getInitedNanos() { - return this.initedNanos; - } - - public long getValidatedNanos() { - return this.validatedNanos; - } - - public long getConnectNanoSpan() { - return this.connectedNanos - this.connectStartNanos; - } - - public Map getVairiables() { - return this.vairiables; - } - - public Map getGlobalVairiables() { - return this.globalVairiables; - } - } -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/DataBackupApplication.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/DataBackupApplication.java deleted file mode 100644 index 3279af5..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/DataBackupApplication.java +++ /dev/null @@ -1,26 +0,0 @@ -package top.hcode.hoj; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.cloud.client.discovery.EnableDiscoveryClient; -import org.springframework.retry.annotation.EnableRetry; -import org.springframework.scheduling.annotation.EnableAsync; -import org.springframework.scheduling.annotation.EnableScheduling; -import org.springframework.transaction.annotation.EnableTransactionManagement; - -/** - * @Author: Himit_ZH - * @Date: 2020/10/22 23:25 - * @Description: - */ -@EnableRetry -@EnableScheduling // 开启定时任务 -@EnableDiscoveryClient // 开启注册发现 -@SpringBootApplication -@EnableAsync(proxyTargetClass=true) //开启异步注解 -@EnableTransactionManagement -public class DataBackupApplication { - public static void main(String[] args) { - SpringApplication.run(DataBackupApplication.class,args); - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/advice/GlobalExceptionAdvice.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/advice/GlobalExceptionAdvice.java deleted file mode 100644 index d2a7850..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/advice/GlobalExceptionAdvice.java +++ /dev/null @@ -1,299 +0,0 @@ -package top.hcode.hoj.advice; - - -import com.google.protobuf.ServiceException; -import lombok.extern.slf4j.Slf4j; -import org.apache.ibatis.exceptions.PersistenceException; -import org.apache.shiro.ShiroException; -import org.apache.shiro.authc.AuthenticationException; -import org.apache.shiro.authz.AuthorizationException; -import org.apache.shiro.authz.UnauthenticatedException; -import org.springframework.dao.DataIntegrityViolationException; -import org.springframework.http.HttpStatus; -import org.springframework.http.converter.HttpMessageNotReadableException; -import org.springframework.validation.BindException; -import org.springframework.validation.BindingResult; -import org.springframework.validation.FieldError; -import org.springframework.validation.ObjectError; -import org.springframework.web.HttpMediaTypeNotSupportedException; -import org.springframework.web.HttpRequestMethodNotSupportedException; -import org.springframework.web.bind.MethodArgumentNotValidException; -import org.springframework.web.bind.MissingServletRequestParameterException; -import org.springframework.web.bind.annotation.ExceptionHandler; -import org.springframework.web.bind.annotation.ResponseStatus; -import org.springframework.web.bind.annotation.RestControllerAdvice; -import top.hcode.hoj.common.exception.*; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.common.result.ResultStatus; -import top.hcode.hoj.exception.AccessException; - -import javax.mail.MessagingException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.validation.ConstraintViolation; -import javax.validation.ConstraintViolationException; -import javax.validation.ValidationException; -import java.io.IOException; -import java.io.PrintWriter; -import java.io.StringWriter; -import java.sql.SQLException; -import java.util.Set; - -/** - * 全局异常处理 - */ -@Slf4j(topic = "hoj") -@RestControllerAdvice -public class GlobalExceptionAdvice { - - - /** - * 400 - Internal Server Error 自定义通用异常 - */ - @ResponseStatus(HttpStatus.BAD_REQUEST) - @ExceptionHandler(value = {StatusForbiddenException.class, - StatusAccessDeniedException.class, - StatusFailException.class, - StatusNotFoundException.class, - StatusSystemErrorException.class}) - public CommonResult handleCustomException(Exception e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FAIL); - } - - - /** - * 401 -UnAuthorized 处理AuthenticationException,token相关异常 即是认证出错 可能无法处理! - */ - @ResponseStatus(HttpStatus.UNAUTHORIZED) - @ExceptionHandler(value = AuthenticationException.class) - public CommonResult handleAuthenticationException(AuthenticationException e, - HttpServletRequest httpRequest, - HttpServletResponse httpResponse) { - httpResponse.setHeader("Url-Type", httpRequest.getHeader("Url-Type")); // 为了前端能区别请求来源 - return CommonResult.errorResponse(e.getMessage(), ResultStatus.ACCESS_DENIED); - } - - /** - * 401 -UnAuthorized UnauthenticatedException,token相关异常 即是认证出错 可能无法处理! - * 没有登录(没有token),访问有@RequiresAuthentication的请求路径会报这个异常 - */ - @ResponseStatus(HttpStatus.UNAUTHORIZED) - @ExceptionHandler(value = UnauthenticatedException.class) - public CommonResult handleUnauthenticatedException(UnauthenticatedException e, - HttpServletRequest httpRequest, - HttpServletResponse httpResponse) { - httpResponse.setHeader("Url-Type", httpRequest.getHeader("Url-Type")); // 为了前端能区别请求来源 - return CommonResult.errorResponse("请您先登录!", ResultStatus.ACCESS_DENIED); - } - - /** - * 403 -FORBIDDEN AuthorizationException异常 即是授权认证出错 可能无法处理! - */ - @ResponseStatus(HttpStatus.FORBIDDEN) - @ExceptionHandler(value = AuthorizationException.class) - public CommonResult handleAuthenticationException(AuthorizationException e, - HttpServletRequest httpRequest, - HttpServletResponse httpResponse) { - httpResponse.setHeader("Url-Type", httpRequest.getHeader("Url-Type")); // 为了前端能区别请求来源 - return CommonResult.errorResponse("对不起,您无权限进行此操作!", ResultStatus.FORBIDDEN); - } - - /** - * 403 -FORBIDDEN 处理shiro的异常 无法处理! 未能走到controller层 - */ - @ResponseStatus(HttpStatus.FORBIDDEN) - @ExceptionHandler(value = ShiroException.class) - public CommonResult handleShiroException(ShiroException e, - HttpServletRequest httpRequest, - HttpServletResponse httpResponse) { - httpResponse.setHeader("Url-Type", httpRequest.getHeader("Url-Type")); // 为了前端能区别请求来源 - return CommonResult.errorResponse("对不起,您无权限进行此操作,请先登录进行授权认证", ResultStatus.FORBIDDEN); - } - - /** - * 403 -FORBIDDEN 处理访问api能力被禁止的异常 - */ - @ResponseStatus(HttpStatus.FORBIDDEN) - @ExceptionHandler(value = AccessException.class) - public CommonResult handleAccessException(AccessException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } - - /** - * 400 - Bad Request 处理Assert的异常 断言的异常! - */ - @ResponseStatus(HttpStatus.BAD_REQUEST) - @ExceptionHandler(value = IllegalArgumentException.class) - public CommonResult handler(IllegalArgumentException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FAIL); - } - - /** - * 400 - Bad Request @Validated 校验错误异常处理 - */ - @ResponseStatus(HttpStatus.BAD_REQUEST) - @ExceptionHandler(value = MethodArgumentNotValidException.class) - public CommonResult handlerMethodArgumentNotValidException(MethodArgumentNotValidException e) throws IOException { - BindingResult bindingResult = e.getBindingResult(); - ObjectError objectError = bindingResult.getAllErrors().stream().findFirst().get(); - return CommonResult.errorResponse(objectError.getDefaultMessage(), ResultStatus.FAIL); - } - - - /** - * 400 - Bad Request 处理缺少请求参数 - */ - @ResponseStatus(HttpStatus.BAD_REQUEST) - @ExceptionHandler(MissingServletRequestParameterException.class) - public CommonResult handleMissingServletRequestParameterException( - MissingServletRequestParameterException e) { - return CommonResult.errorResponse("The required request parameters are missing:" + e.getMessage(), ResultStatus.FAIL); - } - - /** - * 400 - Bad Request 参数解析失败 - */ - @ResponseStatus(HttpStatus.BAD_REQUEST) - @ExceptionHandler(HttpMessageNotReadableException.class) - public CommonResult handleHttpMessageNotReadableException( - HttpMessageNotReadableException e) { - return CommonResult.errorResponse("Failed to parse parameter format!", ResultStatus.FAIL); - } - - - /** - * 400 - Bad Request 参数绑定失败 - */ - @ResponseStatus(HttpStatus.BAD_REQUEST) - @ExceptionHandler(BindException.class) - public CommonResult handleBindException(BindException e) { - BindingResult result = e.getBindingResult(); - FieldError error = result.getFieldError(); - String field = error.getField(); - String code = error.getDefaultMessage(); - String message = String.format("%s:%s", field, code); - return CommonResult.errorResponse(message, ResultStatus.FAIL); - } - - /** - * 400 - Bad Request 参数验证失败 - */ - @ResponseStatus(HttpStatus.BAD_REQUEST) - @ExceptionHandler(ConstraintViolationException.class) - public CommonResult handleServiceException(ConstraintViolationException e) { - Set> violations = e.getConstraintViolations(); - ConstraintViolation violation = violations.iterator().next(); - String message = violation.getMessage(); - return CommonResult.errorResponse("[参数验证失败]parameter:" + message, ResultStatus.FAIL); - } - - /** - * 400 - Bad Request 实体校验失败 - */ - @ResponseStatus(HttpStatus.BAD_REQUEST) - @ExceptionHandler(ValidationException.class) - public CommonResult handleValidationException(ValidationException e) { - return CommonResult.errorResponse("Entity verification failed. The request parameters are incorrect!", ResultStatus.FAIL); - } - - /** - * 405 - Method Not Allowed 不支持当前请求方法 - */ - @ResponseStatus(HttpStatus.METHOD_NOT_ALLOWED) - @ExceptionHandler(HttpRequestMethodNotSupportedException.class) - public CommonResult handleHttpRequestMethodNotSupportedException( - HttpRequestMethodNotSupportedException e) { - return CommonResult.errorResponse("The request method is not supported!", ResultStatus.FAIL); - } - - /** - * 415 - Unsupported Media Type 不支持当前媒体类型 - */ - @ResponseStatus(HttpStatus.UNSUPPORTED_MEDIA_TYPE) - @ExceptionHandler(HttpMediaTypeNotSupportedException.class) - public CommonResult handleHttpMediaTypeNotSupportedException(Exception e) { - return CommonResult.errorResponse("The media type is not supported!", ResultStatus.FAIL); - } - - - /** - * 500 - Internal Server Error 处理邮件发送出现的异常 - */ - @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR) - @ExceptionHandler(value = MessagingException.class) - public CommonResult handler(MessagingException e) { - log.error("邮箱系统异常-------------->{}", getMessage(e)); - return CommonResult.errorResponse("Server Error! Please try Again later!", ResultStatus.SYSTEM_ERROR); - } - - /** - * 500 - Internal Server Error 业务逻辑异常 - */ - @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR) - @ExceptionHandler(ServiceException.class) - public CommonResult handleServiceException(ServiceException e) { - log.error("业务逻辑异常-------------->{}", getMessage(e)); - return CommonResult.errorResponse("Server Error! Please try Again later!", ResultStatus.SYSTEM_ERROR); - } - - /** - * 500 - Internal Server Error 操作数据库出现异常:名称重复,外键关联 - */ - @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR) - @ExceptionHandler(DataIntegrityViolationException.class) - public CommonResult handleDataIntegrityViolationException(DataIntegrityViolationException e) { - log.error("操作数据库出现异常-------------->{}", getMessage(e)); - return CommonResult.errorResponse("Server Error! Please try Again later!", ResultStatus.SYSTEM_ERROR); - } - - - /** - * 500 - Internal Server Error 操作数据库出现异常 - */ - @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR) - @ExceptionHandler(SQLException.class) - public CommonResult handleSQLException(SQLException e) { - log.error("操作数据库出现异常-------------->{}", getMessage(e)); - return CommonResult.errorResponse("Operation failed! Error message: " + e.getMessage(), ResultStatus.SYSTEM_ERROR); - } - - /** - * 500 - Internal Server Error 批量操作数据库出现异常:名称重复,外键关联 - */ - @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR) - @ExceptionHandler(PersistenceException.class) - public CommonResult handleBatchUpdateException(PersistenceException e) { - log.error("操作数据库出现异常-------------->{}", getMessage(e)); - return CommonResult.errorResponse("请检查数据是否准确!可能原因:数据库中已有相同的数据导致重复冲突!", ResultStatus.SYSTEM_ERROR); - } - - - /** - * 500 - Internal Server Error 系统通用异常 - */ - @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR) - @ExceptionHandler(Exception.class) - public CommonResult handleException(Exception e) { - log.error("系统通用异常-------------->{}", getMessage(e)); - return CommonResult.errorResponse("Server Error!", ResultStatus.SYSTEM_ERROR); - } - - - /** - * 打印异常信息 - */ - public static String getMessage(Exception e) { - String swStr = null; - try (StringWriter sw = new StringWriter(); - PrintWriter pw = new PrintWriter(sw)) { - e.printStackTrace(pw); - pw.flush(); - sw.flush(); - swStr = sw.toString(); - } catch (IOException ex) { - ex.printStackTrace(); - log.error(ex.getMessage()); - } - return swStr; - } -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/annotation/HOJAccess.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/annotation/HOJAccess.java deleted file mode 100644 index 90a8976..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/annotation/HOJAccess.java +++ /dev/null @@ -1,16 +0,0 @@ -package top.hcode.hoj.annotation; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * @Author Himit_ZH - * @Date 2022/5/9 - */ -@Target({ElementType.TYPE, ElementType.METHOD}) -@Retention(RetentionPolicy.RUNTIME) -public @interface HOJAccess { - HOJAccessEnum[] value() default {}; -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/annotation/HOJAccessEnum.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/annotation/HOJAccessEnum.java deleted file mode 100644 index b35385e..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/annotation/HOJAccessEnum.java +++ /dev/null @@ -1,42 +0,0 @@ -package top.hcode.hoj.annotation; - -/** - * @Author Himit_ZH - * @Date 2022/5/9 - */ -public enum HOJAccessEnum { - /** - * 公共讨论区 - */ - PUBLIC_DISCUSSION, - - /** - * 团队讨论区 - */ - GROUP_DISCUSSION, - - /** - * 比赛评论 - */ - CONTEST_COMMENT, - - /** - * 公共评测 - */ - PUBLIC_JUDGE, - - /** - * 团队评测 - */ - GROUP_JUDGE, - - /** - * 比赛评测 - */ - CONTEST_JUDGE, - - /** - * 隐藏非比赛提交详情的代码 - */ - HIDE_NON_CONTEST_SUBMISSION_CODE -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/common/exception/StatusAccessDeniedException.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/common/exception/StatusAccessDeniedException.java deleted file mode 100644 index 624f5af..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/common/exception/StatusAccessDeniedException.java +++ /dev/null @@ -1,28 +0,0 @@ -package top.hcode.hoj.common.exception; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/9 10:30 - * @Description: - */ -public class StatusAccessDeniedException extends Exception { - - public StatusAccessDeniedException() { - } - - public StatusAccessDeniedException(String message) { - super(message); - } - - public StatusAccessDeniedException(String message, Throwable cause) { - super(message, cause); - } - - public StatusAccessDeniedException(Throwable cause) { - super(cause); - } - - public StatusAccessDeniedException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) { - super(message, cause, enableSuppression, writableStackTrace); - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/common/exception/StatusFailException.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/common/exception/StatusFailException.java deleted file mode 100644 index 7be8fff..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/common/exception/StatusFailException.java +++ /dev/null @@ -1,27 +0,0 @@ -package top.hcode.hoj.common.exception; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/9 10:27 - * @Description: - */ -public class StatusFailException extends Exception{ - public StatusFailException() { - } - - public StatusFailException(String message) { - super(message); - } - - public StatusFailException(String message, Throwable cause) { - super(message, cause); - } - - public StatusFailException(Throwable cause) { - super(cause); - } - - public StatusFailException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) { - super(message, cause, enableSuppression, writableStackTrace); - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/common/exception/StatusForbiddenException.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/common/exception/StatusForbiddenException.java deleted file mode 100644 index c2814c7..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/common/exception/StatusForbiddenException.java +++ /dev/null @@ -1,28 +0,0 @@ -package top.hcode.hoj.common.exception; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/9 10:29 - * @Description: - */ -public class StatusForbiddenException extends Exception{ - - public StatusForbiddenException() { - } - - public StatusForbiddenException(String message) { - super(message); - } - - public StatusForbiddenException(String message, Throwable cause) { - super(message, cause); - } - - public StatusForbiddenException(Throwable cause) { - super(cause); - } - - public StatusForbiddenException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) { - super(message, cause, enableSuppression, writableStackTrace); - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/common/exception/StatusNotFoundException.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/common/exception/StatusNotFoundException.java deleted file mode 100644 index 5c80059..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/common/exception/StatusNotFoundException.java +++ /dev/null @@ -1,28 +0,0 @@ -package top.hcode.hoj.common.exception; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/9 10:30 - * @Description: - */ -public class StatusNotFoundException extends Exception{ - - public StatusNotFoundException() { - } - - public StatusNotFoundException(String message) { - super(message); - } - - public StatusNotFoundException(String message, Throwable cause) { - super(message, cause); - } - - public StatusNotFoundException(Throwable cause) { - super(cause); - } - - public StatusNotFoundException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) { - super(message, cause, enableSuppression, writableStackTrace); - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/common/exception/StatusSystemErrorException.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/common/exception/StatusSystemErrorException.java deleted file mode 100644 index 88f000d..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/common/exception/StatusSystemErrorException.java +++ /dev/null @@ -1,28 +0,0 @@ -package top.hcode.hoj.common.exception; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/10 14:33 - * @Description: - */ -public class StatusSystemErrorException extends Exception { - - public StatusSystemErrorException() { - } - - public StatusSystemErrorException(String message) { - super(message); - } - - public StatusSystemErrorException(String message, Throwable cause) { - super(message, cause); - } - - public StatusSystemErrorException(Throwable cause) { - super(cause); - } - - public StatusSystemErrorException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) { - super(message, cause, enableSuppression, writableStackTrace); - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/common/result/CommonResult.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/common/result/CommonResult.java deleted file mode 100644 index 880c928..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/common/result/CommonResult.java +++ /dev/null @@ -1,73 +0,0 @@ -package top.hcode.hoj.common.result; - -import lombok.Data; - -@Data -public class CommonResult{ - - private final Integer status; // 状态码 - - private final T data; // 返回的数据 - - private final String msg; // 自定义信息 - - - /** - * 成功的结果 - * - * @param data 返回结果 - * @param msg 返回信息 - */ - public static CommonResult successResponse(T data, String msg) { - return new CommonResult<>(ResultStatus.SUCCESS.getStatus(), data, msg); - } - - - /** - * 成功的结果 - * - * @param data 返回结果 - */ - public static CommonResult successResponse(T data) { - return new CommonResult(ResultStatus.SUCCESS.getStatus(), data, "success"); - } - - /** - * 成功的结果 - * - * @param msg 返回信息 - */ - public static CommonResult successResponse(String msg) { - return new CommonResult(ResultStatus.SUCCESS.getStatus(), null, msg); - } - - /** - * 成功的结果 - */ - public static CommonResult successResponse() { - return new CommonResult(ResultStatus.SUCCESS.getStatus(), null, "success"); - } - - - /** - * 失败的结果,无异常 - * - * @param msg 返回信息 - */ - public static CommonResult errorResponse(String msg) { - return new CommonResult(ResultStatus.FAIL.getStatus(), null, msg); - } - - public static CommonResult errorResponse(ResultStatus resultStatus) { - return new CommonResult(resultStatus.getStatus(), null, resultStatus.getDescription()); - } - - public static CommonResult errorResponse(String msg, ResultStatus resultStatus) { - return new CommonResult(resultStatus.getStatus(), null, msg); - } - - public static CommonResult errorResponse(String msg, Integer status) { - return new CommonResult(status, null, msg); - } - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/common/result/ResultStatus.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/common/result/ResultStatus.java deleted file mode 100644 index 9e71faa..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/common/result/ResultStatus.java +++ /dev/null @@ -1,31 +0,0 @@ -package top.hcode.hoj.common.result; - -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/9 15:17 - * @Description: - */ -@Getter -@AllArgsConstructor -public enum ResultStatus { - - SUCCESS(200,"成功"), - - FAIL(400,"失败"), - - ACCESS_DENIED(401,"访问受限"), - - FORBIDDEN(403,"拒绝访问"), - - NOT_FOUND(404,"数据不存在"), - - SYSTEM_ERROR(500,"系统错误"); - - - private int status; - - private String description; -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/AsyncTaskConfig.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/AsyncTaskConfig.java deleted file mode 100644 index 7cc62f2..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/AsyncTaskConfig.java +++ /dev/null @@ -1,62 +0,0 @@ -package top.hcode.hoj.config; - -import lombok.extern.slf4j.Slf4j; -import org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler; -import org.springframework.context.annotation.Configuration; -import org.springframework.scheduling.annotation.AsyncConfigurer; -import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; - -import java.lang.reflect.Method; -import java.util.concurrent.Executor; -import java.util.concurrent.ThreadPoolExecutor; - -/** - * @Author: Himit_ZH - * @Date: 2020/11/6 23:36 - * @Description: 通用异步线程池 - */ -@Configuration -@Slf4j(topic = "hoj") -public class AsyncTaskConfig implements AsyncConfigurer { - @Override - public Executor getAsyncExecutor() { - ThreadPoolTaskExecutor taskExecutor = new ThreadPoolTaskExecutor(); - // 线程池维护线程的最少数量 - taskExecutor.setCorePoolSize(10); - // 线程池维护线程的最大数量 - taskExecutor.setMaxPoolSize(20); - // 缓存队列 - taskExecutor.setQueueCapacity(200); - //活跃时间 - taskExecutor.setKeepAliveSeconds(3); - // 对拒绝task的处理策略 - //(1) 默认的ThreadPoolExecutor.AbortPolicy 处理程序遭到拒绝将抛出运行时RejectedExecutionException; - //(2) ThreadPoolExecutor.CallerRunsPolicy 线程调用运行该任务的 execute 本身。此策略提供简单的反馈控制机制,能够减缓新任务的提交速度 - //(3) ThreadPoolExecutor.DiscardPolicy 不能执行的任务将被删除; - //(4) ThreadPoolExecutor.DiscardOldestPolicy 如果执行程序尚未关闭,则位于工作队列头部的任务将被删除,然后重试执行程序(如果再次失败,则重复此过程) - taskExecutor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy()); - // 线程名前缀,方便排查问题 - taskExecutor.setThreadNamePrefix("CommonThread-"); - // 注意一定要初始化 - taskExecutor.initialize(); - - return taskExecutor; - - } - - /** - * 异步任务中异常处理 - * @return - */ - @Override - public AsyncUncaughtExceptionHandler getAsyncUncaughtExceptionHandler() { - return new AsyncUncaughtExceptionHandler() { - - @Override - public void handleUncaughtException(Throwable arg0, Method arg1, Object... arg2) { - log.error("==========================" + arg0.getMessage() + "=======================", arg0); - log.error("exception method:" + arg1.getName()); - } - }; - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/DataSourceConfigure.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/DataSourceConfigure.java deleted file mode 100644 index d9fe45c..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/DataSourceConfigure.java +++ /dev/null @@ -1,27 +0,0 @@ -package top.hcode.hoj.config; - -import lombok.Data; -import org.springframework.boot.context.properties.ConfigurationProperties; -import org.springframework.cloud.context.config.annotation.RefreshScope; -import org.springframework.stereotype.Component; - -/** - * @Author Himit_ZH - * @Date 2022/6/15 - */ -@Component -@RefreshScope -@ConfigurationProperties(prefix = "hoj.db") -@Data -public class DataSourceConfigure { - - private String username; - - private String password; - - private String host; - - private Integer port; - - private String name; -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/DruidConfigure.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/DruidConfigure.java deleted file mode 100644 index 654c18c..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/DruidConfigure.java +++ /dev/null @@ -1,130 +0,0 @@ -package top.hcode.hoj.config; - -import com.alibaba.druid.pool.DruidDataSource; -import lombok.Data; -import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.cloud.context.config.annotation.RefreshScope; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; - -import java.util.Optional; - -/** - * @Author: Himit_ZH - * @Date: 2021/5/21 17:57 - * @Description: - */ -@Configuration -@RefreshScope -@Data -@Slf4j(topic = "hoj") -public class DruidConfigure { - - @Value("${mysql-username}") - private String username; - - @Value("${mysql-password}") - private String password; - - @Value("${mysql-host}") - private String host; - - @Value("${mysql-port}") - private Integer port; - - @Value("${mysql-name}") - private String name; - - @Value("${spring.datasource.driver-class-name}") - private String driverClassName; - - @Value("${spring.datasource.type}") - private String type; - - @Value("${spring.datasource.initial-size}") - private Integer initialSize; - - @Value("${spring.datasource.poolPreparedStatements:true}") - private Boolean poolPreparedStatements; - - @Value("${spring.datasource.maxPoolPreparedStatementPerConnectionSize:20}") - private Integer maxPoolPreparedStatementPerConnectionSize; - - @Value("${spring.datasource.timeBetweenEvictionRunsMillis:60000}") - private Integer timeBetweenEvictionRunsMillis; - - @Value("${spring.datasource.minEvictableIdleTimeMillis:300000}") - private Integer minEvictableIdleTimeMillis; - - @Value("${spring.datasource.validationQuery}") - private String validationQuery; - - @Value("${spring.datasource.testWhileIdle:true}") - private Boolean testWhileIdle; - - @Value("${spring.datasource.testOnBorrow:false}") - private Boolean testOnBorrow; - - @Value("${spring.datasource.testOnReturn:false}") - private Boolean testOnReturn; - - @Value("${spring.datasource.connectionErrorRetryAttempts:3}") - private Integer connectionErrorRetryAttempts; - - @Value("${spring.datasource.breakAfterAcquireFailure:true}") - private Boolean breakAfterAcquireFailure; - - @Value("${spring.datasource.timeBetweenConnectErrorMillis:300000}") - private Integer timeBetweenConnectErrorMillis; - - @Value("${spring.datasource.min-idle}") - private Integer minIdle; - - @Value("${spring.datasource.maxActive}") - private Integer maxActive; - - @Value("${spring.datasource.maxWait}") - private Integer maxWait; - - @Autowired - private DataSourceConfigure dataSourceConfigure; - - @Bean(name = "datasource") - @RefreshScope - public DruidDataSource dataSource(){ - - String mysqlHost = Optional.ofNullable(dataSourceConfigure.getHost()).orElseGet(() -> host); - Integer mysqlPort = Optional.ofNullable(dataSourceConfigure.getPort()).orElseGet(() -> port); - String mysqlName = Optional.ofNullable(dataSourceConfigure.getName()).orElseGet(() -> name); - String mysqlUsername = Optional.ofNullable(dataSourceConfigure.getUsername()).orElseGet(() -> username); - String mysqlUserPassword = Optional.ofNullable(dataSourceConfigure.getPassword()).orElseGet(() -> password); - - log.warn("[MySQL] [Config Change] name:[{}], host:[{}], port:[{}], username:[{}], password:[{}]", mysqlName, mysqlHost, mysqlPort, mysqlUsername, mysqlUserPassword); - - DruidDataSource datasource = new DruidDataSource(); - String url = "jdbc:mysql://" + mysqlHost + ":" + mysqlPort + "/" + mysqlName + "?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai&allowMultiQueries=true&rewriteBatchedStatements=true"; - datasource.setUrl(url); - datasource.setUsername(mysqlUsername); - datasource.setPassword(mysqlUserPassword); - datasource.setDriverClassName(driverClassName); - datasource.setDbType(type); - datasource.setMaxActive(maxActive); - datasource.setInitialSize(initialSize); - datasource.setMinIdle(minIdle); - datasource.setMaxWait(maxWait); - datasource.setPoolPreparedStatements(poolPreparedStatements); - datasource.setMaxPoolPreparedStatementPerConnectionSize(maxPoolPreparedStatementPerConnectionSize); - datasource.setTimeBetweenEvictionRunsMillis(timeBetweenEvictionRunsMillis); - datasource.setMinEvictableIdleTimeMillis(minEvictableIdleTimeMillis); - datasource.setValidationQuery(validationQuery); - datasource.setTestWhileIdle(testWhileIdle); - datasource.setTestOnReturn(testOnReturn); - datasource.setTestOnBorrow(testOnBorrow); - datasource.setConnectionErrorRetryAttempts(connectionErrorRetryAttempts); - datasource.setBreakAfterAcquireFailure(breakAfterAcquireFailure); - datasource.setTimeBetweenConnectErrorMillis(timeBetweenConnectErrorMillis); - return datasource; - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/JedisPoolConfigure.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/JedisPoolConfigure.java deleted file mode 100644 index 055ced8..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/JedisPoolConfigure.java +++ /dev/null @@ -1,22 +0,0 @@ -package top.hcode.hoj.config; - -import lombok.Data; -import org.springframework.boot.context.properties.ConfigurationProperties; -import org.springframework.cloud.context.config.annotation.RefreshScope; -import org.springframework.stereotype.Component; - -/** - * @Author Himit_ZH - * @Date 2022/6/15 - */ -@Component -@RefreshScope -@ConfigurationProperties(prefix = "hoj.redis") -@Data -public class JedisPoolConfigure { - private String host; - - private Integer port; - - private String password; -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/JudgeAsyncTaskConfig.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/JudgeAsyncTaskConfig.java deleted file mode 100644 index 96b8294..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/JudgeAsyncTaskConfig.java +++ /dev/null @@ -1,39 +0,0 @@ -package top.hcode.hoj.config; - -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.scheduling.annotation.EnableAsync; -import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; - -import java.util.concurrent.Executor; -import java.util.concurrent.ThreadPoolExecutor; - -/** - * @Author: Himit_ZH - * @Date: 2021/5/24 16:54 - * @Description: 专用于判题的异步线程池 - */ -@Configuration -@EnableAsync -public class JudgeAsyncTaskConfig { - @Bean - public Executor judgeTaskAsyncPool() { - ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); - //核心线程池大小 - executor.setCorePoolSize(2); - //最大线程数 - executor.setMaxPoolSize(10); - //队列容量 - executor.setQueueCapacity(500); - //活跃时间 - executor.setKeepAliveSeconds(3); - //线程名字前缀 - executor.setThreadNamePrefix("JudgeExecutor-"); - - // setRejectedExecutionHandler:当pool已经达到max size的时候,如何处理新任务 - // CallerRunsPolicy:不在新线程中执行任务,而是由调用者所在的线程来执行 - executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy()); - executor.initialize(); - return executor; - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/MyMetaObjectConfig.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/MyMetaObjectConfig.java deleted file mode 100644 index a407eff..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/MyMetaObjectConfig.java +++ /dev/null @@ -1,26 +0,0 @@ -package top.hcode.hoj.config; - -import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler; -import org.apache.ibatis.reflection.MetaObject; -import org.springframework.stereotype.Component; - -import java.util.Date; - -/** - * @Author: Himit_ZH - * @Date: 2020/12/4 14:14 - * @Description: 处理mybatis-plus自动填充时间 - */ -@Component -public class MyMetaObjectConfig implements MetaObjectHandler { - @Override - public void insertFill(MetaObject metaObject) { - this.setFieldValByName("gmtCreate",new Date(),metaObject); - this.setFieldValByName("gmtModified",new Date(),metaObject); - } - - @Override - public void updateFill(MetaObject metaObject) { - this.setFieldValByName("gmtModified", new Date(), metaObject); - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/MybatisPlusConfig.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/MybatisPlusConfig.java deleted file mode 100644 index f5c4ffd..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/MybatisPlusConfig.java +++ /dev/null @@ -1,31 +0,0 @@ -package top.hcode.hoj.config; -import com.baomidou.mybatisplus.extension.plugins.OptimisticLockerInterceptor; -import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor; -import org.mybatis.spring.annotation.MapperScan; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.transaction.annotation.EnableTransactionManagement; - -/** - * @Author: Himit_ZH - * @Date: 2020/7/19 21:04 - * @Description: - */ -@Configuration -@EnableTransactionManagement -@MapperScan("top.hcode.hoj.mapper") -public class MybatisPlusConfig { - - // 注册乐观锁插件 - @Bean - public OptimisticLockerInterceptor optimisticLockerInterceptor() { - return new OptimisticLockerInterceptor(); - } - - // 分页插件 - @Bean - public PaginationInterceptor paginationInterceptor() { - return new PaginationInterceptor(); - } - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/RedisAutoConfig.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/RedisAutoConfig.java deleted file mode 100644 index e4c2307..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/RedisAutoConfig.java +++ /dev/null @@ -1,72 +0,0 @@ -package top.hcode.hoj.config; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.cloud.context.config.annotation.RefreshScope; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.data.redis.connection.RedisConnectionFactory; -import org.springframework.data.redis.connection.RedisPassword; -import org.springframework.data.redis.connection.RedisStandaloneConfiguration; -import org.springframework.data.redis.connection.jedis.JedisConnectionFactory; -import redis.clients.jedis.JedisPoolConfig; - -import java.util.Optional; - -/** - * @Author: Himit_ZH - * @Date: 2021/5/21 15:53 - * @Description: - */ -@Configuration -public class RedisAutoConfig { - - @Value("${spring.redis.jedis.pool.max-active:200}") - private Integer maxActive; - @Value("${spring.redis.jedis.pool.max-idle:50}") - private Integer maxIdle; - @Value("${spring.redis.jedis.pool.max-wait:-1}") - private Long maxWait; - @Value("${spring.redis.jedis.pool.min-idle:10}") - private Integer minIdle; - - @Value("${redis-host}") - private String redisHost; - @Value("${redis-port}") - private Integer redisPort; - @Value("${redis-password}") - private String redisPassword; - - @Autowired - private JedisPoolConfigure jedisPoolConfigure; - - - @Bean - public RedisConnectionFactory redisConnectionFactory(JedisPoolConfig jedisPool, - RedisStandaloneConfiguration jedisConfig) { - JedisConnectionFactory connectionFactory = new JedisConnectionFactory(jedisConfig); - connectionFactory.setPoolConfig(jedisPool); - return connectionFactory; - } - - @Bean - public JedisPoolConfig jedisPool() { - JedisPoolConfig jedisPoolConfig = new JedisPoolConfig(); - jedisPoolConfig.setMaxIdle(maxIdle); - jedisPoolConfig.setMaxWaitMillis(maxWait); - jedisPoolConfig.setMaxTotal(maxActive); - jedisPoolConfig.setMinIdle(minIdle); - return jedisPoolConfig; - } - - @Bean - @RefreshScope - public RedisStandaloneConfiguration jedisConfig() { - RedisStandaloneConfiguration config = new RedisStandaloneConfiguration(); - config.setHostName(Optional.ofNullable(jedisPoolConfigure.getHost()).orElseGet(() -> redisHost)); - config.setPort(Optional.ofNullable(jedisPoolConfigure.getPort()).orElseGet(() -> redisPort)); - config.setPassword(RedisPassword.of(Optional.ofNullable(jedisPoolConfigure.getPassword()).orElseGet(() -> redisPassword))); - return config; - } - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/RedisConfig.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/RedisConfig.java deleted file mode 100644 index c8948e7..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/RedisConfig.java +++ /dev/null @@ -1,50 +0,0 @@ -package top.hcode.hoj.config; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.PropertyAccessor; -import com.fasterxml.jackson.databind.ObjectMapper; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.data.redis.connection.RedisConnectionFactory; -import org.springframework.data.redis.core.RedisTemplate; -import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer; -import org.springframework.data.redis.serializer.StringRedisSerializer; - -/** - * @Author: Himit_ZH - * @Date: 2020/10/23 23:47 - * @Description: - */ -@Configuration -public class RedisConfig { - // 自己定义了一个 RedisTemplate - @Bean(name = "redisTemplate") - @SuppressWarnings("all") - public RedisTemplate redisTemplate(RedisConnectionFactory factory) { - // 我们为了自己开发方便,一般直接使用 - RedisTemplate template = new RedisTemplate(); - template.setConnectionFactory(factory); - - // Json序列化配置 - Jackson2JsonRedisSerializer jackson2JsonRedisSerializer = new Jackson2JsonRedisSerializer(Object.class); - ObjectMapper om = new ObjectMapper(); - om.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY); - om.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL); - jackson2JsonRedisSerializer.setObjectMapper(om); - // String 的序列化 - StringRedisSerializer stringRedisSerializer = new StringRedisSerializer(); - - // key采用String的序列化方式 - template.setKeySerializer(stringRedisSerializer); - // hash的key也采用String的序列化方式 - template.setHashKeySerializer(stringRedisSerializer); - // value序列化方式采用jackson - template.setValueSerializer(jackson2JsonRedisSerializer); - // hash的value序列化方式采用jackson - template.setHashValueSerializer(jackson2JsonRedisSerializer); - template.afterPropertiesSet(); - - return template; - } - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/RestTemplateConfig.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/RestTemplateConfig.java deleted file mode 100644 index 5dc8336..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/RestTemplateConfig.java +++ /dev/null @@ -1,30 +0,0 @@ -package top.hcode.hoj.config; - -import org.springframework.cloud.client.loadbalancer.LoadBalanced; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.http.client.ClientHttpRequestFactory; -import org.springframework.http.client.SimpleClientHttpRequestFactory; -import org.springframework.web.client.RestTemplate; - -/** - * @Author: Himit_ZH - * @Date: 2020/5/19 22:47 - * @Description: - */ -@Configuration -public class RestTemplateConfig { - @Bean - public RestTemplate restTemplate(ClientHttpRequestFactory factory) - { - return new RestTemplate(factory); - } - - @Bean - public ClientHttpRequestFactory simpleClientHttpRequestFactory() { - SimpleClientHttpRequestFactory factory = new SimpleClientHttpRequestFactory(); - factory.setReadTimeout(600000);//单位为ms - factory.setConnectTimeout(50000);//单位为ms - return factory; - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/ShiroConfig.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/ShiroConfig.java deleted file mode 100644 index 6bf509c..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/ShiroConfig.java +++ /dev/null @@ -1,101 +0,0 @@ -package top.hcode.hoj.config; - -/** - * @Author: Himit_ZH - * @Date: 2020/7/19 22:53 - * @Description: - */ - -import org.apache.shiro.mgt.DefaultSessionStorageEvaluator; -import org.apache.shiro.mgt.DefaultSubjectDAO; -import org.apache.shiro.mgt.SecurityManager; -import org.apache.shiro.session.mgt.SessionManager; -import org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor; -import org.apache.shiro.spring.web.ShiroFilterFactoryBean; -import org.apache.shiro.spring.web.config.DefaultShiroFilterChainDefinition; -import org.apache.shiro.spring.web.config.ShiroFilterChainDefinition; -import org.apache.shiro.web.mgt.DefaultWebSecurityManager; -import org.apache.shiro.web.session.mgt.DefaultWebSessionManager; -import org.crazycake.shiro.RedisCacheManager; -import org.crazycake.shiro.RedisSessionDAO; -import org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import top.hcode.hoj.shiro.AccountRealm; -import top.hcode.hoj.shiro.JwtFilter; - - -import javax.servlet.Filter; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; - -/** - * shiro启用注解拦截控制器 - */ -@Configuration -public class ShiroConfig { - @Autowired - JwtFilter jwtFilter; - - @Bean - public SessionManager sessionManager(RedisSessionDAO redisSessionDAO) { - DefaultWebSessionManager sessionManager = new DefaultWebSessionManager(); - sessionManager.setSessionDAO(redisSessionDAO); - return sessionManager; - } - - - @Bean - public DefaultWebSecurityManager securityManager(AccountRealm accountRealm, - SessionManager sessionManager, - RedisCacheManager redisCacheManager) { - DefaultWebSecurityManager securityManager = new DefaultWebSecurityManager(accountRealm); - securityManager.setSessionManager(sessionManager); - securityManager.setCacheManager(redisCacheManager); - /* - * 关闭shiro自带的session,详情见文档 - */ - DefaultSubjectDAO subjectDAO = new DefaultSubjectDAO(); - DefaultSessionStorageEvaluator defaultSessionStorageEvaluator = new DefaultSessionStorageEvaluator(); - defaultSessionStorageEvaluator.setSessionStorageEnabled(false); - subjectDAO.setSessionStorageEvaluator(defaultSessionStorageEvaluator); - securityManager.setSubjectDAO(subjectDAO); - return securityManager; - } - @Bean - public ShiroFilterChainDefinition shiroFilterChainDefinition() { - DefaultShiroFilterChainDefinition chainDefinition = new DefaultShiroFilterChainDefinition(); - Map filterMap = new LinkedHashMap<>(); - filterMap.put("/**", "jwt"); // 主要通过注解方式校验权限 - chainDefinition.addPathDefinitions(filterMap); - return chainDefinition; - } - @Bean("shiroFilterFactoryBean") - public ShiroFilterFactoryBean shiroFilterFactoryBean(SecurityManager securityManager, - ShiroFilterChainDefinition shiroFilterChainDefinition) { - ShiroFilterFactoryBean shiroFilter = new ShiroFilterFactoryBean(); - shiroFilter.setSecurityManager(securityManager); - Map filters = new HashMap<>(); - filters.put("jwt", jwtFilter); - shiroFilter.setFilters(filters); - Map filterMap = shiroFilterChainDefinition.getFilterChainMap(); - shiroFilter.setFilterChainDefinitionMap(filterMap); - return shiroFilter; - } - - //开启注解代理(默认好像已经开启,可以不要) - @Bean - public AuthorizationAttributeSourceAdvisor authorizationAttributeSourceAdvisor(SecurityManager securityManager){ - AuthorizationAttributeSourceAdvisor authorizationAttributeSourceAdvisor = new AuthorizationAttributeSourceAdvisor(); - authorizationAttributeSourceAdvisor.setSecurityManager(securityManager); - return authorizationAttributeSourceAdvisor; - } - @Bean - public static DefaultAdvisorAutoProxyCreator getDefaultAdvisorAutoProxyCreator() { - DefaultAdvisorAutoProxyCreator creator = new DefaultAdvisorAutoProxyCreator(); - creator.setProxyTargetClass(true); - return creator; - } -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/StartupRunner.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/StartupRunner.java deleted file mode 100644 index 5e58cfa..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/StartupRunner.java +++ /dev/null @@ -1,448 +0,0 @@ -package top.hcode.hoj.config; - -import cn.hutool.core.util.IdUtil; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; -import lombok.extern.slf4j.Slf4j; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.boot.CommandLineRunner; -import org.springframework.stereotype.Component; -import org.springframework.util.CollectionUtils; -import top.hcode.hoj.crawler.language.LanguageContext; -import top.hcode.hoj.dao.judge.RemoteJudgeAccountEntityService; -import top.hcode.hoj.dao.problem.LanguageEntityService; -import top.hcode.hoj.manager.admin.system.ConfigManager; -import top.hcode.hoj.pojo.entity.judge.RemoteJudgeAccount; -import top.hcode.hoj.pojo.entity.problem.Language; -import top.hcode.hoj.pojo.vo.ConfigVo; -import top.hcode.hoj.utils.Constants; - -import java.util.Arrays; -import java.util.LinkedList; -import java.util.List; - -/** - * @Author: Himit_ZH - * @Date: 2021/2/19 22:11 - * @Description:项目启动后,初始化运行该run方法 - */ -@Component -@Slf4j(topic = "hoj") -public class StartupRunner implements CommandLineRunner { - - @Autowired - private ConfigVo configVo; - - @Autowired - private ConfigManager configManager; - - @Autowired - private RemoteJudgeAccountEntityService remoteJudgeAccountEntityService; - - @Autowired - private LanguageEntityService languageEntityService; - - @Value("${open-remote-judge}") - private String openRemoteJudge; - - // jwt配置 - @Value("${jwt-token-secret}") - private String tokenSecret; - - @Value("${jwt-token-expire}") - private String tokenExpire; - - @Value("${jwt-token-fresh-expire}") - private String checkRefreshExpire; - - // 数据库配置 - @Value("${mysql-username}") - private String mysqlUsername; - - @Value("${mysql-password}") - private String mysqlPassword; - - @Value("${mysql-name}") - private String mysqlDBName; - - @Value("${mysql-host}") - private String mysqlHost; - - @Value("${mysql-public-host}") - private String mysqlPublicHost; - - @Value("${mysql-port}") - private Integer mysqlPort; - - @Value("${mysql-public-port}") - private Integer mysqlPublicPort; - - // 缓存配置 - @Value("${redis-host}") - private String redisHost; - - @Value("${redis-port}") - private Integer redisPort; - - @Value("${redis-password}") - private String redisPassword; - // 判题服务token - @Value("${judge-token}") - private String judgeToken; - - // 邮箱配置 - @Value("${email-username}") - private String emailUsername; - - @Value("${email-password}") - private String emailPassword; - - @Value("${email-host}") - private String emailHost; - - @Value("${email-port}") - private Integer emailPort; - - @Value("${hdu-username-list}") - private List hduUsernameList; - - @Value("${hdu-password-list}") - private List hduPasswordList; - - @Value("${cf-username-list}") - private List cfUsernameList; - - @Value("${cf-password-list}") - private List cfPasswordList; - - @Value("${poj-username-list}") - private List pojUsernameList; - - @Value("${poj-password-list}") - private List pojPasswordList; - - @Value("${atcoder-username-list}") - private List atcoderUsernameList; - - @Value("${atcoder-password-list}") - private List atcoderPasswordList; - - @Value("${spoj-username-list}") - private List spojUsernameList; - - @Value("${spoj-password-list}") - private List spojPasswordList; - - @Value("${forced-update-remote-judge-account}") - private Boolean forcedUpdateRemoteJudgeAccount; - - @Override - public void run(String... args) throws Exception { - - // 动态修改nacos上的配置文件 - if (judgeToken.equals("default")) { - configVo.setJudgeToken(IdUtil.fastSimpleUUID()); - } else { - configVo.setJudgeToken(judgeToken); - } - - if (tokenSecret.equals("default")) { - configVo.setTokenSecret(IdUtil.fastSimpleUUID()); - } else { - configVo.setTokenSecret(tokenSecret); - } - configVo.setTokenExpire(tokenExpire); - configVo.setCheckRefreshExpire(checkRefreshExpire); - - configVo.setMysqlUsername(mysqlUsername); - configVo.setMysqlPassword(mysqlPassword); - configVo.setMysqlHost(mysqlHost); - configVo.setMysqlPublicHost(mysqlPublicHost); - configVo.setMysqlPort(mysqlPort); - configVo.setMysqlPublicPort(mysqlPublicPort); - configVo.setMysqlDBName(mysqlDBName); - - configVo.setRedisHost(redisHost); - configVo.setRedisPort(redisPort); - configVo.setRedisPassword(redisPassword); - - if (configVo.getEmailHost() == null || !"your_email_host".equals(emailHost)) { - configVo.setEmailHost(emailHost); - } - if (configVo.getEmailPort() == null || emailPort != 456) { - configVo.setEmailPort(emailPort); - } - if (configVo.getEmailUsername() == null || !"your_email_username".equals(emailUsername)) { - configVo.setEmailUsername(emailUsername); - } - if (configVo.getEmailPassword() == null || !"your_email_password".equals(emailPassword)) { - configVo.setEmailPassword(emailPassword); - } - - if (CollectionUtils.isEmpty(configVo.getHduUsernameList()) || forcedUpdateRemoteJudgeAccount) { - configVo.setHduUsernameList(hduUsernameList); - }else { - hduUsernameList = configVo.getHduUsernameList(); - } - - if (CollectionUtils.isEmpty(configVo.getHduPasswordList()) || forcedUpdateRemoteJudgeAccount) { - configVo.setHduPasswordList(hduPasswordList); - }else { - hduPasswordList = configVo.getHduPasswordList(); - } - - if (CollectionUtils.isEmpty(configVo.getCfUsernameList()) || forcedUpdateRemoteJudgeAccount) { - configVo.setCfUsernameList(cfUsernameList); - }else { - cfUsernameList = configVo.getCfUsernameList(); - } - - if (CollectionUtils.isEmpty(configVo.getCfPasswordList()) || forcedUpdateRemoteJudgeAccount) { - configVo.setCfPasswordList(cfPasswordList); - }else { - cfPasswordList = configVo.getCfPasswordList(); - } - - if (CollectionUtils.isEmpty(configVo.getPojUsernameList()) || forcedUpdateRemoteJudgeAccount) { - configVo.setPojUsernameList(pojUsernameList); - }else { - pojUsernameList = configVo.getPojUsernameList(); - } - - if (CollectionUtils.isEmpty(configVo.getPojPasswordList()) || forcedUpdateRemoteJudgeAccount) { - configVo.setPojPasswordList(pojPasswordList); - }else { - pojPasswordList = configVo.getPojPasswordList(); - } - - if (CollectionUtils.isEmpty(configVo.getAtcoderUsernameList()) || forcedUpdateRemoteJudgeAccount) { - configVo.setAtcoderUsernameList(atcoderUsernameList); - }else { - atcoderUsernameList = configVo.getAtcoderUsernameList(); - } - - if (CollectionUtils.isEmpty(configVo.getAtcoderPasswordList()) || forcedUpdateRemoteJudgeAccount) { - configVo.setAtcoderPasswordList(atcoderPasswordList); - }else { - atcoderPasswordList = configVo.getAtcoderPasswordList(); - } - - if (CollectionUtils.isEmpty(configVo.getSpojUsernameList()) || forcedUpdateRemoteJudgeAccount) { - configVo.setSpojUsernameList(spojUsernameList); - }else { - spojUsernameList = configVo.getSpojUsernameList(); - } - - if (CollectionUtils.isEmpty(configVo.getSpojPasswordList()) || forcedUpdateRemoteJudgeAccount) { - configVo.setSpojPasswordList(spojPasswordList); - }else { - spojPasswordList = configVo.getSpojPasswordList(); - } - - configManager.sendNewConfigToNacos(); - - upsertHOJLanguage("PHP", "PyPy2", "PyPy3", "JavaScript Node", "JavaScript V8"); - - checkAllLanguageUpdate(); - - if (openRemoteJudge.equals("true")) { - // 初始化清空表 - remoteJudgeAccountEntityService.remove(new QueryWrapper<>()); - addRemoteJudgeAccountToMySQL(Constants.RemoteOJ.HDU.getName(), hduUsernameList, hduPasswordList); - addRemoteJudgeAccountToMySQL(Constants.RemoteOJ.POJ.getName(), pojUsernameList, pojPasswordList); - addRemoteJudgeAccountToMySQL(Constants.RemoteOJ.CODEFORCES.getName(), cfUsernameList, cfPasswordList); - addRemoteJudgeAccountToMySQL(Constants.RemoteOJ.SPOJ.getName(), spojUsernameList, spojPasswordList); - addRemoteJudgeAccountToMySQL(Constants.RemoteOJ.ATCODER.getName(), atcoderUsernameList, atcoderPasswordList); - - checkRemoteOJLanguage(Constants.RemoteOJ.SPOJ, Constants.RemoteOJ.ATCODER); - } - - } - - /** - * @param oj - * @param usernameList - * @param passwordList - * @MethodName addRemoteJudgeAccountToRedis - * @Description 将传入的对应oj账号写入到mysql - * @Return - * @Since 2021/5/18 - */ - private void addRemoteJudgeAccountToMySQL(String oj, List usernameList, List passwordList) { - - - if (CollectionUtils.isEmpty(usernameList) || CollectionUtils.isEmpty(passwordList) || usernameList.size() != passwordList.size()) { - log.error("[Init System Config] [{}]: There is no account or password configured for remote judge, " + - "username list:{}, password list:{}", oj, Arrays.toString(usernameList.toArray()), - Arrays.toString(passwordList.toArray())); - } - - List remoteAccountList = new LinkedList<>(); - for (int i = 0; i < usernameList.size(); i++) { - - remoteAccountList.add(new RemoteJudgeAccount() - .setUsername(usernameList.get(i)) - .setPassword(passwordList.get(i)) - .setStatus(true) - .setVersion(0L) - .setOj(oj)); - - } - - if (remoteAccountList.size() > 0) { - boolean addOk = remoteJudgeAccountEntityService.saveOrUpdateBatch(remoteAccountList); - if (!addOk) { - log.error("[Init System Config] Remote judge initialization failed. Failed to add account for: [{}]. Please check the configuration file and restart!", oj); - } - } - } - - - private void upsertHOJLanguage(String... languageList) { - /** - * 2022.02.25 新增js、pypy、php语言 - */ - for (String language : languageList) { - QueryWrapper languageQueryWrapper = new QueryWrapper<>(); - languageQueryWrapper.eq("oj", "ME") - .eq("name", language); - int count = languageEntityService.count(languageQueryWrapper); - if (count == 0) { - Language newLanguage = buildHOJLanguage(language); - boolean isOk = languageEntityService.save(newLanguage); - if (!isOk) { - log.error("[Init System Config] [HOJ] Failed to add new language [{}]! Please check whether the language table corresponding to the database has the language!", language); - } - } - } - } - - private void checkAllLanguageUpdate() { - - /** - * 2022.02.25 更新原有的python3.6.9为python3.7.5 - */ - UpdateWrapper languageUpdateWrapper = new UpdateWrapper<>(); - languageUpdateWrapper.eq("oj", "ME") - .eq("name", "Python3") - .set("description", "Python 3.7.5"); - languageEntityService.update(languageUpdateWrapper); - - /** - * 2022.02.25 删除cf的Microsoft Visual C++ 2010 - */ - UpdateWrapper deleteWrapper = new UpdateWrapper<>(); - deleteWrapper.eq("name", "Microsoft Visual C++ 2010") - .eq("oj", "CF"); - languageEntityService.remove(deleteWrapper); - } - - private void checkRemoteOJLanguage(Constants.RemoteOJ... remoteOJList) { - for (Constants.RemoteOJ remoteOJ : remoteOJList) { - QueryWrapper languageQueryWrapper = new QueryWrapper<>(); - languageQueryWrapper.eq("oj", remoteOJ.getName()); - int count = languageEntityService.count(languageQueryWrapper); - if (count == 0) { - List languageList = new LanguageContext(remoteOJ).buildLanguageList(); - boolean isOk = languageEntityService.saveBatch(languageList); - if (!isOk) { - log.error("[Init System Config] [{}] Failed to initialize language list! Please check whether the language table corresponding to the database has the OJ language!", remoteOJ.getName()); - } - } - } - } - - - private Language buildHOJLanguage(String lang) { - Language language = new Language(); - switch (lang) { - case "PHP": - language.setName("PHP") - .setCompileCommand("/usr/bin/php {src_path}") - .setContentType("text/x-php") - .setDescription("PHP 7.3.33") - .setTemplate(" parseInt(n, 10));\n" + - "print((a + b).toString());") - .setIsSpj(false) - .setOj("ME"); - return language; - case "PyPy2": - language.setName("PyPy2") - .setContentType("text/x-python") - .setCompileCommand("/usr/bin/pypy -m py_compile {src_path}") - .setDescription("PyPy 2.7.18 (7.3.8)") - .setTemplate("print sum(int(x) for x in raw_input().split(' '))") - .setCodeTemplate("//PREPEND BEGIN\n" + - "//PREPEND END\n" + - "\n" + - "//TEMPLATE BEGIN\n" + - "def add(a, b):\n" + - " return a + b\n" + - "//TEMPLATE END\n" + - "\n" + - "\n" + - "if __name__ == '__main__': \n" + - " //APPEND BEGIN\n" + - " a, b = 1, 1\n" + - " print add(a, b)\n" + - " //APPEND END") - .setIsSpj(false) - .setOj("ME"); - return language; - case "PyPy3": - language.setName("PyPy3") - .setContentType("text/x-python") - .setDescription("PyPy 3.8.12 (7.3.8)") - .setCompileCommand("/usr/bin/pypy3 -m py_compile {src_path}") - .setTemplate("print(sum(int(x) for x in input().split(' ')))") - .setCodeTemplate("//PREPEND BEGIN\n" + - "//PREPEND END\n" + - "\n" + - "//TEMPLATE BEGIN\n" + - "def add(a, b):\n" + - " return a + b\n" + - "//TEMPLATE END\n" + - "\n" + - "\n" + - "if __name__ == '__main__': \n" + - " //APPEND BEGIN\n" + - " a, b = 1, 1\n" + - " print(add(a, b))\n" + - " //APPEND END") - .setIsSpj(false) - .setOj("ME"); - return language; - } - return null; - } - -} - diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/SwaggerConfig.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/SwaggerConfig.java deleted file mode 100644 index f0af785..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/SwaggerConfig.java +++ /dev/null @@ -1,56 +0,0 @@ -package top.hcode.hoj.config; - -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.core.env.Environment; -import org.springframework.core.env.Profiles; -import springfox.documentation.builders.RequestHandlerSelectors; -import springfox.documentation.service.ApiInfo; -import springfox.documentation.service.Contact; -import springfox.documentation.spi.DocumentationType; -import springfox.documentation.spring.web.plugins.Docket; -import springfox.documentation.swagger2.annotations.EnableSwagger2; - -import java.util.ArrayList; - -/** - * @Author: Himit_ZH - * @Date: 2020/5/29 22:28 - * @Description: - */ -//@Configuration -//@EnableSwagger2 //开启swagger2 -public class SwaggerConfig { - @Bean //配置swagger的docket的bean势力 - public Docket docket(Environment environment){ - //设置要显示的swagger环境 - Profiles profiles = Profiles.of("dev","test"); //线下环境 - //通过环境判断是否在自己所设定的环境当中 - boolean flag = environment.acceptsProfiles(profiles); - return new Docket(DocumentationType.SWAGGER_2) - .apiInfo(apiInfo()) - .groupName("Himit_ZH") //分组 - .enable(flag) //开启 - .select() - //RequestHandlerSelectors扫描方式 - //any()全部 - //none 都不扫描 - //path 过滤什么路径 - .apis(RequestHandlerSelectors.basePackage("top.hcode")) - .build(); - } - //配置swagger信息 - private ApiInfo apiInfo(){ - //作者信息 - Contact contact = new Contact("Himit_ZH", "https://blog.csdn.net/weixin_43853097", "372347736@qq.com"); - return new ApiInfo( - "Himit_ZH的swaggerAPI文档", - "网站作者是个大帅哥!", - "v1.0", - "https://blog.csdn.net/weixin_43853097", - contact, - "Apache 2.0", - "http://www.apache.org/licenses/LICENSE-2.0", - new ArrayList()); - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/TomcatConfig.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/TomcatConfig.java deleted file mode 100644 index ba24d93..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/TomcatConfig.java +++ /dev/null @@ -1,30 +0,0 @@ -package top.hcode.hoj.config; - -import org.apache.catalina.connector.Connector; -import org.springframework.boot.web.embedded.tomcat.TomcatConnectorCustomizer; -import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; - -/** - * @Author Himit_ZH - * @Date 2022/6/11 - * 允许请求路径出现[] \ 等特殊字符 - */ -@Configuration -public class TomcatConfig { - - @Bean - public TomcatServletWebServerFactory webServerFactory() { - TomcatServletWebServerFactory factory = new TomcatServletWebServerFactory(); - factory.addConnectorCustomizers(new TomcatConnectorCustomizer() { - @Override - public void customize(Connector connector) { - connector.setProperty("relaxedPathChars", "\"<>[\\]^`{|}"); - connector.setProperty("relaxedQueryChars", "\"<>[\\]^`{|}"); - connector.setProperty("rejectIllegalHeader", "false"); - } - }); - return factory; - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/WebMvcConfig.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/WebMvcConfig.java deleted file mode 100644 index a97c8a4..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/config/WebMvcConfig.java +++ /dev/null @@ -1,56 +0,0 @@ -package top.hcode.hoj.config; - - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.annotation.Configuration; -import org.springframework.web.servlet.config.annotation.CorsRegistry; -import org.springframework.web.servlet.config.annotation.InterceptorRegistry; -import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; -import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; -import top.hcode.hoj.interceptor.AccessInterceptor; -import top.hcode.hoj.utils.Constants; - -import java.io.File; - -/** - * 解决跨域问题以及增加注解拦截类 - */ -@Configuration -public class WebMvcConfig implements WebMvcConfigurer { - - private static final String[] EXCLUDE_PATH_PATTERNS = new String[]{ - "/api/admin/**", "/api/file/**", "/api/msg/**", "/api/public/**" - }; - - @Autowired - private AccessInterceptor accessInterceptor; - - @Override - public void addCorsMappings(CorsRegistry registry) { - registry.addMapping("/**") - .allowedOrigins("*") - .allowedMethods("GET", "HEAD", "POST", "PUT", "DELETE", "OPTIONS") - .allowCredentials(true) - .maxAge(3600) - .allowedHeaders("*"); - } - - // 前端直接通过/public/img/图片名称即可拿到 - @Override - public void addResourceHandlers(ResourceHandlerRegistry registry) { - // /api/public/img/** /api/public/file/** - registry.addResourceHandler(Constants.File.IMG_API.getPath() + "**", Constants.File.FILE_API.getPath() + "**") - .addResourceLocations("file:" + Constants.File.USER_AVATAR_FOLDER.getPath() + File.separator, - "file:" + Constants.File.GROUP_AVATAR_FOLDER.getPath() + File.separator, - "file:" + Constants.File.MARKDOWN_FILE_FOLDER.getPath() + File.separator, - "file:" + Constants.File.HOME_CAROUSEL_FOLDER.getPath() + File.separator, - "file:" + Constants.File.PROBLEM_FILE_FOLDER.getPath() + File.separator); - } - - @Override - public void addInterceptors(InterceptorRegistry registry) { - registry.addInterceptor(accessInterceptor) - .addPathPatterns("/api/**") - .excludePathPatterns(EXCLUDE_PATH_PATTERNS); - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/AdminAccountController.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/AdminAccountController.java deleted file mode 100644 index 50b3a56..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/AdminAccountController.java +++ /dev/null @@ -1,42 +0,0 @@ -package top.hcode.hoj.controller.admin; - -import org.apache.shiro.authz.annotation.Logical; -import org.apache.shiro.authz.annotation.RequiresAuthentication; -import org.apache.shiro.authz.annotation.RequiresRoles; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; -import top.hcode.hoj.common.result.CommonResult; - -import top.hcode.hoj.pojo.dto.LoginDto; - -import top.hcode.hoj.pojo.vo.UserInfoVo; -import top.hcode.hoj.service.admin.account.AdminAccountService; - - - -/** - * @Author: Himit_ZH - * @Date: 2020/12/2 21:23 - * @Description: - */ -@RestController -@RequestMapping("/api/admin") -public class AdminAccountController { - - @Autowired - private AdminAccountService adminAccountService; - - @PostMapping("/login") - public CommonResult login(@Validated @RequestBody LoginDto loginDto){ - return adminAccountService.login(loginDto); - } - - @GetMapping("/logout") - @RequiresAuthentication - @RequiresRoles(value = {"root","admin","problem_admin"},logical = Logical.OR) - public CommonResult logout() { - return adminAccountService.logout(); - } - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/AdminContestController.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/AdminContestController.java deleted file mode 100644 index 00c4346..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/AdminContestController.java +++ /dev/null @@ -1,236 +0,0 @@ -package top.hcode.hoj.controller.admin; - - -import com.baomidou.mybatisplus.core.metadata.IPage; - -import org.apache.shiro.authz.annotation.Logical; -import org.apache.shiro.authz.annotation.RequiresAuthentication; -import org.apache.shiro.authz.annotation.RequiresRoles; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.transaction.annotation.Transactional; -import org.springframework.web.bind.annotation.*; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.dto.AnnouncementDto; -import top.hcode.hoj.pojo.dto.ContestProblemDto; -import top.hcode.hoj.pojo.dto.ProblemDto; -import top.hcode.hoj.pojo.entity.contest.Contest; -import top.hcode.hoj.pojo.entity.contest.ContestProblem; - -import top.hcode.hoj.pojo.entity.problem.Problem; -import top.hcode.hoj.pojo.vo.AdminContestVo; -import top.hcode.hoj.pojo.vo.AnnouncementVo; - -import top.hcode.hoj.service.admin.contest.AdminContestAnnouncementService; -import top.hcode.hoj.service.admin.contest.AdminContestProblemService; -import top.hcode.hoj.service.admin.contest.AdminContestService; - -import javax.servlet.http.HttpServletRequest; -import java.util.*; - - -/** - * @Author: Himit_ZH - * @Date: 2020/12/19 22:28 - * @Description: - */ -@RestController -@RequestMapping("/api/admin/contest") -public class AdminContestController { - - - @Autowired - private AdminContestService adminContestService; - - @Autowired - private AdminContestProblemService adminContestProblemService; - - @Autowired - private AdminContestAnnouncementService adminContestAnnouncementService; - - @GetMapping("/get-contest-list") - @RequiresAuthentication - @RequiresRoles(value = {"root", "admin", "problem_admin"}, logical = Logical.OR) - public CommonResult> getContestList(@RequestParam(value = "limit", required = false) Integer limit, - @RequestParam(value = "currentPage", required = false) Integer currentPage, - @RequestParam(value = "keyword", required = false) String keyword) { - - return adminContestService.getContestList(limit, currentPage, keyword); - } - - @GetMapping("") - @RequiresAuthentication - @RequiresRoles(value = {"root", "admin", "problem_admin"}, logical = Logical.OR) - public CommonResult getContest(@RequestParam("cid") Long cid) { - - return adminContestService.getContest(cid); - } - - @DeleteMapping("") - @RequiresAuthentication - @RequiresRoles(value = "root") // 只有超级管理员能删除比赛 - public CommonResult deleteContest(@RequestParam("cid") Long cid) { - - return adminContestService.deleteContest(cid); - } - - @PostMapping("") - @RequiresAuthentication - @RequiresRoles(value = {"root", "admin", "problem_admin"}, logical = Logical.OR) - public CommonResult addContest(@RequestBody AdminContestVo adminContestVo) { - - return adminContestService.addContest(adminContestVo); - } - - @GetMapping("/clone") - @RequiresAuthentication - @RequiresRoles(value = {"root", "admin", "problem_admin"}, logical = Logical.OR) - public CommonResult cloneContest(@RequestParam("cid") Long cid) { - return adminContestService.cloneContest(cid); - } - - @PutMapping("") - @RequiresAuthentication - @RequiresRoles(value = {"root", "admin", "problem_admin"}, logical = Logical.OR) - @Transactional(rollbackFor = Exception.class) - public CommonResult updateContest(@RequestBody AdminContestVo adminContestVo) { - - return adminContestService.updateContest(adminContestVo); - } - - @PutMapping("/change-contest-visible") - @RequiresAuthentication - @RequiresRoles(value = {"root", "admin", "problem_admin"}, logical = Logical.OR) - public CommonResult changeContestVisible(@RequestParam(value = "cid", required = true) Long cid, - @RequestParam(value = "uid", required = true) String uid, - @RequestParam(value = "visible", required = true) Boolean visible) { - - return adminContestService.changeContestVisible(cid, uid, visible); - } - - /** - * 以下为比赛的题目的增删改查操作接口 - */ - - @GetMapping("/get-problem-list") - @RequiresAuthentication - @RequiresRoles(value = {"root", "admin", "problem_admin"}, logical = Logical.OR) - @Transactional(rollbackFor = Exception.class) - public CommonResult> getProblemList(@RequestParam(value = "limit", required = false) Integer limit, - @RequestParam(value = "currentPage", required = false) Integer currentPage, - @RequestParam(value = "keyword", required = false) String keyword, - @RequestParam(value = "cid", required = true) Long cid, - @RequestParam(value = "problemType", required = false) Integer problemType, - @RequestParam(value = "oj", required = false) String oj) { - - return adminContestProblemService.getProblemList(limit, currentPage, keyword, cid, problemType, oj); - } - - @GetMapping("/problem") - @RequiresAuthentication - @RequiresRoles(value = {"root", "admin", "problem_admin"}, logical = Logical.OR) - public CommonResult getProblem(@RequestParam("pid") Long pid, HttpServletRequest request) { - return adminContestProblemService.getProblem(pid); - } - - @DeleteMapping("/problem") - @RequiresAuthentication - @RequiresRoles(value = {"root", "problem_admin"}, logical = Logical.OR) - @Transactional(rollbackFor = Exception.class) - public CommonResult deleteProblem(@RequestParam("pid") Long pid, - @RequestParam(value = "cid", required = false) Long cid) { - return adminContestProblemService.deleteProblem(pid, cid); - } - - @PostMapping("/problem") - @RequiresAuthentication - @RequiresRoles(value = {"root", "admin", "problem_admin"}, logical = Logical.OR) - @Transactional(rollbackFor = Exception.class) - public CommonResult> addProblem(@RequestBody ProblemDto problemDto) { - - return adminContestProblemService.addProblem(problemDto); - } - - @PutMapping("/problem") - @RequiresAuthentication - @RequiresRoles(value = {"root", "admin", "problem_admin"}, logical = Logical.OR) - @Transactional(rollbackFor = Exception.class) - public CommonResult updateProblem(@RequestBody ProblemDto problemDto) { - - return adminContestProblemService.updateProblem(problemDto); - } - - @GetMapping("/contest-problem") - @RequiresAuthentication - @RequiresRoles(value = {"root", "admin", "problem_admin"}, logical = Logical.OR) - public CommonResult getContestProblem(@RequestParam(value = "cid", required = true) Long cid, - @RequestParam(value = "pid", required = true) Long pid) { - - return adminContestProblemService.getContestProblem(cid, pid); - } - - @PutMapping("/contest-problem") - @RequiresAuthentication - @RequiresRoles(value = {"root", "admin", "problem_admin"}, logical = Logical.OR) - public CommonResult setContestProblem(@RequestBody ContestProblem contestProblem) { - - return adminContestProblemService.setContestProblem(contestProblem); - } - - @PostMapping("/add-problem-from-public") - @RequiresAuthentication - @RequiresRoles(value = {"root", "admin", "problem_admin"}, logical = Logical.OR) - public CommonResult addProblemFromPublic(@RequestBody ContestProblemDto contestProblemDto) { - - return adminContestProblemService.addProblemFromPublic(contestProblemDto); - } - - @GetMapping("/import-remote-oj-problem") - @RequiresAuthentication - @RequiresRoles(value = {"root", "admin", "problem_admin"}, logical = Logical.OR) - @Transactional(rollbackFor = Exception.class) - public CommonResult importContestRemoteOJProblem(@RequestParam("name") String name, - @RequestParam("problemId") String problemId, - @RequestParam("cid") Long cid, - @RequestParam("displayId") String displayId) { - - return adminContestProblemService.importContestRemoteOJProblem(name, problemId, cid, displayId); - } - - /** - * 以下处理比赛公告的操作请求 - */ - - @GetMapping("/announcement") - @RequiresAuthentication - @RequiresRoles(value = {"root", "admin", "problem_admin"}, logical = Logical.OR) - public CommonResult> getAnnouncementList(@RequestParam(value = "limit", required = false) Integer limit, - @RequestParam(value = "currentPage", required = false) Integer currentPage, - @RequestParam(value = "cid", required = true) Long cid) { - - return adminContestAnnouncementService.getAnnouncementList(limit, currentPage, cid); - } - - @DeleteMapping("/announcement") - @RequiresAuthentication - @RequiresRoles(value = {"root", "admin", "problem_admin"}, logical = Logical.OR) - public CommonResult deleteAnnouncement(@RequestParam("aid") Long aid) { - - return adminContestAnnouncementService.deleteAnnouncement(aid); - } - - @PostMapping("/announcement") - @RequiresAuthentication - @RequiresRoles(value = {"root", "admin", "problem_admin"}, logical = Logical.OR) - public CommonResult addAnnouncement(@RequestBody AnnouncementDto announcementDto) { - - return adminContestAnnouncementService.addAnnouncement(announcementDto); - } - - @PutMapping("/announcement") - @RequiresAuthentication - @RequiresRoles(value = {"root", "admin", "problem_admin"}, logical = Logical.OR) - public CommonResult updateAnnouncement(@RequestBody AnnouncementDto announcementDto) { - - return adminContestAnnouncementService.updateAnnouncement(announcementDto); - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/AdminDiscussionController.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/AdminDiscussionController.java deleted file mode 100644 index d35802d..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/AdminDiscussionController.java +++ /dev/null @@ -1,60 +0,0 @@ -package top.hcode.hoj.controller.admin; - -import com.baomidou.mybatisplus.core.metadata.IPage; - -import org.apache.shiro.authz.annotation.Logical; -import org.apache.shiro.authz.annotation.RequiresAuthentication; -import org.apache.shiro.authz.annotation.RequiresRoles; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.entity.discussion.Discussion; -import top.hcode.hoj.pojo.entity.discussion.DiscussionReport; - -import top.hcode.hoj.pojo.vo.DiscussionReportVo; -import top.hcode.hoj.service.admin.discussion.AdminDiscussionService; - -import java.util.List; - -/** - * @Author: Himit_ZH - * @Date: 2021/5/15 20:35 - * @Description: - */ -@RestController -@RequestMapping("/api/admin") -public class AdminDiscussionController { - - @Autowired - private AdminDiscussionService adminDiscussionService; - - @PutMapping("/discussion") - @RequiresRoles(value = {"root", "admin","problem_admin"}, logical = Logical.OR) - @RequiresAuthentication - public CommonResult updateDiscussion(@RequestBody Discussion discussion) { - return adminDiscussionService.updateDiscussion(discussion); - } - - @DeleteMapping("/discussion") - @RequiresRoles(value = {"root", "admin","problem_admin"}, logical = Logical.OR) - @RequiresAuthentication - public CommonResult removeDiscussion(@RequestBody List didList) { - return adminDiscussionService.removeDiscussion(didList); - } - - @GetMapping("/discussion-report") - @RequiresRoles(value = {"root", "admin","problem_admin"}, logical = Logical.OR) - @RequiresAuthentication - public CommonResult> getDiscussionReport(@RequestParam(value = "limit", defaultValue = "10") Integer limit, - @RequestParam(value = "currentPage", defaultValue = "1") Integer currentPage) { - return adminDiscussionService.getDiscussionReport(limit, currentPage); - } - - @PutMapping("/discussion-report") - @RequiresRoles(value = {"root", "admin","problem_admin"}, logical = Logical.OR) - @RequiresAuthentication - public CommonResult updateDiscussionReport(@RequestBody DiscussionReport discussionReport) { - return adminDiscussionService.updateDiscussionReport(discussionReport); - } - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/AdminGroupProblemController.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/AdminGroupProblemController.java deleted file mode 100644 index 2e3afd3..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/AdminGroupProblemController.java +++ /dev/null @@ -1,40 +0,0 @@ -package top.hcode.hoj.controller.admin; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.apache.shiro.authz.annotation.Logical; -import org.apache.shiro.authz.annotation.RequiresAuthentication; -import org.apache.shiro.authz.annotation.RequiresRoles; -import org.springframework.web.bind.annotation.*; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.dto.ChangeGroupProblemProgressDto; -import top.hcode.hoj.pojo.entity.problem.Problem; -import top.hcode.hoj.service.admin.problem.AdminGroupProblemService; - -import javax.annotation.Resource; - -/** - * @Author Himit_ZH - * @Date 2022/4/13 - */ -@RestController -@RequestMapping("/api/admin/group-problem") -@RequiresAuthentication -@RequiresRoles(value = {"root", "problem_admin"}, logical = Logical.OR) -public class AdminGroupProblemController { - - @Resource - private AdminGroupProblemService adminGroupProblemService; - - @GetMapping("/list") - public CommonResult> getProblemList(@RequestParam(value = "currentPage", defaultValue = "1") Integer currentPage, - @RequestParam(value = "limit", defaultValue = "10") Integer limit, - @RequestParam(value = "keyword", required = false) String keyword, - @RequestParam(value = "gid", required = false) Long gid) { - return adminGroupProblemService.getProblemList(currentPage, limit, keyword, gid); - } - - @PutMapping("/change-progress") - public CommonResult changeProgress(@RequestBody ChangeGroupProblemProgressDto changeGroupProblemProgressDto) { - return adminGroupProblemService.changeProgress(changeGroupProblemProgressDto); - } -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/AdminJudgeController.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/AdminJudgeController.java deleted file mode 100644 index b80f713..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/AdminJudgeController.java +++ /dev/null @@ -1,64 +0,0 @@ -package top.hcode.hoj.controller.admin; - -import org.apache.shiro.authz.annotation.RequiresAuthentication; -import org.apache.shiro.authz.annotation.RequiresPermissions; -import org.apache.shiro.authz.annotation.RequiresRoles; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.entity.judge.Judge; -import top.hcode.hoj.service.admin.rejudge.RejudgeService; - - -import javax.annotation.Resource; - -/** - * @Author: Himit_ZH - * @Date: 2021/1/3 14:09 - * @Description: 超管重判提交 - */ - -@RestController -@RequestMapping("/api/admin/judge") -public class AdminJudgeController { - - @Resource - private RejudgeService rejudgeService; - - @GetMapping("/rejudge") - @RequiresAuthentication - @RequiresRoles("root") // 只有超级管理员能操作 - @RequiresPermissions("rejudge") - public CommonResult rejudge(@RequestParam("submitId") Long submitId) { - return rejudgeService.rejudge(submitId); - } - - @GetMapping("/rejudge-contest-problem") - @RequiresAuthentication - @RequiresRoles("root") // 只有超级管理员能操作 - @RequiresPermissions("rejudge") - public CommonResult rejudgeContestProblem(@RequestParam("cid") Long cid, @RequestParam("pid") Long pid) { - return rejudgeService.rejudgeContestProblem(cid, pid); - } - - - @GetMapping("/manual-judge") - @RequiresAuthentication - @RequiresRoles("root") // 只有超级管理员能操作 - @RequiresPermissions("rejudge") - public CommonResult manualJudge(@RequestParam("submitId") Long submitId, - @RequestParam("status") Integer status, - @RequestParam(value = "score", required = false) Integer score) { - return rejudgeService.manualJudge(submitId, status, score); - } - - @GetMapping("/cancel-judge") - @RequiresAuthentication - @RequiresRoles("root") // 只有超级管理员能操作 - @RequiresPermissions("rejudge") - public CommonResult cancelJudge(@RequestParam("submitId") Long submitId) { - return rejudgeService.cancelJudge(submitId); - } -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/AdminProblemController.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/AdminProblemController.java deleted file mode 100644 index 51daa4a..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/AdminProblemController.java +++ /dev/null @@ -1,108 +0,0 @@ -package top.hcode.hoj.controller.admin; - - -import com.baomidou.mybatisplus.core.metadata.IPage; - -import org.apache.shiro.authz.annotation.Logical; -import org.apache.shiro.authz.annotation.RequiresAuthentication; -import org.apache.shiro.authz.annotation.RequiresRoles; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.dto.ProblemDto; -import top.hcode.hoj.pojo.dto.CompileDTO; -import top.hcode.hoj.pojo.entity.problem.Problem; -import top.hcode.hoj.pojo.entity.problem.ProblemCase; -import top.hcode.hoj.service.admin.problem.AdminProblemService; - -import java.util.*; - -/** - * @Author: Himit_ZH - * @Date: 2020/12/11 21:45 - * @Description: - */ -@RestController -@RequestMapping("/api/admin/problem") -public class AdminProblemController { - - @Autowired - private AdminProblemService adminProblemService; - - @GetMapping("/get-problem-list") - @RequiresAuthentication - @RequiresRoles(value = {"root", "admin", "problem_admin"}, logical = Logical.OR) - public CommonResult> getProblemList(@RequestParam(value = "limit", required = false) Integer limit, - @RequestParam(value = "currentPage", required = false) Integer currentPage, - @RequestParam(value = "keyword", required = false) String keyword, - @RequestParam(value = "auth", required = false) Integer auth, - @RequestParam(value = "oj", required = false) String oj) { - return adminProblemService.getProblemList(limit, currentPage, keyword, auth, oj); - } - - @GetMapping("") - @RequiresAuthentication - @RequiresRoles(value = {"root", "admin", "problem_admin"}, logical = Logical.OR) - public CommonResult getProblem(@RequestParam("pid") Long pid) { - return adminProblemService.getProblem(pid); - } - - @DeleteMapping("") - @RequiresAuthentication - @RequiresRoles(value = {"root", "problem_admin"}, logical = Logical.OR) - public CommonResult deleteProblem(@RequestParam("pid") Long pid) { - return adminProblemService.deleteProblem(pid); - } - - @PostMapping("") - @RequiresAuthentication - @RequiresRoles(value = {"root", "admin", "problem_admin"}, logical = Logical.OR) - public CommonResult addProblem(@RequestBody ProblemDto problemDto) { - return adminProblemService.addProblem(problemDto); - } - - @PutMapping("") - @RequiresAuthentication - @RequiresRoles(value = {"root", "admin", "problem_admin"}, logical = Logical.OR) - public CommonResult updateProblem(@RequestBody ProblemDto problemDto) { - return adminProblemService.updateProblem(problemDto); - } - - @GetMapping("/get-problem-cases") - @RequiresAuthentication - @RequiresRoles(value = {"root", "admin", "problem_admin"}, logical = Logical.OR) - public CommonResult> getProblemCases(@RequestParam("pid") Long pid, - @RequestParam(value = "isUpload", defaultValue = "true") Boolean isUpload) { - return adminProblemService.getProblemCases(pid, isUpload); - } - - @PostMapping("/compile-spj") - @RequiresAuthentication - @RequiresRoles(value = {"root", "admin", "problem_admin"}, logical = Logical.OR) - public CommonResult compileSpj(@RequestBody CompileDTO compileDTO) { - return adminProblemService.compileSpj(compileDTO); - } - - @PostMapping("/compile-interactive") - @RequiresAuthentication - @RequiresRoles(value = {"root", "admin", "problem_admin"}, logical = Logical.OR) - public CommonResult compileInteractive(@RequestBody CompileDTO compileDTO) { - return adminProblemService.compileInteractive(compileDTO); - } - - @GetMapping("/import-remote-oj-problem") - @RequiresAuthentication - @RequiresRoles(value = {"root", "admin", "problem_admin"}, logical = Logical.OR) - public CommonResult importRemoteOJProblem(@RequestParam("name") String name, - @RequestParam("problemId") String problemId) { - return adminProblemService.importRemoteOJProblem(name, problemId); - } - - @PutMapping("/change-problem-auth") - @RequiresAuthentication - @RequiresRoles(value = {"root", "problem_admin", "admin"}, logical = Logical.OR) - public CommonResult changeProblemAuth(@RequestBody Problem problem) { - return adminProblemService.changeProblemAuth(problem); - } - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/AdminTagController.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/AdminTagController.java deleted file mode 100644 index d01aaf7..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/AdminTagController.java +++ /dev/null @@ -1,78 +0,0 @@ -package top.hcode.hoj.controller.admin; - -import org.apache.shiro.authz.annotation.Logical; -import org.apache.shiro.authz.annotation.RequiresAuthentication; -import org.apache.shiro.authz.annotation.RequiresRoles; -import org.springframework.web.bind.annotation.*; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.entity.problem.Tag; -import top.hcode.hoj.pojo.entity.problem.TagClassification; -import top.hcode.hoj.service.admin.tag.AdminTagService; - -import javax.annotation.Resource; -import java.util.List; - -/** - * @Author: Himit_ZH - * @Date: 2021/11/2 23:24 - * @Description: 处理tag的增删改 - */ - -@RestController -@RequestMapping("/api/admin/tag") -public class AdminTagController { - - - @Resource - private AdminTagService adminTagService; - - @PostMapping("") - @RequiresAuthentication - @RequiresRoles(value = {"root", "problem_admin"}, logical = Logical.OR) - public CommonResult addTag(@RequestBody Tag tag) { - return adminTagService.addTag(tag); - } - - @PutMapping("") - @RequiresAuthentication - @RequiresRoles(value = {"root", "problem_admin"}, logical = Logical.OR) - public CommonResult updateTag(@RequestBody Tag tag) { - return adminTagService.updateTag(tag); - } - - @DeleteMapping("") - @RequiresAuthentication - @RequiresRoles(value = {"root", "problem_admin"}, logical = Logical.OR) - public CommonResult deleteTag(@RequestParam("tid") Long tid) { - return adminTagService.deleteTag(tid); - } - - - @GetMapping("/classification") - @RequiresAuthentication - @RequiresRoles(value = {"root", "problem_admin"}, logical = Logical.OR) - public CommonResult> getTagClassification(@RequestParam(value = "oj", defaultValue = "ME") String oj) { - return adminTagService.getTagClassification(oj); - } - - @PostMapping("/classification") - @RequiresAuthentication - @RequiresRoles(value = {"root", "problem_admin"}, logical = Logical.OR) - public CommonResult addTagClassification(@RequestBody TagClassification tagClassification) { - return adminTagService.addTagClassification(tagClassification); - } - - @PutMapping("/classification") - @RequiresAuthentication - @RequiresRoles(value = {"root", "problem_admin"}, logical = Logical.OR) - public CommonResult updateTagClassification(@RequestBody TagClassification tagClassification) { - return adminTagService.updateTagClassification(tagClassification); - } - - @DeleteMapping("/classification") - @RequiresAuthentication - @RequiresRoles(value = {"root", "problem_admin"}, logical = Logical.OR) - public CommonResult deleteTagClassification(@RequestParam("tcid") Long tcid) { - return adminTagService.deleteTagClassification(tcid); - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/AdminTrainingCategoryController.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/AdminTrainingCategoryController.java deleted file mode 100644 index b49dfe6..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/AdminTrainingCategoryController.java +++ /dev/null @@ -1,48 +0,0 @@ -package top.hcode.hoj.controller.admin; - - -import org.apache.shiro.authz.annotation.Logical; -import org.apache.shiro.authz.annotation.RequiresAuthentication; -import org.apache.shiro.authz.annotation.RequiresRoles; -import org.springframework.web.bind.annotation.*; -import top.hcode.hoj.common.result.CommonResult; - -import top.hcode.hoj.pojo.entity.training.TrainingCategory; -import top.hcode.hoj.service.admin.training.AdminTrainingCategoryService; - -import javax.annotation.Resource; - -/** - * @Author: Himit_ZH - * @Date: 2021/11/27 15:11 - * @Description: - */ - -@RestController -@RequestMapping("/api/admin/training/category") -public class AdminTrainingCategoryController { - - @Resource - private AdminTrainingCategoryService adminTrainingCategoryService; - - @PostMapping("") - @RequiresAuthentication - @RequiresRoles(value = {"root", "problem_admin"}, logical = Logical.OR) - public CommonResult addTrainingCategory(@RequestBody TrainingCategory trainingCategory) { - return adminTrainingCategoryService.addTrainingCategory(trainingCategory); - } - - @PutMapping("") - @RequiresAuthentication - @RequiresRoles(value = {"root", "problem_admin"}, logical = Logical.OR) - public CommonResult updateTrainingCategory(@RequestBody TrainingCategory trainingCategory) { - return adminTrainingCategoryService.updateTrainingCategory(trainingCategory); - } - - @DeleteMapping("") - @RequiresAuthentication - @RequiresRoles(value = {"root", "problem_admin"}, logical = Logical.OR) - public CommonResult deleteTrainingCategory(@RequestParam("cid") Long cid) { - return adminTrainingCategoryService.deleteTrainingCategory(cid); - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/AdminTrainingController.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/AdminTrainingController.java deleted file mode 100644 index c8e0c0e..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/AdminTrainingController.java +++ /dev/null @@ -1,128 +0,0 @@ -package top.hcode.hoj.controller.admin; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.apache.shiro.authz.annotation.Logical; -import org.apache.shiro.authz.annotation.RequiresAuthentication; -import org.apache.shiro.authz.annotation.RequiresRoles; -import org.springframework.transaction.annotation.Transactional; -import org.springframework.web.bind.annotation.*; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.dto.TrainingDto; -import top.hcode.hoj.pojo.dto.TrainingProblemDto; -import top.hcode.hoj.pojo.entity.training.Training; -import top.hcode.hoj.pojo.entity.training.TrainingProblem; -import top.hcode.hoj.service.admin.training.AdminTrainingProblemService; -import top.hcode.hoj.service.admin.training.AdminTrainingService; - -import javax.annotation.Resource; -import java.util.HashMap; - -/** - * @Author Himit_ZH - * @Since 2022/01/23 20:22 - * @Description - */ -@RestController -@RequestMapping("/api/admin/training") -public class AdminTrainingController { - - @Resource - private AdminTrainingService adminTrainingService; - - @Resource - private AdminTrainingProblemService adminTrainingProblemService; - - - @GetMapping("/get-training-list") - @RequiresAuthentication - @RequiresRoles(value = {"root", "admin", "problem_admin"}, logical = Logical.OR) - public CommonResult> getTrainingList(@RequestParam(value = "limit", required = false) Integer limit, - @RequestParam(value = "currentPage", required = false) Integer currentPage, - @RequestParam(value = "keyword", required = false) String keyword) { - return adminTrainingService.getTrainingList(limit, currentPage, keyword); - } - - @GetMapping("") - @RequiresAuthentication - @RequiresRoles(value = {"root", "admin", "problem_admin"}, logical = Logical.OR) - public CommonResult getTraining(@RequestParam("tid") Long tid) { - return adminTrainingService.getTraining(tid); - } - - @DeleteMapping("") - @RequiresAuthentication - @RequiresRoles(value = "root") // 只有超级管理员能删除训练 - public CommonResult deleteTraining(@RequestParam("tid") Long tid) { - return adminTrainingService.deleteTraining(tid); - } - - @PostMapping("") - @RequiresAuthentication - @RequiresRoles(value = {"root", "admin", "problem_admin"}, logical = Logical.OR) - public CommonResult addTraining(@RequestBody TrainingDto trainingDto) { - return adminTrainingService.addTraining(trainingDto); - } - - @PutMapping("") - @RequiresAuthentication - @RequiresRoles(value = {"root", "admin", "problem_admin"}, logical = Logical.OR) - public CommonResult updateTraining(@RequestBody TrainingDto trainingDto) { - return adminTrainingService.updateTraining(trainingDto); - } - - - @PutMapping("/change-training-status") - @RequiresAuthentication - @RequiresRoles(value = {"root", "admin", "problem_admin"}, logical = Logical.OR) - public CommonResult changeTrainingStatus(@RequestParam(value = "tid", required = true) Long tid, - @RequestParam(value = "author", required = true) String author, - @RequestParam(value = "status", required = true) Boolean status) { - return adminTrainingService.changeTrainingStatus(tid, author, status); - } - - @GetMapping("/get-problem-list") - @RequiresAuthentication - @RequiresRoles(value = {"root", "admin", "problem_admin"}, logical = Logical.OR) - public CommonResult> getProblemList(@RequestParam(value = "limit", required = false) Integer limit, - @RequestParam(value = "currentPage", required = false) Integer currentPage, - @RequestParam(value = "keyword", required = false) String keyword, - @RequestParam(value = "queryExisted", defaultValue = "false") Boolean queryExisted, - @RequestParam(value = "tid", required = true) Long tid) { - return adminTrainingProblemService.getProblemList(limit, currentPage, keyword, queryExisted, tid); - } - - - @PutMapping("/problem") - @RequiresAuthentication - @RequiresRoles(value = {"root", "problem_admin"}, logical = Logical.OR) - public CommonResult updateProblem(@RequestBody TrainingProblem trainingProblem) { - return adminTrainingProblemService.updateProblem(trainingProblem); - } - - @DeleteMapping("/problem") - @RequiresAuthentication - @RequiresRoles(value = {"root", "problem_admin"}, logical = Logical.OR) - public CommonResult deleteProblem(@RequestParam("pid") Long pid, - @RequestParam(value = "tid", required = false) Long tid) { - - return adminTrainingProblemService.deleteProblem(pid, tid); - } - - @PostMapping("/add-problem-from-public") - @RequiresAuthentication - @RequiresRoles(value = {"root", "admin", "problem_admin"}, logical = Logical.OR) - public CommonResult addProblemFromPublic(@RequestBody TrainingProblemDto trainingProblemDto) { - return adminTrainingProblemService.addProblemFromPublic(trainingProblemDto); - } - - @GetMapping("/import-remote-oj-problem") - @RequiresAuthentication - @RequiresRoles(value = {"root", "admin", "problem_admin"}, logical = Logical.OR) - @Transactional(rollbackFor = Exception.class) - public CommonResult importTrainingRemoteOJProblem(@RequestParam("name") String name, - @RequestParam("problemId") String problemId, - @RequestParam("tid") Long tid) { - return adminTrainingProblemService.importTrainingRemoteOJProblem(name, problemId, tid); - } - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/AdminUserController.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/AdminUserController.java deleted file mode 100644 index 48b80d2..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/AdminUserController.java +++ /dev/null @@ -1,69 +0,0 @@ -package top.hcode.hoj.controller.admin; - - -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.apache.shiro.authz.annotation.RequiresAuthentication; -import org.apache.shiro.authz.annotation.RequiresPermissions; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.dto.AdminEditUserDto; -import top.hcode.hoj.pojo.vo.UserRolesVo; -import top.hcode.hoj.service.admin.user.AdminUserService; - -import java.util.List; -import java.util.Map; - - -/** - * @Author: Himit_ZH - * @Date: 2020/12/6 15:18 - * @Description: - */ -@RestController -@RequestMapping("/api/admin/user") -public class AdminUserController { - - @Autowired - private AdminUserService adminUserService; - - - @GetMapping("/get-user-list") - @RequiresAuthentication - @RequiresPermissions("user_admin") - public CommonResult> getUserList(@RequestParam(value = "limit", required = false) Integer limit, - @RequestParam(value = "currentPage", required = false) Integer currentPage, - @RequestParam(value = "onlyAdmin", defaultValue = "false") Boolean onlyAdmin, - @RequestParam(value = "keyword", required = false) String keyword) { - return adminUserService.getUserList(limit, currentPage, onlyAdmin, keyword); - } - - @PutMapping("/edit-user") - @RequiresPermissions("user_admin") - @RequiresAuthentication - public CommonResult editUser(@RequestBody AdminEditUserDto adminEditUserDto) { - return adminUserService.editUser(adminEditUserDto); - } - - @DeleteMapping("/delete-user") - @RequiresPermissions("user_admin") - @RequiresAuthentication - public CommonResult deleteUser(@RequestBody Map params) { - return adminUserService.deleteUser((List) params.get("ids")); - } - - @PostMapping("/insert-batch-user") - @RequiresPermissions("user_admin") - @RequiresAuthentication - public CommonResult insertBatchUser(@RequestBody Map params) { - return adminUserService.insertBatchUser((List>) params.get("users")); - } - - @PostMapping("/generate-user") - @RequiresPermissions("user_admin") - @RequiresAuthentication - public CommonResult> generateUser(@RequestBody Map params) { - return adminUserService.generateUser(params); - } - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/AnnouncementController.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/AnnouncementController.java deleted file mode 100644 index 1ceb1a0..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/AnnouncementController.java +++ /dev/null @@ -1,53 +0,0 @@ -package top.hcode.hoj.controller.admin; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.apache.shiro.authz.annotation.RequiresAuthentication; -import org.apache.shiro.authz.annotation.RequiresPermissions; -import org.apache.shiro.authz.annotation.RequiresRoles; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.entity.common.Announcement; -import top.hcode.hoj.pojo.vo.AnnouncementVo; -import top.hcode.hoj.service.admin.announcement.AdminAnnouncementService; - - -/** - * @Author: Himit_ZH - * @Date: 2020/12/10 19:53 - * @Description: - */ -@RestController -@RequiresAuthentication -@RequestMapping("/api/admin") -public class AnnouncementController { - - @Autowired - private AdminAnnouncementService adminAnnouncementService; - - @GetMapping("/announcement") - @RequiresPermissions("announcement_admin") - public CommonResult> getAnnouncementList(@RequestParam(value = "limit", required = false) Integer limit, - @RequestParam(value = "currentPage", required = false) Integer currentPage) { - return adminAnnouncementService.getAnnouncementList(limit, currentPage); - } - - @DeleteMapping("/announcement") - @RequiresPermissions("announcement_admin") - public CommonResult deleteAnnouncement(@RequestParam("aid") Long aid) { - return adminAnnouncementService.deleteAnnouncement(aid); - } - - @PostMapping("/announcement") - @RequiresRoles("root") // 只有超级管理员能操作 - @RequiresPermissions("announcement_admin") - public CommonResult addAnnouncement(@RequestBody Announcement announcement) { - return adminAnnouncementService.addAnnouncement(announcement); - } - - @PutMapping("/announcement") - @RequiresPermissions("announcement_admin") - public CommonResult updateAnnouncement(@RequestBody Announcement announcement) { - return adminAnnouncementService.updateAnnouncement(announcement); - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/ConfigController.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/ConfigController.java deleted file mode 100644 index 73337be..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/ConfigController.java +++ /dev/null @@ -1,105 +0,0 @@ -package top.hcode.hoj.controller.admin; - - -import cn.hutool.json.JSONObject; -import org.apache.shiro.authz.annotation.Logical; -import org.apache.shiro.authz.annotation.RequiresPermissions; -import org.apache.shiro.authz.annotation.RequiresRoles; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.dto.DBAndRedisConfigDto; -import top.hcode.hoj.pojo.dto.EmailConfigDto; -import top.hcode.hoj.pojo.dto.TestEmailDto; -import top.hcode.hoj.pojo.dto.WebConfigDto; -import top.hcode.hoj.service.admin.system.ConfigService; - - -import javax.mail.MessagingException; -import java.util.List; -import java.util.Map; - -/** - * @Author: Himit_ZH - * @Date: 2020/12/2 21:42 - * @Description: - */ -@RestController -@RequestMapping("/api/admin/config") -public class ConfigController { - - @Autowired - private ConfigService configService; - - /** - * @MethodName getServiceInfo - * @Params * @param null - * @Description 获取当前服务的相关信息以及当前系统的cpu情况,内存使用情况 - * @Return CommonResult - * @Since 2020/12/3 - */ - @RequiresRoles(value = {"root", "admin", "problem_admin"}, logical = Logical.OR) - @RequestMapping("/get-service-info") - public CommonResult getServiceInfo() { - return configService.getServiceInfo(); - } - - @RequiresRoles(value = {"root", "admin", "problem_admin"}, logical = Logical.OR) - @RequestMapping("/get-judge-service-info") - public CommonResult> getJudgeServiceInfo() { - return configService.getJudgeServiceInfo(); - } - - @RequiresPermissions("system_info_admin") - @RequestMapping("/get-web-config") - public CommonResult getWebConfig() { - return configService.getWebConfig(); - } - - - @RequiresPermissions("system_info_admin") - @DeleteMapping("/home-carousel") - public CommonResult deleteHomeCarousel(@RequestParam("id") Long id) { - - return configService.deleteHomeCarousel(id); - } - - @RequiresPermissions("system_info_admin") - @RequestMapping(value = "/set-web-config", method = RequestMethod.PUT) - public CommonResult setWebConfig(@RequestBody WebConfigDto config) { - - return configService.setWebConfig(config); - } - - @RequiresPermissions("system_info_admin") - @RequestMapping("/get-email-config") - public CommonResult getEmailConfig() { - - return configService.getEmailConfig(); - } - - @RequiresPermissions("system_info_admin") - @PutMapping("/set-email-config") - public CommonResult setEmailConfig(@RequestBody EmailConfigDto config) { - return configService.setEmailConfig(config); - } - - @RequiresPermissions("system_info_admin") - @PostMapping("/test-email") - public CommonResult testEmail(@RequestBody TestEmailDto testEmailDto) { - return configService.testEmail(testEmailDto); - } - - @RequiresPermissions("system_info_admin") - @RequestMapping("/get-db-and-redis-config") - public CommonResult getDBAndRedisConfig() { - return configService.getDBAndRedisConfig(); - } - - @RequiresPermissions("system_info_admin") - @PutMapping("/set-db-and-redis-config") - public CommonResult setDBAndRedisConfig(@RequestBody DBAndRedisConfigDto config) { - return configService.setDBAndRedisConfig(config); - } - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/DashboardController.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/DashboardController.java deleted file mode 100644 index bd41ea8..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/DashboardController.java +++ /dev/null @@ -1,46 +0,0 @@ -package top.hcode.hoj.controller.admin; - -import org.apache.shiro.authz.annotation.Logical; -import org.apache.shiro.authz.annotation.RequiresAuthentication; -import org.apache.shiro.authz.annotation.RequiresRoles; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.entity.user.Session; -import top.hcode.hoj.service.admin.system.DashboardService; - - -import java.util.Map; - -/** - * @Author: Himit_ZH - * @Date: 2020/12/6 15:10 - * @Description: - */ -@RestController -@RequestMapping("/api/admin/dashboard") -public class DashboardController { - - @Autowired - private DashboardService dashboardService; - - - @PostMapping("/get-sessions") - @RequiresAuthentication - @RequiresRoles(value = {"root","admin","problem_admin"},logical = Logical.OR) - public CommonResult getRecentSession(){ - - return dashboardService.getRecentSession(); - } - - @GetMapping("/get-dashboard-info") - @RequiresAuthentication - @RequiresRoles(value = {"root","admin","problem_admin"},logical = Logical.OR) - public CommonResult> getDashboardInfo(){ - - return dashboardService.getDashboardInfo(); - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/SwitchController.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/SwitchController.java deleted file mode 100644 index 1a1d90d..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/SwitchController.java +++ /dev/null @@ -1,37 +0,0 @@ -package top.hcode.hoj.controller.admin; - -import org.apache.shiro.authz.annotation.RequiresPermissions; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.dto.SwitchConfigDto; -import top.hcode.hoj.service.admin.system.ConfigService; - -import javax.annotation.Resource; - -/** - * @Author Himit_ZH - * @Date 2022/5/9 - */ -@RestController -@RequestMapping("/api/admin/switch") -public class SwitchController { - - @Resource - private ConfigService configService; - - @RequiresPermissions("system_info_admin") - @RequestMapping("/info") - public CommonResult getSwitchConfig() { - - return configService.getSwitchConfig(); - } - - @RequiresPermissions("system_info_admin") - @PutMapping("/update") - public CommonResult setSwitchConfig(@RequestBody SwitchConfigDto config) { - return configService.setSwitchConfig(config); - } -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/file/ContestFileController.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/file/ContestFileController.java deleted file mode 100644 index fcfde26..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/file/ContestFileController.java +++ /dev/null @@ -1,57 +0,0 @@ -package top.hcode.hoj.controller.file; - - -import org.apache.shiro.authz.annotation.RequiresAuthentication; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.exception.StatusForbiddenException; -import top.hcode.hoj.service.file.ContestFileService; -import javax.servlet.http.HttpServletResponse; -import java.io.*; - -/** - * @Author: Himit_ZH - * @Date: 2021/10/5 19:55 - * @Description: - */ -@Controller -@RequestMapping("/api/file") -public class ContestFileController { - - @Autowired - private ContestFileService contestFileService; - - - @GetMapping("/download-contest-rank") - @RequiresAuthentication - public void downloadContestRank(@RequestParam("cid") Long cid, - @RequestParam("forceRefresh") Boolean forceRefresh, - @RequestParam(value = "removeStar", defaultValue = "false") Boolean removeStar, - HttpServletResponse response) throws StatusFailException, IOException, StatusForbiddenException { - contestFileService.downloadContestRank(cid, forceRefresh, removeStar, response); - } - - @GetMapping("/download-contest-ac-submission") - @RequiresAuthentication - public void downloadContestACSubmission(@RequestParam("cid") Long cid, - @RequestParam(value = "excludeAdmin", defaultValue = "false") Boolean excludeAdmin, - @RequestParam(value = "splitType", defaultValue = "user") String splitType, - HttpServletResponse response) throws StatusFailException, StatusForbiddenException { - - contestFileService.downloadContestACSubmission(cid, excludeAdmin, splitType, response); - } - - - @GetMapping("/download-contest-print-text") - @RequiresAuthentication - public void downloadContestPrintText(@RequestParam("id") Long id, HttpServletResponse response) throws StatusForbiddenException{ - contestFileService.downloadContestPrintText(id, response); - } - - - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/file/ImageController.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/file/ImageController.java deleted file mode 100644 index aa988e0..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/file/ImageController.java +++ /dev/null @@ -1,55 +0,0 @@ -package top.hcode.hoj.controller.file; - - -import org.apache.shiro.authz.annotation.RequiresAuthentication; -import org.apache.shiro.authz.annotation.RequiresRoles; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.ResponseBody; -import org.springframework.web.multipart.MultipartFile; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.entity.group.Group; -import top.hcode.hoj.service.file.ImageService; - -import java.util.Map; - -/** - * @Author: Himit_ZH - * @Date: 2021/10/5 19:46 - * @Description: - */ -@Controller -@RequestMapping("/api/file") -public class ImageController { - - @Autowired - private ImageService imageService; - - - @RequestMapping(value = "/upload-avatar", method = RequestMethod.POST) - @RequiresAuthentication - @ResponseBody - public CommonResult> uploadAvatar(@RequestParam("image") MultipartFile image) { - return imageService.uploadAvatar(image); - } - - @RequestMapping(value = "/upload-group-avatar", method = RequestMethod.POST) - @RequiresAuthentication - @ResponseBody - public CommonResult uploadGroupAvatar(@RequestParam(value = "image", required = true) MultipartFile image, - @RequestParam(value = "gid", required = true) Long gid) { - return imageService.uploadGroupAvatar(image, gid); - } - - @RequestMapping(value = "/upload-carouse-img", method = RequestMethod.POST) - @RequiresAuthentication - @ResponseBody - @RequiresRoles("root") - public CommonResult> uploadCarouselImg(@RequestParam("file") MultipartFile image) { - return imageService.uploadCarouselImg(image); - } - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/file/ImportFpsProblemController.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/file/ImportFpsProblemController.java deleted file mode 100644 index ca20a25..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/file/ImportFpsProblemController.java +++ /dev/null @@ -1,46 +0,0 @@ -package top.hcode.hoj.controller.file; - - -import org.apache.shiro.authz.annotation.RequiresAuthentication; -import org.apache.shiro.authz.annotation.RequiresRoles; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.ResponseBody; -import org.springframework.web.multipart.MultipartFile; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.service.file.ImportFpsProblemService; - -import javax.annotation.Resource; - -/** - * @Author: Himit_ZH - * @Date: 2021/10/5 19:45 - * @Description: - */ -@Controller -@RequestMapping("/api/file") -public class ImportFpsProblemController { - - - @Resource - private ImportFpsProblemService importFpsProblemService; - - /** - * @param file - * @MethodName importFpsProblem - * @Description zip文件导入题目 仅超级管理员可操作 - * @Return - * @Since 2021/10/06 - */ - @RequiresRoles("root") - @RequiresAuthentication - @ResponseBody - @PostMapping("/import-fps-problem") - public CommonResult importFPSProblem(@RequestParam("file") MultipartFile file) { - return importFpsProblemService.importFPSProblem(file); - } - - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/file/ImportQDUOJProblemController.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/file/ImportQDUOJProblemController.java deleted file mode 100644 index 9fccb2d..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/file/ImportQDUOJProblemController.java +++ /dev/null @@ -1,45 +0,0 @@ -package top.hcode.hoj.controller.file; - - -import org.apache.shiro.authz.annotation.RequiresAuthentication; -import org.apache.shiro.authz.annotation.RequiresRoles; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.ResponseBody; -import org.springframework.web.multipart.MultipartFile; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.service.file.ImportQDUOJProblemService; - -/** - * @Author: Himit_ZH - * @Date: 2021/10/5 19:44 - * @Description: - */ - -@Controller -@RequestMapping("/api/file") -public class ImportQDUOJProblemController { - - @Autowired - private ImportQDUOJProblemService importQDUOJProblemService; - - /** - * @param file - * @MethodName importQDOJProblem - * @Description zip文件导入题目 仅超级管理员可操作 - * @Return - * @Since 2021/5/27 - */ - @RequiresRoles("root") - @RequiresAuthentication - @ResponseBody - @PostMapping("/import-qdoj-problem") - public CommonResult importQDOJProblem(@RequestParam("file") MultipartFile file) { - return importQDUOJProblemService.importQDOJProblem(file); - } - - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/file/MarkDownFileController.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/file/MarkDownFileController.java deleted file mode 100644 index 1b60b2e..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/file/MarkDownFileController.java +++ /dev/null @@ -1,54 +0,0 @@ -package top.hcode.hoj.controller.file; - -import org.apache.shiro.authz.annotation.RequiresAuthentication; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.ResponseBody; -import org.springframework.web.multipart.MultipartFile; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.service.file.MarkDownFileService; - -import javax.annotation.Resource; -import java.util.Map; - -/** - * @Author: Himit_ZH - * @Date: 2021/10/5 20:01 - * @Description: - */ -@Controller -@RequestMapping("/api/file") -public class MarkDownFileController { - - - @Resource - private MarkDownFileService markDownFileService; - - @RequestMapping(value = "/upload-md-img", method = RequestMethod.POST) - @RequiresAuthentication - @ResponseBody - public CommonResult> uploadMDImg(@RequestParam("image") MultipartFile image, - @RequestParam(value = "gid", required = false) Long gid) { - return markDownFileService.uploadMDImg(image, gid); - } - - - @RequestMapping(value = "/delete-md-img", method = RequestMethod.GET) - @RequiresAuthentication - @ResponseBody - public CommonResult deleteMDImg(@RequestParam("fileId") Long fileId) { - return markDownFileService.deleteMDImg(fileId); - } - - - @RequestMapping(value = "/upload-md-file", method = RequestMethod.POST) - @RequiresAuthentication - @ResponseBody - public CommonResult> uploadMd(@RequestParam("file") MultipartFile file, - @RequestParam(value = "gid", required = false) Long gid) { - return markDownFileService.uploadMd(file, gid); - } - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/file/ProblemFileController.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/file/ProblemFileController.java deleted file mode 100644 index 8ea143c..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/file/ProblemFileController.java +++ /dev/null @@ -1,59 +0,0 @@ -package top.hcode.hoj.controller.file; - - -import org.apache.shiro.authz.annotation.RequiresAuthentication; -import org.apache.shiro.authz.annotation.RequiresRoles; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.*; -import org.springframework.web.multipart.MultipartFile; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.service.file.ProblemFileService; -import javax.servlet.http.HttpServletResponse; -import java.util.*; - -/** - * @Author: Himit_ZH - * @Date: 2021/10/5 20:05 - * @Description: - */ -@Controller -@RequestMapping("/api/file") -public class ProblemFileController { - - @Autowired - private ProblemFileService problemFileService; - - - /** - * @param file - * @MethodName importProblem - * @Description zip文件导入题目 仅超级管理员可操作 - * @Return - * @Since 2021/5/27 - */ - @RequiresRoles("root") - @RequiresAuthentication - @ResponseBody - @PostMapping("/import-problem") - public CommonResult importProblem(@RequestParam("file") MultipartFile file) { - return problemFileService.importProblem(file); - } - - - /** - * @param pidList - * @param response - * @MethodName exportProblem - * @Description 导出指定的题目包括测试数据生成zip 仅超级管理员可操作 - * @Return - * @Since 2021/5/28 - */ - @GetMapping("/export-problem") - @RequiresAuthentication - @RequiresRoles("root") - public void exportProblem(@RequestParam("pid") List pidList, HttpServletResponse response) { - problemFileService.exportProblem(pidList, response); - } - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/file/TestCaseController.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/file/TestCaseController.java deleted file mode 100644 index 63347f1..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/file/TestCaseController.java +++ /dev/null @@ -1,42 +0,0 @@ -package top.hcode.hoj.controller.file; - -import top.hcode.hoj.common.exception.StatusForbiddenException; -import org.apache.shiro.authz.annotation.RequiresAuthentication; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.*; -import org.springframework.web.multipart.MultipartFile; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.service.file.TestCaseService; - -import javax.servlet.http.HttpServletResponse; -import java.util.*; - -/** - * @Author: Himit_ZH - * @Date: 2021/10/5 19:51 - * @Description: - */ -@Controller -@RequestMapping("/api/file") -public class TestCaseController { - - @Autowired - private TestCaseService testCaseService; - - - @PostMapping("/upload-testcase-zip") - @ResponseBody - public CommonResult> uploadTestcaseZip(@RequestParam("file") MultipartFile file, - @RequestParam(value = "gid", required = false) Long gid) { - return testCaseService.uploadTestcaseZip(file, gid); - } - - - @GetMapping("/download-testcase") - @RequiresAuthentication - public void downloadTestcase(@RequestParam("pid") Long pid, HttpServletResponse response) throws StatusFailException, StatusForbiddenException { - testCaseService.downloadTestcase(pid, response); - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/file/UserFileController.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/file/UserFileController.java deleted file mode 100644 index 121a8a7..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/file/UserFileController.java +++ /dev/null @@ -1,34 +0,0 @@ -package top.hcode.hoj.controller.file; - - -import org.apache.shiro.authz.annotation.RequiresAuthentication; -import org.apache.shiro.authz.annotation.RequiresRoles; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import top.hcode.hoj.service.file.UserFileService; - -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; - -/** - * @Author: Himit_ZH - * @Date: 2021/10/5 19:48 - * @Description: - */ -@Controller -@RequestMapping("/api/file") -public class UserFileController { - - @Autowired - private UserFileService userFileService; - - @RequestMapping("/generate-user-excel") - @RequiresAuthentication - @RequiresRoles("root") - public void generateUserExcel(@RequestParam("key") String key, HttpServletResponse response) throws IOException { - userFileService.generateUserExcel(key, response); - } - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/group/GroupAnnouncementController.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/group/GroupAnnouncementController.java deleted file mode 100644 index 5e0183c..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/group/GroupAnnouncementController.java +++ /dev/null @@ -1,54 +0,0 @@ -package top.hcode.hoj.controller.group; - -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.entity.common.Announcement; -import top.hcode.hoj.pojo.vo.AnnouncementVo; -import top.hcode.hoj.service.group.announcement.GroupAnnouncementService; -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.apache.shiro.authz.annotation.RequiresAuthentication; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; - -/** - * @Author: LengYun - * @Date: 2022/3/11 13:36 - * @Description: - */ -@RestController -@RequiresAuthentication -@RequestMapping("/api/group") -public class GroupAnnouncementController { - - @Autowired - private GroupAnnouncementService groupAnnouncementService; - - @GetMapping("/get-announcement-list") - public CommonResult> getAnnouncementList(@RequestParam(value = "limit", required = false) Integer limit, - @RequestParam(value = "currentPage", required = false) Integer currentPage, - @RequestParam(value = "gid", required = true) Long gid) { - return groupAnnouncementService.getAnnouncementList(limit, currentPage, gid); - } - - @GetMapping("/get-admin-announcement-list") - public CommonResult> getAdminAnnouncementList(@RequestParam(value = "limit", required = false) Integer limit, - @RequestParam(value = "currentPage", required = false) Integer currentPage, - @RequestParam(value = "gid", required = true) Long gid) { - return groupAnnouncementService.getAdminAnnouncementList(limit, currentPage, gid); - } - - @PostMapping("/announcement") - public CommonResult addAnnouncement(@RequestBody Announcement announcement) { - return groupAnnouncementService.addAnnouncement(announcement); - } - - @PutMapping("/announcement") - public CommonResult updateAnnouncement(@RequestBody Announcement announcement) { - return groupAnnouncementService.updateAnnouncement(announcement); - } - - @DeleteMapping("/announcement") - public CommonResult deleteAnnouncement(@RequestParam(value = "aid", required = true) Long aid) { - return groupAnnouncementService.deleteAnnouncement(aid); - } - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/group/GroupContestController.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/group/GroupContestController.java deleted file mode 100644 index ffe074b..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/group/GroupContestController.java +++ /dev/null @@ -1,151 +0,0 @@ -package top.hcode.hoj.controller.group; - -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.dto.AnnouncementDto; -import top.hcode.hoj.pojo.dto.ContestProblemDto; -import top.hcode.hoj.pojo.dto.ProblemDto; -import top.hcode.hoj.pojo.entity.contest.Contest; -import top.hcode.hoj.pojo.entity.contest.ContestProblem; -import top.hcode.hoj.pojo.vo.AdminContestVo; -import top.hcode.hoj.pojo.vo.AnnouncementVo; -import top.hcode.hoj.pojo.vo.ContestVo; -import top.hcode.hoj.service.group.contest.GroupContestAnnouncementService; -import top.hcode.hoj.service.group.contest.GroupContestProblemService; -import top.hcode.hoj.service.group.contest.GroupContestService; -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.apache.shiro.authz.annotation.RequiresAuthentication; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; - -import java.util.HashMap; -import java.util.Map; - -/** - * @Author: LengYun - * @Date: 2022/3/11 13:36 - * @Description: - */ -@RestController -@RequiresAuthentication -@RequestMapping("/api/group") -public class GroupContestController { - - @Autowired - private GroupContestService groupContestService; - - @Autowired - private GroupContestProblemService groupContestProblemService; - - @Autowired - private GroupContestAnnouncementService groupContestAnnouncementService; - - @GetMapping("/get-contest-list") - public CommonResult> getContestList(@RequestParam(value = "limit", required = false) Integer limit, - @RequestParam(value = "currentPage", required = false) Integer currentPage, - @RequestParam(value = "gid", required = true) Long gid) { - return groupContestService.getContestList(limit, currentPage, gid); - } - - @GetMapping("/get-admin-contest-list") - public CommonResult> getAdminContestList(@RequestParam(value = "limit", required = false) Integer limit, - @RequestParam(value = "currentPage", required = false) Integer currentPage, - @RequestParam(value = "gid", required = true) Long gid) { - return groupContestService.getAdminContestList(limit, currentPage, gid); - } - - @GetMapping("/contest") - public CommonResult getContest(@RequestParam("cid") Long cid) { - return groupContestService.getContest(cid); - } - - @PostMapping("/contest") - public CommonResult addContest(@RequestBody AdminContestVo adminContestVo) { - return groupContestService.addContest(adminContestVo); - } - - @PutMapping("/contest") - public CommonResult updateContest(@RequestBody AdminContestVo adminContestVo) { - return groupContestService.updateContest(adminContestVo); - } - - @DeleteMapping("/contest") - public CommonResult deleteContest(@RequestParam(value = "cid", required = true) Long cid) { - return groupContestService.deleteContest(cid); - } - - @PutMapping("/change-contest-visible") - public CommonResult changeContestVisible(@RequestParam(value = "cid", required = true) Long cid, - @RequestParam(value = "visible", required = true) Boolean visible) { - return groupContestService.changeContestVisible(cid, visible); - } - - @GetMapping("/get-contest-problem-list") - public CommonResult> getContestProblemList(@RequestParam(value = "limit", required = false) Integer limit, - @RequestParam(value = "currentPage", required = false) Integer currentPage, - @RequestParam(value = "keyword", required = false) String keyword, - @RequestParam(value = "cid", required = true) Long cid, - @RequestParam(value = "problemType", required = false) Integer problemType, - @RequestParam(value = "oj", required = false) String oj) { - return groupContestProblemService.getContestProblemList(limit, currentPage, keyword, cid, problemType, oj); - } - - @PostMapping("/contest-problem") - public CommonResult> addProblem(@RequestBody ProblemDto problemDto) { - - return groupContestProblemService.addProblem(problemDto); - } - - @GetMapping("/contest-problem") - public CommonResult getContestProblem(@RequestParam(value = "pid", required = true) Long pid, - @RequestParam(value = "cid", required = true) Long cid) { - - return groupContestProblemService.getContestProblem(pid, cid); - } - - @PutMapping("/contest-problem") - public CommonResult updateContestProblem(@RequestBody ContestProblem contestProblem) { - - return groupContestProblemService.updateContestProblem(contestProblem); - } - - @DeleteMapping("/contest-problem") - public CommonResult deleteContestProblem(@RequestParam(value = "pid", required = true) Long pid, - @RequestParam(value = "cid", required = true) Long cid) { - return groupContestProblemService.deleteContestProblem(pid, cid); - } - - @PostMapping("/add-contest-problem-from-public") - public CommonResult addProblemFromPublic(@RequestBody ContestProblemDto contestProblemDto) { - return groupContestProblemService.addProblemFromPublic(contestProblemDto); - } - - @PostMapping("/add-contest-problem-from-group") - public CommonResult addProblemFromGroup(@RequestParam(value = "problemId", required = true) String problemId, - @RequestParam(value = "cid", required = true) Long cid, - @RequestParam(value = "displayId", required = true) String displayId) { - return groupContestProblemService.addProblemFromGroup(problemId, cid, displayId); - } - - @GetMapping("/get-contest-announcement-list") - public CommonResult> getContestAnnouncementList(@RequestParam(value = "limit", required = false) Integer limit, - @RequestParam(value = "currentPage", required = false) Integer currentPage, - @RequestParam(value = "cid", required = true) Long cid) { - return groupContestAnnouncementService.getContestAnnouncementList(limit, currentPage, cid); - } - - @PostMapping("/contest-announcement") - public CommonResult addContestAnnouncement(@RequestBody AnnouncementDto announcementDto) { - return groupContestAnnouncementService.addContestAnnouncement(announcementDto); - } - - @PutMapping("/contest-announcement") - public CommonResult updateContestAnnouncement(@RequestBody AnnouncementDto announcementDto) { - return groupContestAnnouncementService.updateContestAnnouncement(announcementDto); - } - - @DeleteMapping("/contest-announcement") - public CommonResult deleteContestAnnouncement(@RequestParam(value = "aid", required = true) Long aid, - @RequestParam(value = "cid", required = true) Long cid) { - return groupContestAnnouncementService.deleteContestAnnouncement(aid, cid); - } -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/group/GroupController.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/group/GroupController.java deleted file mode 100644 index c28db14..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/group/GroupController.java +++ /dev/null @@ -1,71 +0,0 @@ -package top.hcode.hoj.controller.group; - -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.entity.group.Group; -import top.hcode.hoj.pojo.vo.AccessVo; -import top.hcode.hoj.pojo.vo.GroupVo; -import top.hcode.hoj.service.group.GroupService; -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.apache.shiro.authz.annotation.RequiresAuthentication; -import org.apache.shiro.authz.annotation.RequiresPermissions; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; - -/** - * @Author: LengYun - * @Date: 2022/3/11 13:36 - * @Description: - */ -@RestController -@RequestMapping("/api") -public class GroupController { - - @Autowired - private GroupService groupService; - - @GetMapping("/get-group-list") - public CommonResult> getGroupList(@RequestParam(value = "limit", required = false) Integer limit, - @RequestParam(value = "currentPage", required = false) Integer currentPage, - @RequestParam(value = "keyword", required = false) String keyword, - @RequestParam(value = "auth", required = false) Integer auth, - @RequestParam(value = "onlyMine", required = false) Boolean onlyMine) { - return groupService.getGroupList(limit, currentPage, keyword, auth, onlyMine); - } - - @GetMapping("/get-group-detail") - public CommonResult getGroup(@RequestParam(value = "gid", required = true) Long gid) { - return groupService.getGroup(gid); - } - - @RequiresAuthentication - @GetMapping("/get-group-access") - public CommonResult getGroupAccess(@RequestParam(value = "gid", required = true) Long gid) { - return groupService.getGroupAccess(gid); - } - - @RequiresAuthentication - @GetMapping("/get-group-auth") - public CommonResult getGroupAuth(@RequestParam(value = "gid", required = true) Long gid) { - return groupService.getGroupAuth(gid); - } - - @PostMapping("/group") - @RequiresAuthentication - @RequiresPermissions("group_add") - public CommonResult addGroup(@RequestBody Group group) { - return groupService.addGroup(group); - } - - @PutMapping("/group") - @RequiresAuthentication - public CommonResult updateGroup(@RequestBody Group group) { - return groupService.updateGroup(group); - } - - @DeleteMapping("/group") - @RequiresAuthentication - @RequiresPermissions("group_del") - public CommonResult deleteGroup(@RequestParam(value = "gid", required = true) Long gid) { - return groupService.deleteGroup(gid); - } -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/group/GroupDiscussionController.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/group/GroupDiscussionController.java deleted file mode 100644 index d8f2c4b..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/group/GroupDiscussionController.java +++ /dev/null @@ -1,57 +0,0 @@ -package top.hcode.hoj.controller.group; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.apache.shiro.authz.annotation.RequiresAuthentication; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; -import top.hcode.hoj.annotation.HOJAccess; -import top.hcode.hoj.annotation.HOJAccessEnum; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.entity.discussion.Discussion; -import top.hcode.hoj.service.group.discussion.GroupDiscussionService; - -/** - * @Author: LengYun - * @Date: 2022/3/11 13:36 - * @Description: - */ -@RestController -@RequiresAuthentication -@RequestMapping("/api/group") -@HOJAccess({HOJAccessEnum.GROUP_DISCUSSION}) -public class GroupDiscussionController { - - @Autowired - private GroupDiscussionService groupDiscussionService; - - @GetMapping("/get-discussion-list") - public CommonResult> getDiscussionList(@RequestParam(value = "limit", required = false) Integer limit, - @RequestParam(value = "currentPage", required = false) Integer currentPage, - @RequestParam(value = "gid", required = true) Long gid, - @RequestParam(value = "pid", required = false) String pid) { - return groupDiscussionService.getDiscussionList(limit, currentPage, gid, pid); - } - - @GetMapping("/get-admin-discussion-list") - public CommonResult> getAdminDiscussionList(@RequestParam(value = "limit", required = false) Integer limit, - @RequestParam(value = "currentPage", required = false) Integer currentPage, - @RequestParam(value = "gid", required = true) Long gid) { - return groupDiscussionService.getAdminDiscussionList(limit, currentPage, gid); - } - - @PostMapping("/discussion") - public CommonResult addDiscussion(@RequestBody Discussion discussion) { - return groupDiscussionService.addDiscussion(discussion); - } - - @PutMapping("/discussion") - public CommonResult updateDiscussion(@RequestBody Discussion discussion) { - return groupDiscussionService.updateDiscussion(discussion); - } - - @DeleteMapping("/discussion") - public CommonResult deleteDiscussion(@RequestParam(value = "did", required = true) Long did) { - return groupDiscussionService.deleteDiscussion(did); - } - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/group/GroupMemberController.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/group/GroupMemberController.java deleted file mode 100644 index afe99e9..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/group/GroupMemberController.java +++ /dev/null @@ -1,71 +0,0 @@ -package top.hcode.hoj.controller.group; - -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.entity.group.GroupMember; -import top.hcode.hoj.pojo.vo.GroupMemberVo; -import top.hcode.hoj.service.group.member.GroupMemberService; -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.apache.shiro.authz.annotation.RequiresAuthentication; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; - -/** - * @Author: LengYun - * @Date: 2022/3/11 13:36 - * @Description: - */ -@RestController -@RequiresAuthentication -@RequestMapping("/api/group") -public class GroupMemberController { - - @Autowired - private GroupMemberService groupMemberService; - - @GetMapping("/get-member-list") - public CommonResult> getMemberList(@RequestParam(value = "limit", required = false) Integer limit, - @RequestParam(value = "currentPage", required = false) Integer currentPage, - @RequestParam(value = "keyword", required = false) String keyword, - @RequestParam(value = "auth", required = false) Integer auth, - @RequestParam(value = "gid", required = true) Long gid) { - return groupMemberService.getMemberList(limit, currentPage, keyword, auth, gid); - } - - @GetMapping("/get-apply-list") - public CommonResult> getApplyList(@RequestParam(value = "limit", required = false) Integer limit, - @RequestParam(value = "currentPage", required = false) Integer currentPage, - @RequestParam(value = "keyword", required = false) String keyword, - @RequestParam(value = "auth", required = false) Integer auth, - @RequestParam(value = "gid", required = true) Long gid) { - return groupMemberService.getApplyList(limit, currentPage, keyword, auth, gid); - } - - @PostMapping("/member") - @RequiresAuthentication - public CommonResult addGroupMember(@RequestParam(value = "gid", required = true) Long gid, - @RequestParam(value = "code", required = false) String code, - @RequestParam(value = "reason", required = false) String reason) { - return groupMemberService.addMember(gid, code, reason); - } - - @PutMapping("/member") - @RequiresAuthentication - public CommonResult updateMember(@RequestBody GroupMember groupMember) { - return groupMemberService.updateMember(groupMember); - } - - @DeleteMapping("/member") - @RequiresAuthentication - public CommonResult deleteMember(@RequestParam(value = "uid", required = true) String uid, - @RequestParam(value = "gid", required = true) Long gid) { - return groupMemberService.deleteMember(uid, gid); - } - - @DeleteMapping("/member/exit") - @RequiresAuthentication - public CommonResult exitGroup(@RequestParam(value = "gid", required = true) Long gid) { - return groupMemberService.exitGroup(gid); - } - - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/group/GroupProblemController.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/group/GroupProblemController.java deleted file mode 100644 index d8234ca..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/group/GroupProblemController.java +++ /dev/null @@ -1,100 +0,0 @@ -package top.hcode.hoj.controller.group; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.apache.shiro.authz.annotation.RequiresAuthentication; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.dto.ProblemDto; -import top.hcode.hoj.pojo.dto.CompileDTO; -import top.hcode.hoj.pojo.entity.problem.Problem; -import top.hcode.hoj.pojo.entity.problem.ProblemCase; -import top.hcode.hoj.pojo.entity.problem.Tag; -import top.hcode.hoj.pojo.vo.ProblemVo; -import top.hcode.hoj.service.group.problem.GroupProblemService; - -import java.util.List; - -/** - * @Author: LengYun - * @Date: 2022/3/11 13:36 - * @Description: - */ -@RestController -@RequiresAuthentication -@RequestMapping("/api/group") -public class GroupProblemController { - - @Autowired - private GroupProblemService groupProblemService; - - @GetMapping("/get-problem-list") - public CommonResult> getProblemList(@RequestParam(value = "limit", required = false) Integer limit, - @RequestParam(value = "currentPage", required = false) Integer currentPage, - @RequestParam(value = "gid", required = true) Long gid) { - return groupProblemService.getProblemList(limit, currentPage, gid); - } - - @GetMapping("/get-admin-problem-list") - public CommonResult> getAdminProblemList(@RequestParam(value = "limit", required = false) Integer limit, - @RequestParam(value = "currentPage", required = false) Integer currentPage, - @RequestParam(value = "gid", required = true) Long gid) { - return groupProblemService.getAdminProblemList(limit, currentPage, gid); - } - - @GetMapping("/problem") - public CommonResult getProblem(@RequestParam("pid") Long pid) { - return groupProblemService.getProblem(pid); - } - - @PostMapping("/problem") - public CommonResult addProblem(@RequestBody ProblemDto problemDto) { - return groupProblemService.addProblem(problemDto); - } - - @PutMapping("/problem") - public CommonResult updateProblem(@RequestBody ProblemDto problemDto) { - return groupProblemService.updateProblem(problemDto); - } - - @DeleteMapping("/problem") - public CommonResult deleteProblem(@RequestParam(value = "pid", required = true) Long pid) { - return groupProblemService.deleteProblem(pid); - } - - @GetMapping("/get-problem-cases") - public CommonResult> getProblemCases(@RequestParam("pid") Long pid, - @RequestParam(value = "isUpload", defaultValue = "true") Boolean isUpload) { - return groupProblemService.getProblemCases(pid, isUpload); - } - - @GetMapping("/get-all-problem-tags") - public CommonResult> getAllProblemTagsList(@RequestParam("gid") Long gid) { - return groupProblemService.getAllProblemTagsList(gid); - } - - @PostMapping("/compile-spj") - public CommonResult compileSpj(@RequestBody CompileDTO compileDTO, - @RequestParam("gid") Long gid) { - return groupProblemService.compileSpj(compileDTO, gid); - } - - @PostMapping("/compile-interactive") - public CommonResult compileInteractive(@RequestBody CompileDTO compileDTO, - @RequestParam("gid") Long gid) { - return groupProblemService.compileInteractive(compileDTO, gid); - } - - @PutMapping("/change-problem-auth") - public CommonResult changeProblemAuth(@RequestParam(value = "pid", required = true) Long pid, - @RequestParam(value = "auth", required = true) Integer auth) { - return groupProblemService.changeProblemAuth(pid, auth); - } - - - @PutMapping("/apply-public") - public CommonResult applyPublic(@RequestParam(value = "pid", required = true) Long pid, - @RequestParam(value = "isApplied", required = true) Boolean isApplied) { - return groupProblemService.applyPublic(pid, isApplied); - } -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/group/GroupRankController.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/group/GroupRankController.java deleted file mode 100644 index 6c99fdf..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/group/GroupRankController.java +++ /dev/null @@ -1,32 +0,0 @@ -package top.hcode.hoj.controller.group; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.vo.OIRankVo; -import top.hcode.hoj.service.group.GroupRankService; - -/** - * @Author Himit_ZH - * @Date 2022/4/22 - */ -@RestController -@RequestMapping("/api") -public class GroupRankController { - - @Autowired - private GroupRankService groupRankService; - - @GetMapping("/get-group-rank-list") - public CommonResult> getRankList(@RequestParam(value = "limit", required = false) Integer limit, - @RequestParam(value = "currentPage", required = false) Integer currentPage, - @RequestParam(value = "searchUser", required = false) String searchUser, - @RequestParam(value = "gid", required = true) Long gid, - @RequestParam(value = "type", required = true) Integer type) { - return groupRankService.getGroupRankList(limit, currentPage, searchUser, type, gid); - } -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/group/GroupTrainingController.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/group/GroupTrainingController.java deleted file mode 100644 index 154f2bc..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/group/GroupTrainingController.java +++ /dev/null @@ -1,104 +0,0 @@ -package top.hcode.hoj.controller.group; - -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.dto.TrainingDto; -import top.hcode.hoj.pojo.dto.TrainingProblemDto; -import top.hcode.hoj.pojo.entity.training.Training; -import top.hcode.hoj.pojo.entity.training.TrainingProblem; -import top.hcode.hoj.pojo.vo.TrainingVo; -import top.hcode.hoj.service.group.training.GroupTrainingProblemService; -import top.hcode.hoj.service.group.training.GroupTrainingService; -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.apache.shiro.authz.annotation.RequiresAuthentication; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; - -import java.util.HashMap; - -/** - * @Author: LengYun - * @Date: 2022/3/11 13:36 - * @Description: - */ -@RestController -@RequiresAuthentication -@RequestMapping("/api/group") -public class GroupTrainingController { - - @Autowired - private GroupTrainingService groupTrainingService; - - @Autowired - private GroupTrainingProblemService groupTrainingProblemService; - - @GetMapping("/get-training-list") - public CommonResult> getTrainingList(@RequestParam(value = "limit", required = false) Integer limit, - @RequestParam(value = "currentPage", required = false) Integer currentPage, - @RequestParam(value = "gid", required = true) Long gid) { - return groupTrainingService.getTrainingList(limit, currentPage, gid); - } - - @GetMapping("/get-admin-training-list") - public CommonResult> getAdminTrainingList(@RequestParam(value = "limit", required = false) Integer limit, - @RequestParam(value = "currentPage", required = false) Integer currentPage, - @RequestParam(value = "gid", required = true) Long gid) { - return groupTrainingService.getAdminTrainingList(limit, currentPage, gid); - } - - @GetMapping("/training") - public CommonResult getTraining(@RequestParam("tid") Long tid) { - return groupTrainingService.getTraining(tid); - } - - @PostMapping("/training") - public CommonResult addTraining(@RequestBody TrainingDto trainingDto) { - return groupTrainingService.addTraining(trainingDto); - } - - @PutMapping("/training") - public CommonResult updateTraining(@RequestBody TrainingDto trainingDto) { - return groupTrainingService.updateTraining(trainingDto); - } - - @DeleteMapping("/training") - public CommonResult deleteTraining(@RequestParam(value = "tid", required = true) Long tid) { - return groupTrainingService.deleteTraining(tid); - } - - @PutMapping("/change-training-status") - public CommonResult changeTrainingStatus(@RequestParam(value = "tid", required = true) Long tid, - @RequestParam(value = "status", required = true) Boolean status) { - return groupTrainingService.changeTrainingStatus(tid, status); - } - - @GetMapping("/get-training-problem-list") - public CommonResult> getTrainingProblemList(@RequestParam(value = "limit", required = false) Integer limit, - @RequestParam(value = "currentPage", required = false) Integer currentPage, - @RequestParam(value = "keyword", required = false) String keyword, - @RequestParam(value = "queryExisted", required = false, defaultValue = "true") Boolean queryExisted, - @RequestParam(value = "tid", required = true) Long tid) { - return groupTrainingProblemService.getTrainingProblemList(limit, currentPage, keyword, queryExisted, tid); - } - - @PutMapping("/training-problem") - public CommonResult updateTrainingProblem(@RequestBody TrainingProblem trainingProblem) { - return groupTrainingProblemService.updateTrainingProblem(trainingProblem); - } - - @DeleteMapping("/training-problem") - public CommonResult deleteTrainingProblem(@RequestParam(value = "pid", required = true) Long pid, - @RequestParam(value = "tid", required = true) Long tid) { - return groupTrainingProblemService.deleteTrainingProblem(pid, tid); - } - - @PostMapping("/add-training-problem-from-public") - public CommonResult addProblemFromPublic(@RequestBody TrainingProblemDto trainingProblemDto) { - return groupTrainingProblemService.addProblemFromPublic(trainingProblemDto); - } - - @PostMapping("/add-training-problem-from-group") - public CommonResult addProblemFromGroup(@RequestParam(value = "problemId", required = true) String problemId, - @RequestParam(value = "tid", required = true) Long tid) { - return groupTrainingProblemService.addProblemFromGroup(problemId, tid); - } -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/msg/AdminNoticeController.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/msg/AdminNoticeController.java deleted file mode 100644 index 0a69997..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/msg/AdminNoticeController.java +++ /dev/null @@ -1,61 +0,0 @@ -package top.hcode.hoj.controller.msg; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.apache.shiro.authz.annotation.RequiresAuthentication; -import org.apache.shiro.authz.annotation.RequiresRoles; -import org.springframework.web.bind.annotation.*; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.entity.msg.AdminSysNotice; -import top.hcode.hoj.pojo.vo.AdminSysNoticeVo; -import top.hcode.hoj.service.msg.AdminNoticeService; - -import javax.annotation.Resource; - -/** - * @Author: Himit_ZH - * @Date: 2021/10/1 20:38 - * @Description: 负责管理员发送系统通知 - */ -@RestController -@RequestMapping("/api/admin/msg") -public class AdminNoticeController { - - @Resource - private AdminNoticeService adminNoticeService; - - @GetMapping("/notice") - @RequiresAuthentication - @RequiresRoles("root") - public CommonResult> getSysNotice(@RequestParam(value = "limit", required = false) Integer limit, - @RequestParam(value = "currentPage", required = false) Integer currentPage, - @RequestParam(value = "type", required = false) String type) { - - return adminNoticeService.getSysNotice(limit, currentPage, type); - } - - @PostMapping("/notice") - @RequiresAuthentication - @RequiresRoles("root") - public CommonResult addSysNotice(@RequestBody AdminSysNotice adminSysNotice) { - - return adminNoticeService.addSysNotice(adminSysNotice); - } - - - @DeleteMapping("/notice") - @RequiresAuthentication - @RequiresRoles("root") - public CommonResult deleteSysNotice(@RequestParam("id") Long id) { - - return adminNoticeService.deleteSysNotice(id); - } - - - @PutMapping("/notice") - @RequiresAuthentication - @RequiresRoles("root") - public CommonResult updateSysNotice(@RequestBody AdminSysNotice adminSysNotice) { - - return adminNoticeService.updateSysNotice(adminSysNotice); - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/msg/NoticeController.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/msg/NoticeController.java deleted file mode 100644 index 687d19e..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/msg/NoticeController.java +++ /dev/null @@ -1,43 +0,0 @@ -package top.hcode.hoj.controller.msg; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.apache.shiro.authz.annotation.RequiresAuthentication; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.vo.SysMsgVo; -import top.hcode.hoj.service.msg.NoticeService; - -import javax.annotation.Resource; - -/** - * @Author: Himit_ZH - * @Date: 2021/10/1 20:42 - * @Description: 负责用户的 系统消息模块、我的消息模块 - */ -@RestController -@RequestMapping("/api/msg") -public class NoticeController { - - @Resource - private NoticeService noticeService; - - @RequestMapping(value = "/sys", method = RequestMethod.GET) - @RequiresAuthentication - public CommonResult> getSysNotice(@RequestParam(value = "limit", required = false) Integer limit, - @RequestParam(value = "currentPage", required = false) Integer currentPage) { - - return noticeService.getSysNotice(limit, currentPage); - } - - - @RequestMapping(value = "/mine", method = RequestMethod.GET) - @RequiresAuthentication - public CommonResult> getMineNotice(@RequestParam(value = "limit", required = false) Integer limit, - @RequestParam(value = "currentPage", required = false) Integer currentPage) { - - return noticeService.getMineNotice(limit, currentPage); - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/msg/UserMessageController.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/msg/UserMessageController.java deleted file mode 100644 index 6ad9e26..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/msg/UserMessageController.java +++ /dev/null @@ -1,103 +0,0 @@ -package top.hcode.hoj.controller.msg; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.apache.shiro.authz.annotation.RequiresAuthentication; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.vo.UserMsgVo; -import top.hcode.hoj.pojo.vo.UserUnreadMsgCountVo; -import top.hcode.hoj.service.msg.UserMessageService; - -import javax.annotation.Resource; - - -/** - * @Author: Himit_ZH - * @Date: 2021/10/1 20:40 - * @Description: 获取用户 评论我的、回复我的、收到的赞的消息 - */ -@RestController -@RequestMapping("/api/msg") -public class UserMessageController { - - @Resource - private UserMessageService userMessageService; - - /** - * @MethodName getUnreadMsgCount - * @Description 获取用户的未读消息数量,包括评论我的、回复我的、收到的赞、系统通知、我的消息 - * @Return - * @Since 2021/10/1 - */ - @RequestMapping(value = "/unread", method = RequestMethod.GET) - @RequiresAuthentication - public CommonResult getUnreadMsgCount() { - return userMessageService.getUnreadMsgCount(); - } - - - /** - * @param type Discuss Reply Like Sys Mine - * @MethodName cleanMsg - * @Description 根据type,清空各个消息模块的消息或单个消息 - * @Return - * @Since 2021/10/3 - */ - @RequestMapping(value = "/clean", method = RequestMethod.DELETE) - @RequiresAuthentication - public CommonResult cleanMsg(@RequestParam("type") String type, - @RequestParam(value = "id", required = false) Long id) { - return userMessageService.cleanMsg(type, id); - } - - - /** - * @param limit - * @param currentPage - * @MethodName getCommentMsg - * @Description 获取评论我的讨论贴的消息,按未读的在前、时间晚的在前进行排序 - * @Return - * @Since 2021/10/1 - */ - @RequestMapping(value = "/comment", method = RequestMethod.GET) - @RequiresAuthentication - public CommonResult> getCommentMsg(@RequestParam(value = "limit", required = false) Integer limit, - @RequestParam(value = "currentPage", required = false) Integer currentPage) { - return userMessageService.getCommentMsg(limit, currentPage); - } - - /** - * @param limit - * @param currentPage - * @MethodName getReplyMsg - * @Description 获取回复我的评论的消息,按未读的在前、时间晚的在前进行排序 - * @Return - * @Since 2021/10/1 - */ - @RequestMapping(value = "/reply", method = RequestMethod.GET) - @RequiresAuthentication - public CommonResult> getReplyMsg(@RequestParam(value = "limit", required = false) Integer limit, - @RequestParam(value = "currentPage", required = false) Integer currentPage) { - return userMessageService.getReplyMsg(limit, currentPage); - } - - - /** - * @param limit - * @param currentPage - * @MethodName getLikeMsg - * @Description 获取点赞我的的消息,按未读的在前、时间晚的在前进行排序 - * @Return - * @Since 2021/10/1 - */ - @RequestMapping(value = "/like", method = RequestMethod.GET) - @RequiresAuthentication - public CommonResult> getLikeMsg(@RequestParam(value = "limit", required = false) Integer limit, - @RequestParam(value = "currentPage", required = false) Integer currentPage) { - return userMessageService.getLikeMsg(limit, currentPage); - } - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/oj/AccountController.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/oj/AccountController.java deleted file mode 100644 index f18f08f..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/oj/AccountController.java +++ /dev/null @@ -1,95 +0,0 @@ -package top.hcode.hoj.controller.oj; - - -import org.apache.shiro.authz.annotation.RequiresAuthentication; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; -import top.hcode.hoj.pojo.dto.*; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.vo.*; -import top.hcode.hoj.service.oj.AccountService; - -/** - * @Author: Himit_ZH - * @Date: 2020/10/23 12:00 - * @Description: 主要负责处理账号的相关操作 - */ -@RestController -@RequestMapping("/api") -public class AccountController { - - @Autowired - private AccountService accountService; - - /** - * @MethodName checkUsernameOrEmail - * @Description 检验用户名和邮箱是否存在 - * @Return - * @Since 2020/11/5 - */ - @RequestMapping(value = "/check-username-or-email", method = RequestMethod.POST) - public CommonResult checkUsernameOrEmail(@RequestBody CheckUsernameOrEmailDto checkUsernameOrEmailDto) { - return accountService.checkUsernameOrEmail(checkUsernameOrEmailDto); - } - - /** - * @param uid - * @MethodName getUserHomeInfo - * @Description 前端userHome用户个人主页的数据请求,主要是返回解决题目数,AC的题目列表,提交总数,AC总数,Rating分, - * @Return CommonResult - * @Since 2021/01/07 - */ - @GetMapping("/get-user-home-info") - public CommonResult getUserHomeInfo(@RequestParam(value = "uid", required = false) String uid, - @RequestParam(value = "username", required = false) String username) { - return accountService.getUserHomeInfo(uid, username); - } - - - /** - * @param uid - * @param username - * @return - * @Description 获取用户最近一年的提交热力图数据 - */ - @GetMapping("/get-user-calendar-heatmap") - public CommonResult getUserCalendarHeatmap(@RequestParam(value = "uid", required = false) String uid, - @RequestParam(value = "username", required = false) String username) { - return accountService.getUserCalendarHeatmap(uid, username); - } - - - /** - * @MethodName changePassword - * @Params * @param null - * @Description 修改密码的操作,连续半小时内修改密码错误5次,则需要半个小时后才可以再次尝试修改密码 - * @Return - * @Since 2021/1/8 - */ - - @PostMapping("/change-password") - @RequiresAuthentication - public CommonResult changePassword(@RequestBody ChangePasswordDto changePasswordDto) { - return accountService.changePassword(changePasswordDto); - } - - /** - * @MethodName changeEmail - * @Params * @param null - * @Description 修改邮箱的操作,连续半小时内密码错误5次,则需要半个小时后才可以再次尝试修改 - * @Return - * @Since 2021/1/9 - */ - @PostMapping("/change-email") - @RequiresAuthentication - public CommonResult changeEmail(@RequestBody ChangeEmailDto changeEmailDto) { - return accountService.changeEmail(changeEmailDto); - } - - @PostMapping("/change-userInfo") - @RequiresAuthentication - public CommonResult changeUserInfo(@RequestBody UserInfoVo userInfoVo) { - return accountService.changeUserInfo(userInfoVo); - } - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/oj/CommentController.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/oj/CommentController.java deleted file mode 100644 index 83f29d4..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/oj/CommentController.java +++ /dev/null @@ -1,81 +0,0 @@ -package top.hcode.hoj.controller.oj; - -import org.apache.shiro.authz.annotation.RequiresAuthentication; -import org.apache.shiro.authz.annotation.RequiresPermissions; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.dto.ReplyDto; -import top.hcode.hoj.pojo.entity.discussion.Comment; -import top.hcode.hoj.pojo.entity.discussion.Reply; -import top.hcode.hoj.pojo.vo.CommentListVo; -import top.hcode.hoj.pojo.vo.CommentVo; -import top.hcode.hoj.pojo.vo.ReplyVo; -import top.hcode.hoj.service.oj.CommentService; - -import java.util.List; - -/** - * @Author: Himit_ZH - * @Date: 2021/5/5 15:41 - * @Description: - */ -@RestController -@RequestMapping("/api") -public class CommentController { - - @Autowired - private CommentService commentService; - - - @GetMapping("/comments") - public CommonResult getComments(@RequestParam(value = "cid", required = false) Long cid, - @RequestParam(value = "did", required = false) Integer did, - @RequestParam(value = "limit", required = false, defaultValue = "20") Integer limit, - @RequestParam(value = "currentPage", required = false, defaultValue = "1") Integer currentPage) { - return commentService.getComments(cid, did, limit, currentPage); - } - - - @PostMapping("/comment") - @RequiresPermissions("comment_add") - @RequiresAuthentication - public CommonResult addComment(@RequestBody Comment comment) { - return commentService.addComment(comment); - } - - @DeleteMapping("/comment") - @RequiresAuthentication - public CommonResult deleteComment(@RequestBody Comment comment) { - return commentService.deleteComment(comment); - } - - @GetMapping("/comment-like") - @RequiresAuthentication - public CommonResult addCommentLike(@RequestParam("cid") Integer cid, - @RequestParam("toLike") Boolean toLike, - @RequestParam("sourceId") Integer sourceId, - @RequestParam("sourceType") String sourceType) { - return commentService.addCommentLike(cid, toLike, sourceId, sourceType); - } - - @GetMapping("/reply") - public CommonResult> getAllReply(@RequestParam("commentId") Integer commentId, - @RequestParam(value = "cid", required = false) Long cid) { - return commentService.getAllReply(commentId, cid); - } - - @PostMapping("/reply") - @RequiresPermissions("reply_add") - @RequiresAuthentication - public CommonResult addReply(@RequestBody ReplyDto replyDto) { - return commentService.addReply(replyDto); - } - - @DeleteMapping("/reply") - @RequiresAuthentication - public CommonResult deleteReply(@RequestBody ReplyDto replyDto) { - return commentService.deleteReply(replyDto); - } - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/oj/CommonController.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/oj/CommonController.java deleted file mode 100644 index fa41784..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/oj/CommonController.java +++ /dev/null @@ -1,77 +0,0 @@ -package top.hcode.hoj.controller.oj; - - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.entity.problem.CodeTemplate; -import top.hcode.hoj.pojo.entity.problem.Language; -import top.hcode.hoj.pojo.entity.problem.Tag; -import top.hcode.hoj.pojo.entity.training.TrainingCategory; -import top.hcode.hoj.pojo.vo.CaptchaVo; -import top.hcode.hoj.pojo.vo.ProblemTagVo; -import top.hcode.hoj.service.oj.CommonService; - -import java.util.Collection; -import java.util.List; - -/** - * @Author: Himit_ZH - * @Date: 2020/12/12 23:25 - * @Description: 通用的请求控制处理类 - */ -@RestController -@RequestMapping("/api") -public class CommonController { - - @Autowired - private CommonService commonService; - - - @GetMapping("/captcha") - public CommonResult getCaptcha() { - return commonService.getCaptcha(); - } - - - @GetMapping("/get-training-category") - public CommonResult> getTrainingCategory() { - return commonService.getTrainingCategory(); - } - - @GetMapping("/get-all-problem-tags") - public CommonResult> getAllProblemTagsList(@RequestParam(value = "oj", defaultValue = "ME") String oj) { - return commonService.getAllProblemTagsList(oj); - } - - @GetMapping("/get-problem-tags-and-classification") - public CommonResult> getProblemTagsAndClassification(@RequestParam(value = "oj", defaultValue = "ME") String oj) { - return commonService.getProblemTagsAndClassification(oj); - } - - @GetMapping("/get-problem-tags") - public CommonResult> getProblemTags(Long pid) { - return commonService.getProblemTags(pid); - } - - - @GetMapping("/languages") - public CommonResult> getLanguages(@RequestParam(value = "pid", required = false) Long pid, - @RequestParam(value = "all", required = false) Boolean all) { - return commonService.getLanguages(pid, all); - } - - @GetMapping("/get-problem-languages") - public CommonResult> getProblemLanguages(@RequestParam("pid") Long pid) { - return commonService.getProblemLanguages(pid); - } - - @GetMapping("/get-problem-code-template") - public CommonResult> getProblemCodeTemplate(@RequestParam("pid") Long pid) { - return commonService.getProblemCodeTemplate(pid); - } - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/oj/ContestAdminController.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/oj/ContestAdminController.java deleted file mode 100644 index 0edef0c..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/oj/ContestAdminController.java +++ /dev/null @@ -1,83 +0,0 @@ -package top.hcode.hoj.controller.oj; - - -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.apache.shiro.authz.annotation.RequiresAuthentication; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.dto.CheckACDto; -import top.hcode.hoj.pojo.entity.contest.ContestPrint; -import top.hcode.hoj.pojo.entity.contest.ContestRecord; -import top.hcode.hoj.service.oj.ContestAdminService; - -/** - * @Author: Himit_ZH - * @Date: 2021/9/20 13:15 - * @Description: 处理比赛管理模块的相关数据请求 - */ -@RestController -@RequestMapping("/api") -public class ContestAdminController { - - @Autowired - private ContestAdminService contestAdminService; - - /** - * @MethodName getContestACInfo - * @Params * @param null - * @Description 获取各个用户的ac情况,仅限于比赛管理者可查看 - * @Return - * @Since 2021/1/17 - */ - @GetMapping("/get-contest-ac-info") - @RequiresAuthentication - public CommonResult> getContestACInfo(@RequestParam("cid") Long cid, - @RequestParam(value = "currentPage", required = false) Integer currentPage, - @RequestParam(value = "limit", required = false) Integer limit) { - - return contestAdminService.getContestACInfo(cid, currentPage, limit); - } - - - /** - * @MethodName checkContestACInfo - * @Params * @param null - * @Description 比赛管理员确定该次提交的ac情况 - * @Return - * @Since 2021/1/17 - */ - @PutMapping("/check-contest-ac-info") - @RequiresAuthentication - public CommonResult checkContestACInfo(@RequestBody CheckACDto checkACDto) { - - return contestAdminService.checkContestACInfo(checkACDto); - } - - - @GetMapping("/get-contest-print") - @RequiresAuthentication - public CommonResult> getContestPrint(@RequestParam("cid") Long cid, - @RequestParam(value = "currentPage", required = false) Integer currentPage, - @RequestParam(value = "limit", required = false) Integer limit) { - - return contestAdminService.getContestPrint(cid, currentPage, limit); - } - - /** - * @param id - * @param cid - * @MethodName checkContestStatus - * @Description 更新该打印为确定状态 - * @Return - * @Since 2021/9/20 - */ - @PutMapping("/check-contest-print-status") - @RequiresAuthentication - public CommonResult checkContestPrintStatus(@RequestParam("id") Long id, - @RequestParam("cid") Long cid) { - - return contestAdminService.checkContestPrintStatus(id, cid); - } - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/oj/ContestController.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/oj/ContestController.java deleted file mode 100644 index 1431155..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/oj/ContestController.java +++ /dev/null @@ -1,193 +0,0 @@ -package top.hcode.hoj.controller.oj; - - -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.apache.shiro.authz.annotation.RequiresAuthentication; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.dto.ContestPrintDto; -import top.hcode.hoj.pojo.dto.ContestRankDto; -import top.hcode.hoj.pojo.dto.RegisterContestDto; -import top.hcode.hoj.pojo.dto.UserReadContestAnnouncementDto; -import top.hcode.hoj.pojo.entity.common.Announcement; -import top.hcode.hoj.pojo.vo.*; -import top.hcode.hoj.service.oj.ContestService; - -import java.util.*; - - -/** - * @Author: Himit_ZH - * @Date: 2020/10/27 21:40 - * @Description: 处理比赛模块的相关数据请求 - */ -@RestController -@RequestMapping("/api") -public class ContestController { - - @Autowired - private ContestService contestService; - - - /** - * @MethodName getContestList - * @Params * @param null - * @Description 获取比赛列表分页数据 - * @Return CommonResult - * @Since 2020/10/27 - */ - @GetMapping("/get-contest-list") - public CommonResult> getContestList(@RequestParam(value = "limit", required = false) Integer limit, - @RequestParam(value = "currentPage", required = false) Integer currentPage, - @RequestParam(value = "status", required = false) Integer status, - @RequestParam(value = "type", required = false) Integer type, - @RequestParam(value = "keyword", required = false) String keyword) { - return contestService.getContestList(limit, currentPage, status, type, keyword); - } - - /** - * @MethodName getContestInfo - * @Description 获得指定比赛的详细信息 - * @Return - * @Since 2020/10/28 - */ - @GetMapping("/get-contest-info") - @RequiresAuthentication - public CommonResult getContestInfo(@RequestParam(value = "cid", required = true) Long cid) { - - return contestService.getContestInfo(cid); - } - - /** - * @MethodName toRegisterContest - * @Description 注册比赛 - * @Return - * @Since 2020/10/28 - */ - @PostMapping("/register-contest") - @RequiresAuthentication - public CommonResult toRegisterContest(@RequestBody RegisterContestDto registerContestDto) { - return contestService.toRegisterContest(registerContestDto); - } - - /** - * @MethodName getContestAccess - * @Description 获得指定私有比赛的访问权限或保护比赛的提交权限 - * @Return - * @Since 2020/10/28 - */ - @RequiresAuthentication - @GetMapping("/get-contest-access") - public CommonResult getContestAccess(@RequestParam(value = "cid") Long cid) { - - return contestService.getContestAccess(cid); - } - - - /** - * @MethodName getContestProblem - * @Description 获得指定比赛的题目列表 - * @Return - * @Since 2020/10/28 - */ - @GetMapping("/get-contest-problem") - @RequiresAuthentication - public CommonResult> getContestProblem(@RequestParam(value = "cid", required = true) Long cid) { - - return contestService.getContestProblem(cid); - } - - @GetMapping("/get-contest-problem-details") - @RequiresAuthentication - public CommonResult getContestProblemDetails(@RequestParam(value = "cid", required = true) Long cid, - @RequestParam(value = "displayId", required = true) String displayId) { - - return contestService.getContestProblemDetails(cid, displayId); - } - - - @GetMapping("/contest-submissions") - @RequiresAuthentication - public CommonResult> getContestSubmissionList(@RequestParam(value = "limit", required = false) Integer limit, - @RequestParam(value = "currentPage", required = false) Integer currentPage, - @RequestParam(value = "onlyMine", required = false) Boolean onlyMine, - @RequestParam(value = "problemID", required = false) String displayId, - @RequestParam(value = "status", required = false) Integer searchStatus, - @RequestParam(value = "username", required = false) String searchUsername, - @RequestParam(value = "contestID", required = true) Long searchCid, - @RequestParam(value = "beforeContestSubmit", required = true) Boolean beforeContestSubmit, - @RequestParam(value = "completeProblemID", defaultValue = "false") Boolean completeProblemID) { - - return contestService.getContestSubmissionList(limit, - currentPage, - onlyMine, - displayId, - searchStatus, - searchUsername, - searchCid, - beforeContestSubmit, - completeProblemID); - } - - - /** - * @MethodName getContestRank - * @Description 获得比赛做题记录以用来排名 - * @Return - * @Since 2020/10/28 - */ - @PostMapping("/get-contest-rank") - @RequiresAuthentication - public CommonResult getContestRank(@RequestBody ContestRankDto contestRankDto) { - - return contestService.getContestRank(contestRankDto); - } - - - /** - * @MethodName getContestAnnouncement - * @Description 获得比赛的通知列表 - * @Return CommonResult - * @Since 2020/10/28 - */ - @GetMapping("/get-contest-announcement") - @RequiresAuthentication - public CommonResult> getContestAnnouncement(@RequestParam(value = "cid", required = true) Long cid, - @RequestParam(value = "limit", required = false) Integer limit, - @RequestParam(value = "currentPage", required = false) Integer currentPage) { - - return contestService.getContestAnnouncement(cid, limit, currentPage); - } - - - /** - * @param userReadContestAnnouncementDto - * @MethodName getContestUserNotReadAnnouncement - * @Description 根据前端传过来的比赛id以及已阅读的公告提示id列表,排除后获取未阅读的公告 - * @Return - * @Since 2021/7/17 - */ - @PostMapping("/get-contest-not-read-announcement") - @RequiresAuthentication - public CommonResult> getContestUserNotReadAnnouncement(@RequestBody UserReadContestAnnouncementDto userReadContestAnnouncementDto) { - return contestService.getContestUserNotReadAnnouncement(userReadContestAnnouncementDto); - } - - - /** - * @param contestPrintDto - * @MethodName submitPrintText - * @Description 提交比赛文本打印内容 - * @Return - * @Since 2021/9/20 - */ - @PostMapping("/submit-print-text") - @RequiresAuthentication - public CommonResult submitPrintText(@RequestBody ContestPrintDto contestPrintDto) { - - return contestService.submitPrintText(contestPrintDto); - } - - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/oj/ContestScoreboardController.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/oj/ContestScoreboardController.java deleted file mode 100644 index 2f4e9ab..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/oj/ContestScoreboardController.java +++ /dev/null @@ -1,47 +0,0 @@ -package top.hcode.hoj.controller.oj; - -import org.springframework.web.bind.annotation.*; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.dto.ContestRankDto; -import top.hcode.hoj.pojo.vo.*; -import top.hcode.hoj.service.oj.ContestScoreboardService; - -import javax.annotation.Resource; -import java.util.List; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/11 22:11 - * @Description: 处理比赛外榜的相关请求 - */ - -@RestController -@RequestMapping("/api") -public class ContestScoreboardController { - - @Resource - private ContestScoreboardService contestScoreboardService; - - /** - * @param cid 比赛id - * @MethodName getContestOutsideInfo - * @Description 提供比赛外榜所需的比赛信息和题目信息 - * @Return - * @Since 2021/12/8 - */ - @GetMapping("/get-contest-outsize-info") - public CommonResult getContestOutsideInfo(@RequestParam(value = "cid", required = true) Long cid) { - return contestScoreboardService.getContestOutsideInfo(cid); - } - - /** - * @MethodName getContestScoreBoard - * @Description 提供比赛外榜排名数据 - * @Return - * @Since 2021/12/07 - */ - @PostMapping("/get-contest-outside-scoreboard") - public CommonResult getContestOutsideScoreboard(@RequestBody ContestRankDto contestRankDto) { - return contestScoreboardService.getContestOutsideScoreboard(contestRankDto); - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/oj/DiscussionController.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/oj/DiscussionController.java deleted file mode 100644 index d5248e3..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/oj/DiscussionController.java +++ /dev/null @@ -1,93 +0,0 @@ -package top.hcode.hoj.controller.oj; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.apache.shiro.authz.annotation.RequiresAuthentication; -import org.apache.shiro.authz.annotation.RequiresPermissions; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; -import top.hcode.hoj.annotation.HOJAccess; -import top.hcode.hoj.annotation.HOJAccessEnum; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.entity.problem.Category; -import top.hcode.hoj.pojo.entity.discussion.Discussion; -import top.hcode.hoj.pojo.entity.discussion.DiscussionReport; -import top.hcode.hoj.pojo.vo.DiscussionVo; -import top.hcode.hoj.service.oj.DiscussionService; - -import java.util.List; - -/** - * @Author: Himit_ZH - * @Date: 2021/05/04 10:14 - * @Description: 负责讨论与评论模块的数据接口 - */ -@RestController -@RequestMapping("/api") -public class DiscussionController { - - @Autowired - private DiscussionService discussionService; - - - @GetMapping("/get-discussion-list") - @HOJAccess({HOJAccessEnum.PUBLIC_DISCUSSION}) - public CommonResult> getDiscussionList(@RequestParam(value = "limit", required = false, defaultValue = "10") Integer limit, - @RequestParam(value = "currentPage", required = false, defaultValue = "1") Integer currentPage, - @RequestParam(value = "cid", required = false) Integer categoryId, - @RequestParam(value = "pid", required = false) String pid, - @RequestParam(value = "onlyMine", required = false, defaultValue = "false") Boolean onlyMine, - @RequestParam(value = "keyword", required = false) String keyword, - @RequestParam(value = "admin", defaultValue = "false") Boolean admin) { - - return discussionService.getDiscussionList(limit, currentPage, categoryId, pid, onlyMine, keyword, admin); - - } - - @GetMapping("/get-discussion-detail") - public CommonResult getDiscussion(@RequestParam(value = "did", required = true) Integer did) { - return discussionService.getDiscussion(did); - } - - @PostMapping("/discussion") - @RequiresPermissions("discussion_add") - @RequiresAuthentication - @HOJAccess({HOJAccessEnum.PUBLIC_DISCUSSION}) - public CommonResult addDiscussion(@RequestBody Discussion discussion) { - return discussionService.addDiscussion(discussion); - } - - @PutMapping("/discussion") - @RequiresPermissions("discussion_edit") - @RequiresAuthentication - @HOJAccess({HOJAccessEnum.PUBLIC_DISCUSSION}) - public CommonResult updateDiscussion(@RequestBody Discussion discussion) { - return discussionService.updateDiscussion(discussion); - } - - @DeleteMapping("/discussion") - @RequiresPermissions("discussion_del") - @RequiresAuthentication - @HOJAccess({HOJAccessEnum.PUBLIC_DISCUSSION}) - public CommonResult removeDiscussion(@RequestParam("did") Integer did) { - return discussionService.removeDiscussion(did); - } - - @GetMapping("/discussion-like") - @RequiresAuthentication - public CommonResult addDiscussionLike(@RequestParam("did") Integer did, - @RequestParam("toLike") Boolean toLike) { - return discussionService.addDiscussionLike(did, toLike); - } - - @GetMapping("/discussion-category") - public CommonResult> getDiscussionCategory() { - return discussionService.getDiscussionCategory(); - } - - @PostMapping("/discussion-report") - @RequiresAuthentication - public CommonResult addDiscussionReport(@RequestBody DiscussionReport discussionReport) { - return discussionService.addDiscussionReport(discussionReport); - } - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/oj/HomeController.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/oj/HomeController.java deleted file mode 100644 index a55ce19..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/oj/HomeController.java +++ /dev/null @@ -1,113 +0,0 @@ -package top.hcode.hoj.controller.oj; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.vo.ACMRankVo; -import top.hcode.hoj.pojo.vo.AnnouncementVo;; -import top.hcode.hoj.pojo.vo.ContestVo; -import top.hcode.hoj.service.oj.HomeService; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * @Author: Himit_ZH - * @Date: 2020/12/26 14:12 - * @Description: 处理首页的请求 - */ -@RestController -@RequestMapping("/api") -public class HomeController { - - @Autowired - private HomeService homeService; - - /** - * @MethodName getRecentContest - * @Params * @param null - * @Description 获取最近14天的比赛信息列表 - * @Return CommonResult - * @Since 2020/12/29 - */ - - @GetMapping("/get-recent-contest") - public CommonResult> getRecentContest() { - return homeService.getRecentContest(); - } - - - /** - * @MethodName getHomeCarousel - * @Params - * @Description 获取主页轮播图 - * @Return - * @Since 2021/9/4 - */ - @GetMapping("/home-carousel") - public CommonResult>> getHomeCarousel() { - return homeService.getHomeCarousel(); - } - - - /** - * @MethodName getRecentSevenACRank - * @Params * @param null - * @Description 获取最近7天用户做题榜单 - * @Return - * @Since 2021/1/15 - */ - @GetMapping("/get-recent-seven-ac-rank") - public CommonResult> getRecentSevenACRank() { - return homeService.getRecentSevenACRank(); - } - - - /** - * @MethodName getRecentOtherContest - * @Params * @param null - * @Description 获取最近其他OJ的比赛信息列表 - * @Return CommonResult - * @Since 2020/1/15 - */ - - @GetMapping("/get-recent-other-contest") - public CommonResult>> getRecentOtherContest() { - return homeService.getRecentOtherContest(); - } - - - /** - * @MethodName getCommonAnnouncement - * @Params * @param null - * @Description 获取主页公告列表 - * @Return CommonResult - * @Since 2020/12/29 - */ - - @GetMapping("/get-common-announcement") - - public CommonResult> getCommonAnnouncement(@RequestParam(value = "limit", required = false) Integer limit, - @RequestParam(value = "currentPage", required = false) Integer currentPage) { - return homeService.getCommonAnnouncement(limit, currentPage); - } - - /** - * @MethodName getWebConfig - * @Params * @param null - * @Description 获取网站的基础配置。例如名字,缩写名字等等。 - * @Return CommonResult - * @Since 2020/12/29 - */ - - @GetMapping("/get-website-config") - public CommonResult> getWebConfig() { - return homeService.getWebConfig(); - } - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/oj/JudgeController.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/oj/JudgeController.java deleted file mode 100644 index 66a0e12..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/oj/JudgeController.java +++ /dev/null @@ -1,160 +0,0 @@ -package top.hcode.hoj.controller.oj; - - -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.apache.shiro.authz.annotation.RequiresAuthentication; -import org.apache.shiro.authz.annotation.RequiresPermissions; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.dto.SubmitIdListDto; -import top.hcode.hoj.pojo.dto.TestJudgeDto; -import top.hcode.hoj.pojo.dto.SubmitJudgeDto; -import top.hcode.hoj.pojo.entity.judge.Judge; -import top.hcode.hoj.pojo.entity.judge.JudgeCase; -import top.hcode.hoj.pojo.vo.JudgeVo; -import top.hcode.hoj.pojo.vo.SubmissionInfoVo; -import top.hcode.hoj.pojo.vo.TestJudgeVo; -import top.hcode.hoj.service.oj.JudgeService; - -import java.util.HashMap; -import java.util.List; - -/** - * @Author: Himit_ZH - * @Date: 2020/10/27 20:52 - * @Description: 处理代码评判相关业务 - */ -@RestController -@RequestMapping("/api") -public class JudgeController { - - - @Autowired - private JudgeService judgeService; - - /** - * @param limit - * @param currentPage - * @param onlyMine - * @param searchPid - * @param searchStatus - * @param searchUsername - * @param completeProblemID - * @MethodName getJudgeList - * @Description 通用查询判题记录列表 - * @Return CommonResult - * @Since 2020/10/29 - */ - @GetMapping("/get-submission-list") - public CommonResult> getJudgeList(@RequestParam(value = "limit", required = false) Integer limit, - @RequestParam(value = "currentPage", required = false) Integer currentPage, - @RequestParam(value = "onlyMine", required = false) Boolean onlyMine, - @RequestParam(value = "problemID", required = false) String searchPid, - @RequestParam(value = "status", required = false) Integer searchStatus, - @RequestParam(value = "username", required = false) String searchUsername, - @RequestParam(value = "completeProblemID", defaultValue = "false") Boolean completeProblemID, - @RequestParam(value = "gid", required = false) Long gid) { - - return judgeService.getJudgeList(limit, currentPage, onlyMine, searchPid, searchStatus, searchUsername, completeProblemID, gid); - } - - /** - * @MethodName getSubmission - * @Description 获取单个提交记录的详情 - * @Return CommonResult - * @Since 2021/1/2 - */ - @GetMapping("/get-submission-detail") - public CommonResult getSubmission(@RequestParam(value = "submitId", required = true) Long submitId) { - return judgeService.getSubmission(submitId); - } - - /** - * @MethodName submitProblemJudge - * @Description 核心方法 判题就此开始 - * @Return CommonResult - * @Since 2020/10/30 - */ - @RequiresAuthentication - @RequiresPermissions("submit") - @RequestMapping(value = "/submit-problem-judge", method = RequestMethod.POST) - public CommonResult submitProblemJudge(@RequestBody SubmitJudgeDto judgeDto) { - return judgeService.submitProblemJudge(judgeDto); - } - - @RequiresAuthentication - @RequiresPermissions("submit") - @RequestMapping(value = "/submit-problem-test-judge", method = RequestMethod.POST) - public CommonResult submitProblemTestJudge(@RequestBody TestJudgeDto testJudgeDto) { - return judgeService.submitProblemTestJudge(testJudgeDto); - } - - - @RequiresAuthentication - @GetMapping("/get-test-judge-result") - public CommonResult getTestJudgeResult(@RequestParam("testJudgeKey") String testJudgeKey) { - return judgeService.getTestJudgeResult(testJudgeKey); - } - - /** - * @MethodName resubmit - * @Description 调用判题服务器提交失败超过60s后,用户点击按钮重新提交判题进入的方法 - * @Return - * @Since 2021/2/12 - */ - @RequiresAuthentication - @GetMapping(value = "/resubmit") - public CommonResult resubmit(@RequestParam("submitId") Long submitId) { - return judgeService.resubmit(submitId); - } - - /** - * @MethodName updateSubmission - * @Description 修改单个提交详情的分享权限 - * @Return CommonResult - * @Since 2021/1/2 - */ - @PutMapping("/submission") - @RequiresAuthentication - public CommonResult updateSubmission(@RequestBody Judge judge) { - return judgeService.updateSubmission(judge); - } - - /** - * @MethodName checkJudgeResult - * @Description 对提交列表状态为Pending和Judging的提交进行更新检查 - * @Return - * @Since 2021/1/3 - */ - @RequestMapping(value = "/check-submissions-status", method = RequestMethod.POST) - public CommonResult> checkCommonJudgeResult(@RequestBody SubmitIdListDto submitIdListDto) { - return judgeService.checkCommonJudgeResult(submitIdListDto); - } - - /** - * @param submitIdListDto - * @MethodName checkContestJudgeResult - * @Description 需要检查是否为封榜,是否可以查询结果,避免有人恶意查询 - * @Return - * @Since 2021/6/11 - */ - @RequestMapping(value = "/check-contest-submissions-status", method = RequestMethod.POST) - @RequiresAuthentication - public CommonResult> checkContestJudgeResult(@RequestBody SubmitIdListDto submitIdListDto) { - return judgeService.checkContestJudgeResult(submitIdListDto); - } - - - /** - * @param submitId - * @MethodName getJudgeCase - * @Description 获得指定提交id的测试样例结果,暂不支持查看测试数据,只可看测试点结果,时间,空间,或者IO得分 - * @Return - * @Since 2020/10/29 - */ - @GetMapping("/get-all-case-result") - public CommonResult> getALLCaseResult(@RequestParam(value = "submitId", required = true) Long submitId) { - return judgeService.getALLCaseResult(submitId); - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/oj/PassportController.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/oj/PassportController.java deleted file mode 100644 index d027b75..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/oj/PassportController.java +++ /dev/null @@ -1,109 +0,0 @@ -package top.hcode.hoj.controller.oj; - -import org.apache.shiro.SecurityUtils; -import org.apache.shiro.authz.annotation.RequiresAuthentication; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.dto.LoginDto; -import top.hcode.hoj.pojo.dto.RegisterDto; -import top.hcode.hoj.pojo.dto.ApplyResetPasswordDto; -import top.hcode.hoj.pojo.dto.ResetPasswordDto; -import top.hcode.hoj.pojo.vo.RegisterCodeVo; -import top.hcode.hoj.pojo.vo.UserInfoVo; -import top.hcode.hoj.service.oj.PassportService; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/11 17:00 - * @Description: 处理登录、注册、重置密码 - */ -@RestController -@RequestMapping("/api") -public class PassportController { - - - @Autowired - private PassportService passportService; - - /** - * @param loginDto - * @MethodName login - * @Description 处理登录逻辑 - * @Return CommonResult - * @Since 2020/10/24 - */ - @PostMapping("/login") - public CommonResult login(@Validated @RequestBody LoginDto loginDto, HttpServletResponse response, HttpServletRequest request) { - return passportService.login(loginDto, response, request); - } - - /** - * @MethodName getRegisterCode - * @Description 调用邮件服务,发送注册流程的6位随机验证码 - * @Return - * @Since 2020/10/26 - */ - @RequestMapping(value = "/get-register-code", method = RequestMethod.GET) - public CommonResult getRegisterCode(@RequestParam(value = "email", required = true) String email) { - return passportService.getRegisterCode(email); - } - - - /** - * @param registerDto - * @MethodName register - * @Description 注册逻辑,具体参数请看RegisterDto类 - * @Return - * @Since 2020/10/24 - */ - @PostMapping("/register") - public CommonResult register(@Validated @RequestBody RegisterDto registerDto) { - return passportService.register(registerDto); - } - - - /** - * @param applyResetPasswordDto - * @MethodName applyResetPassword - * @Description 发送重置密码的链接邮件 - * @Return - * @Since 2020/11/6 - */ - @PostMapping("/apply-reset-password") - public CommonResult applyResetPassword(@RequestBody ApplyResetPasswordDto applyResetPasswordDto) { - return passportService.applyResetPassword(applyResetPasswordDto); - } - - - /** - * @param resetPasswordDto - * @MethodName resetPassword - * @Description 用户重置密码 - * @Return - * @Since 2020/11/6 - */ - @PostMapping("/reset-password") - public CommonResult resetPassword(@RequestBody ResetPasswordDto resetPasswordDto) { - return passportService.resetPassword(resetPasswordDto); - } - - - /** - * @MethodName logout - * @Description 退出逻辑,将jwt在redis中清除,下次需要再次登录。 - * @Return CommonResult - * @Since 2020/10/24 - */ - @GetMapping("/logout") - @RequiresAuthentication - public CommonResult logout() { - SecurityUtils.getSubject().logout(); - return CommonResult.successResponse("登出成功!"); - } - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/oj/ProblemController.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/oj/ProblemController.java deleted file mode 100644 index c5626cd..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/oj/ProblemController.java +++ /dev/null @@ -1,88 +0,0 @@ -package top.hcode.hoj.controller.oj; - -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import org.apache.shiro.authz.annotation.RequiresAuthentication; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.dto.PidListDto; -import top.hcode.hoj.pojo.vo.*; -import top.hcode.hoj.service.oj.ProblemService; - -import java.util.*; - - -/** - * @Author: Himit_ZH - * @Date: 2020/10/27 13:24 - * @Description: 问题数据控制类,处理题目列表请求,题目内容请求。 - */ -@RestController -@RequestMapping("/api") -public class ProblemController { - - @Autowired - private ProblemService problemService; - - /** - * @param currentPage - * @param keyword - * @param tagId - * @param difficulty - * @param oj - * @MethodName getProblemList - * @Description 获取题目列表分页 - * @Return CommonResult - * @Since 2020/10/27 - */ - @RequestMapping(value = "/get-problem-list", method = RequestMethod.GET) - public CommonResult> getProblemList(@RequestParam(value = "limit", required = false) Integer limit, - @RequestParam(value = "currentPage", required = false) Integer currentPage, - @RequestParam(value = "keyword", required = false) String keyword, - @RequestParam(value = "tagId", required = false) List tagId, - @RequestParam(value = "difficulty", required = false) Integer difficulty, - @RequestParam(value = "oj", required = false) String oj) { - - return problemService.getProblemList(limit, currentPage, keyword, tagId, difficulty, oj); - } - - /** - * @MethodName getRandomProblem - * @Description 随机选取一道题目 - * @Return CommonResult - * @Since 2020/10/27 - */ - @GetMapping("/get-random-problem") - public CommonResult getRandomProblem() { - return problemService.getRandomProblem(); - } - - /** - * @param pidListDto - * @MethodName getUserProblemStatus - * @Description 获取用户对应该题目列表中各个题目的做题情况 - * @Return CommonResult - * @Since 2020/12/29 - */ - @RequiresAuthentication - @PostMapping("/get-user-problem-status") - public CommonResult> getUserProblemStatus(@Validated @RequestBody PidListDto pidListDto) { - return problemService.getUserProblemStatus(pidListDto); - } - - /** - * @param problemId - * @MethodName getProblemInfo - * @Description 获取指定题目的详情信息,标签,所支持语言,做题情况(只能查询公开题目 也就是auth为1) - * @Return CommonResult - * @Since 2020/10/27 - */ - @RequestMapping(value = "/get-problem-detail", method = RequestMethod.GET) - public CommonResult getProblemInfo(@RequestParam(value = "problemId", required = true) String problemId, - @RequestParam(value = "gid", required = false) Long gid) { - return problemService.getProblemInfo(problemId,gid); - } - - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/oj/RankController.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/oj/RankController.java deleted file mode 100644 index 3fa0711..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/oj/RankController.java +++ /dev/null @@ -1,38 +0,0 @@ -package top.hcode.hoj.controller.oj; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.service.oj.RankService; - -/** - * @Author: Himit_ZH - * @Date: 2020/10/27 20:53 - * @Description: 处理排行榜数据 - */ -@RestController -@RequestMapping("/api") -public class RankController { - - @Autowired - private RankService rankService; - - /** - * @MethodName get-rank-list - * @Params * @param null - * @Description 获取排行榜数据 - * @Return CommonResult - * @Since 2020/10/27 - */ - @GetMapping("/get-rank-list") - public CommonResult getRankList(@RequestParam(value = "limit", required = false) Integer limit, - @RequestParam(value = "currentPage", required = false) Integer currentPage, - @RequestParam(value = "searchUser", required = false) String searchUser, - @RequestParam(value = "type", required = true) Integer type) { - return rankService.getRankList(limit, currentPage, searchUser, type); - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/oj/TrainingController.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/oj/TrainingController.java deleted file mode 100644 index b5a6d59..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/oj/TrainingController.java +++ /dev/null @@ -1,121 +0,0 @@ -package top.hcode.hoj.controller.oj; - - -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.apache.shiro.authz.annotation.RequiresAuthentication; -import org.springframework.web.bind.annotation.*; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.dto.RegisterTrainingDto; -import top.hcode.hoj.pojo.vo.*; -import top.hcode.hoj.service.oj.TrainingService; - -import javax.annotation.Resource; -import java.util.List; - -/** - * @Author: Himit_ZH - * @Date: 2021/11/19 21:42 - * @Description: 处理训练题单的请求 - */ - -@RestController -@RequestMapping("/api") -public class TrainingController { - - @Resource - private TrainingService trainingService; - - /** - * @param limit - * @param currentPage - * @param keyword - * @param categoryId - * @param auth - * @MethodName getTrainingList - * @Description 获取训练题单列表,可根据关键词、类别、权限、类型过滤 - * @Return - * @Since 2021/11/20 - */ - @GetMapping("/get-training-list") - public CommonResult> getTrainingList(@RequestParam(value = "limit", required = false) Integer limit, - @RequestParam(value = "currentPage", required = false) Integer currentPage, - @RequestParam(value = "keyword", required = false) String keyword, - @RequestParam(value = "categoryId", required = false) Long categoryId, - @RequestParam(value = "auth", required = false) String auth) { - - return trainingService.getTrainingList(limit, currentPage, keyword, categoryId, auth); - } - - - /** - * @param tid - * @MethodName getTraining - * @Description 根据tid获取指定训练详情 - * @Return - * @Since 2021/11/20 - */ - @GetMapping("/get-training-detail") - @RequiresAuthentication - public CommonResult getTraining(@RequestParam(value = "tid") Long tid) { - return trainingService.getTraining(tid); - } - - /** - * @param tid - * @MethodName getTrainingProblemList - * @Description 根据tid获取指定训练的题单题目列表 - * @Return - * @Since 2021/11/20 - */ - @GetMapping("/get-training-problem-list") - @RequiresAuthentication - public CommonResult> getTrainingProblemList(@RequestParam(value = "tid") Long tid) { - return trainingService.getTrainingProblemList(tid); - } - - /** - * @param registerTrainingDto - * @MethodName toRegisterTraining - * @Description 注册校验私有权限的训练 - * @Return - * @Since 2021/11/20 - */ - @PostMapping("/register-training") - @RequiresAuthentication - public CommonResult toRegisterTraining(@RequestBody RegisterTrainingDto registerTrainingDto) { - return trainingService.toRegisterTraining(registerTrainingDto); - } - - - /** - * @param tid - * @MethodName getTrainingAccess - * @Description 私有权限的训练需要获取当前用户是否有进入训练的权限 - * @Return - * @Since 2021/11/20 - */ - @RequiresAuthentication - @GetMapping("/get-training-access") - public CommonResult getTrainingAccess(@RequestParam(value = "tid") Long tid) { - return trainingService.getTrainingAccess(tid); - } - - - /** - * @param tid - * @param limit - * @param currentPage - * @MethodName getTrainingRank - * @Description 获取训练的排行榜分页 - * @Return - * @Since 2021/11/22 - */ - @GetMapping("/get-training-rank") - @RequiresAuthentication - public CommonResult> getTrainingRank(@RequestParam(value = "tid", required = true) Long tid, - @RequestParam(value = "limit", required = false) Integer limit, - @RequestParam(value = "currentPage", required = false) Integer currentPage) { - return trainingService.getTrainingRank(tid, limit, currentPage); - } - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/language/AtCoderLanguageStrategy.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/language/AtCoderLanguageStrategy.java deleted file mode 100644 index ca92566..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/language/AtCoderLanguageStrategy.java +++ /dev/null @@ -1,326 +0,0 @@ -package top.hcode.hoj.crawler.language; - -import cn.hutool.core.util.ReUtil; -import top.hcode.hoj.pojo.entity.problem.Language; - -import java.util.Collection; -import java.util.HashMap; -import java.util.List; -import java.util.regex.Pattern; - -/** - * @Author: Himit_ZH - * @Date: 2022/1/28 21:48 - * @Description: - */ -public class AtCoderLanguageStrategy extends LanguageStrategy { - - @Override - public String getLanguageNameById(String id) { - return null; - } - - @Override - public List buildLanguageListByIds(List allLanguageList, List langIdList) { - return null; - } - - @Override - public Collection getLangList() { - HashMap languageMap = new HashMap<>(); - languageMap.put("C (GCC 9.2.1)", "4001"); - languageMap.put("C (Clang 10.0.0)", "4002"); - languageMap.put("C++ (GCC 9.2.1)", "4003"); - languageMap.put("C++ (Clang 10.0.0)", "4004"); - languageMap.put("Java (OpenJDK 11.0.6)", "4005"); - languageMap.put("Python (3.8.2)", "4006"); - languageMap.put("Bash (5.0.11)", "4007"); - languageMap.put("bc (1.07.1)", "4008"); - languageMap.put("Awk (GNU Awk 4.1.4)", "4009"); - languageMap.put("C# (.NET Core 3.1.201)", "4010"); - languageMap.put("C# (Mono-mcs 6.8.0.105)", "4011"); - languageMap.put("C# (Mono-csc 3.5.0)", "4012"); - languageMap.put("Clojure (1.10.1.536)", "4013"); - languageMap.put("Crystal (0.33.0)", "4014"); - languageMap.put("D (DMD 2.091.0)", "4015"); - languageMap.put("D (GDC 9.2.1)", "4016"); - languageMap.put("D (LDC 1.20.1)", "4017"); - languageMap.put("Dart (2.7.2)", "4018"); - languageMap.put("dc (1.4.1)", "4019"); - languageMap.put("Erlang (22.3)", "4020"); - languageMap.put("Elixir (1.10.2)", "4021"); - languageMap.put("F# (.NET Core 3.1.201)", "4022"); - languageMap.put("F# (Mono 10.2.3)", "4023"); - languageMap.put("Forth (gforth 0.7.3)", "4024"); - languageMap.put("Fortran (GNU Fortran 9.2.1)", "4025"); - languageMap.put("Go (1.14.1)", "4026"); - languageMap.put("Haskell (GHC 8.8.3)", "4027"); - languageMap.put("Haxe (4.0.3); js", "4028"); - languageMap.put("Haxe (4.0.3); Java", "4029"); - languageMap.put("JavaScript (Node.js 12.16.1)", "4030"); - languageMap.put("Julia (1.4.0)", "4031"); - languageMap.put("Kotlin (1.3.71)", "4032"); - languageMap.put("Lua (Lua 5.3.5)", "4033"); - languageMap.put("Lua (LuaJIT 2.1.0)", "4034"); - languageMap.put("Dash (0.5.8)", "4035"); - languageMap.put("Nim (1.0.6)", "4036"); - languageMap.put("Objective-C (Clang 10.0.0)", "4037"); - languageMap.put("Common Lisp (SBCL 2.0.3)", "4038"); - languageMap.put("OCaml (4.10.0)", "4039"); - languageMap.put("Octave (5.2.0)", "4040"); - languageMap.put("Pascal (FPC 3.0.4)", "4041"); - languageMap.put("Perl (5.26.1)", "4042"); - languageMap.put("Raku (Rakudo 2020.02.1)", "4043"); - languageMap.put("PHP (7.4.4)", "4044"); - languageMap.put("Prolog (SWI-Prolog 8.0.3)", "4045"); - languageMap.put("PyPy2 (7.3.0)", "4046"); - languageMap.put("PyPy3 (7.3.0)", "4047"); - languageMap.put("Racket (7.6)", "4048"); - languageMap.put("Ruby (2.7.1)", "4049"); - languageMap.put("Rust (1.42.0)", "4050"); - languageMap.put("Scala (2.13.1)", "4051"); - languageMap.put("Java (OpenJDK 1.8.0)", "4052"); - languageMap.put("Scheme (Gauche 0.9.9)", "4053"); - languageMap.put("Standard ML (MLton 20130715)", "4054"); - languageMap.put("Swift (5.2.1)", "4055"); - languageMap.put("Text (cat 8.28)", "4056"); - languageMap.put("TypeScript (3.8)", "4057"); - languageMap.put("Visual Basic (.NET Core 3.1.101)", "4058"); - languageMap.put("Zsh (5.4.2)", "4059"); - languageMap.put("COBOL - Fixed (OpenCOBOL 1.1.0)", "4060"); - languageMap.put("COBOL - Free (OpenCOBOL 1.1.0)", "4061"); - languageMap.put("Brainfuck (bf 20041219)", "4062"); - languageMap.put("Ada2012 (GNAT 9.2.1)", "4063"); - languageMap.put("Unlambda (2.0.0)", "4064"); - languageMap.put("Cython (0.29.16)", "4065"); - languageMap.put("Sed (4.4)", "4066"); - languageMap.put("Vim (8.2.0460)", "4067"); - return languageMap.keySet(); - } - - @Override - public String getOJName() { - return "AC"; - } - - @Override - protected String getLangContentType(String name) { - HashMap nameMapContestType = new HashMap<>(); - nameMapContestType.put("C (GCC 9.2.1)", "text/x-csrc"); - nameMapContestType.put("C (Clang 10.0.0)", "text/x-csrc"); - nameMapContestType.put("C++ (GCC 9.2.1)", "text/x-c++src"); - nameMapContestType.put("C++ (Clang 10.0.0)", "text/x-c++src"); - nameMapContestType.put("Java (OpenJDK 11.0.6)", "text/x-java"); - nameMapContestType.put("Python (3.8.2)", "text/x-python"); - nameMapContestType.put("Bash (5.0.11)", "text/x-sh"); - nameMapContestType.put("bc (1.07.1)", "text/x-bc"); - nameMapContestType.put("Awk (GNU Awk 4.1.4)", "text/x-sh"); - nameMapContestType.put("C# (.NET Core 3.1.201)", "text/x-csharp"); - nameMapContestType.put("C# (Mono-mcs 6.8.0.105)", "text/x-csharp"); - nameMapContestType.put("C# (Mono-csc 3.5.0)", "text/x-csharp"); - nameMapContestType.put("Clojure (1.10.1.536)", "text/x-clojure"); - nameMapContestType.put("Crystal (0.33.0)", "text/x-crystal"); - nameMapContestType.put("D (DMD 2.091.0)", "text/x-d"); - nameMapContestType.put("D (GDC 9.2.1)", "text/x-d"); - nameMapContestType.put("D (LDC 1.20.1)", "text/x-d"); - nameMapContestType.put("Dart (2.7.2)", "application/dart"); - nameMapContestType.put("dc (1.4.1)", "text/x-dc"); - nameMapContestType.put("Erlang (22.3)", "text/x-erlang"); - nameMapContestType.put("Elixir (1.10.2)", "elixir"); - nameMapContestType.put("F# (.NET Core 3.1.201)", "text/x-fsharp"); - nameMapContestType.put("F# (Mono 10.2.3)", "text/x-fsharp"); - nameMapContestType.put("Forth (gforth 0.7.3)", "text/x-forth"); - nameMapContestType.put("Fortran (GNU Fortran 9.2.1)", "text/x-fortran"); - nameMapContestType.put("Go (1.14.1)", "text/x-go"); - nameMapContestType.put("Haskell (GHC 8.8.3)", "text/x-haskell"); - nameMapContestType.put("Haxe (4.0.3); js", "text/x-haxe"); - nameMapContestType.put("Haxe (4.0.3); Java", "text/x-haxe"); - nameMapContestType.put("JavaScript (Node.js 12.16.1)", "text/javascript"); - nameMapContestType.put("Julia (1.4.0)", "text/x-julia"); - nameMapContestType.put("Kotlin (1.3.71)", "text/x-kotlin"); - nameMapContestType.put("Lua (Lua 5.3.5)", "text/x-lua"); - nameMapContestType.put("Lua (LuaJIT 2.1.0)", "text/x-lua"); - nameMapContestType.put("Dash (0.5.8)", "text/x-sh"); - nameMapContestType.put("Nim (1.0.6)", "text/x-nim"); - nameMapContestType.put("Objective-C (Clang 10.0.0)", "text/x-objectivec"); - nameMapContestType.put("Common Lisp (SBCL 2.0.3)", "text/x-common-lisp"); - nameMapContestType.put("OCaml (4.10.0)", "text/x-ocaml"); - nameMapContestType.put("Octave (5.2.0)", "text/x-octave"); - nameMapContestType.put("Pascal (FPC 3.0.4)", "text/x-pascal"); - nameMapContestType.put("Perl (5.26.1)", "text/x-perl"); - nameMapContestType.put("Raku (Rakudo 2020.02.1)", "text/x-perl"); - nameMapContestType.put("PHP (7.4.4)", "text/x-php"); - nameMapContestType.put("Prolog (SWI-Prolog 8.0.3)", "text/x-prolog"); - nameMapContestType.put("PyPy2 (7.3.0)", "text/x-python"); - nameMapContestType.put("PyPy3 (7.3.0)", "text/x-python"); - nameMapContestType.put("Racket (7.6)", "text/x-racket"); - nameMapContestType.put("Ruby (2.7.1)", "text/x-ruby"); - nameMapContestType.put("Rust (1.42.0)", "text/x-rustsrc"); - nameMapContestType.put("Scala (2.13.1)", "text/x-scala"); - nameMapContestType.put("Java (OpenJDK 1.8.0)", "text/x-java"); - nameMapContestType.put("Scheme (Gauche 0.9.9)", "text/x-scheme"); - nameMapContestType.put("Standard ML (MLton 20130715)", "text/x-sml"); - nameMapContestType.put("Swift (5.2.1)", "text/x-swift"); - nameMapContestType.put("Text (cat 8.28)", "text/plain"); - nameMapContestType.put("TypeScript (3.8)", "text/typescript"); - nameMapContestType.put("Visual Basic (.NET Core 3.1.101)", "text/x-vb"); - nameMapContestType.put("Zsh (5.4.2)", "text/x-sh"); - nameMapContestType.put("COBOL - Fixed (OpenCOBOL 1.1.0)", "text/x-cobol"); - nameMapContestType.put("COBOL - Free (OpenCOBOL 1.1.0)", "text/x-cobol"); - nameMapContestType.put("Brainfuck (bf 20041219)", "text/x-brainfuck"); - nameMapContestType.put("Ada2012 (GNAT 9.2.1)", "text/x-ada"); - nameMapContestType.put("Unlambda (2.0.0)", "text/x-unlambda"); - nameMapContestType.put("Cython (0.29.16)", "text/x-python"); - nameMapContestType.put("Sed (4.4)", "text/x-sh"); - nameMapContestType.put("Vim (8.2.0460)", "text/x-vim"); - return nameMapContestType.get(name); - } - - public static void main(String[] args) { - String body = "\n" + - "\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\n" + - "\t\t\t\t\t\t\t"; - Pattern pattern1 = Pattern.compile(""); - Pattern pattern2 = Pattern.compile(""); - Pattern pattern3 = Pattern.compile(""); - List allGroups1 = ReUtil.findAll(pattern1, body, 1); - List allGroups2 = ReUtil.findAll(pattern2, body, 1); - List allGroups3 = ReUtil.findAll(pattern3, body, 1); - for (int i = 0; i < allGroups1.size(); i++) { - System.out.println("nameMapContestType.put(\"" + allGroups2.get(i) + "\", \"" + allGroups3.get(i) + "\");"); - } - for (int i = 0; i < allGroups1.size(); i++) { - System.out.println("languageMap.put(\"" + allGroups2.get(i) + "\", \"" + allGroups1.get(i) + "\");"); - } - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/language/LanguageContext.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/language/LanguageContext.java deleted file mode 100644 index 7c16b29..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/language/LanguageContext.java +++ /dev/null @@ -1,45 +0,0 @@ -package top.hcode.hoj.crawler.language; - -import top.hcode.hoj.pojo.entity.problem.Language; -import top.hcode.hoj.utils.Constants; - -;import java.util.List; - -/** - * @Author: Himit_ZH - * @Date: 2022/1/27 21:15 - * @Description: - */ -public class LanguageContext { - - private LanguageStrategy languageStrategy; - - public LanguageContext(LanguageStrategy languageStrategy) { - this.languageStrategy = languageStrategy; - } - - public LanguageContext(Constants.RemoteOJ remoteOJ) { - switch (remoteOJ) { - case SPOJ: - languageStrategy = new SPOJLanguageStrategy(); - break; - case ATCODER: - languageStrategy = new AtCoderLanguageStrategy(); - break; - default: - throw new RuntimeException("未知的OJ的名字,暂时不支持!"); - } - } - - public List buildLanguageList(){ - return languageStrategy.buildLanguageList(); - } - - public String getLanguageNameById(String id) { - return languageStrategy.getLanguageNameById(id); - } - - public List buildLanguageListByIds(List allLanguageList, List langIdList) { - return languageStrategy.buildLanguageListByIds(allLanguageList, langIdList); - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/language/LanguageStrategy.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/language/LanguageStrategy.java deleted file mode 100644 index 7f0cab6..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/language/LanguageStrategy.java +++ /dev/null @@ -1,119 +0,0 @@ -package top.hcode.hoj.crawler.language; - -import top.hcode.hoj.pojo.entity.problem.Language; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collection; -import java.util.List; - -/** - * @Author: Himit_ZH - * @Date: 2022/1/27 21:14 - * @Description: - */ -public abstract class LanguageStrategy { - - - public abstract String getLanguageNameById(String id); - - public abstract List buildLanguageListByIds(List allLanguageList, List langIdList); - - public abstract Collection getLangList(); - - public abstract String getOJName(); - - public List buildLanguageList() { - List languageList = new ArrayList<>(); - for (String lang : getLangList()) { - languageList.add(new Language() - .setName(lang) - .setDescription(lang) - .setOj(getOJName()) - .setContentType(getLangContentType(lang))); - } - return languageList; - } - - private final static List CLang = Arrays.asList("c", "gcc", "clang"); - private final static List CPPLang = Arrays.asList("c++", "g++", "clang++"); - private final static List PythonLang = Arrays.asList("python", "pypy"); - private final static List JSLang = Arrays.asList("node", "javascript"); - - protected String getLangContentType(String name) { - String lowerName = name.toLowerCase(); - - for (String lang : CPPLang) { - if (lowerName.contains(lang)) { - return "text/x-c++src"; - } - } - - if (lowerName.contains("c#")) { - return "text/x-csharp"; - } - - for (String lang : CLang) { - if (lowerName.contains(lang)) { - return "text/x-csrc"; - } - } - - for (String lang : PythonLang) { - if (lowerName.contains(lang)) { - return "text/x-python"; - } - } - for (String lang : JSLang) { - if (lowerName.contains(lang)) { - return "text/javascript"; - } - } - if (lowerName.contains("scala")) { - return "text/x-scala"; - } - - if (lowerName.contains("java")) { - return "text/x-java"; - } - - if (lowerName.contains("pascal")) { - return "text/x-pascal"; - } - - if (lowerName.contains("go")) { - return "text/x-go"; - } - - if (lowerName.contains("ruby")) { - return "text/x-ruby"; - } - - if (lowerName.contains("rust")) { - return "text/x-rustsrc"; - } - - if (lowerName.contains("php")) { - return "text/x-php"; - } - - if (lowerName.contains("perl")) { - return "text/x-perl"; - } - - if (lowerName.contains("fortran")) { - return "text/x-fortran"; - } - - if (lowerName.contains("haskell")) { - return "text/x-haskell"; - } - - if (lowerName.contains("ocaml")) { - return "text/x-ocaml"; - } - - return null; - - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/language/SPOJLanguageStrategy.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/language/SPOJLanguageStrategy.java deleted file mode 100644 index d2a8280..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/language/SPOJLanguageStrategy.java +++ /dev/null @@ -1,143 +0,0 @@ -package top.hcode.hoj.crawler.language; - -import cn.hutool.core.util.ReUtil; -import cn.hutool.http.HttpUtil; -import top.hcode.hoj.pojo.entity.problem.Language; - -import java.util.Collection; -import java.util.HashMap; -import java.util.List; -import java.util.regex.Pattern; -import java.util.stream.Collectors; - -/** - * @Author: Himit_ZH - * @Date: 2022/1/27 21:21 - * @Description: - */ -public class SPOJLanguageStrategy extends LanguageStrategy { - - private static final HashMap languageMap = new HashMap<>(); - - static { - languageMap.put("7", "Ada95 (gnat 8.3)"); - languageMap.put("45", "Assembler 32 (gcc 8.3)"); - languageMap.put("13", "Assembler 32 (nasm 2.14)"); - languageMap.put("42", "Assembler 64 (nasm 2.14)"); - languageMap.put("104", "AWK (gawk 4.2.1)"); - languageMap.put("105", "AWK (mawk 1.3.3)"); - languageMap.put("28", "Bash (bash 5.0.3)"); - languageMap.put("110", "BC (bc 1.07.1)"); - languageMap.put("12", "Brainf**k (bff 1.0.6)"); - languageMap.put("81", "C (clang 8.0)"); - languageMap.put("11", "C (gcc 8.3)"); - languageMap.put("27", "C# (gmcs 5.20.1)"); - languageMap.put("41", "C++ (g++ 4.3.2)"); - languageMap.put("1", "C++ (gcc 8.3)"); - languageMap.put("44", "C++14 (gcc 8.3)"); - languageMap.put("82", "C++14 (clang 8.0)"); - languageMap.put("34", "C99 (gcc 8.3)"); - languageMap.put("14", "Clips (clips 6.30)"); - languageMap.put("111", "Clojure (clojure 1.10.0)"); - languageMap.put("118", "Cobol (gnucobol 2.2.0)"); - languageMap.put("91", "CoffeeScript (coffee 2.4.1)"); - languageMap.put("31", "Common Lisp (sbcl 1.4.16)"); - languageMap.put("32", "Common Lisp (clisp 2.49.92)"); - languageMap.put("102", "D (dmd 2.085.0)"); - languageMap.put("84", "D (ldc 1.12.0)"); - languageMap.put("20", "D (gdc 8.3)"); - languageMap.put("48", "Dart (dart 2.3.0)"); - languageMap.put("96", "Elixir (elixir 1.8.2)"); - languageMap.put("36", "Erlang (erl 21.3.8)"); - languageMap.put("124", "F# (mono 4.1)"); - languageMap.put("92", "Fantom (fantom 1.0.72)"); - languageMap.put("107", "Forth (gforth 0.7.3)"); - languageMap.put("5", "Fortran (gfortran 8.3)"); - languageMap.put("114", "Go (go 1.12.1)"); - languageMap.put("98", "Gosu (gosu 1.14.9)"); - languageMap.put("121", "Groovy (groovy 2.5.6)"); - languageMap.put("21", "Haskell (ghc 8.4.4)"); - languageMap.put("16", "Icon (iconc 9.5.1)"); - languageMap.put("9", "Intercal (ick 0.3)"); - languageMap.put("24", "JAR (JavaSE 6)"); - languageMap.put("10", "Java (HotSpot 12)"); - languageMap.put("35", "JavaScript (rhino 1.7.9)"); - languageMap.put("112", "JavaScript (SMonkey 60.2.3)"); - languageMap.put("47", "Kotlin (kotlin 1.3.21)"); - languageMap.put("26", "Lua (luac 5.3.3)"); - languageMap.put("30", "Nemerle (ncc 1.2.547)"); - languageMap.put("25", "Nice (nicec 0.9.13)"); - languageMap.put("122", "Nim (nim 0.19.4)"); - languageMap.put("56", "Node.js (node 11.12.0)"); - languageMap.put("43", "Objective-C (gcc 8.3)"); - languageMap.put("83", "Objective-C (clang 8.0)"); - languageMap.put("8", "Ocaml (ocamlopt 4.05.0)"); - languageMap.put("127", "Octave (octave 4.4.1)"); - languageMap.put("2", "Pascal (gpc 20070904)"); - languageMap.put("22", "Pascal (fpc 3.0.4)"); - languageMap.put("54", "Perl (perl 2018.12)"); - languageMap.put("3", "Perl (perl 5.28.1)"); - languageMap.put("29", "PHP (php 7.3.5)"); - languageMap.put("94", "Pico Lisp (pico 18.12.27)"); - languageMap.put("19", "Pike (pike 8.0)"); - languageMap.put("15", "Prolog (swi 7.6.4)"); - languageMap.put("108", "Prolog (gprolog 1.4.5)"); - languageMap.put("4", "Python (cpython 2.7.16)"); - languageMap.put("99", "Python (PyPy 2.7.13)"); - languageMap.put("116", "Python 3 (python 3.7.3)"); - languageMap.put("126", "Python 3 nbc (python 3.7.3)"); - languageMap.put("117", "R (R 3.5.2)"); - languageMap.put("95", "Racket (racket 7.0)"); - languageMap.put("17", "Ruby (ruby 2.5.5)"); - languageMap.put("93", "Rust (rust 1.33.0)"); - languageMap.put("39", "Scala (scala 2.12.8)"); - languageMap.put("18", "Scheme (stalin 0.11)"); - languageMap.put("33", "Scheme (guile 2.2.4)"); - languageMap.put("97", "Scheme (chicken 4.13)"); - languageMap.put("46", "Sed (sed 4.7)"); - languageMap.put("23", "Smalltalk (gst 3.2.5)"); - languageMap.put("40", "SQLite (sqlite 3.27.2)"); - languageMap.put("85", "Swift (swift 4.2.2)"); - languageMap.put("38", "TCL (tcl 8.6)"); - languageMap.put("62", "Text (plain text)"); - languageMap.put("115", "Unlambda (unlambda 0.1.4.2)"); - languageMap.put("50", "VB.net (mono 4.7)"); - languageMap.put("6", "Whitespace (wspace 0.3)"); - } - - - @Override - public String getLanguageNameById(String id) { - return languageMap.get(id); - } - - @Override - public List buildLanguageListByIds(List allLanguageList, List langIdList) { - - List langNameList = langIdList.stream().map(this::getLanguageNameById).collect(Collectors.toList()); - - return allLanguageList.stream().filter(language -> langNameList.contains(language.getName())).collect(Collectors.toList()); - } - - @Override - public Collection getLangList() { - return languageMap.values(); - } - - @Override - public String getOJName() { - return "SPOJ"; - } - - public static void main(String[] args) { - String url = "https://www.spoj.com/submit/HOTLINE/"; - String body = HttpUtil.get(url); - Pattern pattern1 = Pattern.compile(""); - Pattern pattern2 = Pattern.compile(""); - List allGroups1 = ReUtil.findAll(pattern1, body, 1); - List allGroups2 = ReUtil.findAll(pattern2, body, 1); - for (int i = 0; i < allGroups1.size(); i++) { - System.out.println("languageMap.put(\"" + allGroups2.get(i) + "\", \"" + allGroups1.get(i) + "\");"); - } - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/problem/AtCoderProblemStrategy.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/problem/AtCoderProblemStrategy.java deleted file mode 100644 index 9cd2ae3..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/problem/AtCoderProblemStrategy.java +++ /dev/null @@ -1,128 +0,0 @@ -package top.hcode.hoj.crawler.problem; - -import cn.hutool.core.util.ReUtil; -import cn.hutool.http.HttpUtil; -import org.apache.commons.lang.Validate; -import org.jsoup.Jsoup; -import top.hcode.hoj.pojo.entity.problem.Problem; -import top.hcode.hoj.utils.Constants; - -import java.util.List; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -/** - * @Author: Himit_ZH - * @Date: 2022/1/28 21:23 - * @Description: - */ -public class AtCoderProblemStrategy extends ProblemStrategy { - - public static final String JUDGE_NAME = "AC"; - public static final String HOST = "https://atcoder.jp"; - public static final String PROBLEM_URL = "/contests/%s/tasks/%s"; - - public String getJudgeName() { - return JUDGE_NAME; - } - - public String getProblemUrl(String problemId, String contestId) { - return HOST + String.format(PROBLEM_URL, contestId, problemId); - } - - public String getProblemSource(String problemId, String contestId) { - return String.format("%s", "AtCoder-" + problemId); - } - - @Override - public RemoteProblemInfo getProblemInfo(String problemId, String author) throws Exception { - - problemId = problemId.toLowerCase(); - boolean isMatch = ReUtil.isMatch("[a-z]+[0-9]+_[a-z]*[0-9]*", problemId); - if (!isMatch){ - throw new IllegalArgumentException("AtCoder: Incorrect problem id format! Must be like `abc110_a`"); - } - - String contestId = problemId.split("_")[0]; - - String body = HttpUtil.get(getProblemUrl(problemId, contestId)); - Pattern pattern = Pattern.compile("Time Limit: (\\d+) sec / Memory Limit: (\\d+) MB"); - Matcher matcher = pattern.matcher(body); - Validate.isTrue(matcher.find()); - String timeLimit = matcher.group(1).trim(); - String memoryLimit = matcher.group(2).trim(); - String title = ReUtil.get("[\\s\\S]*? - ([\\s\\S]*?)", body, 1); - - - Problem problem = new Problem(); - problem.setProblemId(getJudgeName() + "-" + problemId) - .setAuthor(author) - .setTitle(title) - .setType(0) - .setTimeLimit(Integer.parseInt(timeLimit) * 1000) - .setMemoryLimit(Integer.parseInt(memoryLimit)) - .setIsRemote(true) - .setSource(getProblemSource(problemId, contestId)) - .setAuth(1) - .setOpenCaseResult(false) - .setIsRemoveEndBlank(false) - .setIsGroup(false) - .setDifficulty(1); // 默认为中等 - - if (body.contains("Problem Statement")) { - String desc = ReUtil.get("

Problem Statement

([\\s\\S]*?)[\\s\\S]*?", body, 1); - - desc = desc.replaceAll("", "\\$").replaceAll("", "\\$"); - desc = desc.replaceAll("
", "
");
-            desc = desc.replaceAll("src=\"/img", "src=\"" + HOST + "/img");
-
-            StringBuilder sb = new StringBuilder();
-            String rawInput = ReUtil.get("

Input

([\\s\\S]*?)[\\s\\S]*?", body, 1); - sb.append(rawInput); - String constrains = ReUtil.get("

Constraints

([\\s\\S]*?)[\\s\\S]*?", body, 1); - sb.append(constrains); - String input = sb.toString().replaceAll("", "\\$").replaceAll("", "\\$"); - input = input.replaceAll("
", "
");
-
-
-            String rawOutput = ReUtil.get("

Output

([\\s\\S]*?)[\\s\\S]*?", body, 1); - String output = rawOutput.replaceAll("", "\\$").replaceAll("", "\\$"); - output = output.replaceAll("
", "
");
-
-            List sampleInput = ReUtil.findAll("

Sample Input \\d+

([\\s\\S]*?)
[\\s\\S]*?[\\s\\S]*?", body, 1); - List sampleOutput = ReUtil.findAll("

Sample Output \\d+

([\\s\\S]*?)
[\\s\\S]*?[\\s\\S]*?", body, 1); - - - StringBuilder examples = new StringBuilder(); - - for (int i = 0; i < sampleInput.size() && i < sampleOutput.size(); i++) { - examples.append(""); - String exampleInput = sampleInput.get(i).trim(); - examples.append(exampleInput).append(""); - examples.append(""); - String exampleOutput = sampleOutput.get(i).trim(); - examples.append(exampleOutput).append(""); - } - - problem.setInput(input.trim()) - .setOutput(output.trim()) - .setDescription(desc.trim()) - .setExamples(examples.toString()); - - - } else { - org.jsoup.nodes.Element element = Jsoup.parse(body).getElementById("task-statement"); - String desc = element.html(); - desc = desc.replaceAll("src=\"/img", "src=\"https://atcoder.jp/img"); - desc = desc.replaceAll("
", "
");
-            desc = desc.replaceAll("", "\\$").replaceAll("", "\\$");
-            desc = desc.replaceAll("
", ""); - problem.setDescription(desc); - } - return new RemoteProblemInfo() - .setProblem(problem) - .setTagList(null) - .setLangIdList(null) - .setRemoteOJ(Constants.RemoteOJ.ATCODER); - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/problem/CFProblemStrategy.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/problem/CFProblemStrategy.java deleted file mode 100644 index 779c69a..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/problem/CFProblemStrategy.java +++ /dev/null @@ -1,197 +0,0 @@ -package top.hcode.hoj.crawler.problem; - -import cn.hutool.core.util.NumberUtil; -import cn.hutool.core.util.ReUtil; -import cn.hutool.http.HtmlUtil; -import cn.hutool.http.HttpRequest; -import org.springframework.util.StringUtils; -import top.hcode.hoj.pojo.entity.problem.Problem; -import top.hcode.hoj.pojo.entity.problem.Tag; -import top.hcode.hoj.utils.CodeForcesUtils; -import top.hcode.hoj.utils.Constants; - -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; -import java.util.regex.Pattern; - -/** - * @Author: Himit_ZH - * @Date: 2021/3/3 15:00 - * @Description: - */ -public class CFProblemStrategy extends ProblemStrategy { - - public static final String JUDGE_NAME = "CF"; - public static final String HOST = "https://codeforces.com"; - public static final String PROBLEM_URL = "/problemset/problem/%s/%s"; - - public String getJudgeName() { - return JUDGE_NAME; - } - - public String getProblemUrl(String contestId, String problemNum) { - return HOST + String.format(PROBLEM_URL, contestId, problemNum); - } - - public String getProblemSource(String html, String problemId, String contestId, String problemNum) { - return String.format("

Problem:%s

" + - "Contest:" + ReUtil.get("(]+/contest/\\d+\">.+?)", html, 1) - .replace("/contest", HOST + "/contest") - .replace("color: black", "color: #009688;") + "

", - contestId, problemNum, getJudgeName() + "-" + problemId); - } - - @Override - public RemoteProblemInfo getProblemInfo(String problemId, String author) throws Exception { - - String contestId; - String problemNum; - if (NumberUtil.isInteger(problemId)) { - contestId = ReUtil.get("([0-9]+)[0-9]{2}", problemId, 1); - problemNum = ReUtil.get("[0-9]+([0-9]{2})", problemId, 1); - } else { - contestId = ReUtil.get("([0-9]+)[A-Z]{1}[0-9]{0,1}", problemId, 1); - problemNum = ReUtil.get("[0-9]+([A-Z]{1}[0-9]{0,1})", problemId, 1); - } - - if (contestId == null || problemNum == null) { - throw new IllegalArgumentException("Codeforces: Incorrect problem id format!"); - } - - String html = HttpRequest.get(getProblemUrl(contestId, problemNum)) - .header("cookie", "RCPC=" + CodeForcesUtils.getRCPC()) - .timeout(20000) - .execute() - .body(); - - // 重定向失效,更新RCPC - if (html.contains("Redirecting... Please, wait.")) { - List list = ReUtil.findAll("[a-z0-9]+[a-z0-9]{31}", html, 0, new ArrayList<>()); - CodeForcesUtils.updateRCPC(list); - html = HttpRequest.get(getProblemUrl(contestId, problemNum)) - .header("cookie", "RCPC=" + CodeForcesUtils.getRCPC()) - .timeout(20000) - .execute() - .body(); - } - - Problem info = new Problem(); - info.setProblemId(getJudgeName() + "-" + problemId); - - info.setTitle(ReUtil.get("
\\s*" + problemNum + "\\. ([\\s\\S]*?)
", html, 1).trim()); - - String timeLimitStr = ReUtil.get("\\s*([\\d\\.]+) (seconds?|s)\\s*", html, 1); - if (StringUtils.isEmpty(timeLimitStr)) { - timeLimitStr = ReUtil.get("\\s*(\\d+) (seconds?|s)\\s*\\s*", html, 1); - } - - double timeLimit = 1000 * Double.parseDouble(timeLimitStr); - info.setTimeLimit((int) timeLimit); - - String memoryLimitStr = ReUtil.get("\\s*(\\d+) (megabytes|MB)\\s*", html, 1); - if (StringUtils.isEmpty(memoryLimitStr)) { - memoryLimitStr = ReUtil.get("\\s*(\\d+) (megabytes|MB)\\s*\\s*", html, 1); - } - - info.setMemoryLimit(Integer.parseInt(memoryLimitStr)); - - String tmpDesc = ReUtil.get("standard output\\s*\\s*\\s*
([\\s\\S]*?)
\\s*
([\\s\\S]*?)
\\s*
\\s*
([\\s\\S]*?)
\\s*
\\s*
\\s*
\\s*
([\\s\\S]*?)
", - html, 1); - } - - if (!StringUtils.isEmpty(tmpDesc)) { - tmpDesc = tmpDesc.replaceAll("\\$\\$\\$", "\\$") - .replaceAll("src=\"../../", "src=\"" + HOST + "/") - .trim(); - } - - info.setDescription(tmpDesc); - - String inputDesc = ReUtil.get("
\\s*Input\\s*
([\\s\\S]*?)
\\s*
", html, 1); - - if (StringUtils.isEmpty(inputDesc)) { - inputDesc = ReUtil.get("
\\s*Interaction\\s*
([\\s\\S]*?)
\\s*
", html, 1); - } - if (StringUtils.isEmpty(inputDesc)) { - inputDesc = ReUtil.get("
\\s*
\\s*Input\\s*
([\\s\\S]*?)
", html, 1); - } - if (!StringUtils.isEmpty(inputDesc)) { - inputDesc = inputDesc.replaceAll("\\$\\$\\$", "\\$").trim(); - } - - info.setInput(inputDesc); - - String outputDesc = ReUtil.get("
\\s*Output\\s*
([\\s\\S]*?)
\\s*
", html, 1); - if (!StringUtils.isEmpty(outputDesc)) { - outputDesc = outputDesc.replaceAll("\\$\\$\\$", "\\$").trim(); - } - info.setOutput(outputDesc); - - List inputExampleList = ReUtil.findAll(Pattern.compile("
\\s*
\\s*Input\\s*
\\s*
([\\s\\S]*?)
\\s*
"), html, 1); - - List outputExampleList = ReUtil.findAll(Pattern.compile("
\\s*
\\s*Output\\s*
\\s*
([\\s\\S]*?)
\\s*
"), html, 1); - - - StringBuilder sb = new StringBuilder(); - - for (int i = 0; i < inputExampleList.size() && i < outputExampleList.size(); i++) { - sb.append(""); - String input = inputExampleList.get(i) - .replaceAll("
", "\n") - .replaceAll("
", "\n") - .trim(); - sb.append(HtmlUtil.unescape(input)).append(""); - sb.append(""); - String output = outputExampleList.get(i) - .replaceAll("
", "\n") - .replaceAll("
", "\n") - .trim(); - sb.append(HtmlUtil.unescape(output)).append("
"); - } - - info.setExamples(sb.toString()); - - String tmpHint = ReUtil.get("
\\s*Note\\s*
([\\s\\S]*?)
\\s*", html, 1); - if (tmpHint != null) { - info.setHint(tmpHint.replaceAll("\\$\\$\\$", "\\$").trim()); - } - - info.setIsRemote(true); - - info.setSource(getProblemSource(html, problemId, contestId, problemNum)); - - info.setType(0) - .setAuth(1) - .setAuthor(author) - .setOpenCaseResult(true) - .setIsRemoveEndBlank(false) - .setIsGroup(false) - .setDifficulty(1); // 默认为中等 - - List allTags = ReUtil.findAll(Pattern.compile("([\\s\\S]*?)"), html, 1); - List tagList = new LinkedList<>(); - for (String tmp : allTags) { - tagList.add(new Tag().setName(tmp.trim())); - } - return new RemoteProblemInfo() - .setProblem(info) - .setTagList(tagList) - .setRemoteOJ(Constants.RemoteOJ.CODEFORCES); - } - - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/problem/GYMProblemStrategy.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/problem/GYMProblemStrategy.java deleted file mode 100644 index 6f8578c..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/problem/GYMProblemStrategy.java +++ /dev/null @@ -1,134 +0,0 @@ -package top.hcode.hoj.crawler.problem; - -import cn.hutool.core.util.IdUtil; -import cn.hutool.core.util.ReUtil; -import cn.hutool.http.HttpRequest; -import cn.hutool.http.HttpUtil; -import top.hcode.hoj.pojo.entity.problem.Problem; -import top.hcode.hoj.utils.CodeForcesUtils; -import top.hcode.hoj.utils.Constants; - -import java.io.File; -import java.util.ArrayList; -import java.util.List; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -/** - * @Author: Himit_ZH - * @Date: 2021/11/6 11:35 - * @Description: - */ - -public class GYMProblemStrategy extends CFProblemStrategy { - - public static final String IMAGE_HOST = "https://codeforces.com"; - - @Override - public String getJudgeName() { - return "GYM"; - } - - @Override - public String getProblemUrl(String contestId, String problemNum) { - String problemUrl = "/gym/%s/problem/%s"; - return HOST + String.format(problemUrl, contestId, problemNum); - } - - @Override - public String getProblemSource(String html, String problemId, String contestNum, String problemNum) { - return String.format("

Problem:%s

" + - "Contest:" + ReUtil.get("(]+/gym/\\d+\">.+?)", html, 1) - .replace("/gym", HOST + "/gym") - .replace("color: black", "color: #009688;") + "

", - contestNum, problemNum, getJudgeName() + "-" + problemId); - } - - @Override - public RemoteProblemInfo getProblemInfo(String problemId, String author) { - try { - return super.getProblemInfo(problemId, author); - } catch (Exception ignored) { - String contestNum = ReUtil.get("([0-9]+)[A-Z]{1}[0-9]{0,1}", problemId, 1); - String problemNum = ReUtil.get("[0-9]+([A-Z]{1}[0-9]{0,1})", problemId, 1); - return getPDFHtml(problemId, contestNum, problemNum, author); - } - } - - private RemoteProblemInfo getPDFHtml(String problemId, String contestNum, String problemNum, String author) { - - Problem problem = new Problem(); - - String url = HOST + "/gym/" + contestNum; - String html = HttpRequest.get(url) - .header("cookie", "RCPC=" + CodeForcesUtils.getRCPC()) - .timeout(20000) - .execute() - .body(); - - // 重定向失效,更新RCPC - if (html.contains("Redirecting... Please, wait.")) { - List list = ReUtil.findAll("[a-z0-9]+[a-z0-9]{31}", html, 0, new ArrayList<>()); - CodeForcesUtils.updateRCPC(list); - html = HttpRequest.get(url) - .header("cookie", "RCPC=" + CodeForcesUtils.getRCPC()) - .timeout(20000) - .execute() - .body(); - } - - String regex = "([^<]+)(?:(?:.|\\s)*?]*>\\s*([^<]+)<\\/div>\\s*([\\d.]+)\\D*(\\d+)"; - - Matcher matcher = Pattern.compile(regex).matcher(html); - matcher.find(); - - problem.setProblemId(getJudgeName() + "-" + problemId); - problem.setTitle(matcher.group(1)); - problem.setTimeLimit((int) (Double.parseDouble(matcher.group(3)) * 1000)); - problem.setMemoryLimit(Integer.parseInt(matcher.group(4))); - - problem.setSource(String.format("

Problem:%s

" + - "Contest:" + ReUtil.get("(]+/gym/\\d+\">.+?)", html, 1) - .replace("/gym", HOST + "/gym") - .replace("color: black", "color: #009688;") + "

", - contestNum, getJudgeName() + "-" + problemId)); - - - regex = "\\/gym\\/" + contestNum + "\\/attachments\\/download\\S*?\\.pdf"; - - matcher = Pattern.compile(regex).matcher(html); - matcher.find(); - - String pdfURI; - try { - String fileName = IdUtil.fastSimpleUUID() + ".pdf"; - String filePath = Constants.File.PROBLEM_FILE_FOLDER.getPath() + File.separator + fileName; - HttpUtil.downloadFile(IMAGE_HOST + matcher.group(0), filePath); - pdfURI = Constants.File.FILE_API.getPath() + fileName; - } catch (Exception e1) { - try { - pdfURI = HOST + matcher.group(0); - } catch (Exception e2) { - String fileName = IdUtil.fastSimpleUUID() + ".pdf"; - String filePath = Constants.File.PROBLEM_FILE_FOLDER.getPath() + File.separator + fileName; - CodeForcesUtils.downloadPDF(HOST + "/gym/" + contestNum + "/problem/" + problemNum, filePath); - pdfURI = Constants.File.FILE_API.getPath() + fileName; - } - } - String description = "

Click here to download the PDF file.

"; - problem.setDescription(description); - problem.setType(0) - .setIsRemote(true) - .setAuth(1) - .setAuthor(author) - .setOpenCaseResult(true) - .setIsRemoveEndBlank(false) - .setIsGroup(false) - .setDifficulty(1); // 默认为中等 - return new RemoteProblemInfo() - .setProblem(problem) - .setTagList(null) - .setRemoteOJ(Constants.RemoteOJ.GYM); - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/problem/HDUProblemStrategy.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/problem/HDUProblemStrategy.java deleted file mode 100644 index 274d89f..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/problem/HDUProblemStrategy.java +++ /dev/null @@ -1,66 +0,0 @@ -package top.hcode.hoj.crawler.problem; - -import cn.hutool.core.util.ReUtil; -import com.baomidou.mybatisplus.extension.api.R; -import org.jsoup.Connection; -import org.jsoup.nodes.Document; -import org.springframework.util.Assert; -import top.hcode.hoj.pojo.entity.problem.Problem; -import top.hcode.hoj.utils.Constants; -import top.hcode.hoj.utils.JsoupUtils; - -/** - * @Author: Himit_ZH - * @Date: 2021/2/17 22:42 - * @Description: - */ -public class HDUProblemStrategy extends ProblemStrategy { - public static final String JUDGE_NAME = "HDU"; - public static final String HOST = "http://acm.hdu.edu.cn"; - public static final String PROBLEM_URL = "/showproblem.php?pid=%s"; - - /** - * @param problemId String的原因是因为某些题库题号不是纯数字 - * @param author 导入该题目的管理员用户名 - * @return 返回Problem对象 - * @throws Exception - */ - @Override - public RemoteProblemInfo getProblemInfo(String problemId, String author) throws Exception { - // 验证题号是否符合规范 - Assert.isTrue(problemId.matches("[1-9]\\d*"), "HDU题号格式错误!"); - Problem info = new Problem(); - String url = HOST + String.format(PROBLEM_URL, problemId); - Connection connection = JsoupUtils.getConnectionFromUrl(url, null, null); - Document document = JsoupUtils.getDocument(connection, null); - String html = document.html(); - info.setProblemId(JUDGE_NAME + "-" + problemId); - info.setTitle(ReUtil.get("color:#1A5CC8\">([\\s\\S]*?)", html, 1).trim()); - info.setTimeLimit(Integer.parseInt(ReUtil.get("(\\d*) MS", html, 1))); - info.setMemoryLimit(Integer.parseInt(ReUtil.get("/(\\d*) K", html, 1)) / 1024); - info.setDescription(ReUtil.get(">Problem Description
([\\s\\S]*?)
", html, 1) - .replaceAll("src=\"[../]*", "src=\"" + HOST + "/")); - info.setInput(ReUtil.get(">Input
([\\s\\S]*?)
", html, 1)); - info.setOutput(ReUtil.get(">Output
([\\s\\S]*?)
", html, 1)); - StringBuilder sb = new StringBuilder(""); - sb.append(ReUtil.get(">Sample Input
([\\s\\S]*?)
", html, 1)); - sb.append(""); - sb.append(ReUtil.get(">Sample Output
([\\s\\S]*?)(
)*?
", html, 1)).append(""); - info.setExamples(sb.toString()); - info.setHint(ReUtil.get("Hint([\\s\\S]*?)<[^<>]*?panel_title[^<>]*?>", html, 1)); - info.setIsRemote(true); - info.setSource(String.format("%s", problemId, JUDGE_NAME + "-" + problemId)); - info.setType(0) - .setAuth(1) - .setAuthor(author) - .setOpenCaseResult(false) - .setIsRemoveEndBlank(false) - .setIsGroup(false) - .setDifficulty(1); // 默认为简单 - - return new RemoteProblemInfo() - .setProblem(info) - .setTagList(null) - .setRemoteOJ(Constants.RemoteOJ.HDU); - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/problem/POJProblemStrategy.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/problem/POJProblemStrategy.java deleted file mode 100644 index 9581b4e..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/problem/POJProblemStrategy.java +++ /dev/null @@ -1,63 +0,0 @@ -package top.hcode.hoj.crawler.problem; - -import cn.hutool.core.util.ReUtil; -import org.jsoup.Connection; -import org.jsoup.nodes.Document; -import org.springframework.util.Assert; -import top.hcode.hoj.pojo.entity.problem.Problem; -import top.hcode.hoj.utils.Constants; -import top.hcode.hoj.utils.JsoupUtils; - -/** - * @Author: Himit_ZH - * @Date: 2021/6/24 23:27 - * @Description: - */ -public class POJProblemStrategy extends ProblemStrategy { - - public static final String JUDGE_NAME = "POJ"; - public static final String HOST = "http://poj.org"; - public static final String PROBLEM_URL = "/problem?id=%s"; - - @Override - public RemoteProblemInfo getProblemInfo(String problemId, String author) throws Exception { - - // 验证题号是否符合规范 - Assert.isTrue(problemId.matches("[1-9]\\d*"), "POJ题号格式错误!"); - Problem info = new Problem(); - String url = HOST + String.format(PROBLEM_URL, problemId); - Connection connection = JsoupUtils.getConnectionFromUrl(url, null, null); - Document document = JsoupUtils.getDocument(connection, null); - String html = document.html(); - html = html.replaceAll("
", "\n"); - info.setProblemId(JUDGE_NAME + "-" + problemId); - info.setTitle(ReUtil.get("\\d{3,} -- ([\\s\\S]*?)", html, 1).trim()); - info.setTimeLimit(Integer.parseInt(ReUtil.get("Time Limit: (\\d{3,})MS", html, 1))); - info.setMemoryLimit(Integer.parseInt(ReUtil.get("Memory Limit: (\\d{2,})K", html, 1)) / 1024); - info.setDescription(ReUtil.get("

Description

([\\s\\S]*?)

", html, 1) - .replaceAll("src=\"[../]*", "src=\"" + HOST + "/")); - - info.setInput(ReUtil.get("

Input

([\\s\\S]*?)

", html, 1)); - info.setOutput(ReUtil.get("

Output

([\\s\\S]*?)

", html, 1)); - StringBuilder sb = new StringBuilder(""); - sb.append(ReUtil.get("

Sample Input

([\\s\\S]*?)

", html, 1)); - sb.append(""); - sb.append(ReUtil.get("

Sample Output

([\\s\\S]*?)

", html, 1)) - .append(""); - info.setExamples(sb.toString()); - info.setHint(ReUtil.get("

Hint

([\\s\\S]*?)

", html, 1)); - info.setIsRemote(true); - info.setSource(String.format("%s", problemId, JUDGE_NAME + "-" + problemId)); - info.setType(0) - .setAuth(1) - .setAuthor(author) - .setOpenCaseResult(false) - .setIsRemoveEndBlank(false) - .setIsGroup(false) - .setDifficulty(1); // 默认为简单 - return new RemoteProblemInfo() - .setProblem(info) - .setTagList(null) - .setRemoteOJ(Constants.RemoteOJ.POJ); - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/problem/ProblemContext.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/problem/ProblemContext.java deleted file mode 100644 index 5c29165..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/problem/ProblemContext.java +++ /dev/null @@ -1,31 +0,0 @@ -package top.hcode.hoj.crawler.problem; - -import lombok.extern.slf4j.Slf4j; - -/** - * @Author: Himit_ZH - * @Date: 2021/2/17 22:40 - * @Description: - */ -@Slf4j(topic = "hoj") -public class ProblemContext { - - ProblemStrategy problemStrategy; - - public ProblemContext(ProblemStrategy problemStrategy) { - this.problemStrategy = problemStrategy; - } - - //上下文接口 - public ProblemStrategy.RemoteProblemInfo getProblemInfo(String problemId, String author) throws Exception { - - try { - return problemStrategy.getProblemInfo(problemId, author); - }catch (IllegalArgumentException e){ - throw e; - } catch (Exception e) { - log.error("获取题目详情失败---------------->{}", e); - } - return null; - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/problem/ProblemStrategy.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/problem/ProblemStrategy.java deleted file mode 100644 index ed4acd4..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/problem/ProblemStrategy.java +++ /dev/null @@ -1,24 +0,0 @@ -package top.hcode.hoj.crawler.problem; - -import lombok.Data; -import lombok.experimental.Accessors; -import top.hcode.hoj.pojo.entity.problem.Problem; -import top.hcode.hoj.pojo.entity.problem.Tag; -import top.hcode.hoj.utils.Constants; - -import java.util.List; - -public abstract class ProblemStrategy { - - public abstract RemoteProblemInfo getProblemInfo(String problemId,String author) throws Exception; - - @Data - @Accessors(chain = true) - public static - class RemoteProblemInfo { - private Problem problem; - private List tagList; - private List langIdList; - private Constants.RemoteOJ remoteOJ; - } -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/problem/SPOJProblemStrategy.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/problem/SPOJProblemStrategy.java deleted file mode 100644 index debcbeb..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/crawler/problem/SPOJProblemStrategy.java +++ /dev/null @@ -1,89 +0,0 @@ -package top.hcode.hoj.crawler.problem; - -import cn.hutool.core.util.ReUtil; -import cn.hutool.http.HttpUtil; -import top.hcode.hoj.pojo.entity.problem.Problem; -import top.hcode.hoj.pojo.entity.problem.Tag; -import top.hcode.hoj.utils.Constants; - -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; -import java.util.regex.Pattern; - -/** - * @Author: Himit_ZH - * @Date: 2022/1/25 14:11 - * @Description: - */ -public class SPOJProblemStrategy extends ProblemStrategy { - - public static final String JUDGE_NAME = "SPOJ"; - public static final String HOST = "https://www.spoj.com"; - public static final String PROBLEM_URL = "/problems/%s/"; - public static final String SUBMIT_URL = "/submit/%s/"; - - public String getJudgeName() { - return JUDGE_NAME; - } - - public String getProblemUrl(String problemId) { - return HOST + String.format(PROBLEM_URL, problemId); - } - - public String getSubmitUrl(String problemId) { - return HOST + String.format(SUBMIT_URL, problemId); - } - - public String getProblemSource(String problemId) { - return String.format("%s", getJudgeName() + "-" + problemId); - } - - @Override - public RemoteProblemInfo getProblemInfo(String problemId, String author) throws Exception { - problemId = problemId.toUpperCase(); - String body = HttpUtil.get(getProblemUrl(problemId)); - String title = ReUtil.get("

[\\s\\S]*? - ([\\s\\S]*?)

", body, 1); - String timeLimit = ReUtil.get("Time limit:([\\s\\S]*?)s", body, 1); - String memoryLimit = ReUtil.get("Memory limit:([\\s\\S]*?)MB", body, 1); - String desc = ReUtil.get("
([\\s\\S]*?)
", body, 1); - desc = desc.replaceAll("src=\"/", "src=\"" + HOST + "/") - .replaceAll("
", "
");
-        desc = desc.replaceAll("", "");
-
-        Pattern tagPattern = Pattern.compile("([\\s\\S]*?)");
-        List allTags = ReUtil.findAll(tagPattern, body, 1);
-
-        Problem problem = new Problem();
-        problem.setProblemId(getJudgeName() + "-" + problemId)
-                .setAuthor(author)
-                .setTitle(title)
-                .setType(0)
-                .setTimeLimit((int) (Double.parseDouble(timeLimit) * 1000))
-                .setMemoryLimit(Integer.parseInt(memoryLimit))
-                .setDescription(desc.trim())
-                .setIsRemote(true)
-                .setSource(getProblemSource(problemId))
-                .setAuth(1)
-                .setOpenCaseResult(false)
-                .setIsGroup(false)
-                .setIsRemoveEndBlank(false)
-                .setDifficulty(1); // 默认为中等
-
-        List tagList = new ArrayList<>();
-        for (String tmp : allTags) {
-            tagList.add(new Tag().setName(tmp.trim()));
-        }
-
-        String submitPageBody = HttpUtil.get(getSubmitUrl(problemId));
-        Pattern pattern = Pattern.compile("");
-        List langIdList = ReUtil.findAll(pattern, submitPageBody, 1);
-
-        return new RemoteProblemInfo()
-                .setProblem(problem)
-                .setTagList(tagList)
-                .setLangIdList(langIdList)
-                .setRemoteOJ(Constants.RemoteOJ.SPOJ);
-
-    }
-}
\ No newline at end of file
diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/common/AnnouncementEntityService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/common/AnnouncementEntityService.java
deleted file mode 100644
index 2d77c1d..0000000
--- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/common/AnnouncementEntityService.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package top.hcode.hoj.dao.common;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import top.hcode.hoj.pojo.entity.common.Announcement;
-import com.baomidou.mybatisplus.extension.service.IService;
-import top.hcode.hoj.pojo.vo.AnnouncementVo;
-
-/**
- * 

- * 服务类 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -public interface AnnouncementEntityService extends IService { - - IPage getAnnouncementList(int limit, int currentPage, Boolean notAdmin); - - IPage getContestAnnouncement(Long cid,Boolean notAdmin,int limit, int currentPage); -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/common/FileEntityService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/common/FileEntityService.java deleted file mode 100644 index 04135e3..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/common/FileEntityService.java +++ /dev/null @@ -1,28 +0,0 @@ -package top.hcode.hoj.dao.common; - -import com.baomidou.mybatisplus.extension.service.IService; -import top.hcode.hoj.pojo.entity.common.File; -import top.hcode.hoj.pojo.vo.ACMContestRankVo; -import top.hcode.hoj.pojo.vo.OIContestRankVo; - -import java.util.List; - -public interface FileEntityService extends IService { - int updateFileToDeleteByUidAndType(String uid, String type); - - int updateFileToDeleteByGidAndType(Long gid, String type); - - List queryDeleteAvatarList(); - - List queryCarouselFileList(); - - List> getContestRankExcelHead(List contestProblemDisplayIDList, Boolean isACM); - - List> changeACMContestRankToExcelRowList(List acmContestRankVoList, - List contestProblemDisplayIDList, - String rankShowName); - - List> changOIContestRankToExcelRowList(List oiContestRankVoList, - List contestProblemDisplayIDList, - String rankShowName); -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/common/impl/AnnouncementEntityServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/common/impl/AnnouncementEntityServiceImpl.java deleted file mode 100644 index 969a9a9..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/common/impl/AnnouncementEntityServiceImpl.java +++ /dev/null @@ -1,39 +0,0 @@ -package top.hcode.hoj.dao.common.impl; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import org.springframework.beans.factory.annotation.Autowired; -import top.hcode.hoj.pojo.entity.common.Announcement; -import top.hcode.hoj.mapper.AnnouncementMapper; -import top.hcode.hoj.pojo.vo.AnnouncementVo; -import top.hcode.hoj.dao.common.AnnouncementEntityService; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.stereotype.Service; - -/** - *

- * 服务实现类 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -@Service -public class AnnouncementEntityServiceImpl extends ServiceImpl implements AnnouncementEntityService { - - @Autowired - private AnnouncementMapper announcementMapper; - - @Override - public IPage getAnnouncementList(int limit, int currentPage,Boolean notAdmin) { - //新建分页 - Page page = new Page<>(currentPage, limit); - return announcementMapper.getAnnouncementList(page,notAdmin); - } - - @Override - public IPage getContestAnnouncement(Long cid,Boolean notAdmin,int limit, int currentPage) { - Page page = new Page<>(currentPage, limit); - return announcementMapper.getContestAnnouncement(page,cid,notAdmin); - } -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/common/impl/FileEntityEntityServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/common/impl/FileEntityEntityServiceImpl.java deleted file mode 100644 index e14cb51..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/common/impl/FileEntityEntityServiceImpl.java +++ /dev/null @@ -1,184 +0,0 @@ -package top.hcode.hoj.dao.common.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import top.hcode.hoj.mapper.FileMapper; -import top.hcode.hoj.pojo.entity.common.File; -import top.hcode.hoj.pojo.vo.ACMContestRankVo; -import top.hcode.hoj.pojo.vo.OIContestRankVo; -import top.hcode.hoj.dao.common.FileEntityService; - -import java.util.HashMap; -import java.util.LinkedList; -import java.util.List; - -/** - * @Author: Himit_ZH - * @Date: 2021/1/11 14:05 - * @Description: - */ -@Service -public class FileEntityEntityServiceImpl extends ServiceImpl implements FileEntityService { - @Autowired - private FileMapper fileMapper; - - @Override - public int updateFileToDeleteByUidAndType(String uid, String type) { - return fileMapper.updateFileToDeleteByUidAndType(uid, type); - } - - @Override - public int updateFileToDeleteByGidAndType(Long gid, String type) { - return fileMapper.updateFileToDeleteByGidAndType(gid, type); - } - - @Override - public List queryDeleteAvatarList() { - return fileMapper.queryDeleteAvatarList(); - } - - @Override - public List queryCarouselFileList() { - return fileMapper.queryCarouselFileList(); - } - - @Override - public List> getContestRankExcelHead(List contestProblemDisplayIDList, Boolean isACM) { - List> headList = new LinkedList<>(); - - List head0 = new LinkedList<>(); - head0.add("Rank"); - - List head1 = new LinkedList<>(); - head1.add("Username"); - List head2 = new LinkedList<>(); - head2.add("ShowName"); - List head3 = new LinkedList<>(); - head3.add("Real Name"); - List head4 = new LinkedList<>(); - head4.add("School"); - - headList.add(head0); - headList.add(head1); - headList.add(head2); - headList.add(head3); - headList.add(head4); - - List head5 = new LinkedList<>(); - if (isACM) { - head5.add("AC"); - List head6 = new LinkedList<>(); - head6.add("Total Submission"); - List head7 = new LinkedList<>(); - head7.add("Total Penalty Time"); - headList.add(head5); - headList.add(head6); - headList.add(head7); - } else { - head5.add("Total Score"); - headList.add(head5); - } - - // 添加题目头 - for (String displayID : contestProblemDisplayIDList) { - List tmp = new LinkedList<>(); - tmp.add(displayID); - headList.add(tmp); - } - return headList; - } - - @Override - public List> changeACMContestRankToExcelRowList(List acmContestRankVoList, - List contestProblemDisplayIDList, - String rankShowName) { - List> allRowDataList = new LinkedList<>(); - for (ACMContestRankVo acmContestRankVo : acmContestRankVoList) { - List rowData = new LinkedList<>(); - rowData.add(acmContestRankVo.getRank() == -1 ? "*" : acmContestRankVo.getRank().toString()); - rowData.add(acmContestRankVo.getUsername()); - if ("username".equals(rankShowName)) { - rowData.add(acmContestRankVo.getUsername()); - } else if ("realname".equals(rankShowName)) { - rowData.add(acmContestRankVo.getRealname()); - } else if ("nickname".equals(rankShowName)) { - rowData.add(acmContestRankVo.getNickname()); - } else { - rowData.add(""); - } - rowData.add(acmContestRankVo.getRealname()); - rowData.add(acmContestRankVo.getSchool()); - rowData.add(acmContestRankVo.getAc()); - rowData.add(acmContestRankVo.getTotal()); - rowData.add(acmContestRankVo.getTotalTime()); - HashMap> submissionInfo = acmContestRankVo.getSubmissionInfo(); - for (String displayID : contestProblemDisplayIDList) { - HashMap problemInfo = submissionInfo.getOrDefault(displayID, null); - if (problemInfo != null) { // 如果是有提交记录的 - boolean isAC = (boolean) problemInfo.getOrDefault("isAC", false); - String info = ""; - int errorNum = (int) problemInfo.getOrDefault("errorNum", 0); - int tryNum = (int) problemInfo.getOrDefault("tryNum", 0); - if (isAC) { - if (errorNum == 0) { - info = "+(1)"; - } else { - info = "-(" + (errorNum + 1) + ")"; - } - } else { - if (tryNum != 0 && errorNum != 0) { - info = "-(" + errorNum + "+" + tryNum + ")"; - } else if (errorNum != 0) { - info = "-(" + errorNum + ")"; - } else if (tryNum != 0) { - info = "?(" + tryNum + ")"; - } - } - rowData.add(info); - } else { - rowData.add(""); - } - } - allRowDataList.add(rowData); - } - return allRowDataList; - } - - @Override - public List> changOIContestRankToExcelRowList(List oiContestRankVoList, - List contestProblemDisplayIDList, - String rankShowName) { - List> allRowDataList = new LinkedList<>(); - for (OIContestRankVo oiContestRankVo : oiContestRankVoList) { - List rowData = new LinkedList<>(); - rowData.add(oiContestRankVo.getRank() == -1 ? "*" : oiContestRankVo.getRank().toString()); - rowData.add(oiContestRankVo.getUsername()); - if ("username".equals(rankShowName)) { - rowData.add(oiContestRankVo.getUsername()); - } else if ("realname".equals(rankShowName)) { - rowData.add(oiContestRankVo.getRealname()); - } else if ("nickname".equals(rankShowName)) { - rowData.add(oiContestRankVo.getNickname()); - } else { - rowData.add(""); - } - rowData.add(oiContestRankVo.getRealname()); - rowData.add(oiContestRankVo.getSchool()); - rowData.add(oiContestRankVo.getTotalScore()); - HashMap submissionInfo = oiContestRankVo.getSubmissionInfo(); - for (String displayID : contestProblemDisplayIDList) { - Integer score = submissionInfo.getOrDefault(displayID, null); - if (score != null) { // 如果是有提交记录的就写最后一次提交的分数,没有的就写空 - rowData.add(score); - } else { - rowData.add(""); - } - } - allRowDataList.add(rowData); - } - return allRowDataList; - } - - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/contest/ContestAnnouncementEntityService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/contest/ContestAnnouncementEntityService.java deleted file mode 100644 index 517579f..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/contest/ContestAnnouncementEntityService.java +++ /dev/null @@ -1,8 +0,0 @@ -package top.hcode.hoj.dao.contest; - - -import com.baomidou.mybatisplus.extension.service.IService; -import top.hcode.hoj.pojo.entity.contest.ContestAnnouncement; - -public interface ContestAnnouncementEntityService extends IService { -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/contest/ContestEntityService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/contest/ContestEntityService.java deleted file mode 100644 index b24793d..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/contest/ContestEntityService.java +++ /dev/null @@ -1,25 +0,0 @@ -package top.hcode.hoj.dao.contest; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import top.hcode.hoj.pojo.vo.ContestVo; -import top.hcode.hoj.pojo.entity.contest.Contest; -import com.baomidou.mybatisplus.extension.service.IService; - -import java.util.List; - -/** - *

- * 服务类 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -public interface ContestEntityService extends IService { - - List getWithinNext14DaysContests(); - - IPage getContestList(Integer limit, Integer currentPage, Integer type, Integer status, String keyword); - - ContestVo getContestInfoById(long cid); -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/contest/ContestExplanationEntityService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/contest/ContestExplanationEntityService.java deleted file mode 100644 index 5d7a11a..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/contest/ContestExplanationEntityService.java +++ /dev/null @@ -1,16 +0,0 @@ -package top.hcode.hoj.dao.contest; - -import top.hcode.hoj.pojo.entity.contest.ContestExplanation; -import com.baomidou.mybatisplus.extension.service.IService; - -/** - *

- * 服务类 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -public interface ContestExplanationEntityService extends IService { - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/contest/ContestPrintEntityService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/contest/ContestPrintEntityService.java deleted file mode 100644 index 5508e37..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/contest/ContestPrintEntityService.java +++ /dev/null @@ -1,12 +0,0 @@ -package top.hcode.hoj.dao.contest; - -import com.baomidou.mybatisplus.extension.service.IService; -import top.hcode.hoj.pojo.entity.contest.ContestPrint; - -/** - * @Author: Himit_ZH - * @Date: 2021/9/19 21:05 - * @Description: - */ -public interface ContestPrintEntityService extends IService { -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/contest/ContestProblemEntityService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/contest/ContestProblemEntityService.java deleted file mode 100644 index 72f3470..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/contest/ContestProblemEntityService.java +++ /dev/null @@ -1,28 +0,0 @@ -package top.hcode.hoj.dao.contest; - -import top.hcode.hoj.pojo.entity.contest.ContestProblem; -import com.baomidou.mybatisplus.extension.service.IService; -import top.hcode.hoj.pojo.vo.ContestProblemVo; - -import java.util.Date; -import java.util.List; - -/** - *

- * 服务类 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -public interface ContestProblemEntityService extends IService { - List getContestProblemList(Long cid, - Date startTime, - Date endTime, - Date sealTime, - Boolean isAdmin, - String contestAuthorUid, - List groupRootUidList); - - void syncContestRecord(Long pid, Long cid, String displayId); -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/contest/ContestRecordEntityService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/contest/ContestRecordEntityService.java deleted file mode 100644 index 9c3d5d3..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/contest/ContestRecordEntityService.java +++ /dev/null @@ -1,32 +0,0 @@ -package top.hcode.hoj.dao.contest; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import top.hcode.hoj.pojo.entity.contest.Contest; -import top.hcode.hoj.pojo.entity.contest.ContestRecord; -import com.baomidou.mybatisplus.extension.service.IService; -import top.hcode.hoj.pojo.vo.ContestRecordVo; - -import java.util.Date; -import java.util.List; - -/** - *

- * 服务类 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -public interface ContestRecordEntityService extends IService { - - IPage getACInfo(Integer currentPage, - Integer limit, - Integer status, - Long cid, - String contestCreatorId); - - List getOIContestRecord(Contest contest,List externalCidList, Boolean isOpenSealRank); - - List getACMContestRecord(String contestCreatorUid, Long cid, List externalCidList, Date startTime); - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/contest/ContestRegisterEntityService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/contest/ContestRegisterEntityService.java deleted file mode 100644 index f0e53a8..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/contest/ContestRegisterEntityService.java +++ /dev/null @@ -1,16 +0,0 @@ -package top.hcode.hoj.dao.contest; - -import top.hcode.hoj.pojo.entity.contest.ContestRegister; -import com.baomidou.mybatisplus.extension.service.IService; - -/** - *

- * 服务类 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -public interface ContestRegisterEntityService extends IService { - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/contest/ContestScoreEntityService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/contest/ContestScoreEntityService.java deleted file mode 100644 index a2e9a47..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/contest/ContestScoreEntityService.java +++ /dev/null @@ -1,16 +0,0 @@ -package top.hcode.hoj.dao.contest; - -import top.hcode.hoj.pojo.entity.contest.ContestScore; -import com.baomidou.mybatisplus.extension.service.IService; - -/** - *

- * 服务类 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -public interface ContestScoreEntityService extends IService { - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/contest/impl/ContestAnnouncementEntityServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/contest/impl/ContestAnnouncementEntityServiceImpl.java deleted file mode 100644 index 39df774..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/contest/impl/ContestAnnouncementEntityServiceImpl.java +++ /dev/null @@ -1,16 +0,0 @@ -package top.hcode.hoj.dao.contest.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.stereotype.Service; -import top.hcode.hoj.mapper.ContestAnnouncementMapper; -import top.hcode.hoj.pojo.entity.contest.ContestAnnouncement; -import top.hcode.hoj.dao.contest.ContestAnnouncementEntityService; - -/** - * @Author: Himit_ZH - * @Date: 2020/12/21 22:59 - * @Description: - */ -@Service -public class ContestAnnouncementEntityServiceImpl extends ServiceImpl implements ContestAnnouncementEntityService { -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/contest/impl/ContestEntityServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/contest/impl/ContestEntityServiceImpl.java deleted file mode 100644 index cb3fc7c..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/contest/impl/ContestEntityServiceImpl.java +++ /dev/null @@ -1,83 +0,0 @@ -package top.hcode.hoj.dao.contest.impl; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.util.CollectionUtils; -import top.hcode.hoj.pojo.vo.ContestRegisterCountVo; -import top.hcode.hoj.pojo.vo.ContestVo; -import top.hcode.hoj.pojo.entity.contest.Contest; -import top.hcode.hoj.mapper.ContestMapper; -import top.hcode.hoj.dao.contest.ContestEntityService; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.stereotype.Service; - -import java.util.Collections; -import java.util.List; -import java.util.stream.Collectors; - -/** - *

- * 服务实现类 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -@Service -public class ContestEntityServiceImpl extends ServiceImpl implements ContestEntityService { - - @Autowired - private ContestMapper contestMapper; - - @Override - public List getWithinNext14DaysContests() { - List contestList = contestMapper.getWithinNext14DaysContests(); - setRegisterCount(contestList); - - return contestList; - } - - @Override - public IPage getContestList(Integer limit, Integer currentPage, Integer type, Integer status, String keyword) { - //新建分页 - IPage page = new Page<>(currentPage, limit); - - List contestList = contestMapper.getContestList(page, type, status, keyword); - setRegisterCount(contestList); - - return page.setRecords(contestList); - } - - @Override - public ContestVo getContestInfoById(long cid) { - List cidList = Collections.singletonList(cid); - ContestVo contestVo = contestMapper.getContestInfoById(cid); - if (contestVo != null) { - List contestRegisterCountVoList = contestMapper.getContestRegisterCount(cidList); - if(!CollectionUtils.isEmpty(contestRegisterCountVoList)) { - ContestRegisterCountVo contestRegisterCountVo = contestRegisterCountVoList.get(0); - contestVo.setCount(contestRegisterCountVo.getCount()); - } - } - return contestVo; - } - - - private void setRegisterCount(List contestList){ - List cidList = contestList.stream().map(ContestVo::getId).collect(Collectors.toList()); - if (!CollectionUtils.isEmpty(cidList)) { - List contestRegisterCountVoList = contestMapper.getContestRegisterCount(cidList); - for (ContestRegisterCountVo contestRegisterCountVo : contestRegisterCountVoList) { - for (ContestVo contestVo : contestList) { - if (contestRegisterCountVo.getCid().equals(contestVo.getId())) { - contestVo.setCount(contestRegisterCountVo.getCount()); - break; - } - } - } - } - } - - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/contest/impl/ContestExplanationEntityServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/contest/impl/ContestExplanationEntityServiceImpl.java deleted file mode 100644 index f1ba4a8..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/contest/impl/ContestExplanationEntityServiceImpl.java +++ /dev/null @@ -1,20 +0,0 @@ -package top.hcode.hoj.dao.contest.impl; - -import top.hcode.hoj.pojo.entity.contest.ContestExplanation; -import top.hcode.hoj.mapper.ContestExplanationMapper; -import top.hcode.hoj.dao.contest.ContestExplanationEntityService; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.stereotype.Service; - -/** - *

- * 服务实现类 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -@Service -public class ContestExplanationEntityServiceImpl extends ServiceImpl implements ContestExplanationEntityService { - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/contest/impl/ContestPrintEntityServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/contest/impl/ContestPrintEntityServiceImpl.java deleted file mode 100644 index c407551..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/contest/impl/ContestPrintEntityServiceImpl.java +++ /dev/null @@ -1,17 +0,0 @@ -package top.hcode.hoj.dao.contest.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.stereotype.Service; - -import top.hcode.hoj.mapper.ContestPrintMapper; -import top.hcode.hoj.pojo.entity.contest.ContestPrint; -import top.hcode.hoj.dao.contest.ContestPrintEntityService; - -/** - * @Author: Himit_ZH - * @Date: 2021/9/19 21:05 - * @Description: - */ -@Service -public class ContestPrintEntityServiceImpl extends ServiceImpl implements ContestPrintEntityService { -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/contest/impl/ContestProblemEntityServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/contest/impl/ContestProblemEntityServiceImpl.java deleted file mode 100644 index 5a62755..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/contest/impl/ContestProblemEntityServiceImpl.java +++ /dev/null @@ -1,71 +0,0 @@ -package top.hcode.hoj.dao.contest.impl; - -import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.scheduling.annotation.Async; -import org.springframework.util.CollectionUtils; -import top.hcode.hoj.pojo.entity.contest.ContestProblem; -import top.hcode.hoj.mapper.ContestProblemMapper; -import top.hcode.hoj.pojo.entity.contest.ContestRecord; -import top.hcode.hoj.pojo.entity.user.UserInfo; -import top.hcode.hoj.pojo.vo.ContestProblemVo; -import top.hcode.hoj.dao.contest.ContestProblemEntityService; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.stereotype.Service; -import top.hcode.hoj.dao.contest.ContestRecordEntityService; -import top.hcode.hoj.dao.user.UserInfoEntityService; - -import java.util.Date; -import java.util.List; -import java.util.stream.Collectors; - -/** - *

- * 服务实现类 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -@Service -public class ContestProblemEntityServiceImpl extends ServiceImpl implements ContestProblemEntityService { - - @Autowired - private ContestProblemMapper contestProblemMapper; - - @Autowired - private UserInfoEntityService userInfoEntityService; - - @Autowired - private ContestRecordEntityService contestRecordEntityService; - - @Override - public List getContestProblemList(Long cid, - Date startTime, - Date endTime, - Date sealTime, - Boolean isAdmin, - String contestAuthorUid, - List groupRootUidList) { - // 筛去 比赛管理员和超级管理员的提交 - List superAdminUidList = userInfoEntityService.getSuperAdminUidList(); - superAdminUidList.add(contestAuthorUid); - - if (!CollectionUtils.isEmpty(groupRootUidList)) { - superAdminUidList.addAll(groupRootUidList); - } - - return contestProblemMapper.getContestProblemList(cid, startTime, endTime, sealTime, isAdmin, superAdminUidList); - } - - @Async - @Override - public void syncContestRecord(Long pid, Long cid, String displayId) { - - UpdateWrapper updateWrapper = new UpdateWrapper<>(); - updateWrapper.eq("pid", pid) - .eq("cid", cid) - .set("display_id", displayId); - contestRecordEntityService.update(updateWrapper); - } -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/contest/impl/ContestRecordEntityServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/contest/impl/ContestRecordEntityServiceImpl.java deleted file mode 100644 index a923cec..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/contest/impl/ContestRecordEntityServiceImpl.java +++ /dev/null @@ -1,170 +0,0 @@ -package top.hcode.hoj.dao.contest.impl; - -import cn.hutool.core.collection.CollectionUtil; -import cn.hutool.core.date.DateUnit; -import cn.hutool.core.date.DateUtil; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import top.hcode.hoj.dao.contest.ContestRecordEntityService; -import top.hcode.hoj.dao.user.UserInfoEntityService; -import top.hcode.hoj.mapper.ContestRecordMapper; -import top.hcode.hoj.pojo.entity.contest.Contest; -import top.hcode.hoj.pojo.entity.contest.ContestRecord; -import top.hcode.hoj.pojo.vo.ContestRecordVo; -import top.hcode.hoj.utils.Constants; -import top.hcode.hoj.utils.RedisUtils; - -import java.util.*; - -/** - *

- * 服务实现类 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -@Service -public class ContestRecordEntityServiceImpl extends ServiceImpl implements ContestRecordEntityService { - - @Autowired - private ContestRecordMapper contestRecordMapper; - - @Autowired - private UserInfoEntityService userInfoEntityService; - - @Autowired - private RedisUtils redisUtils; - - @Override - public IPage getACInfo(Integer currentPage, Integer limit, Integer status, Long cid, String contestCreatorId) { - - List acInfo = contestRecordMapper.getACInfo(status, cid); - - HashMap pidMapUidAndPid = new HashMap<>(12); - HashMap UidAndPidMapTime = new HashMap<>(12); - - List superAdminUidList = userInfoEntityService.getSuperAdminUidList(); - - List userACInfo = new LinkedList<>(); - - for (ContestRecord contestRecord : acInfo) { - - if (contestRecord.getUid().equals(contestCreatorId) - || superAdminUidList.contains(contestRecord.getUid())) { // 超级管理员和比赛创建者的提交跳过 - continue; - } - - contestRecord.setFirstBlood(false); - String uidAndPid = pidMapUidAndPid.get(contestRecord.getPid()); - if (uidAndPid == null) { - pidMapUidAndPid.put(contestRecord.getPid(), contestRecord.getUid() + contestRecord.getPid()); - UidAndPidMapTime.put(contestRecord.getUid() + contestRecord.getPid(), contestRecord.getTime()); - } else { - Long firstTime = UidAndPidMapTime.get(uidAndPid); - Long tmpTime = contestRecord.getTime(); - if (tmpTime < firstTime) { - pidMapUidAndPid.put(contestRecord.getPid(), contestRecord.getUid() + contestRecord.getPid()); - UidAndPidMapTime.put(contestRecord.getUid() + contestRecord.getPid(), tmpTime); - } - } - userACInfo.add(contestRecord); - } - - - List pageList = new ArrayList<>(); - - int count = userACInfo.size(); - - //计算当前页第一条数据的下标 - int currId = currentPage > 1 ? (currentPage - 1) * limit : 0; - for (int i = 0; i < limit && i < count - currId; i++) { - ContestRecord contestRecord = userACInfo.get(currId + i); - if (pidMapUidAndPid.get(contestRecord.getPid()).equals(contestRecord.getUid() + contestRecord.getPid())) { - contestRecord.setFirstBlood(true); - } - pageList.add(contestRecord); - } - - - Page page = new Page<>(currentPage, limit); - page.setSize(limit); - page.setCurrent(currentPage); - page.setTotal(count); - page.setRecords(pageList); - - return page; - } - - - @Override - public List getOIContestRecord(Contest contest, List externalCidList, Boolean isOpenSealRank) { - - String oiRankScoreType = contest.getOiRankScoreType(); - Long cid = contest.getId(); - String contestCreatorUid = contest.getUid(); - - if (!isOpenSealRank) { - // 封榜解除 获取最新数据 - // 获取每个用户每道题最近一次提交 - Long endTime = contest.getDuration(); - if (Objects.equals(Constants.Contest.OI_RANK_RECENT_SCORE.getName(), oiRankScoreType)) { - return contestRecordMapper.getOIContestRecordByRecentSubmission(cid, - externalCidList, - contestCreatorUid, - false, - null, - endTime); - } else { - return contestRecordMapper.getOIContestRecordByHighestSubmission(cid, - externalCidList, - contestCreatorUid, - false, - null, - endTime); - } - - } else { - String key = Constants.Contest.OI_CONTEST_RANK_CACHE.getName() + "_" + oiRankScoreType + "_" + cid; - List oiContestRecordList = (List) redisUtils.get(key); - if (oiContestRecordList == null) { - Long sealTime = DateUtil.between(contest.getStartTime(), contest.getSealRankTime(), DateUnit.SECOND); - if (sealTime > 0) { - sealTime --; - } - if (Objects.equals(Constants.Contest.OI_RANK_RECENT_SCORE.getName(), oiRankScoreType)) { - oiContestRecordList = contestRecordMapper.getOIContestRecordByRecentSubmission(cid, - externalCidList, - contestCreatorUid, - true, - sealTime, - null); - } else { - oiContestRecordList = contestRecordMapper.getOIContestRecordByHighestSubmission(cid, - externalCidList, - contestCreatorUid, - true, - sealTime, - null); - } - redisUtils.set(key, oiContestRecordList, 2 * 3600); - } - return oiContestRecordList; - } - - } - - @Override - public List getACMContestRecord(String contestCreatorUid, Long cid, List externalCidList, Date startTime) { - if (CollectionUtil.isEmpty(externalCidList)) { - return contestRecordMapper.getACMContestRecord(contestCreatorUid, cid, null, null); - } else { - long time = DateUtil.between(startTime, new Date(), DateUnit.SECOND); - return contestRecordMapper.getACMContestRecord(contestCreatorUid, cid, externalCidList, time); - } - } - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/contest/impl/ContestRegisterEntityServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/contest/impl/ContestRegisterEntityServiceImpl.java deleted file mode 100644 index 4b20a07..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/contest/impl/ContestRegisterEntityServiceImpl.java +++ /dev/null @@ -1,20 +0,0 @@ -package top.hcode.hoj.dao.contest.impl; - -import top.hcode.hoj.pojo.entity.contest.ContestRegister; -import top.hcode.hoj.mapper.ContestRegisterMapper; -import top.hcode.hoj.dao.contest.ContestRegisterEntityService; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.stereotype.Service; - -/** - *

- * 服务实现类 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -@Service -public class ContestRegisterEntityServiceImpl extends ServiceImpl implements ContestRegisterEntityService { - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/contest/impl/ContestScoreEntityServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/contest/impl/ContestScoreEntityServiceImpl.java deleted file mode 100644 index 15e289f..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/contest/impl/ContestScoreEntityServiceImpl.java +++ /dev/null @@ -1,20 +0,0 @@ -package top.hcode.hoj.dao.contest.impl; - -import top.hcode.hoj.pojo.entity.contest.ContestScore; -import top.hcode.hoj.mapper.ContestScoreMapper; -import top.hcode.hoj.dao.contest.ContestScoreEntityService; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.stereotype.Service; - -/** - *

- * 服务实现类 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -@Service -public class ContestScoreEntityServiceImpl extends ServiceImpl implements ContestScoreEntityService { - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/discussion/CommentEntityService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/discussion/CommentEntityService.java deleted file mode 100644 index 6efa661..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/discussion/CommentEntityService.java +++ /dev/null @@ -1,27 +0,0 @@ -package top.hcode.hoj.dao.discussion; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import top.hcode.hoj.pojo.entity.discussion.Comment; -import com.baomidou.mybatisplus.extension.service.IService; -import top.hcode.hoj.pojo.entity.discussion.Reply; -import top.hcode.hoj.pojo.vo.CommentVo; -import top.hcode.hoj.pojo.vo.ReplyVo; - -import java.util.List; - -/** - *

- * 服务类 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -public interface CommentEntityService extends IService { - - IPage getCommentList(int limit, int currentPage, Long cid, Integer did, Boolean isRoot, String uid); - - void updateCommentMsg(String recipientId, String senderId, String content, Integer discussionId, Long gid); - - void updateCommentLikeMsg(String recipientId, String senderId, Integer sourceId, String sourceType); -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/discussion/CommentLikeEntityService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/discussion/CommentLikeEntityService.java deleted file mode 100644 index 80ee99a..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/discussion/CommentLikeEntityService.java +++ /dev/null @@ -1,8 +0,0 @@ -package top.hcode.hoj.dao.discussion; - -import com.baomidou.mybatisplus.extension.service.IService; -import top.hcode.hoj.pojo.entity.discussion.CommentLike; - - -public interface CommentLikeEntityService extends IService { -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/discussion/DiscussionEntityService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/discussion/DiscussionEntityService.java deleted file mode 100644 index 02e5b37..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/discussion/DiscussionEntityService.java +++ /dev/null @@ -1,13 +0,0 @@ -package top.hcode.hoj.dao.discussion; - -import com.baomidou.mybatisplus.extension.service.IService; - -import top.hcode.hoj.pojo.entity.discussion.Discussion; -import top.hcode.hoj.pojo.vo.DiscussionVo; - -public interface DiscussionEntityService extends IService { - - DiscussionVo getDiscussion(Integer did, String uid); - - void updatePostLikeMsg(String recipientId, String senderId, Integer discussionId, Long gid); -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/discussion/DiscussionLikeEntityService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/discussion/DiscussionLikeEntityService.java deleted file mode 100644 index 44bf2e1..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/discussion/DiscussionLikeEntityService.java +++ /dev/null @@ -1,7 +0,0 @@ -package top.hcode.hoj.dao.discussion; - -import com.baomidou.mybatisplus.extension.service.IService; -import top.hcode.hoj.pojo.entity.discussion.DiscussionLike; - -public interface DiscussionLikeEntityService extends IService { -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/discussion/DiscussionReportEntityService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/discussion/DiscussionReportEntityService.java deleted file mode 100644 index 29abf2b..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/discussion/DiscussionReportEntityService.java +++ /dev/null @@ -1,12 +0,0 @@ -package top.hcode.hoj.dao.discussion; - - -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.service.IService; -import top.hcode.hoj.pojo.entity.discussion.DiscussionReport; -import top.hcode.hoj.pojo.vo.DiscussionReportVo; - -public interface DiscussionReportEntityService extends IService { - - IPage getDiscussionReportList(Integer limit, Integer currentPage); -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/discussion/ReplyEntityService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/discussion/ReplyEntityService.java deleted file mode 100644 index 8bb4efb..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/discussion/ReplyEntityService.java +++ /dev/null @@ -1,20 +0,0 @@ -package top.hcode.hoj.dao.discussion; - -import com.baomidou.mybatisplus.extension.service.IService; -import top.hcode.hoj.pojo.entity.discussion.Reply; -import top.hcode.hoj.pojo.vo.ReplyVo; - -import java.util.List; - -/** - * @Author: Himit_ZH - * @Date: 2021/5/5 22:08 - * @Description: - */ -public interface ReplyEntityService extends IService { - - public List getAllReplyByCommentId(Long cid, String uid, Boolean isRoot, Integer commentId); - - public void updateReplyMsg(Integer sourceId, String sourceType, String content, - Integer quoteId, String quoteType, String recipientId,String senderId); -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/discussion/impl/CommentEntityServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/discussion/impl/CommentEntityServiceImpl.java deleted file mode 100644 index 75f7d96..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/discussion/impl/CommentEntityServiceImpl.java +++ /dev/null @@ -1,142 +0,0 @@ -package top.hcode.hoj.dao.discussion.impl; - -import top.hcode.hoj.dao.discussion.DiscussionEntityService; -import top.hcode.hoj.dao.group.GroupMemberEntityService; -import top.hcode.hoj.pojo.entity.discussion.Discussion; -import top.hcode.hoj.pojo.entity.group.GroupMember; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.scheduling.annotation.Async; -import top.hcode.hoj.mapper.CommentMapper; -import top.hcode.hoj.pojo.entity.contest.Contest; -import top.hcode.hoj.pojo.entity.discussion.Comment; -import top.hcode.hoj.pojo.entity.msg.MsgRemind; -import top.hcode.hoj.pojo.vo.CommentVo; -import top.hcode.hoj.dao.contest.ContestEntityService; -import top.hcode.hoj.dao.discussion.CommentEntityService; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.stereotype.Service; -import top.hcode.hoj.dao.msg.MsgRemindEntityService; -import top.hcode.hoj.dao.user.UserInfoEntityService; -import top.hcode.hoj.utils.Constants; - -import javax.annotation.Resource; -import java.util.List; - -/** - *

- * 服务实现类 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -@Service -public class CommentEntityServiceImpl extends ServiceImpl implements CommentEntityService { - - @Autowired - private CommentMapper commentMapper; - - @Autowired - private DiscussionEntityService discussionEntityService; - - @Autowired - private ContestEntityService contestEntityService; - - @Autowired - private UserInfoEntityService userInfoEntityService; - - @Resource - private MsgRemindEntityService msgRemindEntityService; - - @Autowired - private GroupMemberEntityService groupMemberEntityService; - - @Override - public IPage getCommentList(int limit, int currentPage, Long cid, Integer did, Boolean isRoot, String uid) { - //新建分页 - Page page = new Page<>(currentPage, limit); - - if (cid != null) { - Contest contest = contestEntityService.getById(cid); - - boolean onlyMineAndAdmin = contest.getStatus().equals(Constants.Contest.STATUS_RUNNING.getCode()) - && !isRoot && !contest.getUid().equals(uid); - if (onlyMineAndAdmin) { // 自己和比赛管理者评论可看 - - List myAndAdminUidList = userInfoEntityService.getSuperAdminUidList(); - myAndAdminUidList.add(uid); - myAndAdminUidList.add(contest.getUid()); - Long gid = contest.getGid(); - if (gid != null) { - QueryWrapper groupMemberQueryWrapper = new QueryWrapper<>(); - groupMemberQueryWrapper.eq("gid", gid).eq("auth", 5); - List groupAdminUidList = groupMemberEntityService.list(groupMemberQueryWrapper); - - for (GroupMember groupMember : groupAdminUidList) { - myAndAdminUidList.add(groupMember.getUid()); - } - } - return commentMapper.getCommentList(page, cid, did, true, myAndAdminUidList); - } - - } - return commentMapper.getCommentList(page, cid, did, false, null); - } - - @Async - @Override - public void updateCommentMsg(String recipientId, String senderId, String content, Integer discussionId, Long gid) { - - if (content.length() > 200) { - content = content.substring(0, 200) + "..."; - } - - MsgRemind msgRemind = new MsgRemind(); - msgRemind.setAction("Discuss") - .setRecipientId(recipientId) - .setSenderId(senderId) - .setSourceContent(content) - .setSourceId(discussionId) - .setSourceType("Discussion") - .setUrl("/discussion-detail/" + discussionId); - - if (gid != null) { - msgRemind.setUrl("/group/" + gid + "/discussion-detail/" + discussionId); - } else { - msgRemind.setUrl("/discussion-detail/" + discussionId); - } - msgRemindEntityService.saveOrUpdate(msgRemind); - } - - - @Async - @Override - public void updateCommentLikeMsg(String recipientId, String senderId, Integer sourceId, String sourceType) { - - MsgRemind msgRemind = new MsgRemind(); - msgRemind.setAction("Like_Discuss") - .setRecipientId(recipientId) - .setSenderId(senderId) - .setSourceId(sourceId) - .setSourceType(sourceType); - - if (sourceType.equals("Discussion")) { - - Discussion discussion = discussionEntityService.getById(sourceId); - if (discussion != null) { - if (discussion.getGid() != null) { - msgRemind.setUrl("/group/" + discussion.getGid() + "/discussion-detail/" + sourceId); - } else { - msgRemind.setUrl("/discussion-detail/" + sourceId); - } - } - } else if (sourceType.equals("Contest")) { - msgRemind.setUrl("/contest/" + sourceId + "/comment"); - } - - msgRemindEntityService.saveOrUpdate(msgRemind); - } -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/discussion/impl/CommentLikeEntityServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/discussion/impl/CommentLikeEntityServiceImpl.java deleted file mode 100644 index 67abf99..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/discussion/impl/CommentLikeEntityServiceImpl.java +++ /dev/null @@ -1,17 +0,0 @@ -package top.hcode.hoj.dao.discussion.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.stereotype.Service; -import top.hcode.hoj.mapper.CommentLikeMapper; -import top.hcode.hoj.pojo.entity.discussion.CommentLike; -import top.hcode.hoj.dao.discussion.CommentLikeEntityService; - - -/** - * @Author: Himit_ZH - * @Date: 2021/5/4 22:31 - * @Description: - */ -@Service -public class CommentLikeEntityServiceImpl extends ServiceImpl implements CommentLikeEntityService { -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/discussion/impl/DiscussionEntityServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/discussion/impl/DiscussionEntityServiceImpl.java deleted file mode 100644 index 7ec882b..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/discussion/impl/DiscussionEntityServiceImpl.java +++ /dev/null @@ -1,54 +0,0 @@ -package top.hcode.hoj.dao.discussion.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.scheduling.annotation.Async; -import org.springframework.stereotype.Service; -import top.hcode.hoj.mapper.DiscussionMapper; -import top.hcode.hoj.pojo.entity.discussion.Discussion; -import top.hcode.hoj.pojo.entity.msg.MsgRemind; -import top.hcode.hoj.pojo.vo.DiscussionVo; -import top.hcode.hoj.dao.discussion.DiscussionEntityService; -import top.hcode.hoj.dao.msg.MsgRemindEntityService; - -import javax.annotation.Resource; - -/** - * @Author: Himit_ZH - * @Date: 2021/5/4 22:31 - * @Description: - */ -@Service -public class DiscussionEntityServiceImpl extends ServiceImpl implements DiscussionEntityService { - - @Autowired - private DiscussionMapper discussionMapper; - - @Override - public DiscussionVo getDiscussion(Integer did, String uid) { - return discussionMapper.getDiscussion(did, uid); - } - - @Resource - private MsgRemindEntityService msgRemindEntityService; - - @Async - public void updatePostLikeMsg(String recipientId, String senderId, Integer discussionId, Long gid) { - - MsgRemind msgRemind = new MsgRemind(); - msgRemind.setAction("Like_Post") - .setRecipientId(recipientId) - .setSenderId(senderId) - .setSourceId(discussionId) - .setSourceType("Discussion") - .setUrl("/discussion-detail/" + discussionId); - - if (gid != null) { - msgRemind.setUrl("/group/" + gid + "/discussion-detail/" + discussionId); - } else { - msgRemind.setUrl("/discussion-detail/" + discussionId); - } - - msgRemindEntityService.saveOrUpdate(msgRemind); - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/discussion/impl/DiscussionLikeEntityServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/discussion/impl/DiscussionLikeEntityServiceImpl.java deleted file mode 100644 index 100fbc3..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/discussion/impl/DiscussionLikeEntityServiceImpl.java +++ /dev/null @@ -1,16 +0,0 @@ -package top.hcode.hoj.dao.discussion.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.stereotype.Service; -import top.hcode.hoj.mapper.DiscussionLikeMapper; -import top.hcode.hoj.pojo.entity.discussion.DiscussionLike; -import top.hcode.hoj.dao.discussion.DiscussionLikeEntityService; - -/** - * @Author: Himit_ZH - * @Date: 2021/5/4 22:31 - * @Description: - */ -@Service -public class DiscussionLikeEntityServiceImpl extends ServiceImpl implements DiscussionLikeEntityService { -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/discussion/impl/DiscussionReportEntityServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/discussion/impl/DiscussionReportEntityServiceImpl.java deleted file mode 100644 index 964bf76..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/discussion/impl/DiscussionReportEntityServiceImpl.java +++ /dev/null @@ -1,30 +0,0 @@ -package top.hcode.hoj.dao.discussion.impl; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.stereotype.Service; -import top.hcode.hoj.dao.discussion.DiscussionReportEntityService; -import top.hcode.hoj.mapper.DiscussionReportMapper; -import top.hcode.hoj.pojo.entity.discussion.DiscussionReport; -import top.hcode.hoj.pojo.vo.DiscussionReportVo; - -import javax.annotation.Resource; - -/** - * @Author: Himit_ZH - * @Date: 2021/5/11 21:46 - * @Description: - */ -@Service -public class DiscussionReportEntityServiceImpl extends ServiceImpl implements DiscussionReportEntityService { - - @Resource - private DiscussionReportMapper discussionReportMapper; - - @Override - public IPage getDiscussionReportList(Integer limit, Integer currentPage) { - Page page = new Page<>(currentPage, limit); - return discussionReportMapper.getDiscussionReportList(page); - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/discussion/impl/ReplyEntityServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/discussion/impl/ReplyEntityServiceImpl.java deleted file mode 100644 index 5f5cd84..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/discussion/impl/ReplyEntityServiceImpl.java +++ /dev/null @@ -1,100 +0,0 @@ -package top.hcode.hoj.dao.discussion.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.scheduling.annotation.Async; -import org.springframework.stereotype.Service; -import top.hcode.hoj.dao.contest.ContestEntityService; -import top.hcode.hoj.dao.discussion.DiscussionEntityService; -import top.hcode.hoj.dao.user.UserInfoEntityService; -import top.hcode.hoj.mapper.ReplyMapper; -import top.hcode.hoj.pojo.entity.contest.Contest; -import top.hcode.hoj.pojo.entity.discussion.Discussion; -import top.hcode.hoj.pojo.entity.msg.MsgRemind; -import top.hcode.hoj.pojo.entity.discussion.Reply; -import top.hcode.hoj.dao.discussion.ReplyEntityService; -import top.hcode.hoj.dao.msg.MsgRemindEntityService; -import top.hcode.hoj.pojo.vo.ReplyVo; -import top.hcode.hoj.utils.Constants; - -import javax.annotation.Resource; -import java.util.List; - -/** - * @Author: Himit_ZH - * @Date: 2021/5/5 22:09 - * @Description: - */ -@Service -public class ReplyEntityServiceImpl extends ServiceImpl implements ReplyEntityService { - - @Resource - private MsgRemindEntityService msgRemindEntityService; - - @Autowired - private ContestEntityService contestEntityService; - - @Autowired - private UserInfoEntityService userInfoEntityService; - - @Autowired - private DiscussionEntityService discussionEntityService; - - @Autowired - private ReplyMapper replyMapper; - - @Override - public List getAllReplyByCommentId(Long cid, String uid, Boolean isRoot, Integer commentId) { - - - if (cid != null) { - Contest contest = contestEntityService.getById(cid); - boolean onlyMineAndAdmin = contest.getStatus().equals(Constants.Contest.STATUS_RUNNING.getCode()) - && !isRoot && !contest.getUid().equals(uid); - if (onlyMineAndAdmin) { // 自己和比赛管理者评论可看 - - List myAndAdminUidList = userInfoEntityService.getSuperAdminUidList(); - myAndAdminUidList.add(uid); - myAndAdminUidList.add(contest.getUid()); - return replyMapper.getAllReplyByCommentId(commentId, myAndAdminUidList); - } - - } - return replyMapper.getAllReplyByCommentId(commentId, null); - } - - @Async - @Override - public void updateReplyMsg(Integer sourceId, String sourceType, String content, - Integer quoteId, String quoteType, String recipientId, String senderId) { - if (content.length() > 200) { - content = content.substring(0, 200) + "..."; - } - - MsgRemind msgRemind = new MsgRemind(); - msgRemind.setAction("Reply") - .setSourceId(sourceId) - .setSourceType(sourceType) - .setSourceContent(content) - .setQuoteId(quoteId) - .setQuoteType(quoteType) - .setRecipientId(recipientId) - .setSenderId(senderId); - - - if (sourceType.equals("Discussion")) { - Discussion discussion = discussionEntityService.getById(sourceId); - if (discussion != null) { - if (discussion.getGid() != null) { - msgRemind.setUrl("/group/" + discussion.getGid() + "/discussion-detail/" + sourceId); - } else { - msgRemind.setUrl("/discussion-detail/" + sourceId); - } - } - } else if (sourceType.equals("Contest")) { - msgRemind.setUrl("/contest/" + sourceId + "/comment"); - } - - msgRemindEntityService.saveOrUpdate(msgRemind); - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/group/GroupAnnouncementEntityService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/group/GroupAnnouncementEntityService.java deleted file mode 100644 index fe8770e..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/group/GroupAnnouncementEntityService.java +++ /dev/null @@ -1,19 +0,0 @@ -package top.hcode.hoj.dao.group; - -import top.hcode.hoj.pojo.entity.common.Announcement; -import top.hcode.hoj.pojo.vo.AnnouncementVo; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.service.IService; - -/** - * @Author: LengYun - * @Date: 2022/3/11 13:36 - * @Description: - */ -public interface GroupAnnouncementEntityService extends IService { - - IPage getAnnouncementList(int limit, int currentPage, Long gid); - - IPage getAdminAnnouncementList(int limit, int currentPage, Long gid); - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/group/GroupContestEntityService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/group/GroupContestEntityService.java deleted file mode 100644 index 2c09413..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/group/GroupContestEntityService.java +++ /dev/null @@ -1,19 +0,0 @@ -package top.hcode.hoj.dao.group; - -import top.hcode.hoj.pojo.entity.contest.Contest; -import top.hcode.hoj.pojo.vo.ContestVo; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.service.IService; - -/** - * @Author: LengYun - * @Date: 2022/3/11 13:36 - * @Description: - */ -public interface GroupContestEntityService extends IService { - - IPage getContestList(int limit, int currentPage, Long gid); - - IPage getAdminContestList(int limit, int currentPage, Long gid); - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/group/GroupDiscussionEntityService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/group/GroupDiscussionEntityService.java deleted file mode 100644 index c60a327..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/group/GroupDiscussionEntityService.java +++ /dev/null @@ -1,13 +0,0 @@ -package top.hcode.hoj.dao.group; - -import top.hcode.hoj.pojo.entity.discussion.Discussion; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.service.IService; - -/** - * @Author: LengYun - * @Date: 2022/3/11 13:36 - * @Description: - */ -public interface GroupDiscussionEntityService extends IService { -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/group/GroupEntityService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/group/GroupEntityService.java deleted file mode 100644 index 073db0d..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/group/GroupEntityService.java +++ /dev/null @@ -1,21 +0,0 @@ -package top.hcode.hoj.dao.group; - -import top.hcode.hoj.pojo.entity.group.Group; -import top.hcode.hoj.pojo.vo.GroupVo; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.service.IService; - -/** - * @Author: LengYun - * @Date: 2022/3/11 13:36 - * @Description: - */ -public interface GroupEntityService extends IService { - IPage getGroupList(int limit, - int currentPage, - String keyword, - Integer auth, - String uid, - Boolean onlyMine, - Boolean isRoot); -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/group/GroupMemberEntityService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/group/GroupMemberEntityService.java deleted file mode 100644 index dca35ee..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/group/GroupMemberEntityService.java +++ /dev/null @@ -1,30 +0,0 @@ -package top.hcode.hoj.dao.group; - -import top.hcode.hoj.pojo.entity.group.GroupMember; -import top.hcode.hoj.pojo.vo.GroupMemberVo; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.service.IService; - -import java.util.List; - -/** - * @Author: LengYun - * @Date: 2022/3/11 13:36 - * @Description: - */ -public interface GroupMemberEntityService extends IService { - - IPage getMemberList(int limit, int currentPage, String keyword, Integer auth, Long gid); - - IPage getApplyList(int limit, int currentPage, String keyword, Integer auth, Long gid); - - List getGroupRootUidList(Long gid); - - void addApplyNoticeToGroupRoot(Long gid, String groupName, String newMemberUid); - - void addWelcomeNoticeToGroupNewMember(Long gid, String groupName,String memberUid); - - void addRemoveNoticeToGroupMember(Long gid, String groupName, String operator, String memberUid); - - void addDissolutionNoticeToGroupMember(Long gid, String groupName, List groupMemberUidList, String operator); -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/group/GroupProblemEntityService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/group/GroupProblemEntityService.java deleted file mode 100644 index b9fcd33..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/group/GroupProblemEntityService.java +++ /dev/null @@ -1,19 +0,0 @@ -package top.hcode.hoj.dao.group; - -import top.hcode.hoj.pojo.entity.problem.Problem; -import top.hcode.hoj.pojo.vo.ProblemVo; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.service.IService; - -/** - * @Author: LengYun - * @Date: 2022/3/11 13:36 - * @Description: - */ -public interface GroupProblemEntityService extends IService { - - IPage getProblemList(int limit, int currentPage, Long gid); - - IPage getAdminProblemList(int limit, int currentPage, Long gid); - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/group/GroupTrainingEntityService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/group/GroupTrainingEntityService.java deleted file mode 100644 index acb008b..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/group/GroupTrainingEntityService.java +++ /dev/null @@ -1,19 +0,0 @@ -package top.hcode.hoj.dao.group; - -import top.hcode.hoj.pojo.entity.training.Training; -import top.hcode.hoj.pojo.vo.TrainingVo; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.service.IService; - -/** - * @Author: LengYun - * @Date: 2022/3/11 13:36 - * @Description: - */ -public interface GroupTrainingEntityService extends IService { - - IPage getTrainingList(int limit, int currentPage, Long gid); - - IPage getAdminTrainingList(int limit, int currentPage, Long gid); - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/group/impl/GroupAnnouncementEntityServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/group/impl/GroupAnnouncementEntityServiceImpl.java deleted file mode 100644 index a4ecbbb..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/group/impl/GroupAnnouncementEntityServiceImpl.java +++ /dev/null @@ -1,44 +0,0 @@ -package top.hcode.hoj.dao.group.impl; - -import top.hcode.hoj.dao.group.GroupAnnouncementEntityService; -import top.hcode.hoj.mapper.GroupAnnouncementMapper; -import top.hcode.hoj.pojo.entity.common.Announcement; -import top.hcode.hoj.pojo.vo.AnnouncementVo; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.util.List; - -/** - * @Author: LengYun - * @Date: 2022/3/11 13:36 - * @Description: - */ -@Service -public class GroupAnnouncementEntityServiceImpl extends ServiceImpl implements GroupAnnouncementEntityService { - - @Autowired - private GroupAnnouncementMapper groupAnnouncementMapper; - - @Override - public IPage getAnnouncementList(int limit, int currentPage, Long gid) { - IPage iPage = new Page<>(currentPage, limit); - - List announcementList = groupAnnouncementMapper.getAnnouncementList(iPage, gid); - - return iPage.setRecords(announcementList); - } - - @Override - public IPage getAdminAnnouncementList(int limit, int currentPage, Long gid) { - IPage iPage = new Page<>(currentPage, limit); - - List announcementList = groupAnnouncementMapper.getAdminAnnouncementList(iPage, gid); - - return iPage.setRecords(announcementList); - } - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/group/impl/GroupContestEntityServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/group/impl/GroupContestEntityServiceImpl.java deleted file mode 100644 index 5a614b5..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/group/impl/GroupContestEntityServiceImpl.java +++ /dev/null @@ -1,43 +0,0 @@ -package top.hcode.hoj.dao.group.impl; - -import top.hcode.hoj.dao.group.GroupContestEntityService; -import top.hcode.hoj.mapper.GroupContestMapper; -import top.hcode.hoj.pojo.entity.contest.Contest; -import top.hcode.hoj.pojo.vo.ContestVo; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.util.List; - -/** - * @Author: LengYun - * @Date: 2022/3/11 13:36 - * @Description: - */ -@Service -public class GroupContestEntityServiceImpl extends ServiceImpl implements GroupContestEntityService { - - @Autowired - private GroupContestMapper groupContestMapper; - - @Override - public IPage getContestList(int limit, int currentPage, Long gid) { - IPage iPage = new Page<>(currentPage, limit); - - List contestList = groupContestMapper.getContestList(iPage, gid); - - return iPage.setRecords(contestList); - } - - @Override - public IPage getAdminContestList(int limit, int currentPage, Long gid) { - IPage iPage = new Page<>(currentPage, limit); - - List contestList = groupContestMapper.getAdminContestList(iPage, gid); - - return iPage.setRecords(contestList); - } -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/group/impl/GroupDiscussionEntityServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/group/impl/GroupDiscussionEntityServiceImpl.java deleted file mode 100644 index 1892753..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/group/impl/GroupDiscussionEntityServiceImpl.java +++ /dev/null @@ -1,16 +0,0 @@ -package top.hcode.hoj.dao.group.impl; - -import top.hcode.hoj.dao.group.GroupDiscussionEntityService; -import top.hcode.hoj.mapper.GroupDiscussionMapper; -import top.hcode.hoj.pojo.entity.discussion.Discussion; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.stereotype.Service; - -/** - * @Author: LengYun - * @Date: 2022/3/11 13:36 - * @Description: - */ -@Service -public class GroupDiscussionEntityServiceImpl extends ServiceImpl implements GroupDiscussionEntityService { -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/group/impl/GroupEntityServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/group/impl/GroupEntityServiceImpl.java deleted file mode 100644 index 27dfea2..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/group/impl/GroupEntityServiceImpl.java +++ /dev/null @@ -1,39 +0,0 @@ -package top.hcode.hoj.dao.group.impl; - -import top.hcode.hoj.dao.group.GroupEntityService; -import top.hcode.hoj.mapper.GroupMapper; -import top.hcode.hoj.pojo.entity.group.Group; -import top.hcode.hoj.pojo.vo.GroupVo; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.util.List; - -/** - * @Author: LengYun - * @Date: 2022/3/11 13:36 - * @Description: - */ -@Service -public class GroupEntityServiceImpl extends ServiceImpl implements GroupEntityService { - - @Autowired - private GroupMapper groupMapper; - - @Override - public IPage getGroupList(int limit, - int currentPage, - String keyword, - Integer auth, - String uid, - Boolean onlyMine, - Boolean isRoot) { - IPage iPage = new Page<>(currentPage, limit); - List groupList = groupMapper.getGroupList(iPage, keyword, auth, uid, onlyMine,isRoot); - - return iPage.setRecords(groupList); - } -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/group/impl/GroupMemberEntityServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/group/impl/GroupMemberEntityServiceImpl.java deleted file mode 100644 index 8ae26f2..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/group/impl/GroupMemberEntityServiceImpl.java +++ /dev/null @@ -1,138 +0,0 @@ -package top.hcode.hoj.dao.group.impl; - -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import org.springframework.scheduling.annotation.Async; -import top.hcode.hoj.dao.group.GroupMemberEntityService; -import top.hcode.hoj.dao.user.UserInfoEntityService; -import top.hcode.hoj.manager.msg.AdminNoticeManager; -import top.hcode.hoj.mapper.GroupMemberMapper; -import top.hcode.hoj.pojo.entity.group.GroupMember; -import top.hcode.hoj.pojo.entity.user.UserInfo; -import top.hcode.hoj.pojo.vo.GroupMemberVo; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.util.List; -import java.util.stream.Collectors; - -/** - * @Author: LengYun - * @Date: 2022/3/11 13:36 - * @Description: - */ -@Service -public class GroupMemberEntityServiceImpl extends ServiceImpl implements GroupMemberEntityService { - - @Autowired - private GroupMemberMapper groupMemberMapper; - - @Autowired - private AdminNoticeManager adminNoticeManager; - - @Autowired - private UserInfoEntityService userInfoEntityService; - - @Override - public IPage getMemberList(int limit, int currentPage, String keyword, Integer auth, Long gid) { - IPage iPage = new Page<>(currentPage, limit); - List memberList = groupMemberMapper.getMemberList(iPage, keyword, auth, gid); - - return iPage.setRecords(memberList); - } - - @Override - public IPage getApplyList(int limit, int currentPage, String keyword, Integer auth, Long gid) { - IPage iPage = new Page<>(currentPage, limit); - List applyList = groupMemberMapper.getApplyList(iPage, keyword, auth, gid); - - return iPage.setRecords(applyList); - } - - @Override - public List getGroupRootUidList(Long gid) { - QueryWrapper groupMemberQueryWrapper = new QueryWrapper<>(); - groupMemberQueryWrapper.eq("gid", gid).eq("auth", 5); - List groupMembers = groupMemberMapper.selectList(groupMemberQueryWrapper); - return groupMembers.stream().map(GroupMember::getUid).collect(Collectors.toList()); - } - - @Async - @Override - public void addApplyNoticeToGroupRoot(Long gid, String groupName, String newMemberUid) { - String title = "团队成员申请通知(Group Member Application Notice)"; - UserInfo newMemberUser = userInfoEntityService.getById(newMemberUid); - if (newMemberUser != null) { - String content = getNewMemberApplyGroupContent(gid, groupName, newMemberUser); - List groupRootUidList = getGroupRootUidList(gid); - adminNoticeManager.addSingleNoticeToBatchUser(null, groupRootUidList, title, content, "Mine"); - } - } - - private String getNewMemberApplyGroupContent(Long gid, String groupName, UserInfo newMemberUser) { - return "您好,您作为[" + gid + "]【**" + groupName - + "**】团队的超级管理员,目前有用户【[" + newMemberUser.getUsername() - + "](/user-home?username=" + newMemberUser.getUsername() + ")】正在申请参加该团队," + - "请前往 [" + groupName + "](/group/" + gid + "/member) 查看审批!" + - "\n\n" + - "Hello, as the super administrator of the [" + gid + "]【**" + groupName - + "**】 group, a user 【[" + newMemberUser.getUsername() - + "](/user-home?username=" + newMemberUser.getUsername() + ")】 is applying to join the group. " + - "Please go to [" + groupName + "](/group/" + gid + "/member) check and approve!"; - } - - - @Async - @Override - public void addWelcomeNoticeToGroupNewMember(Long gid, String groupName, String memberUid) { - String title = "欢迎加入团队(Welcome to The Group)"; - String content = getWelcomeNewMember(gid, groupName); - adminNoticeManager.addSingleNoticeToUser(null, memberUid, title, content, "Mine"); - } - - public String getWelcomeNewMember(Long gid, String groupName) { - return "您好,您已经通过了审批,欢迎加入[" + gid + "]【[" + groupName - + "](/group/" + gid + ")】团队!" + - "\n\n" + - "Hello, you have passed the approval. Welcome to join the group [" + gid + - "]【[" + groupName + "](/group/" + gid + ")】!"; - } - - - @Async - @Override - public void addRemoveNoticeToGroupMember(Long gid, String groupName, String operator, String memberUid) { - String title = "移除团队成员通知(Remove Group Member Notice)"; - String content = getRemoveMemberContent(gid, groupName, operator); - adminNoticeManager.addSingleNoticeToUser(null, memberUid, title, content, "Mine"); - } - - public String getRemoveMemberContent(Long gid, String groupName, String operator) { - return "您好,您已经被[" + gid + "]【[" + groupName + "](/group/" + gid + ")】" + - "团队的管理员【[" + operator + "](/user-home?username=" + operator + ")】移除了团队!" + - "\n\n" + - "Hello, You have been removed from the group [" + gid + - "]【[" + groupName + "](/group/" + gid + ")】 by the group admin 【[" + operator + "](/user-home?username=" + operator + ")】!"; - } - - - @Async - @Override - public void addDissolutionNoticeToGroupMember(Long gid, String groupName, List groupMemberUidList, String operator) { - String title = "团队解散通知(Group Dissolution Notice)"; - String content = getDissolutionGroupContent(gid, groupName, operator); - adminNoticeManager.addSingleNoticeToBatchUser(null, groupMemberUidList, title, content, "Mine"); - - } - - private String getDissolutionGroupContent(Long gid, String groupName, String operator) { - return "您好,您所在的团队**[" + gid + "]【" + groupName - + "】**目前已经被管理员【[" + operator + "](/user-home?username=" + operator + ")】解散,请您注意!" + - "\n\n" + - "Hello, your team **[" + gid + "]【" + groupName - + "】** has been dissolved by the administrator【[" + operator - + "](/user-home?username=" + operator + ")】, please pay attention!"; - } -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/group/impl/GroupProblemEntityServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/group/impl/GroupProblemEntityServiceImpl.java deleted file mode 100644 index 7e11884..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/group/impl/GroupProblemEntityServiceImpl.java +++ /dev/null @@ -1,44 +0,0 @@ -package top.hcode.hoj.dao.group.impl; - -import top.hcode.hoj.dao.group.GroupProblemEntityService; -import top.hcode.hoj.mapper.GroupProblemMapper; -import top.hcode.hoj.pojo.entity.problem.Problem; -import top.hcode.hoj.pojo.vo.ProblemVo; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.util.List; - -/** - * @Author: LengYun - * @Date: 2022/3/11 13:36 - * @Description: - */ -@Service -public class GroupProblemEntityServiceImpl extends ServiceImpl implements GroupProblemEntityService { - - @Autowired - private GroupProblemMapper groupProblemMapper; - - @Override - public IPage getProblemList(int limit, int currentPage, Long gid) { - IPage iPage = new Page<>(currentPage, limit); - - List problemList = groupProblemMapper.getProblemList(iPage, gid); - - return iPage.setRecords(problemList); - } - - @Override - public IPage getAdminProblemList(int limit, int currentPage, Long gid) { - IPage iPage = new Page<>(currentPage, limit); - - List problemList = groupProblemMapper.getAdminProblemList(iPage, gid); - - return iPage.setRecords(problemList); - } - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/group/impl/GroupTrainingEntityServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/group/impl/GroupTrainingEntityServiceImpl.java deleted file mode 100644 index ebe5acc..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/group/impl/GroupTrainingEntityServiceImpl.java +++ /dev/null @@ -1,44 +0,0 @@ -package top.hcode.hoj.dao.group.impl; - -import top.hcode.hoj.dao.group.GroupTrainingEntityService; -import top.hcode.hoj.mapper.GroupTrainingMapper; -import top.hcode.hoj.pojo.entity.training.Training; -import top.hcode.hoj.pojo.vo.TrainingVo; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.util.List; - -/** - * @Author: LengYun - * @Date: 2022/3/11 13:36 - * @Description: - */ -@Service -public class GroupTrainingEntityServiceImpl extends ServiceImpl implements GroupTrainingEntityService { - - @Autowired - private GroupTrainingMapper groupTrainingMapper; - - @Override - public IPage getTrainingList(int limit, int currentPage, Long gid) { - IPage iPage = new Page<>(currentPage, limit); - - List trainingList = groupTrainingMapper.getTrainingList(iPage, gid); - - return iPage.setRecords(trainingList); - } - - @Override - public IPage getAdminTrainingList(int limit, int currentPage, Long gid) { - IPage iPage = new Page<>(currentPage, limit); - - List trainingList = groupTrainingMapper.getAdminTrainingList(iPage, gid); - - return iPage.setRecords(trainingList); - } - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/judge/JudgeCaseEntityService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/judge/JudgeCaseEntityService.java deleted file mode 100644 index 09ed3ea..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/judge/JudgeCaseEntityService.java +++ /dev/null @@ -1,16 +0,0 @@ -package top.hcode.hoj.dao.judge; - -import top.hcode.hoj.pojo.entity.judge.JudgeCase; -import com.baomidou.mybatisplus.extension.service.IService; - -/** - *

- * 服务类 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -public interface JudgeCaseEntityService extends IService { - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/judge/JudgeEntityService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/judge/JudgeEntityService.java deleted file mode 100644 index 4c3b1d2..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/judge/JudgeEntityService.java +++ /dev/null @@ -1,63 +0,0 @@ -package top.hcode.hoj.dao.judge; - - -import com.baomidou.mybatisplus.core.metadata.IPage; -import top.hcode.hoj.pojo.entity.judge.Judge; -import com.baomidou.mybatisplus.extension.service.IService; -import top.hcode.hoj.pojo.vo.JudgeVo; -import top.hcode.hoj.pojo.vo.ProblemCountVo; - -import java.util.Date; -import java.util.List; - - -/** - *

- * 服务类 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ - -public interface JudgeEntityService extends IService { - - IPage getCommonJudgeList(Integer limit, - Integer currentPage, - String searchPid, - Integer status, - String username, - String uid, - Boolean completeProblemID, - Long gid); - - IPage getContestJudgeList(Integer limit, - Integer currentPage, - String displayId, - Long cid, - Integer status, - String username, - String uid, - Boolean beforeContestSubmit, - String rule, - Date startTime, - Date sealRankTime, - String sealTimeUid, - Boolean completeProblemID); - - - void failToUseRedisPublishJudge(Long submitId, Long pid, Boolean isContest); - - ProblemCountVo getContestProblemCount(Long pid, - Long cpid, - Long cid, - Date startTime, - Date sealRankTime, - List adminList); - - ProblemCountVo getProblemCount(Long pid, Long gid); - - public int getTodayJudgeNum(); - - public List getProblemListCount(List pidList); -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/judge/JudgeServerEntityService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/judge/JudgeServerEntityService.java deleted file mode 100644 index 888bac0..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/judge/JudgeServerEntityService.java +++ /dev/null @@ -1,9 +0,0 @@ -package top.hcode.hoj.dao.judge; - -import com.baomidou.mybatisplus.extension.service.IService; - -import top.hcode.hoj.pojo.entity.judge.JudgeServer; - -public interface JudgeServerEntityService extends IService { - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/judge/RemoteJudgeAccountEntityService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/judge/RemoteJudgeAccountEntityService.java deleted file mode 100644 index ef28216..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/judge/RemoteJudgeAccountEntityService.java +++ /dev/null @@ -1,7 +0,0 @@ -package top.hcode.hoj.dao.judge; - -import com.baomidou.mybatisplus.extension.service.IService; -import top.hcode.hoj.pojo.entity.judge.RemoteJudgeAccount; - -public interface RemoteJudgeAccountEntityService extends IService { -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/judge/impl/JudgeCaseEntityServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/judge/impl/JudgeCaseEntityServiceImpl.java deleted file mode 100644 index 9038083..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/judge/impl/JudgeCaseEntityServiceImpl.java +++ /dev/null @@ -1,20 +0,0 @@ -package top.hcode.hoj.dao.judge.impl; - -import top.hcode.hoj.pojo.entity.judge.JudgeCase; -import top.hcode.hoj.mapper.JudgeCaseMapper; -import top.hcode.hoj.dao.judge.JudgeCaseEntityService; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.stereotype.Service; - -/** - *

- * 服务实现类 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -@Service -public class JudgeCaseEntityServiceImpl extends ServiceImpl implements JudgeCaseEntityService { - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/judge/impl/JudgeEntityServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/judge/impl/JudgeEntityServiceImpl.java deleted file mode 100644 index 271012f..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/judge/impl/JudgeEntityServiceImpl.java +++ /dev/null @@ -1,152 +0,0 @@ -package top.hcode.hoj.dao.judge.impl; - -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import org.springframework.util.CollectionUtils; -import top.hcode.hoj.dao.contest.ContestRecordEntityService; -import top.hcode.hoj.dao.judge.JudgeEntityService; -import top.hcode.hoj.mapper.JudgeMapper; -import top.hcode.hoj.mapper.ProblemMapper; -import top.hcode.hoj.pojo.entity.contest.ContestRecord; -import top.hcode.hoj.pojo.entity.judge.Judge; -import top.hcode.hoj.pojo.entity.problem.Problem; -import top.hcode.hoj.pojo.vo.JudgeVo; -import top.hcode.hoj.pojo.vo.ProblemCountVo; -import top.hcode.hoj.utils.Constants; - -import java.util.Date; -import java.util.HashMap; -import java.util.List; -import java.util.stream.Collectors; - - -/** - *

- * 服务实现类 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -@Service -@Slf4j(topic = "hoj") -public class JudgeEntityServiceImpl extends ServiceImpl implements JudgeEntityService { - - @Autowired - private JudgeMapper judgeMapper; - - @Autowired - private ContestRecordEntityService contestRecordEntityService; - - @Autowired - private ProblemMapper problemMapper; - - - @Override - public IPage getCommonJudgeList(Integer limit, - Integer currentPage, - String searchPid, - Integer status, - String username, - String uid, - Boolean completeProblemID, - Long gid) { - //新建分页 - Page page = new Page<>(currentPage, limit); - - IPage commonJudgeList = judgeMapper.getCommonJudgeList(page, searchPid, status, username, uid, completeProblemID, gid); - List records = commonJudgeList.getRecords(); - if (!CollectionUtils.isEmpty(records)) { - List pidList = records.stream().map(JudgeVo::getPid).collect(Collectors.toList()); - QueryWrapper problemQueryWrapper = new QueryWrapper<>(); - problemQueryWrapper.select("id", "title") - .in("id", pidList); - List problemList = problemMapper.selectList(problemQueryWrapper); - HashMap storeMap = new HashMap<>(limit); - for (JudgeVo judgeVo : records) { - judgeVo.setTitle(getProblemTitleByPid(judgeVo.getPid(), problemList, storeMap)); - } - } - return commonJudgeList; - } - - private String getProblemTitleByPid(Long pid, List problemList, HashMap storeMap) { - String title = storeMap.get(pid); - if (title != null) { - return title; - } - for (Problem problem : problemList) { - if (problem.getId().equals(pid)) { - storeMap.put(pid, problem.getTitle()); - return problem.getTitle(); - } - } - return ""; - } - - @Override - public IPage getContestJudgeList(Integer limit, - Integer currentPage, - String displayId, - Long cid, - Integer status, - String username, - String uid, - Boolean beforeContestSubmit, - String rule, - Date startTime, - Date sealRankTime, - String sealTimeUid, - Boolean completeProblemID) { - //新建分页 - Page page = new Page<>(currentPage, limit); - - return judgeMapper.getContestJudgeList(page, displayId, cid, status, username, uid, beforeContestSubmit, - rule, startTime, sealRankTime, sealTimeUid, completeProblemID); - } - - - @Override - public void failToUseRedisPublishJudge(Long submitId, Long pid, Boolean isContest) { - UpdateWrapper judgeUpdateWrapper = new UpdateWrapper<>(); - judgeUpdateWrapper.eq("submit_id", submitId) - .set("error_message", "The something has gone wrong with the data Backup server. Please report this to administrator.") - .set("status", Constants.Judge.STATUS_SYSTEM_ERROR.getStatus()); - judgeMapper.update(null, judgeUpdateWrapper); - // 更新contest_record表 - if (isContest) { - UpdateWrapper updateWrapper = new UpdateWrapper<>(); - updateWrapper.eq("submit_id", submitId) // submit_id一定只有一个 - .set("first_blood", false) - .set("status", Constants.Contest.RECORD_NOT_AC_NOT_PENALTY.getCode()); - contestRecordEntityService.update(updateWrapper); - } - } - - @Override - public ProblemCountVo getContestProblemCount(Long pid, Long cpid, Long cid, Date startTime, Date sealRankTime, List adminList) { - return judgeMapper.getContestProblemCount(pid, cpid, cid, startTime, sealRankTime, adminList); - } - - @Override - public ProblemCountVo getProblemCount(Long pid, Long gid) { - return judgeMapper.getProblemCount(pid, gid); - } - - @Override - public int getTodayJudgeNum() { - return judgeMapper.getTodayJudgeNum(); - } - - @Override - public List getProblemListCount(List pidList) { - return judgeMapper.getProblemListCount(pidList); - } - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/judge/impl/JudgeServerEntityServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/judge/impl/JudgeServerEntityServiceImpl.java deleted file mode 100644 index dfc7f72..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/judge/impl/JudgeServerEntityServiceImpl.java +++ /dev/null @@ -1,19 +0,0 @@ -package top.hcode.hoj.dao.judge.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.stereotype.Service; - -import top.hcode.hoj.mapper.JudgeServerMapper; - -import top.hcode.hoj.pojo.entity.judge.JudgeServer; -import top.hcode.hoj.dao.judge.JudgeServerEntityService; - -/** - * @Author: Himit_ZH - * @Date: 2021/4/15 11:27 - * @Description: - */ -@Service -public class JudgeServerEntityServiceImpl extends ServiceImpl implements JudgeServerEntityService { - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/judge/impl/RemoteJudgeAccountEntityServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/judge/impl/RemoteJudgeAccountEntityServiceImpl.java deleted file mode 100644 index 8a4108c..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/judge/impl/RemoteJudgeAccountEntityServiceImpl.java +++ /dev/null @@ -1,17 +0,0 @@ -package top.hcode.hoj.dao.judge.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.stereotype.Service; -import top.hcode.hoj.mapper.RemoteJudgeAccountMapper; -import top.hcode.hoj.pojo.entity.judge.RemoteJudgeAccount; -import top.hcode.hoj.dao.judge.RemoteJudgeAccountEntityService; - - -/** - * @Author: Himit_ZH - * @Date: 2021/5/18 17:46 - * @Description: - */ -@Service -public class RemoteJudgeAccountEntityServiceImpl extends ServiceImpl implements RemoteJudgeAccountEntityService { -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/msg/AdminSysNoticeEntityService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/msg/AdminSysNoticeEntityService.java deleted file mode 100644 index 1e0258e..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/msg/AdminSysNoticeEntityService.java +++ /dev/null @@ -1,18 +0,0 @@ -package top.hcode.hoj.dao.msg; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.service.IService; -import top.hcode.hoj.pojo.entity.msg.AdminSysNotice; -import top.hcode.hoj.pojo.vo.AdminSysNoticeVo; - - -/** - * @Author: Himit_ZH - * @Date: 2021/10/1 20:33 - * @Description: - */ -public interface AdminSysNoticeEntityService extends IService { - - public IPage getSysNotice(int limit,int currentPage,String type); - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/msg/MsgRemindEntityService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/msg/MsgRemindEntityService.java deleted file mode 100644 index b52aec5..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/msg/MsgRemindEntityService.java +++ /dev/null @@ -1,21 +0,0 @@ -package top.hcode.hoj.dao.msg; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.baomidou.mybatisplus.extension.service.IService; -import top.hcode.hoj.pojo.entity.msg.MsgRemind; -import top.hcode.hoj.pojo.vo.UserMsgVo; -import top.hcode.hoj.pojo.vo.UserUnreadMsgCountVo; - - -/** - * @Author: Himit_ZH - * @Date: 2021/10/1 20:32 - * @Description: - */ -public interface MsgRemindEntityService extends IService { - - UserUnreadMsgCountVo getUserUnreadMsgCount(String uid); - - IPage getUserMsg(Page page, String uid,String action); -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/msg/UserSysNoticeEntityService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/msg/UserSysNoticeEntityService.java deleted file mode 100644 index 58538b9..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/msg/UserSysNoticeEntityService.java +++ /dev/null @@ -1,13 +0,0 @@ -package top.hcode.hoj.dao.msg; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.service.IService; -import top.hcode.hoj.pojo.entity.msg.UserSysNotice; -import top.hcode.hoj.pojo.vo.SysMsgVo; - -public interface UserSysNoticeEntityService extends IService { - - IPage getSysNotice(int limit, int currentPage, String uid); - - IPage getMineNotice(int limit, int currentPage, String uid); -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/msg/impl/AdminSysNoticeEntityServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/msg/impl/AdminSysNoticeEntityServiceImpl.java deleted file mode 100644 index a130d2b..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/msg/impl/AdminSysNoticeEntityServiceImpl.java +++ /dev/null @@ -1,31 +0,0 @@ -package top.hcode.hoj.dao.msg.impl; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.stereotype.Service; -import top.hcode.hoj.mapper.AdminSysNoticeMapper; - -import top.hcode.hoj.pojo.entity.msg.AdminSysNotice; -import top.hcode.hoj.pojo.vo.AdminSysNoticeVo; -import top.hcode.hoj.dao.msg.AdminSysNoticeEntityService; - -import javax.annotation.Resource; - -/** - * @Author: Himit_ZH - * @Date: 2021/10/1 20:34 - * @Description: - */ -@Service -public class AdminSysNoticeEntityServiceImpl extends ServiceImpl implements AdminSysNoticeEntityService { - - @Resource - private AdminSysNoticeMapper adminSysNoticeMapper; - - @Override - public IPage getSysNotice(int limit, int currentPage, String type) { - Page page = new Page<>(currentPage, limit); - return adminSysNoticeMapper.getAdminSysNotice(page, type); - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/msg/impl/MsgRemindEntityServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/msg/impl/MsgRemindEntityServiceImpl.java deleted file mode 100644 index 599a92a..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/msg/impl/MsgRemindEntityServiceImpl.java +++ /dev/null @@ -1,37 +0,0 @@ -package top.hcode.hoj.dao.msg.impl; - - -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.stereotype.Service; -import top.hcode.hoj.mapper.MsgRemindMapper; -import top.hcode.hoj.pojo.entity.msg.MsgRemind; -import top.hcode.hoj.pojo.vo.UserMsgVo; -import top.hcode.hoj.pojo.vo.UserUnreadMsgCountVo; -import top.hcode.hoj.dao.msg.MsgRemindEntityService; - -import javax.annotation.Resource; - - -/** - * @Author: Himit_ZH - * @Date: 2021/10/1 20:36 - * @Description: - */ -@Service -public class MsgRemindEntityServiceImpl extends ServiceImpl implements MsgRemindEntityService { - - @Resource - private MsgRemindMapper msgRemindMapper; - @Override - public UserUnreadMsgCountVo getUserUnreadMsgCount(String uid) { - return msgRemindMapper.getUserUnreadMsgCount(uid); - } - - @Override - public IPage getUserMsg(Page page, String uid, String action) { - return msgRemindMapper.getUserMsg(page, uid, action); - } - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/msg/impl/UserSysNoticeEntityServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/msg/impl/UserSysNoticeEntityServiceImpl.java deleted file mode 100644 index 1e70a36..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/msg/impl/UserSysNoticeEntityServiceImpl.java +++ /dev/null @@ -1,36 +0,0 @@ -package top.hcode.hoj.dao.msg.impl; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.stereotype.Service; -import top.hcode.hoj.mapper.UserSysNoticeMapper; -import top.hcode.hoj.pojo.entity.msg.UserSysNotice; -import top.hcode.hoj.pojo.vo.SysMsgVo; -import top.hcode.hoj.dao.msg.UserSysNoticeEntityService; - -import javax.annotation.Resource; -/** - * @Author: Himit_ZH - * @Date: 2021/10/1 20:35 - * @Description: - */ -@Service -public class UserSysNoticeEntityServiceImpl extends ServiceImpl implements UserSysNoticeEntityService { - - @Resource - private UserSysNoticeMapper userSysNoticeMapper; - - @Override - public IPage getSysNotice(int limit, int currentPage, String uid) { - Page page = new Page<>(currentPage, limit); - return userSysNoticeMapper.getSysOrMineNotice(page, uid, "Sys"); - } - - @Override - public IPage getMineNotice(int limit, int currentPage, String uid) { - Page page = new Page<>(currentPage, limit); - return userSysNoticeMapper.getSysOrMineNotice(page, uid, "Mine"); - } - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/CategoryEntityService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/CategoryEntityService.java deleted file mode 100644 index d01b3e8..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/CategoryEntityService.java +++ /dev/null @@ -1,8 +0,0 @@ -package top.hcode.hoj.dao.problem; - -import com.baomidou.mybatisplus.extension.service.IService; -import top.hcode.hoj.pojo.entity.problem.Category; - - -public interface CategoryEntityService extends IService { -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/CodeTemplateEntityService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/CodeTemplateEntityService.java deleted file mode 100644 index 20e0ecc..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/CodeTemplateEntityService.java +++ /dev/null @@ -1,7 +0,0 @@ -package top.hcode.hoj.dao.problem; - -import com.baomidou.mybatisplus.extension.service.IService; -import top.hcode.hoj.pojo.entity.problem.CodeTemplate; - -public interface CodeTemplateEntityService extends IService { -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/LanguageEntityService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/LanguageEntityService.java deleted file mode 100644 index 70e8c90..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/LanguageEntityService.java +++ /dev/null @@ -1,7 +0,0 @@ -package top.hcode.hoj.dao.problem; - -import com.baomidou.mybatisplus.extension.service.IService; -import top.hcode.hoj.pojo.entity.problem.Language; - -public interface LanguageEntityService extends IService { -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/ProblemCaseEntityService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/ProblemCaseEntityService.java deleted file mode 100644 index 30dd23f..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/ProblemCaseEntityService.java +++ /dev/null @@ -1,12 +0,0 @@ -package top.hcode.hoj.dao.problem; - -import com.baomidou.mybatisplus.extension.service.IService; -import top.hcode.hoj.pojo.entity.problem.ProblemCase; - -/** - * @Author: Himit_ZH - * @Date: 2020/12/14 19:58 - * @Description: - */ -public interface ProblemCaseEntityService extends IService { -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/ProblemCountEntityService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/ProblemCountEntityService.java deleted file mode 100644 index 204ad50..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/ProblemCountEntityService.java +++ /dev/null @@ -1,16 +0,0 @@ -package top.hcode.hoj.dao.problem; - -import top.hcode.hoj.pojo.entity.problem.ProblemCount; -import com.baomidou.mybatisplus.extension.service.IService; - -/** - *

- * 服务类 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -public interface ProblemCountEntityService extends IService { - ProblemCount getContestProblemCount(Long pid, Long cpid, Long cid); -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/ProblemEntityService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/ProblemEntityService.java deleted file mode 100644 index f7cbb62..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/ProblemEntityService.java +++ /dev/null @@ -1,32 +0,0 @@ -package top.hcode.hoj.dao.problem; - -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import top.hcode.hoj.pojo.dto.ProblemDto; -import top.hcode.hoj.pojo.vo.ImportProblemVo; -import top.hcode.hoj.pojo.vo.ProblemVo; -import top.hcode.hoj.pojo.entity.problem.Problem; -import com.baomidou.mybatisplus.extension.service.IService; - -import java.util.HashMap; -import java.util.List; - - -/** - *

- * 服务类 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ - -public interface ProblemEntityService extends IService { - Page getProblemList(int limit, int currentPage, Long pid, String title, - Integer difficulty, List tid, String oj); - - boolean adminUpdateProblem(ProblemDto problemDto); - - boolean adminAddProblem(ProblemDto problemDto); - - ImportProblemVo buildExportProblem(Long pid, List> problemCaseList, HashMap languageMap, HashMap tagMap); -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/ProblemLanguageEntityService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/ProblemLanguageEntityService.java deleted file mode 100644 index 2ba5cce..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/ProblemLanguageEntityService.java +++ /dev/null @@ -1,12 +0,0 @@ -package top.hcode.hoj.dao.problem; - -import com.baomidou.mybatisplus.extension.service.IService; -import top.hcode.hoj.pojo.entity.problem.ProblemLanguage; - -/** - * @Author: Himit_ZH - * @Date: 2020/12/13 00:03 - * @Description: - */ -public interface ProblemLanguageEntityService extends IService { -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/ProblemTagEntityService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/ProblemTagEntityService.java deleted file mode 100644 index c54ab15..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/ProblemTagEntityService.java +++ /dev/null @@ -1,7 +0,0 @@ -package top.hcode.hoj.dao.problem; - -import com.baomidou.mybatisplus.extension.service.IService; -import top.hcode.hoj.pojo.entity.problem.ProblemTag; - -public interface ProblemTagEntityService extends IService { -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/TagClassificationEntityService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/TagClassificationEntityService.java deleted file mode 100644 index acea06b..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/TagClassificationEntityService.java +++ /dev/null @@ -1,11 +0,0 @@ -package top.hcode.hoj.dao.problem; - -import com.baomidou.mybatisplus.extension.service.IService; -import top.hcode.hoj.pojo.entity.problem.TagClassification; - -/** - * @Author Himit_ZH - * @Date 2022/8/3 - */ -public interface TagClassificationEntityService extends IService { -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/TagEntityService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/TagEntityService.java deleted file mode 100644 index a4788a4..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/TagEntityService.java +++ /dev/null @@ -1,16 +0,0 @@ -package top.hcode.hoj.dao.problem; - -import top.hcode.hoj.pojo.entity.problem.Tag; -import com.baomidou.mybatisplus.extension.service.IService; - -/** - *

- * 服务类 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -public interface TagEntityService extends IService { - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/CategoryEntityServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/CategoryEntityServiceImpl.java deleted file mode 100644 index 76858d0..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/CategoryEntityServiceImpl.java +++ /dev/null @@ -1,16 +0,0 @@ -package top.hcode.hoj.dao.problem.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.stereotype.Service; -import top.hcode.hoj.mapper.CategoryMapper; -import top.hcode.hoj.pojo.entity.problem.Category; -import top.hcode.hoj.dao.problem.CategoryEntityService; - -/** - * @Author: Himit_ZH - * @Date: 2021/5/4 22:30 - * @Description: - */ -@Service -public class CategoryEntityServiceImpl extends ServiceImpl implements CategoryEntityService { -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/CodeTemplateEntityServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/CodeTemplateEntityServiceImpl.java deleted file mode 100644 index 18bb366..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/CodeTemplateEntityServiceImpl.java +++ /dev/null @@ -1,16 +0,0 @@ -package top.hcode.hoj.dao.problem.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.stereotype.Service; -import top.hcode.hoj.mapper.CodeTemplateMapper; -import top.hcode.hoj.pojo.entity.problem.CodeTemplate; -import top.hcode.hoj.dao.problem.CodeTemplateEntityService; - -/** - * @Author: Himit_ZH - * @Date: 2021/4/24 10:27 - * @Description: - */ -@Service -public class CodeTemplateEntityServiceImpl extends ServiceImpl implements CodeTemplateEntityService { -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/LanguageEntityServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/LanguageEntityServiceImpl.java deleted file mode 100644 index 75ef54b..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/LanguageEntityServiceImpl.java +++ /dev/null @@ -1,16 +0,0 @@ -package top.hcode.hoj.dao.problem.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.stereotype.Service; -import top.hcode.hoj.mapper.LanguageMapper; -import top.hcode.hoj.pojo.entity.problem.Language; -import top.hcode.hoj.dao.problem.LanguageEntityService; - -/** - * @Author: Himit_ZH - * @Date: 2020/12/12 23:23 - * @Description: - */ -@Service -public class LanguageEntityServiceImpl extends ServiceImpl implements LanguageEntityService { -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/ProblemCaseEntityServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/ProblemCaseEntityServiceImpl.java deleted file mode 100644 index 74d3a23..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/ProblemCaseEntityServiceImpl.java +++ /dev/null @@ -1,16 +0,0 @@ -package top.hcode.hoj.dao.problem.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.stereotype.Service; -import top.hcode.hoj.mapper.ProblemCaseMapper; -import top.hcode.hoj.pojo.entity.problem.ProblemCase; -import top.hcode.hoj.dao.problem.ProblemCaseEntityService; - -/** - * @Author: Himit_ZH - * @Date: 2020/12/14 19:59 - * @Description: - */ -@Service -public class ProblemCaseEntityServiceImpl extends ServiceImpl implements ProblemCaseEntityService { -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/ProblemCountServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/ProblemCountServiceImpl.java deleted file mode 100644 index ad0b386..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/ProblemCountServiceImpl.java +++ /dev/null @@ -1,28 +0,0 @@ -package top.hcode.hoj.dao.problem.impl; - -import org.springframework.beans.factory.annotation.Autowired; -import top.hcode.hoj.pojo.entity.problem.ProblemCount; -import top.hcode.hoj.mapper.ProblemCountMapper; -import top.hcode.hoj.dao.problem.ProblemCountEntityService; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.stereotype.Service; - -/** - *

- * 服务实现类 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -@Service -public class ProblemCountServiceImpl extends ServiceImpl implements ProblemCountEntityService { - - @Autowired - private ProblemCountMapper problemCountMapper; - - @Override - public ProblemCount getContestProblemCount(Long pid, Long cpid, Long cid) { - return problemCountMapper.getContestProblemCount(pid,cpid, cid); - } -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/ProblemEntityServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/ProblemEntityServiceImpl.java deleted file mode 100644 index 094b326..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/ProblemEntityServiceImpl.java +++ /dev/null @@ -1,690 +0,0 @@ -package top.hcode.hoj.dao.problem.impl; - -import cn.hutool.core.bean.BeanUtil; -import cn.hutool.core.io.FileUtil; -import cn.hutool.core.io.file.FileReader; -import cn.hutool.core.io.file.FileWriter; -import cn.hutool.core.util.CharsetUtil; -import cn.hutool.json.JSONArray; -import cn.hutool.json.JSONObject; -import cn.hutool.json.JSONUtil; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.ApplicationContext; -import org.springframework.scheduling.annotation.Async; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; -import org.springframework.util.DigestUtils; -import org.springframework.util.StringUtils; -import top.hcode.hoj.dao.judge.JudgeEntityService; -import top.hcode.hoj.dao.problem.*; -import top.hcode.hoj.mapper.ProblemMapper; -import top.hcode.hoj.pojo.dto.ProblemDto; -import top.hcode.hoj.pojo.entity.problem.*; -import top.hcode.hoj.pojo.vo.ImportProblemVo; -import top.hcode.hoj.pojo.vo.ProblemCountVo; -import top.hcode.hoj.pojo.vo.ProblemVo; -import top.hcode.hoj.utils.Constants; - -import java.io.File; -import java.nio.charset.StandardCharsets; -import java.util.*; -import java.util.stream.Collectors; - -/** - *

- * 服务实现类 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -@Service -public class ProblemEntityServiceImpl extends ServiceImpl implements ProblemEntityService { - - @Autowired - private ProblemMapper problemMapper; - - @Autowired - private JudgeEntityService judgeEntityService; - - @Autowired - private ProblemCaseEntityService problemCaseEntityService; - - @Autowired - private ProblemLanguageEntityService problemLanguageEntityService; - - @Autowired - private TagEntityService tagEntityService; - - @Autowired - private ProblemTagEntityService problemTagEntityService; - - @Autowired - private ApplicationContext applicationContext; - - @Autowired - private CodeTemplateEntityService codeTemplateEntityService; - - @Override - public Page getProblemList(int limit, int currentPage, Long pid, String title, Integer difficulty, - List tid, String oj) { - - //新建分页 - Page page = new Page<>(currentPage, limit); - Integer tagListSize = null; - if (tid != null) { - tid = tid.stream().distinct().collect(Collectors.toList()); - tagListSize = tid.size(); - } - - List problemList = problemMapper.getProblemList(page, pid, title, difficulty, tid, tagListSize, oj); - - if (problemList.size() > 0) { - List pidList = problemList.stream().map(ProblemVo::getPid).collect(Collectors.toList()); - List problemListCount = judgeEntityService.getProblemListCount(pidList); - for (ProblemVo problemVo : problemList) { - for (ProblemCountVo problemCountVo : problemListCount) { - if (problemVo.getPid().equals(problemCountVo.getPid())) { - problemVo.setProblemCountVo(problemCountVo); - break; - } - } - } - } - - return page.setRecords(problemList); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public boolean adminUpdateProblem(ProblemDto problemDto) { - - Problem problem = problemDto.getProblem(); - if (Constants.JudgeMode.DEFAULT.getMode().equals(problemDto.getJudgeMode())) { - problem.setSpjLanguage(null).setSpjCode(null); - } - - String ojName = "ME"; - if (problem.getIsRemote()) { - String problemId = problem.getProblemId(); - ojName = problemId.split("-")[0]; - } - - /** - * problem_id唯一性检查 - */ - String problemId = problem.getProblemId().toUpperCase(); - QueryWrapper problemQueryWrapper = new QueryWrapper<>(); - problemQueryWrapper.eq("problem_id", problemId); - Problem existedProblem = problemMapper.selectOne(problemQueryWrapper); - - problem.setProblemId(problem.getProblemId().toUpperCase()); - if (problem.getIsGroup() == null) { - problem.setIsGroup(false); - } - // 后面许多表的更新或删除需要用到题目id - long pid = problemDto.getProblem().getId(); - - if (existedProblem != null && existedProblem.getId() != pid) { - throw new RuntimeException("The problem_id [" + problemId + "] already exists. Do not reuse it!"); - } - - Map map = new HashMap<>(); - map.put("pid", pid); - //查询出原来题目的关联表数据 - List oldProblemLanguages = (List) problemLanguageEntityService.listByMap(map); - List oldProblemCases = (List) problemCaseEntityService.listByMap(map); - List oldProblemTemplate = (List) codeTemplateEntityService.listByMap(map); - List oldProblemTags = (List) problemTagEntityService.listByMap(map); - - Map mapOldPT = new HashMap<>(); - Map mapOldPL = new HashMap<>(); - Map mapOldPCT = new HashMap<>(); - List needDeleteProblemCases = new LinkedList<>(); - HashMap oldProblemMap = new HashMap<>(); - - // 登记一下原有的tag的id - oldProblemTags.stream().forEach(problemTag -> { - mapOldPT.put(problemTag.getTid(), 0); - }); - // 登记一下原有的language的id - oldProblemLanguages.stream().forEach(problemLanguage -> { - mapOldPL.put(problemLanguage.getLid(), 0); - }); - // 登记一下原有的codeTemplate的id - oldProblemTemplate.stream().forEach(codeTemplate -> { - mapOldPCT.put(codeTemplate.getId(), 0); - }); - // 登记一下原有的case的id - oldProblemCases.stream().forEach(problemCase -> { - needDeleteProblemCases.add(problemCase.getId()); - oldProblemMap.put(problemCase.getId(), problemCase); - }); - - - // 与前端上传的数据进行对比,添加或删除! - /** - * 处理tag表与problem_tag表的删除与更新 - */ - List problemTagList = new LinkedList<>(); // 存储新的problem_tag表数据 - for (Tag tag : problemDto.getTags()) { - if (tag.getId() == null) { // 没有主键表示为新添加的标签 - tag.setOj(ojName); - boolean addTagResult = tagEntityService.save(tag); - if (addTagResult) { - problemTagList.add(new ProblemTag() - .setPid(pid).setTid(tag.getId())); - } - // 已存在tag 但是新添加的 - } else if (mapOldPT.getOrDefault(tag.getId(), null) == null) { - problemTagList.add(new ProblemTag() - .setPid(pid).setTid(tag.getId())); - } else { // 已有主键的需要记录一下,若原先在problem_tag有的,现在不见了,表明需要删除 - mapOldPT.put(tag.getId(), 1); // 更新记录,说明该tag未删除 - } - } - // 放入需要删除的tagId列表 - List needDeleteTids = new LinkedList<>(); - for (Long key : mapOldPT.keySet()) { - if (mapOldPT.get(key) == 0) { // 记录表中没有更新原来的存在Tid,则表明该tag已不被该problem使用 - needDeleteTids.add(key); - } - } - boolean deleteTagsFromProblemResult = true; - if (needDeleteTids.size() > 0) { - QueryWrapper tagWrapper = new QueryWrapper<>(); - tagWrapper.eq("pid", pid).in("tid", needDeleteTids); - // 执行批量删除操作 - deleteTagsFromProblemResult = problemTagEntityService.remove(tagWrapper); - } - // 执行批量插入操作 - boolean addTagsToProblemResult = true; - if (problemTagList.size() > 0) { - addTagsToProblemResult = problemTagEntityService.saveOrUpdateBatch(problemTagList); - } - - /** - * 处理code_template表 - */ - boolean deleteTemplate = true; - boolean saveOrUpdateCodeTemplate = true; - for (CodeTemplate codeTemplate : problemDto.getCodeTemplates()) { - if (codeTemplate.getId() != null) { - mapOldPCT.put(codeTemplate.getId(), 1); - } - } - // 需要删除的模板 - List needDeleteCTs = new LinkedList<>(); - for (Integer key : mapOldPCT.keySet()) { - if (mapOldPCT.get(key) == 0) { - needDeleteCTs.add(key); - } - } - if (needDeleteCTs.size() > 0) { - deleteTemplate = codeTemplateEntityService.removeByIds(needDeleteCTs); - } - if (problemDto.getCodeTemplates().size() > 0) { - saveOrUpdateCodeTemplate = codeTemplateEntityService.saveOrUpdateBatch(problemDto.getCodeTemplates()); - } - - - /** - * 处理problem_language表的更新与删除 - */ - - // 根据上传来的language列表的每一个name字段查询对应的language表的id,更新problem_language - //构建problem_language实体列表 - List problemLanguageList = new LinkedList<>(); - for (Language language : problemDto.getLanguages()) { // 遍历插入 - if (mapOldPL.get(language.getId()) != null) { // 如果记录中有,则表式该language原来已有选中。 - mapOldPL.put(language.getId(), 1); // 记录一下,新数据也有该language - } else { // 没有记录,则表明为新添加的language - problemLanguageList.add(new ProblemLanguage().setLid(language.getId()).setPid(pid)); - } - } - // 放入需要删除的languageId列表 - List needDeleteLids = new LinkedList<>(); - for (Long key : mapOldPL.keySet()) { - if (mapOldPL.get(key) == 0) { // 记录表中没有更新原来的存在Lid,则表明该language已不被该problem使用 - needDeleteLids.add(key); - } - } - boolean deleteLanguagesFromProblemResult = true; - if (needDeleteLids.size() > 0) { - QueryWrapper LangWrapper = new QueryWrapper<>(); - LangWrapper.eq("pid", pid).in("lid", needDeleteLids); - // 执行批量删除操作 - deleteLanguagesFromProblemResult = problemLanguageEntityService.remove(LangWrapper); - } - // 执行批量添加操作 - boolean addLanguagesToProblemResult = true; - if (problemLanguageList.size() > 0) { - addLanguagesToProblemResult = problemLanguageEntityService.saveOrUpdateBatch(problemLanguageList); - } - - - /** - * 处理problem_case表的增加与删除 - */ - - boolean checkProblemCase = true; - - if (!problem.getIsRemote() && problemDto.getSamples().size() > 0) { // 如果是自家的题目才有测试数据 - int sumScore = 0; - // 新增加的case列表 - List newProblemCaseList = new LinkedList<>(); - // 需要修改的case列表 - List needUpdateProblemCaseList = new LinkedList<>(); - // 遍历上传的case列表,如果还存在,则从需要删除的测试样例列表移除该id - for (ProblemCase problemCase : problemDto.getSamples()) { - if (problemCase.getId() != null) { // 已存在的case - needDeleteProblemCases.remove(problemCase.getId()); - // 跟原先的数据做对比,如果变动 则加入需要修改的case列表 - ProblemCase oldProblemCase = oldProblemMap.get(problemCase.getId()); - if (!oldProblemCase.getInput().equals(problemCase.getInput()) || - !oldProblemCase.getOutput().equals(problemCase.getOutput())) { - needUpdateProblemCaseList.add(problemCase); - } else if (problem.getType().intValue() == Constants.Contest.TYPE_OI.getCode()) { - // 分数变动 - if (!Objects.equals(oldProblemCase.getScore(), problemCase.getScore())) { - needUpdateProblemCaseList.add(problemCase); - } - } - } else { - newProblemCaseList.add(problemCase.setPid(pid)); - } - - if (problemCase.getScore() != null) { - sumScore += problemCase.getScore(); - } - } - // 设置oi总分数,根据每个测试点的加和 - if (problem.getType().intValue() == Constants.Contest.TYPE_OI.getCode()) { - problem.setIoScore(sumScore); - } - // 执行批量删除操作 - boolean deleteCasesFromProblemResult = true; - if (needDeleteProblemCases.size() > 0) { - deleteCasesFromProblemResult = problemCaseEntityService.removeByIds(needDeleteProblemCases); - } - // 执行批量添加操作 - boolean addCasesToProblemResult = true; - if (newProblemCaseList.size() > 0) { - addCasesToProblemResult = problemCaseEntityService.saveBatch(newProblemCaseList); - } - // 执行批量修改操作 - boolean updateCasesToProblemResult = true; - if (needUpdateProblemCaseList.size() > 0) { - updateCasesToProblemResult = problemCaseEntityService.saveOrUpdateBatch(needUpdateProblemCaseList); - } - checkProblemCase = addCasesToProblemResult && deleteCasesFromProblemResult && updateCasesToProblemResult; - - // 只要有新添加,修改,删除都需要更新版本号 同时更新测试数据 - String caseVersion = String.valueOf(System.currentTimeMillis()); - String testcaseDir = problemDto.getUploadTestcaseDir(); - if (needDeleteProblemCases.size() > 0 || newProblemCaseList.size() > 0 - || needUpdateProblemCaseList.size() > 0 || !StringUtils.isEmpty(testcaseDir)) { - problem.setCaseVersion(caseVersion); - // 如果是选择上传测试文件的,则需要遍历对应文件夹,读取数据,写入数据库,先前的题目数据一并清空。 - if (problemDto.getIsUploadTestCase()) { - // 获取代理bean对象执行异步方法===》根据测试文件初始info - applicationContext.getBean(ProblemEntityServiceImpl.class).initUploadTestCase(problemDto.getJudgeMode(), caseVersion, pid, testcaseDir, problemDto.getSamples()); - } else { - applicationContext.getBean(ProblemEntityServiceImpl.class).initHandTestCase(problemDto.getJudgeMode(), problem.getCaseVersion(), pid, problemDto.getSamples()); - } - } - // 变化成spj或interactive或者取消 同时更新测试数据 - else if (problemDto.getChangeModeCode() != null && problemDto.getChangeModeCode()) { - problem.setCaseVersion(caseVersion); - if (problemDto.getIsUploadTestCase()) { - // 获取代理bean对象执行异步方法===》根据测试文件初始info - applicationContext.getBean(ProblemEntityServiceImpl.class).initUploadTestCase(problemDto.getJudgeMode(), caseVersion, pid, null, problemDto.getSamples()); - } else { - applicationContext.getBean(ProblemEntityServiceImpl.class).initHandTestCase(problemDto.getJudgeMode(), problem.getCaseVersion(), pid, problemDto.getSamples()); - } - } - } - - // 更新problem表 - boolean problemUpdateResult = problemMapper.updateById(problem) == 1; - - if (problemUpdateResult && checkProblemCase && deleteLanguagesFromProblemResult && deleteTagsFromProblemResult - && addLanguagesToProblemResult && addTagsToProblemResult && deleteTemplate && saveOrUpdateCodeTemplate) { - return true; - } else { - return false; - } - - } - - @Override - @Transactional(rollbackFor = Exception.class) - public boolean adminAddProblem(ProblemDto problemDto) { - - Problem problem = problemDto.getProblem(); - - if (Constants.JudgeMode.DEFAULT.getMode().equals(problemDto.getJudgeMode())) { - problem.setSpjLanguage(null) - .setSpjCode(null); - } - - /** - * problem_id唯一性检查 - */ - String problemId = problem.getProblemId().toUpperCase(); - QueryWrapper problemQueryWrapper = new QueryWrapper<>(); - problemQueryWrapper.eq("problem_id", problemId); - int existedProblem = problemMapper.selectCount(problemQueryWrapper); - if (existedProblem > 0) { - throw new RuntimeException("The problem_id [" + problemId + "] already exists. Do not reuse it!"); - } - - - // 设置测试样例的版本号 - problem.setCaseVersion(String.valueOf(System.currentTimeMillis())); - if (problem.getIsGroup() == null) { - problem.setIsGroup(false); - } - problem.setProblemId(problemId); - boolean addProblemResult = problemMapper.insert(problem) == 1; - long pid = problem.getId(); - // 为新的题目添加对应的language - List problemLanguageList = new LinkedList<>(); - for (Language language : problemDto.getLanguages()) { - problemLanguageList.add(new ProblemLanguage().setPid(pid).setLid(language.getId())); - } - boolean addLangToProblemResult = problemLanguageEntityService.saveOrUpdateBatch(problemLanguageList); - - // 为新的题目添加对应的codeTemplate - boolean addProblemCodeTemplate = true; - if (problemDto.getCodeTemplates() != null && problemDto.getCodeTemplates().size() > 0) { - for (CodeTemplate codeTemplate : problemDto.getCodeTemplates()) { - codeTemplate.setPid(pid); - } - addProblemCodeTemplate = codeTemplateEntityService.saveOrUpdateBatch(problemDto.getCodeTemplates()); - } - - - boolean addCasesToProblemResult = true; - // 为新的题目添加对应的case - if (problemDto.getIsUploadTestCase()) { // 如果是选择上传测试文件的,则需要遍历对应文件夹,读取数据。。 - int sumScore = 0; - String testcaseDir = problemDto.getUploadTestcaseDir(); - // 如果是io题目统计总分 - List problemCases = problemDto.getSamples(); - if (problemCases.size() == 0) { - throw new RuntimeException("The test cases of problem must not be empty!"); - } - for (ProblemCase problemCase : problemCases) { - if (problemCase.getScore() != null) { - sumScore += problemCase.getScore(); - } - if (StringUtils.isEmpty(problemCase.getOutput())) { - String filePreName = problemCase.getInput().split("\\.")[0]; - problemCase.setOutput(filePreName + ".out"); - } - problemCase.setPid(pid); - } - // 设置oi总分数,根据每个测试点的加和 - if (problem.getType().intValue() == Constants.Contest.TYPE_OI.getCode()) { - UpdateWrapper problemUpdateWrapper = new UpdateWrapper<>(); - problemUpdateWrapper.eq("id", pid) - .set("io_score", sumScore); - problemMapper.update(null, problemUpdateWrapper); - } - addCasesToProblemResult = problemCaseEntityService.saveOrUpdateBatch(problemCases); - // 获取代理bean对象执行异步方法===》根据测试文件初始info - applicationContext.getBean(ProblemEntityServiceImpl.class).initUploadTestCase(problemDto.getJudgeMode(), - problem.getCaseVersion(), pid, testcaseDir, problemDto.getSamples()); - } else { - // oi题目需要求取平均值,给每个测试点初始oi的score值,默认总分100分 - if (problem.getType().intValue() == Constants.Contest.TYPE_OI.getCode()) { - int sumScore = 0; - for (ProblemCase problemCase : problemDto.getSamples()) { - // 设置好新题目的pid和累加总分数 - problemCase.setPid(pid); - if (problemCase.getScore() != null) { - sumScore += problemCase.getScore(); - } - } - addCasesToProblemResult = problemCaseEntityService.saveOrUpdateBatch(problemDto.getSamples()); - UpdateWrapper problemUpdateWrapper = new UpdateWrapper<>(); - problemUpdateWrapper.eq("id", pid) - .set("io_score", sumScore); - problemMapper.update(null, problemUpdateWrapper); - } else { - problemDto.getSamples().forEach(problemCase -> problemCase.setPid(pid)); // 设置好新题目的pid - addCasesToProblemResult = problemCaseEntityService.saveOrUpdateBatch(problemDto.getSamples()); - } - initHandTestCase(problemDto.getJudgeMode(), problem.getCaseVersion(), pid, problemDto.getSamples()); - } - - // 为新的题目添加对应的tag,可能tag是原表已有,也可能是新的,所以需要判断。 - List problemTagList = new LinkedList<>(); - if (problemDto.getTags() != null) { - for (Tag tag : problemDto.getTags()) { - if (tag.getId() == null) { //id为空 表示为原tag表中不存在的 插入后可以获取到对应的tagId - Tag existedTag = tagEntityService.getOne(new QueryWrapper().eq("name", tag.getName()) - .eq("oj", "ME"), false); - if (existedTag == null) { - tag.setOj("ME"); - tagEntityService.save(tag); - } else { - tag = existedTag; - } - } - problemTagList.add(new ProblemTag().setTid(tag.getId()).setPid(pid)); - } - } - boolean addTagsToProblemResult = true; - if (problemTagList.size() > 0) { - addTagsToProblemResult = problemTagEntityService.saveOrUpdateBatch(problemTagList); - } - - - if (addProblemResult && addCasesToProblemResult && addLangToProblemResult - && addTagsToProblemResult && addProblemCodeTemplate) { - return true; - } else { - return false; - } - } - - // 初始化上传文件的测试数据,写成json文件 - @Async - public void initUploadTestCase(String mode, - String version, - Long problemId, - String tmpTestcaseDir, - List problemCaseList) { - - String testCasesDir = Constants.File.TESTCASE_BASE_FOLDER.getPath() + File.separator + "problem_" + problemId; - - // 将之前的临时文件夹里面的评测文件全部复制到指定文件夹(覆盖) - if (!StringUtils.isEmpty(tmpTestcaseDir)) { - FileUtil.clean(testCasesDir); - FileUtil.copyFilesFromDir(new File(tmpTestcaseDir), new File(testCasesDir), true); - } - - JSONObject result = new JSONObject(); - result.set("mode", mode); - result.set("version", version); - result.set("testCasesSize", problemCaseList.size()); - - JSONArray testCaseList = new JSONArray(problemCaseList.size()); - - for (ProblemCase problemCase : problemCaseList) { - JSONObject jsonObject = new JSONObject(); - jsonObject.set("caseId", problemCase.getId()); - jsonObject.set("score", problemCase.getScore()); - jsonObject.set("inputName", problemCase.getInput()); - jsonObject.set("outputName", problemCase.getOutput()); - - // 读取输入文件 - FileReader inputFile = new FileReader(testCasesDir + File.separator + problemCase.getInput(), CharsetUtil.UTF_8); - String input = inputFile.readString().replaceAll("\r\n", "\n"); - - FileWriter inputFileWriter = new FileWriter(testCasesDir + File.separator + problemCase.getInput(), CharsetUtil.UTF_8); - inputFileWriter.write(input); - - // 读取输出文件 - FileReader outputFile = new FileReader(testCasesDir + File.separator + problemCase.getOutput(), CharsetUtil.UTF_8); - String output = outputFile.readString().replaceAll("\r\n", "\n"); - - FileWriter outFileWriter = new FileWriter(testCasesDir + File.separator + problemCase.getOutput(), CharsetUtil.UTF_8); - outFileWriter.write(output); - - // spj和interactive是根据特判程序输出判断结果,所以无需初始化测试数据 - if (Constants.JudgeMode.DEFAULT.getMode().equals(mode)) { - // 原数据MD5 - jsonObject.set("outputMd5", DigestUtils.md5DigestAsHex(output.getBytes(StandardCharsets.UTF_8))); - // 原数据大小 - jsonObject.set("outputSize", output.getBytes(StandardCharsets.UTF_8).length); - // 去掉全部空格的MD5,用来判断pe - jsonObject.set("allStrippedOutputMd5", DigestUtils.md5DigestAsHex(output.replaceAll("\\s+", "").getBytes(StandardCharsets.UTF_8))); - // 默认去掉文末空格的MD5 - jsonObject.set("EOFStrippedOutputMd5", DigestUtils.md5DigestAsHex(rtrim(output).getBytes(StandardCharsets.UTF_8))); - } - - testCaseList.add(jsonObject); - } - - result.set("testCases", testCaseList); - - FileWriter infoFile = new FileWriter(testCasesDir + "/info", CharsetUtil.UTF_8); - // 写入记录文件 - infoFile.write(JSONUtil.toJsonStr(result)); - // 删除临时上传文件夹 - FileUtil.del(tmpTestcaseDir); - } - - - // 初始化手动输入上传的测试数据,写成json文件 - @Async - public void initHandTestCase(String mode, - String version, - Long problemId, - List problemCaseList) { - - JSONObject result = new JSONObject(); - result.set("mode", mode); - result.set("version", version); - result.set("testCasesSize", problemCaseList.size()); - - JSONArray testCaseList = new JSONArray(problemCaseList.size()); - - String testCasesDir = Constants.File.TESTCASE_BASE_FOLDER.getPath() + File.separator + "problem_" + problemId; - FileUtil.del(testCasesDir); - for (int index = 0; index < problemCaseList.size(); index++) { - JSONObject jsonObject = new JSONObject(); - String inputName = (index + 1) + ".in"; - jsonObject.set("caseId", problemCaseList.get(index).getId()); - jsonObject.set("score", problemCaseList.get(index).getScore()); - jsonObject.set("inputName", inputName); - // 生成对应文件 - FileWriter infileWriter = new FileWriter(testCasesDir + "/" + inputName, CharsetUtil.UTF_8); - // 将该测试数据的输入写入到文件 - String inputData = problemCaseList.get(index).getInput().replaceAll("\r\n", "\n"); - infileWriter.write(inputData); - - String outputName = (index + 1) + ".out"; - jsonObject.set("outputName", outputName); - // 生成对应文件 - String outputData = problemCaseList.get(index).getOutput().replaceAll("\r\n", "\n"); - FileWriter outFile = new FileWriter(testCasesDir + "/" + outputName, CharsetUtil.UTF_8); - outFile.write(outputData); - - // spj和interactive是根据特判程序输出判断结果,所以无需初始化测试数据 - if (Constants.JudgeMode.DEFAULT.getMode().equals(mode)) { - // 原数据MD5 - jsonObject.set("outputMd5", DigestUtils.md5DigestAsHex(outputData.getBytes(StandardCharsets.UTF_8))); - // 原数据大小 - jsonObject.set("outputSize", outputData.getBytes(StandardCharsets.UTF_8).length); - // 去掉全部空格的MD5,用来判断pe - jsonObject.set("allStrippedOutputMd5", DigestUtils.md5DigestAsHex(outputData.replaceAll("\\s+", "").getBytes(StandardCharsets.UTF_8))); - // 默认去掉文末空格的MD5 - jsonObject.set("EOFStrippedOutputMd5", DigestUtils.md5DigestAsHex(rtrim(outputData).getBytes(StandardCharsets.UTF_8))); - } - - testCaseList.add(jsonObject); - } - - result.set("testCases", testCaseList); - - FileWriter infoFile = new FileWriter(testCasesDir + "/info", CharsetUtil.UTF_8); - // 写入记录文件 - infoFile.write(JSONUtil.toJsonStr(result)); - } - - - @Override - @SuppressWarnings("All") - public ImportProblemVo buildExportProblem(Long pid, List> problemCaseList, - HashMap languageMap, HashMap tagMap) { - // 导出相当于导入 - ImportProblemVo importProblemVo = new ImportProblemVo(); - Problem problem = problemMapper.selectById(pid); - problem.setCaseVersion(null) - .setGmtCreate(null) - .setId(null) - .setAuth(1) - .setIsUploadCase(true) - .setAuthor(null) - .setGmtModified(null); - HashMap problemMap = new HashMap<>(); - BeanUtil.beanToMap(problem, problemMap, false, true); - importProblemVo.setProblem(problemMap); - QueryWrapper codeTemplateQueryWrapper = new QueryWrapper<>(); - codeTemplateQueryWrapper.eq("pid", pid).eq("status", true); - List codeTemplates = codeTemplateEntityService.list(codeTemplateQueryWrapper); - List> codeTemplateList = new LinkedList<>(); - for (CodeTemplate codeTemplate : codeTemplates) { - HashMap tmp = new HashMap<>(); - tmp.put("language", languageMap.get(codeTemplate.getLid())); - tmp.put("code", codeTemplate.getCode()); - codeTemplateList.add(tmp); - } - importProblemVo.setCodeTemplates(codeTemplateList); - importProblemVo.setJudgeMode(problem.getJudgeMode()); - importProblemVo.setSamples(problemCaseList); - - if (!StringUtils.isEmpty(problem.getUserExtraFile())) { - HashMap userExtraFileMap = (HashMap) JSONUtil.toBean(problem.getUserExtraFile(), Map.class); - importProblemVo.setUserExtraFile(userExtraFileMap); - } - - if (!StringUtils.isEmpty(problem.getJudgeExtraFile())) { - HashMap judgeExtraFileMap = (HashMap) JSONUtil.toBean(problem.getJudgeExtraFile(), Map.class); - importProblemVo.setUserExtraFile(judgeExtraFileMap); - } - - QueryWrapper problemTagQueryWrapper = new QueryWrapper<>(); - problemTagQueryWrapper.eq("pid", pid); - List problemTags = problemTagEntityService.list(problemTagQueryWrapper); - importProblemVo.setTags(problemTags.stream().map(problemTag -> tagMap.get(problemTag.getTid())).collect(Collectors.toList())); - - QueryWrapper problemLanguageQueryWrapper = new QueryWrapper<>(); - problemLanguageQueryWrapper.eq("pid", pid); - List problemLanguages = problemLanguageEntityService.list(problemLanguageQueryWrapper); - importProblemVo.setLanguages(problemLanguages.stream().map(problemLanguage -> languageMap.get(problemLanguage.getLid())).collect(Collectors.toList())); - - - return importProblemVo; - } - - // 去除每行末尾的空白符 - public static String rtrim(String value) { - if (value == null) return null; - StringBuilder sb = new StringBuilder(); - String[] strArr = value.split("\n"); - for (String str : strArr) { - sb.append(str.replaceAll("\\s+$", "")).append("\n"); - } - return sb.toString().replaceAll("\\s+$", ""); - } - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/ProblemLanguageEntityServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/ProblemLanguageEntityServiceImpl.java deleted file mode 100644 index 7347d30..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/ProblemLanguageEntityServiceImpl.java +++ /dev/null @@ -1,16 +0,0 @@ -package top.hcode.hoj.dao.problem.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.stereotype.Service; -import top.hcode.hoj.mapper.ProblemLanguageMapper; -import top.hcode.hoj.pojo.entity.problem.ProblemLanguage; -import top.hcode.hoj.dao.problem.ProblemLanguageEntityService; - -/** - * @Author: Himit_ZH - * @Date: 2020/12/13 00:04 - * @Description: - */ -@Service -public class ProblemLanguageEntityServiceImpl extends ServiceImpl implements ProblemLanguageEntityService { -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/ProblemTagEntityServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/ProblemTagEntityServiceImpl.java deleted file mode 100644 index a87f5fb..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/ProblemTagEntityServiceImpl.java +++ /dev/null @@ -1,16 +0,0 @@ -package top.hcode.hoj.dao.problem.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.stereotype.Service; -import top.hcode.hoj.mapper.ProblemTagMapper; -import top.hcode.hoj.pojo.entity.problem.ProblemTag; -import top.hcode.hoj.dao.problem.ProblemTagEntityService; - -/** - * @Author: Himit_ZH - * @Date: 2020/12/13 23:22 - * @Description: - */ -@Service -public class ProblemTagEntityServiceImpl extends ServiceImpl implements ProblemTagEntityService { -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/TagClassificationEntityServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/TagClassificationEntityServiceImpl.java deleted file mode 100644 index c57ded3..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/TagClassificationEntityServiceImpl.java +++ /dev/null @@ -1,15 +0,0 @@ -package top.hcode.hoj.dao.problem.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.stereotype.Service; -import top.hcode.hoj.dao.problem.TagClassificationEntityService; -import top.hcode.hoj.mapper.TagClassificationMapper; -import top.hcode.hoj.pojo.entity.problem.TagClassification; - -/** - * @Author Himit_ZH - * @Date 2022/8/3 - */ -@Service -public class TagClassificationEntityServiceImpl extends ServiceImpl implements TagClassificationEntityService { -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/TagEntityServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/TagEntityServiceImpl.java deleted file mode 100644 index d73ebec..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/problem/impl/TagEntityServiceImpl.java +++ /dev/null @@ -1,20 +0,0 @@ -package top.hcode.hoj.dao.problem.impl; - -import top.hcode.hoj.pojo.entity.problem.Tag; -import top.hcode.hoj.mapper.TagMapper; -import top.hcode.hoj.dao.problem.TagEntityService; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.stereotype.Service; - -/** - *

- * 服务实现类 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -@Service -public class TagEntityServiceImpl extends ServiceImpl implements TagEntityService { - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/training/MappingTrainingCategoryEntityService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/training/MappingTrainingCategoryEntityService.java deleted file mode 100644 index bb97e7a..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/training/MappingTrainingCategoryEntityService.java +++ /dev/null @@ -1,7 +0,0 @@ -package top.hcode.hoj.dao.training; - -import com.baomidou.mybatisplus.extension.service.IService; -import top.hcode.hoj.pojo.entity.training.MappingTrainingCategory; - -public interface MappingTrainingCategoryEntityService extends IService { -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/training/TrainingCategoryEntityService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/training/TrainingCategoryEntityService.java deleted file mode 100644 index 38379cb..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/training/TrainingCategoryEntityService.java +++ /dev/null @@ -1,9 +0,0 @@ -package top.hcode.hoj.dao.training; - -import com.baomidou.mybatisplus.extension.service.IService; -import top.hcode.hoj.pojo.entity.training.TrainingCategory; - -public interface TrainingCategoryEntityService extends IService { - - public TrainingCategory getTrainingCategoryByTrainingId(Long tid); -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/training/TrainingEntityService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/training/TrainingEntityService.java deleted file mode 100644 index 2f4a58d..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/training/TrainingEntityService.java +++ /dev/null @@ -1,12 +0,0 @@ -package top.hcode.hoj.dao.training; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.service.IService; -import top.hcode.hoj.pojo.entity.training.Training; -import top.hcode.hoj.pojo.vo.TrainingVo; - -public interface TrainingEntityService extends IService { - public IPage getTrainingList(int limit, int currentPage, - Long categoryId, String auth, String keyword); - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/training/TrainingProblemEntityService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/training/TrainingProblemEntityService.java deleted file mode 100644 index bc1c4b3..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/training/TrainingProblemEntityService.java +++ /dev/null @@ -1,21 +0,0 @@ -package top.hcode.hoj.dao.training; - -import com.baomidou.mybatisplus.extension.service.IService; -import top.hcode.hoj.pojo.entity.training.TrainingProblem; -import top.hcode.hoj.pojo.vo.ProblemVo; - -import java.util.List; - -/** - * @Author: Himit_ZH - * @Date: 2021/11/20 12:24 - * @Description: - */ -public interface TrainingProblemEntityService extends IService { - public List getTrainingProblemIdList(Long tid); - - public List getTrainingProblemList(Long tid); - - public Integer getUserTrainingACProblemCount(String uid, List pidList); - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/training/TrainingRecordEntityService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/training/TrainingRecordEntityService.java deleted file mode 100644 index 3fb4f65..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/training/TrainingRecordEntityService.java +++ /dev/null @@ -1,19 +0,0 @@ -package top.hcode.hoj.dao.training; - -import com.baomidou.mybatisplus.extension.service.IService; -import top.hcode.hoj.pojo.entity.training.TrainingRecord; -import top.hcode.hoj.pojo.vo.TrainingRecordVo; - -import java.util.List; - - -/** - * @Author: Himit_ZH - * @Date: 2021/11/21 23:38 - * @Description: - */ -public interface TrainingRecordEntityService extends IService { - - public List getTrainingRecord(Long tid); - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/training/TrainingRegisterEntityService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/training/TrainingRegisterEntityService.java deleted file mode 100644 index 5a55862..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/training/TrainingRegisterEntityService.java +++ /dev/null @@ -1,12 +0,0 @@ -package top.hcode.hoj.dao.training; - -import com.baomidou.mybatisplus.extension.service.IService; -import top.hcode.hoj.pojo.entity.training.TrainingRegister; -import java.util.List; - -public interface TrainingRegisterEntityService extends IService { - - - public List getAlreadyRegisterUidList(Long tid); - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/training/impl/MappingTrainingCategoryEntityServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/training/impl/MappingTrainingCategoryEntityServiceImpl.java deleted file mode 100644 index 827003b..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/training/impl/MappingTrainingCategoryEntityServiceImpl.java +++ /dev/null @@ -1,16 +0,0 @@ -package top.hcode.hoj.dao.training.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.stereotype.Service; -import top.hcode.hoj.mapper.MappingTrainingCategoryMapper; -import top.hcode.hoj.pojo.entity.training.MappingTrainingCategory; -import top.hcode.hoj.dao.training.MappingTrainingCategoryEntityService; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/9 19:53 - * @Description: - */ -@Service -public class MappingTrainingCategoryEntityServiceImpl extends ServiceImpl implements MappingTrainingCategoryEntityService { -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/training/impl/TrainingCategoryEntityServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/training/impl/TrainingCategoryEntityServiceImpl.java deleted file mode 100644 index 404020a..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/training/impl/TrainingCategoryEntityServiceImpl.java +++ /dev/null @@ -1,26 +0,0 @@ -package top.hcode.hoj.dao.training.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.stereotype.Service; -import top.hcode.hoj.mapper.TrainingCategoryMapper; -import top.hcode.hoj.pojo.entity.training.TrainingCategory; -import top.hcode.hoj.dao.training.TrainingCategoryEntityService; - -import javax.annotation.Resource; - -/** - * @Author: Himit_ZH - * @Date: 2021/11/20 12:15 - * @Description: - */ -@Service -public class TrainingCategoryEntityServiceImpl extends ServiceImpl implements TrainingCategoryEntityService { - - @Resource - private TrainingCategoryMapper trainingCategoryMapper; - - @Override - public TrainingCategory getTrainingCategoryByTrainingId(Long tid) { - return trainingCategoryMapper.getTrainingCategoryByTrainingId(tid); - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/training/impl/TrainingEntityServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/training/impl/TrainingEntityServiceImpl.java deleted file mode 100644 index 1d42d95..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/training/impl/TrainingEntityServiceImpl.java +++ /dev/null @@ -1,49 +0,0 @@ -package top.hcode.hoj.dao.training.impl; - -; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.stereotype.Service; -import top.hcode.hoj.mapper.TrainingMapper; -import top.hcode.hoj.pojo.entity.training.Training; -import top.hcode.hoj.pojo.vo.TrainingVo; -import top.hcode.hoj.dao.training.TrainingEntityService; - -import javax.annotation.Resource; -import java.util.ArrayList; -import java.util.List; - -/** - * @Author: Himit_ZH - * @Date: 2021/11/19 22:01 - * @Description: - */ -@Service -public class TrainingEntityServiceImpl extends ServiceImpl implements TrainingEntityService { - - @Resource - private TrainingMapper trainingMapper; - - - @Override - public IPage getTrainingList(int limit, int currentPage, Long categoryId, String auth, String keyword) { - List trainingList = trainingMapper.getTrainingList(categoryId, auth, keyword); - Page page = new Page<>(currentPage, limit); - int count = trainingList.size(); - List pageList = new ArrayList<>(); - //计算当前页第一条数据的下标 - int currId = currentPage > 1 ? (currentPage - 1) * limit : 0; - for (int i = 0; i < limit && i < count - currId; i++) { - pageList.add(trainingList.get(currId + i)); - } - page.setSize(limit); - page.setCurrent(currentPage); - page.setTotal(count); - page.setRecords(pageList); - return page; - } - - - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/training/impl/TrainingProblemEntityServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/training/impl/TrainingProblemEntityServiceImpl.java deleted file mode 100644 index 6cf90a9..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/training/impl/TrainingProblemEntityServiceImpl.java +++ /dev/null @@ -1,65 +0,0 @@ -package top.hcode.hoj.dao.training.impl; - -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.stereotype.Service; -import org.springframework.util.CollectionUtils; -import top.hcode.hoj.mapper.TrainingProblemMapper; -import top.hcode.hoj.dao.judge.JudgeEntityService; -import top.hcode.hoj.pojo.entity.judge.Judge; -import top.hcode.hoj.pojo.entity.training.TrainingProblem; -import top.hcode.hoj.pojo.vo.ProblemVo; -import top.hcode.hoj.dao.training.TrainingProblemEntityService; - -import javax.annotation.Resource; -import java.util.*; -import java.util.concurrent.ConcurrentHashMap; -import java.util.function.Function; -import java.util.function.Predicate; -import java.util.stream.Collectors; - -/** - * @Author: Himit_ZH - * @Date: 2021/11/20 12:25 - * @Description: - */ -@Service -public class TrainingProblemEntityServiceImpl extends ServiceImpl implements TrainingProblemEntityService { - - @Resource - private TrainingProblemMapper trainingProblemMapper; - - @Resource - private JudgeEntityService judgeEntityService; - - @Override - public List getTrainingProblemIdList(Long tid) { - return trainingProblemMapper.getTrainingProblemCount(tid); - } - - @Override - public List getTrainingProblemList(Long tid) { - List trainingProblemList = trainingProblemMapper.getTrainingProblemList(tid); - return trainingProblemList.stream().filter(distinctByKey(ProblemVo::getPid)).collect(Collectors.toList()); - } - - static Predicate distinctByKey(Function keyExtractor) { - Map seen = new ConcurrentHashMap<>(); - return t -> seen.putIfAbsent(keyExtractor.apply(t), Boolean.TRUE) == null; - } - - @Override - public Integer getUserTrainingACProblemCount(String uid, List pidList) { - if (CollectionUtils.isEmpty(pidList)) { - return 0; - } - QueryWrapper judgeQueryWrapper = new QueryWrapper<>(); - judgeQueryWrapper.select("DISTINCT pid") - .in("pid", pidList) - .eq("cid", 0) - .eq("uid", uid) - .eq("status", 0); - return judgeEntityService.count(judgeQueryWrapper); - } - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/training/impl/TrainingRecordEntityServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/training/impl/TrainingRecordEntityServiceImpl.java deleted file mode 100644 index 35984f8..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/training/impl/TrainingRecordEntityServiceImpl.java +++ /dev/null @@ -1,29 +0,0 @@ -package top.hcode.hoj.dao.training.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.stereotype.Service; -import top.hcode.hoj.mapper.TrainingRecordMapper; -import top.hcode.hoj.pojo.entity.training.TrainingRecord; -import top.hcode.hoj.pojo.vo.TrainingRecordVo; -import top.hcode.hoj.dao.training.TrainingRecordEntityService; - -import javax.annotation.Resource; -import java.util.List; - -/** - * @Author: Himit_ZH - * @Date: 2021/11/21 23:39 - * @Description: - */ -@Service -public class TrainingRecordEntityServiceImpl extends ServiceImpl implements TrainingRecordEntityService { - - @Resource - private TrainingRecordMapper trainingRecordMapper; - - @Override - public List getTrainingRecord(Long tid){ - return trainingRecordMapper.getTrainingRecord(tid); - } - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/training/impl/TrainingRegisterEntityServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/training/impl/TrainingRegisterEntityServiceImpl.java deleted file mode 100644 index b93203d..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/training/impl/TrainingRegisterEntityServiceImpl.java +++ /dev/null @@ -1,33 +0,0 @@ -package top.hcode.hoj.dao.training.impl; - -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.stereotype.Service; -import top.hcode.hoj.mapper.TrainingRegisterMapper; -import top.hcode.hoj.pojo.entity.training.TrainingRegister; -import top.hcode.hoj.dao.training.TrainingRegisterEntityService; - -import javax.annotation.Resource; -import java.util.List; -import java.util.stream.Collectors; - -/** - * @Author: Himit_ZH - * @Date: 2021/11/20 11:30 - * @Description: - */ -@Service -public class TrainingRegisterEntityServiceImpl extends ServiceImpl implements TrainingRegisterEntityService { - - @Resource - private TrainingRegisterMapper trainingRegisterMapper; - - - @Override - public List getAlreadyRegisterUidList(Long tid){ - QueryWrapper trainingRegisterQueryWrapper = new QueryWrapper<>(); - trainingRegisterQueryWrapper.eq("tid", tid); - return trainingRegisterMapper.selectList(trainingRegisterQueryWrapper).stream().map(TrainingRegister::getUid).collect(Collectors.toList()); - } - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/user/AuthEntityService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/user/AuthEntityService.java deleted file mode 100644 index 0e8be34..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/user/AuthEntityService.java +++ /dev/null @@ -1,16 +0,0 @@ -package top.hcode.hoj.dao.user; - -import top.hcode.hoj.pojo.entity.user.Auth; -import com.baomidou.mybatisplus.extension.service.IService; - -/** - *

- * 服务类 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -public interface AuthEntityService extends IService { - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/user/RoleAuthEntityService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/user/RoleAuthEntityService.java deleted file mode 100644 index ea4b30f..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/user/RoleAuthEntityService.java +++ /dev/null @@ -1,16 +0,0 @@ -package top.hcode.hoj.dao.user; - -import top.hcode.hoj.pojo.entity.user.RoleAuth; -import com.baomidou.mybatisplus.extension.service.IService; - -/** - *

- * 服务类 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -public interface RoleAuthEntityService extends IService { - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/user/RoleEntityService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/user/RoleEntityService.java deleted file mode 100644 index 22f1f62..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/user/RoleEntityService.java +++ /dev/null @@ -1,16 +0,0 @@ -package top.hcode.hoj.dao.user; - -import top.hcode.hoj.pojo.entity.user.Role; -import com.baomidou.mybatisplus.extension.service.IService; - -/** - *

- * 服务类 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -public interface RoleEntityService extends IService { - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/user/SessionEntityService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/user/SessionEntityService.java deleted file mode 100644 index 5afaeac..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/user/SessionEntityService.java +++ /dev/null @@ -1,10 +0,0 @@ -package top.hcode.hoj.dao.user; - -import com.baomidou.mybatisplus.extension.service.IService; -import top.hcode.hoj.pojo.entity.user.Session; - -public interface SessionEntityService extends IService { - - public void checkRemoteLogin(String uid); - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/user/UserAcproblemEntityService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/user/UserAcproblemEntityService.java deleted file mode 100644 index ca17dc3..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/user/UserAcproblemEntityService.java +++ /dev/null @@ -1,16 +0,0 @@ -package top.hcode.hoj.dao.user; - -import com.baomidou.mybatisplus.extension.service.IService; -import top.hcode.hoj.pojo.entity.user.UserAcproblem; - -/** - *

- * 服务类 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -public interface UserAcproblemEntityService extends IService { - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/user/UserInfoEntityService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/user/UserInfoEntityService.java deleted file mode 100644 index 1a4cd03..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/user/UserInfoEntityService.java +++ /dev/null @@ -1,24 +0,0 @@ -package top.hcode.hoj.dao.user; - -import top.hcode.hoj.pojo.dto.RegisterDto; -import com.baomidou.mybatisplus.extension.service.IService; -import top.hcode.hoj.pojo.entity.user.UserInfo; - -import java.util.List; - -/** - *

- * 服务类 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -public interface UserInfoEntityService extends IService { - - public Boolean addUser(RegisterDto registerDto); - - public List getSuperAdminUidList(); - - public List getProblemAdminUidList(); -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/user/UserRecordEntityService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/user/UserRecordEntityService.java deleted file mode 100644 index 7cf73d6..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/user/UserRecordEntityService.java +++ /dev/null @@ -1,36 +0,0 @@ -package top.hcode.hoj.dao.user; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import top.hcode.hoj.pojo.entity.judge.Judge; -import top.hcode.hoj.pojo.vo.ACMRankVo; -import top.hcode.hoj.pojo.entity.user.UserRecord; -import com.baomidou.mybatisplus.extension.service.IService; -import top.hcode.hoj.pojo.vo.OIRankVo; -import top.hcode.hoj.pojo.vo.UserHomeVo; - -import java.util.List; - -/** - *

- * 服务类 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -public interface UserRecordEntityService extends IService { - - List getRecent7ACRank(); - - UserHomeVo getUserHomeInfo(String uid, String username); - - List getLastYearUserJudgeList(String uid, String username); - - IPage getOIRankList(Page page, List uidList); - - IPage getACMRankList(Page page, List uidList); - - IPage getGroupRankList(Page page, Long gid, List uidList, String rankType, Boolean useCache); - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/user/UserRoleEntityService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/user/UserRoleEntityService.java deleted file mode 100644 index c0dae93..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/user/UserRoleEntityService.java +++ /dev/null @@ -1,25 +0,0 @@ -package top.hcode.hoj.dao.user; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import top.hcode.hoj.pojo.entity.user.UserRole; -import com.baomidou.mybatisplus.extension.service.IService; -import top.hcode.hoj.pojo.vo.UserRolesVo; - -/** - *

- * 服务类 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -public interface UserRoleEntityService extends IService { - - UserRolesVo getUserRoles(String uid,String username); - - IPage getUserList(int limit, int currentPage, String keyword,Boolean onlyAdmin); - - void deleteCache(String uid, boolean isRemoveSession); - - String getAuthChangeContent(int oldType,int newType); -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/user/impl/AuthEntityServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/user/impl/AuthEntityServiceImpl.java deleted file mode 100644 index bd6b682..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/user/impl/AuthEntityServiceImpl.java +++ /dev/null @@ -1,20 +0,0 @@ -package top.hcode.hoj.dao.user.impl; - -import top.hcode.hoj.pojo.entity.user.Auth; -import top.hcode.hoj.mapper.AuthMapper; -import top.hcode.hoj.dao.user.AuthEntityService; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.stereotype.Service; - -/** - *

- * 服务实现类 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -@Service -public class AuthEntityServiceImpl extends ServiceImpl implements AuthEntityService { - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/user/impl/RoleAuthEntityServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/user/impl/RoleAuthEntityServiceImpl.java deleted file mode 100644 index a996b68..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/user/impl/RoleAuthEntityServiceImpl.java +++ /dev/null @@ -1,20 +0,0 @@ -package top.hcode.hoj.dao.user.impl; - -import top.hcode.hoj.pojo.entity.user.RoleAuth; -import top.hcode.hoj.mapper.RoleAuthMapper; -import top.hcode.hoj.dao.user.RoleAuthEntityService; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.stereotype.Service; - -/** - *

- * 服务实现类 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -@Service -public class RoleAuthEntityServiceImpl extends ServiceImpl implements RoleAuthEntityService { - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/user/impl/RoleEntityServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/user/impl/RoleEntityServiceImpl.java deleted file mode 100644 index 7e1ef4b..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/user/impl/RoleEntityServiceImpl.java +++ /dev/null @@ -1,20 +0,0 @@ -package top.hcode.hoj.dao.user.impl; - -import top.hcode.hoj.pojo.entity.user.Role; -import top.hcode.hoj.mapper.RoleMapper; -import top.hcode.hoj.dao.user.RoleEntityService; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.stereotype.Service; - -/** - *

- * 服务实现类 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -@Service -public class RoleEntityServiceImpl extends ServiceImpl implements RoleEntityService { - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/user/impl/SessionEntityServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/user/impl/SessionEntityServiceImpl.java deleted file mode 100644 index 849a4dc..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/user/impl/SessionEntityServiceImpl.java +++ /dev/null @@ -1,129 +0,0 @@ -package top.hcode.hoj.dao.user.impl; - -import cn.hutool.core.date.DateUtil; -import cn.hutool.http.HttpUtil; -import cn.hutool.json.JSONObject; -import cn.hutool.json.JSONUtil; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.scheduling.annotation.Async; -import org.springframework.stereotype.Service; -import org.springframework.util.StringUtils; -import top.hcode.hoj.mapper.SessionMapper; -import top.hcode.hoj.pojo.entity.msg.AdminSysNotice; -import top.hcode.hoj.pojo.entity.user.Session; -import top.hcode.hoj.pojo.entity.msg.UserSysNotice; -import top.hcode.hoj.dao.msg.AdminSysNoticeEntityService; -import top.hcode.hoj.dao.msg.UserSysNoticeEntityService; -import top.hcode.hoj.dao.user.SessionEntityService; - -import javax.annotation.Resource; -import java.util.Date; -import java.util.List; - -/** - * @Author: Himit_ZH - * @Date: 2020/12/3 22:46 - * @Description: - */ -@Service -public class SessionEntityServiceImpl extends ServiceImpl implements SessionEntityService { - - @Resource - private SessionMapper sessionMapper; - - @Resource - private AdminSysNoticeEntityService adminSysNoticeEntityService; - - @Resource - private UserSysNoticeEntityService userSysNoticeEntityService; - - @Override - @Async - public void checkRemoteLogin(String uid) { - QueryWrapper sessionQueryWrapper = new QueryWrapper<>(); - sessionQueryWrapper.eq("uid", uid) - .orderByDesc("gmt_create") - .last("limit 2"); - List sessionList = sessionMapper.selectList(sessionQueryWrapper); - if (sessionList.size() < 2) { - return; - } - Session nowSession = sessionList.get(0); - Session lastSession = sessionList.get(1); - // 如果两次登录的ip不相同,需要发通知给用户 - if (!nowSession.getIp().equals(lastSession.getIp())) { - String remoteLoginContent = getRemoteLoginContent(lastSession.getIp(), nowSession.getIp(), nowSession.getGmtCreate()); - if (remoteLoginContent == null) { - return; - } - AdminSysNotice adminSysNotice = new AdminSysNotice(); - adminSysNotice - .setType("Single") - .setContent(remoteLoginContent) - .setTitle("账号异地登录通知(Account Remote Login Notice)") - .setAdminId("1") - .setState(false) - .setRecipientId(uid); - boolean isSaveOk = adminSysNoticeEntityService.save(adminSysNotice); - if (isSaveOk) { - UserSysNotice userSysNotice = new UserSysNotice(); - userSysNotice.setType("Sys") - .setSysNoticeId(adminSysNotice.getId()) - .setRecipientId(uid) - .setState(false); - boolean isOk = userSysNoticeEntityService.save(userSysNotice); - if (isOk) { - adminSysNotice.setState(true); - adminSysNoticeEntityService.saveOrUpdate(adminSysNotice); - } - } - } - } - - private String getRemoteLoginContent(String oldIp, String newIp, Date loginDate) { - String dateStr = DateUtil.format(loginDate, "yyyy-MM-dd HH:mm:ss"); - StringBuilder sb = new StringBuilder(); - sb.append("亲爱的用户,您好!您的账号于").append(dateStr); - String addr = null; - try { - String newRes = HttpUtil.get("https://whois.pconline.com.cn/ipJson.jsp?ip=" + newIp + "&json=true"); - JSONObject newResJson = JSONUtil.parseObj(newRes); - addr = newResJson.getStr("addr"); - - String newCityCode = newResJson.getStr("cityCode"); - - String oldRes = HttpUtil.get("https://whois.pconline.com.cn/ipJson.jsp?ip=" + oldIp + "&json=true"); - JSONObject oldResJson = JSONUtil.parseObj(oldRes); - - String oldCityCode = oldResJson.getStr("cityCode"); - - if (newCityCode == null || oldCityCode == null || newCityCode.equals(oldCityCode)) { - return null; - } - - } catch (Exception ignored) { - return null; - } - if (!StringUtils.isEmpty(addr)) { - sb.append("在【") - .append(addr) - .append("】"); - } - sb.append("登录,登录IP为:【") - .append(newIp) - .append("】,若非本人操作,请立即修改密码。") - .append("\n\n") - .append("Hello! Dear user, Your account was logged in in"); - - if (!StringUtils.isEmpty(addr)) { - sb.append(" 【") - .append(addr) - .append("】 on ") - .append(dateStr) - .append(". If you do not operate by yourself, please change your password immediately."); - } - - return sb.toString(); - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/user/impl/UserAcproblemEntityServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/user/impl/UserAcproblemEntityServiceImpl.java deleted file mode 100644 index c65aabd..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/user/impl/UserAcproblemEntityServiceImpl.java +++ /dev/null @@ -1,22 +0,0 @@ -package top.hcode.hoj.dao.user.impl; - - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import top.hcode.hoj.mapper.UserAcproblemMapper; -import top.hcode.hoj.pojo.entity.user.UserAcproblem; -import top.hcode.hoj.dao.user.UserAcproblemEntityService; - -import org.springframework.stereotype.Service; - -/** - *

- * 服务实现类 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -@Service -public class UserAcproblemEntityServiceImpl extends ServiceImpl implements UserAcproblemEntityService { - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/user/impl/UserInfoEntityServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/user/impl/UserInfoEntityServiceImpl.java deleted file mode 100644 index 7ba50b9..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/user/impl/UserInfoEntityServiceImpl.java +++ /dev/null @@ -1,54 +0,0 @@ -package top.hcode.hoj.dao.user.impl; - -import org.springframework.beans.factory.annotation.Autowired; -import top.hcode.hoj.pojo.dto.RegisterDto; -import top.hcode.hoj.pojo.entity.user.UserInfo; -import top.hcode.hoj.mapper.UserInfoMapper; -import top.hcode.hoj.dao.user.UserInfoEntityService; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.stereotype.Service; -import top.hcode.hoj.utils.Constants; -import top.hcode.hoj.utils.RedisUtils; - -import java.util.List; - -/** - *

- * 服务实现类 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -@Service -public class UserInfoEntityServiceImpl extends ServiceImpl implements UserInfoEntityService { - - @Autowired - private UserInfoMapper userInfoMapper; - - @Autowired - private RedisUtils redisUtils; - - @Override - public Boolean addUser(RegisterDto registerDto) { - return userInfoMapper.addUser(registerDto) == 1; - } - - @Override - public List getSuperAdminUidList() { - - String cacheKey = Constants.Account.SUPER_ADMIN_UID_LIST_CACHE.getCode(); - List superAdminUidList = (List) redisUtils.get(cacheKey); - if (superAdminUidList == null) { - superAdminUidList = userInfoMapper.getSuperAdminUidList(); - redisUtils.set(cacheKey, superAdminUidList, 12 * 3600); - } - return superAdminUidList; - } - - @Override - public List getProblemAdminUidList() { - return userInfoMapper.getProblemAdminUidList(); - } - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/user/impl/UserRecordEntityServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/user/impl/UserRecordEntityServiceImpl.java deleted file mode 100644 index fee370e..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/user/impl/UserRecordEntityServiceImpl.java +++ /dev/null @@ -1,84 +0,0 @@ -package top.hcode.hoj.dao.user.impl; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import org.springframework.beans.factory.annotation.Autowired; -import top.hcode.hoj.mapper.JudgeMapper; -import top.hcode.hoj.pojo.entity.judge.Judge; -import top.hcode.hoj.pojo.vo.ACMRankVo; -import top.hcode.hoj.pojo.entity.user.UserRecord; -import top.hcode.hoj.mapper.UserRecordMapper; -import top.hcode.hoj.pojo.vo.OIRankVo; -import top.hcode.hoj.pojo.vo.UserHomeVo; -import top.hcode.hoj.dao.user.UserRecordEntityService; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.stereotype.Service; -import top.hcode.hoj.utils.Constants; -import top.hcode.hoj.utils.RedisUtils; - -import java.util.List; - -/** - *

- * 服务实现类 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -@Service -public class UserRecordEntityServiceImpl extends ServiceImpl implements UserRecordEntityService { - - @Autowired - private UserRecordMapper userRecordMapper; - - @Autowired - private JudgeMapper judgeMapper; - - @Autowired - private RedisUtils redisUtils; - - // 排行榜缓存时间 10s - private static final long cacheRankSecond = 10; - - @Override - public List getRecent7ACRank() { - return userRecordMapper.getRecent7ACRank(); - } - - @Override - public UserHomeVo getUserHomeInfo(String uid, String username) { - return userRecordMapper.getUserHomeInfo(uid, username); - } - - @Override - public List getLastYearUserJudgeList(String uid, String username) { - return judgeMapper.getLastYearUserJudgeList(uid, username); - } - - @Override - public IPage getOIRankList(Page page, List uidList) { - return userRecordMapper.getOIRankList(page, uidList); - } - - @Override - public IPage getACMRankList(Page page, List uidList) { - return userRecordMapper.getACMRankList(page, uidList); - } - - @Override - public IPage getGroupRankList(Page page, Long gid, List uidList, String rankType, Boolean useCache) { - if (useCache) { - IPage data = null; - String key = Constants.Account.GROUP_RANK_CACHE.getCode() + "_" + gid + "_" + rankType + "_" + page.getCurrent() + "_" + page.getSize(); - data = (IPage) redisUtils.get(key); - if (data == null) { - data = userRecordMapper.getGroupRankList(page, gid, uidList, rankType); - redisUtils.set(key, data, cacheRankSecond); - } - return data; - } else { - return userRecordMapper.getGroupRankList(page, gid, uidList, rankType); - } - } -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/user/impl/UserRoleEntityServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/user/impl/UserRoleEntityServiceImpl.java deleted file mode 100644 index 0b4b1b3..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/user/impl/UserRoleEntityServiceImpl.java +++ /dev/null @@ -1,128 +0,0 @@ -package top.hcode.hoj.dao.user.impl; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import org.apache.shiro.SecurityUtils; -import org.apache.shiro.authc.Authenticator; -import org.apache.shiro.authc.LogoutAware; -import org.apache.shiro.session.Session; -import org.apache.shiro.subject.SimplePrincipalCollection; -import org.apache.shiro.subject.support.DefaultSubjectContext; -import org.apache.shiro.web.mgt.DefaultWebSecurityManager; -import org.crazycake.shiro.RedisSessionDAO; -import org.springframework.beans.factory.annotation.Autowired; -import top.hcode.hoj.pojo.entity.user.UserRole; -import top.hcode.hoj.mapper.UserRoleMapper; -import top.hcode.hoj.pojo.vo.UserRolesVo; -import top.hcode.hoj.dao.user.UserRoleEntityService; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.stereotype.Service; -import top.hcode.hoj.shiro.AccountProfile; - -import java.util.Arrays; -import java.util.Collection; -import java.util.List; -import java.util.Objects; - -/** - *

- * 服务实现类 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -@Service -public class UserRoleEntityServiceImpl extends ServiceImpl implements UserRoleEntityService { - @Autowired - private UserRoleMapper userRoleMapper; - - @Autowired - private RedisSessionDAO redisSessionDAO; - - @Override - public UserRolesVo getUserRoles(String uid, String username) { - return userRoleMapper.getUserRoles(uid, username); - } - - @Override - public IPage getUserList(int limit, int currentPage, String keyword, Boolean onlyAdmin) { - //新建分页 - Page page = new Page<>(currentPage, limit); - if (onlyAdmin) { - return userRoleMapper.getAdminUserList(page, limit, currentPage, keyword); - } else { - return userRoleMapper.getUserList(page, limit, currentPage, keyword); - } - } - - /** - * @param uid 当前需要操作的用户id - * @param isRemoveSession 如果为true则会强行删除该用户session,必须重新登陆,false的话 在访问受限接口时会重新授权 - * @MethodName deleteCache - * @Description TODO - * @Return - * @Since 2021/6/12 - */ - @Override - public void deleteCache(String uid, boolean isRemoveSession) { - //从缓存中获取Session - Collection sessions = redisSessionDAO.getActiveSessions(); - for (Session sessionInfo : sessions) { - //遍历Session,找到该用户名称对应的Session - Object attribute = sessionInfo.getAttribute(DefaultSubjectContext.PRINCIPALS_SESSION_KEY); - if (attribute == null) { - continue; - } - AccountProfile accountProfile = (AccountProfile) ((SimplePrincipalCollection) attribute).getPrimaryPrincipal(); - if (accountProfile == null) { - continue; - } - // 如果该session是指定的uid用户的 - if (Objects.equals(accountProfile.getUid(), uid)) { - deleteSession(isRemoveSession, sessionInfo, attribute); - } - } - - } - - - private void deleteSession(boolean isRemoveSession, Session session, Object attribute) { - //删除session 会强制退出!主要是在禁用用户或角色时,强制用户退出的 - if (isRemoveSession) { - redisSessionDAO.delete(session); - } - - //删除Cache,在访问受限接口时会重新授权 - DefaultWebSecurityManager securityManager = (DefaultWebSecurityManager) SecurityUtils.getSecurityManager(); - Authenticator authc = securityManager.getAuthenticator(); - ((LogoutAware) authc).onLogout((SimplePrincipalCollection) attribute); - } - - - private final static List ChineseRole = Arrays.asList("超级管理员", "普通管理员", - "普通用户(默认)", "普通用户(禁止提交)", "普通用户(禁止发讨论)", "普通用户(禁言)", "普通用户(禁止提交&禁止发讨论)", - "用户(禁止提交&禁言)", "题目管理员"); - - private final static List EnglishRole = Arrays.asList("Super Administrator", "General Administrator", - "Normal User(Default)", "Normal User(No Submission)", "Normal User(No Discussion)", "Normal User(Forbidden Words)", - "Normal User(No Submission & No Discussion)", - "Normal User(No Submission & Forbidden Words)", "Problem Administrator"); - - @Override - public String getAuthChangeContent(int oldType, int newType) { - String msg = "您好,您的权限产生了变更,由【" + - ChineseRole.get(oldType - 1000) + - "】变更为【" + - ChineseRole.get(newType - 1000) + - "】。部分权限可能与之前有所不同,请您注意!" + - "\n\n" + - "Hello, your permission has been changed from 【" + - EnglishRole.get(oldType - 1000) + - "】 to 【" + - EnglishRole.get(newType - 1000) + - "】. Some permissions may be different from before. Please note!"; - return msg; - } - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/exception/AccessException.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/exception/AccessException.java deleted file mode 100644 index c0cf349..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/exception/AccessException.java +++ /dev/null @@ -1,27 +0,0 @@ -package top.hcode.hoj.exception; - -/** - * @Author Himit_ZH - * @Date 2022/5/9 - */ -public class AccessException extends Exception{ - public AccessException() { - super(); - } - - public AccessException(String message) { - super(message); - } - - public AccessException(String message, Throwable cause) { - super(message, cause); - } - - public AccessException(Throwable cause) { - super(cause); - } - - protected AccessException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) { - super(message, cause, enableSuppression, writableStackTrace); - } -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/interceptor/AccessInterceptor.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/interceptor/AccessInterceptor.java deleted file mode 100644 index cf25696..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/interceptor/AccessInterceptor.java +++ /dev/null @@ -1,55 +0,0 @@ -package top.hcode.hoj.interceptor; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; -import org.springframework.web.method.HandlerMethod; -import org.springframework.web.servlet.HandlerInterceptor; -import org.springframework.web.servlet.ModelAndView; -import org.springframework.web.servlet.resource.ResourceHttpRequestHandler; -import top.hcode.hoj.annotation.HOJAccess; -import top.hcode.hoj.annotation.HOJAccessEnum; -import top.hcode.hoj.utils.ServiceContextUtils; -import top.hcode.hoj.validator.AccessValidator; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -/** - * @Author Himit_ZH - * @Date 2022/5/9 - */ -@Component -public class AccessInterceptor implements HandlerInterceptor { - - @Autowired - private AccessValidator accessValidator; - - @Override - public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { - if(handler instanceof HandlerMethod) { - HandlerMethod handlerMethod = HandlerMethod.class.cast(handler); - HOJAccess hojAccess = ServiceContextUtils.getAnnotation(handlerMethod.getMethod(), handlerMethod.getBeanType(), HOJAccess.class); - if (hojAccess == null || hojAccess.value().length == 0) { - return true; - } - for (HOJAccessEnum value : hojAccess.value()) { - accessValidator.validateAccess(value); - } - return true; - }else if (handler instanceof ResourceHttpRequestHandler){ - // 静态资源的请求不处理 - return true; - } - return false; - } - - @Override - public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) throws Exception { - HandlerInterceptor.super.postHandle(request, response, handler, modelAndView); - } - - @Override - public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception { - HandlerInterceptor.super.afterCompletion(request, response, handler, ex); - } -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/AbstractReceiver.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/AbstractReceiver.java deleted file mode 100644 index a567c0b..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/AbstractReceiver.java +++ /dev/null @@ -1,24 +0,0 @@ -package top.hcode.hoj.judge; - -/** - * @Author: Himit_ZH - * @Date: 2021/12/22 12:40 - * @Description: - */ - -public abstract class AbstractReceiver { - - public void handleWaitingTask(String... queues) { - for (String queue : queues) { - String taskStr = getTaskByRedis(queue); - if (taskStr != null) { - handleJudgeMsg(taskStr, queue); - } - } - } - - public abstract String getTaskByRedis(String queue); - - public abstract void handleJudgeMsg(String taskStr, String queueName); - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/ChooseUtils.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/ChooseUtils.java deleted file mode 100644 index 0ee7a4c..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/ChooseUtils.java +++ /dev/null @@ -1,214 +0,0 @@ -package top.hcode.hoj.judge; - -import com.alibaba.cloud.nacos.NacosDiscoveryProperties; -import com.alibaba.nacos.api.exception.NacosException; -import com.alibaba.nacos.api.naming.NamingService; -import com.alibaba.nacos.api.naming.pojo.Instance; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; -import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.stereotype.Component; -import org.springframework.transaction.annotation.Transactional; -import top.hcode.hoj.mapper.RemoteJudgeAccountMapper; -import top.hcode.hoj.dao.judge.JudgeServerEntityService; -import top.hcode.hoj.pojo.entity.judge.JudgeServer; -import top.hcode.hoj.pojo.entity.judge.RemoteJudgeAccount; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; - -/** - * @Author: Himit_ZH - * @Date: 2021/5/24 17:30 - * @Description: 筛选可用判题机 - */ -@Component -@Slf4j(topic = "hoj") -public class ChooseUtils { - - @Autowired - private NacosDiscoveryProperties discoveryProperties; - - @Value("${service-url.name}") - private String JudgeServiceName; - - @Autowired - private JudgeServerEntityService judgeServerEntityService; - - @Autowired - private RemoteJudgeAccountMapper remoteJudgeAccountMapper; - - public static final boolean openCodeforcesFixServer = false; - - /** - * @param - * @MethodName chooseServer - * @Description 选择可以用调用判题的判题服务器 - * @Return - * @Since 2021/4/15 - */ - @Transactional(rollbackFor = Exception.class) - public JudgeServer chooseServer(Boolean isRemote) { - // 获取该微服务的所有健康实例 - List instances = getInstances(JudgeServiceName); - if (instances.size() <= 0) { - return null; - } - List keyList = new ArrayList<>(); - // 获取当前健康实例取出ip和port拼接 - for (Instance instance : instances) { - keyList.add(instance.getIp() + ":" + instance.getPort()); - } - - // 过滤出小于或等于规定最大并发判题任务数的服务实例且健康的判题机 - QueryWrapper judgeServerQueryWrapper = new QueryWrapper<>(); - judgeServerQueryWrapper - .in("url", keyList) - .eq("is_remote", isRemote) - .orderByAsc("task_number") - .last("for update"); // 开启悲观锁 - - /** - * 如果一个条件无法通过索引快速过滤,存储引擎层面就会将所有记录加锁后返回, - * 再由MySQL Server层进行过滤,但在实际使用过程当中,MySQL做了一些改进, - * 在MySQL Server过滤条件,发现不满足后,会调用unlock_row方法, - * 把不满足条件的记录释放锁 (违背了二段锁协议的约束)。 - */ - List judgeServerList = judgeServerEntityService.list(judgeServerQueryWrapper); - - // 获取可用判题机 - for (JudgeServer judgeServer : judgeServerList) { - if (judgeServer.getTaskNumber() < judgeServer.getMaxTaskNumber()) { - judgeServer.setTaskNumber(judgeServer.getTaskNumber() + 1); - boolean isOk = judgeServerEntityService.updateById(judgeServer); - if (isOk) { - return judgeServer; - } - } - } - - return null; - } - - - @Transactional(rollbackFor = Exception.class) - public JudgeServer chooseFixedServer(Boolean isRemote, String fixedTag, Integer index, Integer total) { - // 获取该微服务的所有健康实例 - List instances = getInstances(JudgeServiceName); - if (instances.size() <= 0) { - return null; - } - List keyList = new ArrayList<>(); - // 获取当前健康实例取出ip和port拼接 - for (Instance instance : instances) { - keyList.add(instance.getIp() + ":" + instance.getPort()); - } - - // 过滤出小于或等于规定最大并发判题任务数的服务实例且健康的判题机 - QueryWrapper judgeServerQueryWrapper = new QueryWrapper<>(); - judgeServerQueryWrapper - .in("url", keyList) - .eq("is_remote", isRemote) - .last("for update"); // 开启悲观锁 - - /** - * 如果一个条件无法通过索引快速过滤,存储引擎层面就会将所有记录加锁后返回, - * 再由MySQL Server层进行过滤,但在实际使用过程当中,MySQL做了一些改进, - * 在MySQL Server过滤条件,发现不满足后,会调用unlock_row方法, - * 把不满足条件的记录释放锁 (违背了二段锁协议的约束)。 - */ - List judgeServerList = judgeServerEntityService.list(judgeServerQueryWrapper); - // CF的VJ判題需要一机一题(根据序号保持一定的固定) - int len = judgeServerList.size(); - for (int i = 0; i < len; i++) { - if (i % total == index) { - JudgeServer judgeServer = judgeServerList.get(i); - UpdateWrapper judgeServerUpdateWrapper = new UpdateWrapper<>(); - judgeServerUpdateWrapper.set(fixedTag, false) - .eq("id", judgeServer.getId()) - .eq(fixedTag, true); - boolean isOk = judgeServerEntityService.update(judgeServerUpdateWrapper); - if (isOk) { - return judgeServer; - } - } - } - return null; - } - - - /** - * @param serviceId - * @MethodName getInstances - * @Description 根据服务id获取对应的健康实例列表 - * @Return - * @Since 2021/4/15 - */ - private List getInstances(String serviceId) { - // 获取服务发现的相关API - NamingService namingService = discoveryProperties.namingServiceInstance(); - try { - // 获取该微服务的所有健康实例 - return namingService.selectInstances(serviceId, true); - } catch (NacosException e) { - log.error("获取微服务健康实例发生异常--------->{}", e); - return Collections.emptyList(); - } - } - - @Transactional(rollbackFor = Exception.class) - public RemoteJudgeAccount chooseRemoteAccount(String remoteOJAccountType, String username, Boolean isNeedAccountRejudge) { - - // 过滤出当前远程oj可用的账号列表 悲观锁 - List remoteJudgeAccountList = remoteJudgeAccountMapper.getAvailableAccount(remoteOJAccountType); - - for (RemoteJudgeAccount remoteJudgeAccount : remoteJudgeAccountList) { - // POJ已有submitId的重判需要使用原来的账号获取结果 - if (isNeedAccountRejudge) { - if (remoteJudgeAccount.getUsername().equals(username)) { - int count = remoteJudgeAccountMapper.updateAccountStatusById(remoteJudgeAccount.getId()); - if (count > 0) { - return remoteJudgeAccount; - } - } - } else { - int count = remoteJudgeAccountMapper.updateAccountStatusById(remoteJudgeAccount.getId()); - if (count > 0) { - return remoteJudgeAccount; - } - } - } - - return null; - } - - @Transactional(rollbackFor = Exception.class) - public HashMap chooseFixedAccount(String remoteOJAccountType) { - List instances = getInstances(JudgeServiceName); - // 过滤出当前远程可用的账号列表 悲观锁 - QueryWrapper remoteJudgeAccountQueryWrapper = new QueryWrapper<>(); - remoteJudgeAccountQueryWrapper.eq("oj", remoteOJAccountType) - .last("for update"); - - List remoteJudgeAccountList = remoteJudgeAccountMapper.selectList(remoteJudgeAccountQueryWrapper); - int len = remoteJudgeAccountList.size(); - for (int i = 0; i < len && i < instances.size(); i++) { - RemoteJudgeAccount remoteJudgeAccount = remoteJudgeAccountList.get(i); - int count = remoteJudgeAccountMapper.updateAccountStatusById(remoteJudgeAccount.getId()); - if (count > 0) { - HashMap result = new HashMap<>(); - result.put("index", i); - result.put("size", len); - result.put("account", remoteJudgeAccount); - return result; - } - } - return null; - } - - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/Dispatcher.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/Dispatcher.java deleted file mode 100644 index cc85a49..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/Dispatcher.java +++ /dev/null @@ -1,379 +0,0 @@ -package top.hcode.hoj.judge; - - -import cn.hutool.core.lang.UUID; -import cn.hutool.json.JSONObject; -import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; -import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; -import org.springframework.util.StringUtils; -import org.springframework.web.client.RestTemplate; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.common.result.ResultStatus; -import top.hcode.hoj.dao.judge.JudgeEntityService; -import top.hcode.hoj.dao.judge.JudgeServerEntityService; -import top.hcode.hoj.dao.judge.impl.RemoteJudgeAccountEntityServiceImpl; -import top.hcode.hoj.pojo.dto.CompileDTO; -import top.hcode.hoj.pojo.dto.TestJudgeReq; -import top.hcode.hoj.pojo.dto.TestJudgeRes; -import top.hcode.hoj.pojo.dto.ToJudgeDTO; -import top.hcode.hoj.pojo.entity.judge.Judge; -import top.hcode.hoj.pojo.entity.judge.JudgeServer; -import top.hcode.hoj.pojo.entity.judge.RemoteJudgeAccount; -import top.hcode.hoj.utils.Constants; -import top.hcode.hoj.utils.RedisUtils; - -import java.util.Map; -import java.util.concurrent.*; -import java.util.concurrent.atomic.AtomicInteger; - -/** - * @Author: Himit_ZH - * @Date: 2021/4/15 17:29 - * @Description: - */ -@Component -@Slf4j(topic = "hoj") -public class Dispatcher { - - @Autowired - private RestTemplate restTemplate; - - @Autowired - private JudgeServerEntityService judgeServerEntityService; - - @Autowired - private JudgeEntityService judgeEntityService; - - @Autowired - private ChooseUtils chooseUtils; - - @Autowired - private RedisUtils redisUtils; - - private final static ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(20); - - private final static Map futureTaskMap = new ConcurrentHashMap<>(20); - - @Autowired - private RemoteJudgeAccountEntityServiceImpl remoteJudgeAccountService; - - public CommonResult dispatcherJudge(String type, String path, Object data) { - switch (type) { - case "judge": - ToJudgeDTO judgeData = (ToJudgeDTO) data; - toJudge(path, judgeData, judgeData.getJudge().getSubmitId(), judgeData.getRemoteJudgeProblem() != null); - break; - case "compile": - CompileDTO compileDTO = (CompileDTO) data; - return toCompile(path, compileDTO); - default: - throw new IllegalArgumentException("判题机不支持此调用类型"); - } - return null; - } - - public void dispatcherTestJudge(TestJudgeReq testJudgeReq, String path) { - AtomicInteger count = new AtomicInteger(0); - String key = testJudgeReq.getUniqueKey(); - Runnable getResultTask = () -> { - if (count.get() > 300) { // 300次失败则判为提交失败 - Future future = futureTaskMap.get(key); - if (future != null) { - boolean isCanceled = future.cancel(true); - if (isCanceled) { - futureTaskMap.remove(key); - } - } - return; - } - count.getAndIncrement(); - JudgeServer judgeServer = chooseUtils.chooseServer(false); - - if (judgeServer != null) { // 获取到判题机资源 - try { - JSONObject resultJson = restTemplate.postForObject("http://" + judgeServer.getUrl() + path, testJudgeReq, JSONObject.class); - if (resultJson != null) { - if (resultJson.getInt("status") == ResultStatus.SUCCESS.getStatus()) { - TestJudgeRes testJudgeRes = resultJson.getBean("data", TestJudgeRes.class); - testJudgeRes.setInput(testJudgeReq.getTestCaseInput()); - testJudgeRes.setExpectedOutput(testJudgeReq.getExpectedOutput()); - testJudgeRes.setProblemJudgeMode(testJudgeReq.getProblemJudgeMode()); - redisUtils.set(testJudgeReq.getUniqueKey(), testJudgeRes, 60); - } else { - TestJudgeRes testJudgeRes = TestJudgeRes.builder() - .status(Constants.Judge.STATUS_SYSTEM_ERROR.getStatus()) - .time(0L) - .memory(0L) - .stderr(resultJson.getStr("msg")) - .build(); - redisUtils.set(testJudgeReq.getUniqueKey(), testJudgeRes, 60); - } - } - } catch (Exception e) { - log.error("调用判题服务器[" + judgeServer.getUrl() + "]发送异常-------------->", e); - TestJudgeRes testJudgeRes = TestJudgeRes.builder() - .status(Constants.Judge.STATUS_SYSTEM_ERROR.getStatus()) - .time(0L) - .memory(0L) - .stderr("Failed to connect the judgeServer. Please resubmit this submission again!") - .build(); - redisUtils.set(testJudgeReq.getUniqueKey(), testJudgeRes, 60); - } finally { - // 无论成功与否,都要将对应的当前判题机当前判题数减1 - reduceCurrentTaskNum(judgeServer.getId()); - Future future = futureTaskMap.get(key); - if (future != null) { - boolean isCanceled = future.cancel(true); - if (isCanceled) { - futureTaskMap.remove(key); - } - } - } - } - }; - ScheduledFuture scheduledFuture = scheduler.scheduleWithFixedDelay(getResultTask, 0, 1, TimeUnit.SECONDS); - futureTaskMap.put(key, scheduledFuture); - } - - - public void toJudge(String path, ToJudgeDTO data, Long submitId, Boolean isRemote) { - - String oj = null; - if (isRemote) { - oj = data.getRemoteJudgeProblem().split("-")[0]; - if (oj.equals("GYM")) { - oj = "CF"; - } - } - - // 如果是vj判題,同时不是已有提交id的获取结果操作,归属于CF的判題,需要控制判题机的权限,一机一题 - boolean isCFFixServerJudge = isRemote - && ChooseUtils.openCodeforcesFixServer - && !data.getIsHasSubmitIdRemoteReJudge() - && Constants.RemoteOJ.CODEFORCES.getName().equals(oj); - - // 尝试600s - AtomicInteger count = new AtomicInteger(0); - String key = UUID.randomUUID().toString() + submitId; - final String finalOj = oj; - Runnable getResultTask = () -> { - if (count.get() > 300) { // 300次失败则判为提交失败 - if (isRemote) { // 远程判题需要将账号归为可用 - changeRemoteJudgeStatus(finalOj, data.getUsername(), null); - } - checkResult(null, submitId); - Future future = futureTaskMap.get(key); - if (future != null) { - boolean isCanceled = future.cancel(true); - if (isCanceled) { - futureTaskMap.remove(key); - } - } - return; - } - count.getAndIncrement(); - JudgeServer judgeServer = null; - if (!isCFFixServerJudge) { - judgeServer = chooseUtils.chooseServer(isRemote); - } else { - judgeServer = chooseUtils.chooseFixedServer(true, "cf_submittable", data.getIndex(), data.getSize()); - } - - if (judgeServer != null) { // 获取到判题机资源 - data.setJudgeServerIp(judgeServer.getIp()); - data.setJudgeServerPort(judgeServer.getPort()); - CommonResult result = null; - try { - result = restTemplate.postForObject("http://" + judgeServer.getUrl() + path, data, CommonResult.class); - } catch (Exception e) { - log.error("调用判题服务器[" + judgeServer.getUrl() + "]发送异常-------------->", e); - if (isRemote) { - changeRemoteJudgeStatus(finalOj, data.getUsername(), judgeServer); - } - } finally { - checkResult(result, submitId); - if (!isCFFixServerJudge) { - // 无论成功与否,都要将对应的当前判题机当前判题数减1 - reduceCurrentTaskNum(judgeServer.getId()); - } - Future future = futureTaskMap.get(key); - if (future != null) { - boolean isCanceled = future.cancel(true); - if (isCanceled) { - futureTaskMap.remove(key); - } - } - } - } - }; - ScheduledFuture scheduledFuture = scheduler.scheduleWithFixedDelay(getResultTask, 0, 2, TimeUnit.SECONDS); - futureTaskMap.put(key, scheduledFuture); - } - - - public CommonResult toCompile(String path, CompileDTO data) { - CommonResult result = CommonResult.errorResponse("没有可用的判题服务器,请重新尝试!"); - JudgeServer judgeServer = chooseUtils.chooseServer(false); - if (judgeServer != null) { - try { - result = restTemplate.postForObject("http://" + judgeServer.getUrl() + path, data, CommonResult.class); - } catch (Exception e) { - log.error("调用判题服务器[" + judgeServer.getUrl() + "]发送异常-------------->", e.getMessage()); - } finally { - // 无论成功与否,都要将对应的当前判题机当前判题数减1 - reduceCurrentTaskNum(judgeServer.getId()); - } - } - return result; - } - - - private void checkResult(CommonResult result, Long submitId) { - - Judge judge = new Judge(); - if (result == null) { // 调用失败 - judge.setSubmitId(submitId); - judge.setStatus(Constants.Judge.STATUS_SUBMITTED_FAILED.getStatus()); - judge.setErrorMessage("Failed to connect the judgeServer. Please resubmit this submission again!"); - judgeEntityService.updateById(judge); - } else { - if (result.getStatus() != ResultStatus.SUCCESS.getStatus()) { // 如果是结果码不是200 说明调用有错误 - // 判为系统错误 - judge.setStatus(Constants.Judge.STATUS_SYSTEM_ERROR.getStatus()) - .setErrorMessage(result.getMsg()); - judgeEntityService.updateById(judge); - } - } - - } - - public void reduceCurrentTaskNum(Integer id) { - UpdateWrapper judgeServerUpdateWrapper = new UpdateWrapper<>(); - judgeServerUpdateWrapper.setSql("task_number = task_number-1").eq("id", id); - boolean isOk = judgeServerEntityService.update(judgeServerUpdateWrapper); - if (!isOk) { // 重试八次 - tryAgainUpdateJudge(judgeServerUpdateWrapper); - } - } - - public void tryAgainUpdateJudge(UpdateWrapper updateWrapper) { - boolean retryable; - int attemptNumber = 0; - do { - boolean success = judgeServerEntityService.update(updateWrapper); - if (success) { - return; - } else { - attemptNumber++; - retryable = attemptNumber < 8; - if (attemptNumber == 8) { - break; - } - try { - Thread.sleep(300); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - } while (retryable); - } - - - public void changeRemoteJudgeStatus(String oj, String username, JudgeServer judgeServer) { - changeAccountStatus(oj, username); - if (ChooseUtils.openCodeforcesFixServer) { - if (oj.equals(Constants.RemoteOJ.CODEFORCES.getName()) - || oj.equals(Constants.RemoteOJ.GYM.getName())) { - if (judgeServer != null) { - changeServerSubmitCFStatus(judgeServer.getIp(), judgeServer.getPort()); - } - } - } - } - - - public void changeAccountStatus(String remoteJudge, String username) { - - UpdateWrapper remoteJudgeAccountUpdateWrapper = new UpdateWrapper<>(); - remoteJudgeAccountUpdateWrapper.set("status", true) - .eq("status", false) - .eq("username", username); - if (remoteJudge.equals("GYM")) { - remoteJudge = "CF"; - } - remoteJudgeAccountUpdateWrapper.eq("oj", remoteJudge); - - boolean isOk = remoteJudgeAccountService.update(remoteJudgeAccountUpdateWrapper); - - if (!isOk) { // 重试8次 - tryAgainUpdateAccount(remoteJudgeAccountUpdateWrapper, remoteJudge, username); - } - } - - - private void tryAgainUpdateAccount(UpdateWrapper updateWrapper, String remoteJudge, String username) { - boolean retryable; - int attemptNumber = 0; - do { - boolean success = remoteJudgeAccountService.update(updateWrapper); - if (success) { - return; - } else { - attemptNumber++; - retryable = attemptNumber < 8; - if (attemptNumber == 8) { - log.error("远程判题:修正账号为可用状态失败----------->{}", "oj:" + remoteJudge + ",username:" + username); - break; - } - try { - Thread.sleep(300); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - } while (retryable); - } - - - public void changeServerSubmitCFStatus(String ip, Integer port) { - - if (StringUtils.isEmpty(ip) || port == null) { - return; - } - UpdateWrapper judgeServerUpdateWrapper = new UpdateWrapper<>(); - judgeServerUpdateWrapper.set("cf_submittable", true) - .eq("ip", ip) - .eq("is_remote", true) - .eq("port", port); - boolean isOk = judgeServerEntityService.update(judgeServerUpdateWrapper); - - if (!isOk) { // 重试8次 - tryAgainUpdateServer(judgeServerUpdateWrapper, ip, port); - } - } - - private void tryAgainUpdateServer(UpdateWrapper updateWrapper, String ip, Integer port) { - boolean retryable; - int attemptNumber = 0; - do { - boolean success = judgeServerEntityService.update(updateWrapper); - if (success) { - return; - } else { - attemptNumber++; - retryable = attemptNumber < 8; - if (attemptNumber == 8) { - log.error("Remote Judge:Change CF Judge Server Status to `true` Failed! =======>{}", "ip:" + ip + ",port:" + port); - break; - } - try { - Thread.sleep(300); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - } while (retryable); - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/remote/RemoteJudgeDispatcher.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/remote/RemoteJudgeDispatcher.java deleted file mode 100644 index 4714b73..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/remote/RemoteJudgeDispatcher.java +++ /dev/null @@ -1,61 +0,0 @@ -package top.hcode.hoj.judge.remote; - - -import cn.hutool.json.JSONObject; -import cn.hutool.json.JSONUtil; -import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.cloud.context.config.annotation.RefreshScope; -import org.springframework.stereotype.Component; -import top.hcode.hoj.dao.judge.JudgeEntityService; -import top.hcode.hoj.pojo.entity.judge.Judge; -import top.hcode.hoj.utils.Constants; -import top.hcode.hoj.utils.RedisUtils; - - -@Component -@Slf4j(topic = "hoj") -@RefreshScope -public class RemoteJudgeDispatcher { - - @Autowired - private RedisUtils redisUtils; - - @Autowired - private JudgeEntityService judgeEntityService; - - @Autowired - private RemoteJudgeReceiver remoteJudgeReceiver; - - @Value("${hoj.judge.token}") - private String judgeToken; - - public void sendTask(Long judgeId, Long pid, String remoteJudgeProblem, Boolean isContest, Boolean isHasSubmitIdRemoteReJudge) { - JSONObject task = new JSONObject(); - task.set("judgeId", judgeId); - task.set("remoteJudgeProblem", remoteJudgeProblem); - task.set("token", judgeToken); - task.set("isContest", isContest); - task.set("isHasSubmitIdRemoteReJudge", isHasSubmitIdRemoteReJudge); - try { - boolean isOk; - if (isContest) { - isOk = redisUtils.llPush(Constants.Queue.CONTEST_REMOTE_JUDGE_WAITING_HANDLE.getName(), JSONUtil.toJsonStr(task)); - } else { - isOk = redisUtils.llPush(Constants.Queue.GENERAL_REMOTE_JUDGE_WAITING_HANDLE.getName(), JSONUtil.toJsonStr(task)); - } - if (!isOk) { - judgeEntityService.updateById(new Judge() - .setSubmitId(judgeId) - .setStatus(Constants.Judge.STATUS_SUBMITTED_FAILED.getStatus()) - .setErrorMessage("Call Redis to push task error. Please try to submit again!") - ); - } - remoteJudgeReceiver.processWaitingTask(); - } catch (Exception e) { - log.error("调用redis将判题纳入判题等待队列异常,此次判题任务判为系统错误--------------->", e); - judgeEntityService.failToUseRedisPublishJudge(judgeId, pid, isContest); - } - } -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/remote/RemoteJudgeReceiver.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/remote/RemoteJudgeReceiver.java deleted file mode 100644 index 99550ae..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/remote/RemoteJudgeReceiver.java +++ /dev/null @@ -1,329 +0,0 @@ -package top.hcode.hoj.judge.remote; - -import cn.hutool.core.lang.UUID; -import cn.hutool.json.JSONObject; -import cn.hutool.json.JSONUtil; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.scheduling.annotation.Async; -import org.springframework.stereotype.Component; -import org.springframework.util.CollectionUtils; -import org.springframework.util.StringUtils; -import top.hcode.hoj.dao.contest.ContestRecordEntityService; -import top.hcode.hoj.dao.judge.JudgeEntityService; -import top.hcode.hoj.dao.judge.RemoteJudgeAccountEntityService; -import top.hcode.hoj.judge.AbstractReceiver; -import top.hcode.hoj.judge.ChooseUtils; -import top.hcode.hoj.judge.Dispatcher; -import top.hcode.hoj.pojo.dto.ToJudgeDTO; -import top.hcode.hoj.pojo.entity.contest.ContestRecord; -import top.hcode.hoj.pojo.entity.judge.Judge; -import top.hcode.hoj.pojo.entity.judge.RemoteJudgeAccount; -import top.hcode.hoj.pojo.vo.ConfigVo; -import top.hcode.hoj.utils.Constants; -import top.hcode.hoj.utils.RedisUtils; - -import javax.annotation.Resource; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.concurrent.*; -import java.util.concurrent.atomic.AtomicInteger; - -@Component -public class RemoteJudgeReceiver extends AbstractReceiver { - - @Autowired - private JudgeEntityService judgeEntityService; - - @Autowired - private Dispatcher dispatcher; - - @Autowired - private RedisUtils redisUtils; - - @Resource - private ChooseUtils chooseUtils; - - @Autowired - private ConfigVo configVo; - - @Autowired - private ContestRecordEntityService contestRecordEntityService; - - @Autowired - private RemoteJudgeAccountEntityService remoteJudgeAccountEntityService; - - private final static ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(10); - - private final static Map futureTaskMap = new ConcurrentHashMap<>(10); - - @Async("judgeTaskAsyncPool") - public void processWaitingTask() { - // 优先处理比赛的提交 - // 其次处理普通提交的提交 - handleWaitingTask(Constants.Queue.CONTEST_REMOTE_JUDGE_WAITING_HANDLE.getName(), - Constants.Queue.GENERAL_REMOTE_JUDGE_WAITING_HANDLE.getName()); - } - - @Override - public String getTaskByRedis(String queue) { - if (redisUtils.lGetListSize(queue) > 0) { - return (String) redisUtils.lrPop(queue); - } else { - return null; - } - } - - @Override - public void handleJudgeMsg(String taskStr, String queueName) { - JSONObject task = JSONUtil.parseObj(taskStr); - String token = task.getStr("token"); - String remoteJudgeProblem = task.getStr("remoteJudgeProblem"); - Boolean isHasSubmitIdRemoteReJudge = task.getBool("isHasSubmitIdRemoteReJudge"); - String remoteOJName = remoteJudgeProblem.split("-")[0].toUpperCase(); - Long judgeId = task.getLong("judgeId"); - Judge judge = judgeEntityService.getById(judgeId); - if (judge != null) { - if (Objects.equals(judge.getStatus(), Constants.Judge.STATUS_CANCELLED.getStatus())) { - if (judge.getCid() != 0) { - UpdateWrapper updateWrapper = new UpdateWrapper<>(); - // 取消评测,不罚时也不算得分 - updateWrapper.set("status", Constants.Contest.RECORD_NOT_AC_NOT_PENALTY.getCode()); - updateWrapper.eq("submit_id", judge.getSubmitId()); // submit_id一定只有一个 - contestRecordEntityService.update(updateWrapper); - } - }else { - dispatchRemoteJudge(judge, - token, - remoteJudgeProblem, - isHasSubmitIdRemoteReJudge, - remoteOJName); - } - } - } - - private void dispatchRemoteJudge(Judge judge, String token, String remoteJudgeProblem, - Boolean isHasSubmitIdRemoteReJudge, String remoteOJName) { - - ToJudgeDTO toJudgeDTO = new ToJudgeDTO(); - toJudgeDTO.setJudge(judge) - .setToken(token) - .setRemoteJudgeProblem(remoteJudgeProblem); - Constants.RemoteOJ remoteOJ = Constants.RemoteOJ.getRemoteOJ(remoteOJName); - if (!checkExistedAccountByOJ(remoteOJ)) { - judge.setStatus(Constants.Judge.STATUS_SYSTEM_ERROR.getStatus()); - judge.setErrorMessage("System Error! Cause: The System does not have [" + remoteOJ + "] account configured. " + - "Please report the matter to the administrator!"); - judgeEntityService.updateById(judge); - } else { - if (remoteOJName.equals(Constants.RemoteOJ.CODEFORCES.getName()) - || remoteOJName.equals(Constants.RemoteOJ.GYM.getName())) { - if (ChooseUtils.openCodeforcesFixServer) { - fixServerCFJudge(isHasSubmitIdRemoteReJudge, toJudgeDTO, judge); - } else { - commonJudge(Constants.RemoteOJ.CODEFORCES.getName(), isHasSubmitIdRemoteReJudge, toJudgeDTO, judge); - } - } else if (remoteOJName.equals(Constants.RemoteOJ.POJ.getName())) { - pojJudge(isHasSubmitIdRemoteReJudge, toJudgeDTO, judge); - } else { - commonJudge(remoteOJName, isHasSubmitIdRemoteReJudge, toJudgeDTO, judge); - } - } - // 如果队列中还有任务,则继续处理 - processWaitingTask(); - } - - - private void commonJudge(String OJName, Boolean isHasSubmitIdRemoteReJudge, ToJudgeDTO toJudgeDTO, Judge judge) { - - if (isHasSubmitIdRemoteReJudge) { - toJudgeDTO.setIsHasSubmitIdRemoteReJudge(true); - toJudgeDTO.setUsername(judge.getVjudgeUsername()); - toJudgeDTO.setPassword(judge.getVjudgePassword()); - // 调用判题服务 - dispatcher.dispatcherJudge("judge", "/remote-judge", toJudgeDTO); - return; - } - - // 尝试600s - AtomicInteger tryNum = new AtomicInteger(0); - String key = UUID.randomUUID().toString() + toJudgeDTO.getJudge().getSubmitId(); - Runnable getResultTask = new Runnable() { - @Override - public void run() { - if (tryNum.get() > 200) { - // 获取调用多次失败可能为系统忙碌,判为提交失败 - judge.setStatus(Constants.Judge.STATUS_SUBMITTED_FAILED.getStatus()); - judge.setErrorMessage("Submission failed! Please resubmit this submission again!" + - "Cause: Waiting for account scheduling timeout."); - judgeEntityService.updateById(judge); - Future future = futureTaskMap.get(key); - if (future != null) { - boolean isCanceled = future.cancel(true); - if (isCanceled) { - futureTaskMap.remove(key); - } - } - return; - } - tryNum.getAndIncrement(); - RemoteJudgeAccount account = chooseUtils.chooseRemoteAccount(OJName, judge.getVjudgeUsername(), false); - if (account != null) { - toJudgeDTO.setUsername(account.getUsername()) - .setPassword(account.getPassword()); - toJudgeDTO.setIsHasSubmitIdRemoteReJudge(false); - // 调用判题服务 - dispatcher.dispatcherJudge("judge", "/remote-judge", toJudgeDTO); - Future future = futureTaskMap.get(key); - if (future != null) { - future.cancel(true); - futureTaskMap.remove(key); - } - } - } - }; - ScheduledFuture scheduledFuture = scheduler.scheduleWithFixedDelay(getResultTask, 0, 3, TimeUnit.SECONDS); - futureTaskMap.put(key, scheduledFuture); - } - - - private void pojJudge(Boolean isHasSubmitIdRemoteReJudge, ToJudgeDTO toJudgeDTO, Judge judge) { - - - if (StringUtils.isEmpty(judge.getVjudgeUsername())) { - isHasSubmitIdRemoteReJudge = false; - } - - if (isHasSubmitIdRemoteReJudge) { - QueryWrapper queryWrapper = new QueryWrapper<>(); - queryWrapper.eq("oj", Constants.RemoteOJ.POJ.getName()) - .eq("username", judge.getVjudgeUsername()); - int count = remoteJudgeAccountEntityService.count(queryWrapper); - if (count == 0) { - // poj以往的账号丢失了,那么只能重新从头到尾提交 - isHasSubmitIdRemoteReJudge = false; - } - } - - // 尝试600s - AtomicInteger tryNum = new AtomicInteger(0); - String key = UUID.randomUUID().toString() + toJudgeDTO.getJudge().getSubmitId(); - boolean finalIsHasSubmitIdRemoteReJudge = isHasSubmitIdRemoteReJudge; - Runnable getResultTask = new Runnable() { - @Override - public void run() { - if (tryNum.get() > 200) { - // 获取调用多次失败可能为系统忙碌,判为提交失败 - judge.setStatus(Constants.Judge.STATUS_SUBMITTED_FAILED.getStatus()); - judge.setErrorMessage("Submission failed! Please resubmit this submission again!" + - "Cause: Waiting for account scheduling timeout"); - judgeEntityService.updateById(judge); - Future future = futureTaskMap.get(key); - if (future != null) { - boolean isCanceled = future.cancel(true); - if (isCanceled) { - futureTaskMap.remove(key); - } - } - return; - } - tryNum.getAndIncrement(); - RemoteJudgeAccount account = chooseUtils.chooseRemoteAccount(Constants.RemoteOJ.POJ.getName() - , judge.getVjudgeUsername(), finalIsHasSubmitIdRemoteReJudge); - if (account != null) { - toJudgeDTO.setUsername(account.getUsername()) - .setPassword(account.getPassword()); - toJudgeDTO.setIsHasSubmitIdRemoteReJudge(finalIsHasSubmitIdRemoteReJudge); - // 调用判题服务 - dispatcher.dispatcherJudge("judge", "/remote-judge", toJudgeDTO); - Future future = futureTaskMap.get(key); - if (future != null) { - future.cancel(true); - futureTaskMap.remove(key); - } - } - } - }; - ScheduledFuture scheduledFuture = scheduler.scheduleWithFixedDelay(getResultTask, 0, 3, TimeUnit.SECONDS); - futureTaskMap.put(key, scheduledFuture); - } - - private void fixServerCFJudge(Boolean isHasSubmitIdRemoteReJudge, ToJudgeDTO toJudgeDTO, Judge judge) { - - if (isHasSubmitIdRemoteReJudge) { - toJudgeDTO.setIsHasSubmitIdRemoteReJudge(true); - toJudgeDTO.setUsername(judge.getVjudgeUsername()); - toJudgeDTO.setPassword(judge.getVjudgePassword()); - // 调用判题服务 - dispatcher.dispatcherJudge("judge", "/remote-judge", toJudgeDTO); - return; - } - - // 尝试600s - String key = UUID.randomUUID().toString() + toJudgeDTO.getJudge().getSubmitId(); - AtomicInteger tryNum = new AtomicInteger(0); - Runnable getResultTask = new Runnable() { - @Override - public void run() { - if (tryNum.get() > 200) { - // 获取调用多次失败可能为系统忙碌,判为提交失败 - judge.setStatus(Constants.Judge.STATUS_SUBMITTED_FAILED.getStatus()); - judge.setErrorMessage("Submission failed! Please resubmit this submission again!" + - "Cause: Waiting for account scheduling timeout"); - judgeEntityService.updateById(judge); - Future future = futureTaskMap.get(key); - if (future != null) { - boolean isCanceled = future.cancel(true); - if (isCanceled) { - futureTaskMap.remove(key); - } - } - return; - } - tryNum.getAndIncrement(); - HashMap result = chooseUtils.chooseFixedAccount(Constants.RemoteOJ.CODEFORCES.getName()); - if (result != null) { - RemoteJudgeAccount account = (RemoteJudgeAccount) result.get("account"); - int index = (int) result.get("index"); - int size = (int) result.get("size"); - toJudgeDTO.setUsername(account.getUsername()) - .setPassword(account.getPassword()); - toJudgeDTO.setIsHasSubmitIdRemoteReJudge(false); - toJudgeDTO.setIndex(index); - toJudgeDTO.setSize(size); - // 调用判题服务 - dispatcher.dispatcherJudge("judge", "/remote-judge", toJudgeDTO); - Future future = futureTaskMap.get(key); - if (future != null) { - future.cancel(true); - futureTaskMap.remove(key); - } - } - } - }; - ScheduledFuture scheduledFuture = scheduler.scheduleWithFixedDelay(getResultTask, 0, 3, TimeUnit.SECONDS); - futureTaskMap.put(key, scheduledFuture); - } - - private boolean checkExistedAccountByOJ(Constants.RemoteOJ remoteOJ) { - if (remoteOJ == null) { - return false; - } - switch (remoteOJ) { - case GYM: - case CODEFORCES: - return !CollectionUtils.isEmpty(configVo.getCfUsernameList()); - case POJ: - return !CollectionUtils.isEmpty(configVo.getPojUsernameList()); - case HDU: - return !CollectionUtils.isEmpty(configVo.getHduUsernameList()); - case SPOJ: - return !CollectionUtils.isEmpty(configVo.getSpojUsernameList()); - case ATCODER: - return !CollectionUtils.isEmpty(configVo.getAtcoderUsernameList()); - } - return false; - } -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/self/JudgeDispatcher.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/self/JudgeDispatcher.java deleted file mode 100644 index 684ed19..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/self/JudgeDispatcher.java +++ /dev/null @@ -1,81 +0,0 @@ -package top.hcode.hoj.judge.self; - -import cn.hutool.json.JSONObject; -import cn.hutool.json.JSONUtil; - -import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.cloud.context.config.annotation.RefreshScope; -import org.springframework.stereotype.Component; -import top.hcode.hoj.common.exception.StatusSystemErrorException; -import top.hcode.hoj.dao.judge.JudgeEntityService; -import top.hcode.hoj.pojo.dto.TestJudgeReq; -import top.hcode.hoj.pojo.entity.judge.Judge; -import top.hcode.hoj.utils.Constants; -import top.hcode.hoj.utils.RedisUtils; - -/** - * @Author: Himit_ZH - * @Date: 2021/2/5 16:44 - * @Description: - */ -@Component -@Slf4j(topic = "hoj") -@RefreshScope -public class JudgeDispatcher { - - @Autowired - private RedisUtils redisUtils; - - @Autowired - private JudgeEntityService judgeEntityService; - - @Autowired - private JudgeReceiver judgeReceiver; - - @Value("${hoj.judge.token}") - private String judgeToken; - - public void sendTask(Long judgeId, Long pid, Boolean isContest) { - JSONObject task = new JSONObject(); - task.set("judgeId", judgeId); - task.set("token", judgeToken); - task.set("isContest", isContest); - try { - boolean isOk; - if (isContest) { - isOk = redisUtils.llPush(Constants.Queue.CONTEST_JUDGE_WAITING.getName(), JSONUtil.toJsonStr(task)); - } else { - isOk = redisUtils.llPush(Constants.Queue.GENERAL_JUDGE_WAITING.getName(), JSONUtil.toJsonStr(task)); - } - if (!isOk) { - judgeEntityService.updateById(new Judge() - .setSubmitId(judgeId) - .setStatus(Constants.Judge.STATUS_SUBMITTED_FAILED.getStatus()) - .setErrorMessage("Call Redis to push task error. Please try to submit again!") - ); - } - // 调用判题任务处理 - judgeReceiver.processWaitingTask(); - } catch (Exception e) { - log.error("调用redis将判题纳入判题等待队列异常--------------->{}", e.getMessage()); - judgeEntityService.failToUseRedisPublishJudge(judgeId, pid, isContest); - } - } - - public void sendTestJudgeTask(TestJudgeReq testJudgeReq) throws StatusSystemErrorException { - testJudgeReq.setToken(judgeToken); - try { - boolean isOk = redisUtils.llPush(Constants.Queue.TEST_JUDGE_WAITING.getName(), JSONUtil.toJsonStr(testJudgeReq)); - if (!isOk) { - throw new StatusSystemErrorException("系统错误:当前评测任务进入等待队列失败!"); - } - // 调用判题任务处理 - judgeReceiver.processWaitingTask(); - } catch (Exception e) { - log.error("调用redis将判题纳入判题等待队列异常--------------->{}", e.getMessage()); - throw new StatusSystemErrorException("系统错误:当前评测任务进入等待队列失败!"); - } - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/self/JudgeReceiver.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/self/JudgeReceiver.java deleted file mode 100644 index b65e15f..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/judge/self/JudgeReceiver.java +++ /dev/null @@ -1,99 +0,0 @@ -package top.hcode.hoj.judge.self; - -import cn.hutool.json.JSONObject; -import cn.hutool.json.JSONUtil; -import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; -import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.scheduling.annotation.Async; -import org.springframework.stereotype.Component; -import top.hcode.hoj.dao.contest.ContestRecordEntityService; -import top.hcode.hoj.dao.judge.JudgeEntityService; -import top.hcode.hoj.judge.AbstractReceiver; -import top.hcode.hoj.judge.Dispatcher; -import top.hcode.hoj.pojo.dto.TestJudgeReq; -import top.hcode.hoj.pojo.dto.ToJudgeDTO; -import top.hcode.hoj.pojo.entity.contest.ContestRecord; -import top.hcode.hoj.pojo.entity.judge.Judge; -import top.hcode.hoj.utils.Constants; -import top.hcode.hoj.utils.RedisUtils; - -import java.util.Objects; - -/** - * @Author: Himit_ZH - * @Date: 2021/2/5 16:43 - * @Description: - */ -@Component -@Slf4j(topic = "hoj") -public class JudgeReceiver extends AbstractReceiver { - - @Autowired - private Dispatcher dispatcher; - - @Autowired - private RedisUtils redisUtils; - - @Autowired - private JudgeEntityService judgeEntityService; - - @Autowired - private ContestRecordEntityService contestRecordEntityService; - - @Async("judgeTaskAsyncPool") - public void processWaitingTask() { - // 优先处理比赛的提交任务 - // 其次处理普通提交的提交任务 - // 最后处理在线调试的任务 - handleWaitingTask(Constants.Queue.CONTEST_JUDGE_WAITING.getName(), - Constants.Queue.GENERAL_JUDGE_WAITING.getName(), - Constants.Queue.TEST_JUDGE_WAITING.getName()); - } - - - @Override - public String getTaskByRedis(String queue) { - long size = redisUtils.lGetListSize(queue); - if (size > 0) { - return (String) redisUtils.lrPop(queue); - } else { - return null; - } - } - - @Override - public void handleJudgeMsg(String taskStr, String queueName) { - if (Constants.Queue.TEST_JUDGE_WAITING.getName().equals(queueName)) { - TestJudgeReq testJudgeReq = JSONUtil.toBean(taskStr, TestJudgeReq.class); - dispatcher.dispatcherTestJudge(testJudgeReq, "/test-judge"); - } else { - JSONObject task = JSONUtil.parseObj(taskStr); - Long judgeId = task.getLong("judgeId"); - Judge judge = judgeEntityService.getById(judgeId); - if (judge != null) { - // 调度评测时发现该评测任务被取消,则结束评测 - if (Objects.equals(judge.getStatus(), Constants.Judge.STATUS_CANCELLED.getStatus())) { - if (judge.getCid() != 0) { - UpdateWrapper updateWrapper = new UpdateWrapper<>(); - // 取消评测,不罚时也不算得分 - updateWrapper.set("status", Constants.Contest.RECORD_NOT_AC_NOT_PENALTY.getCode()); - updateWrapper.eq("submit_id", judge.getSubmitId()); // submit_id一定只有一个 - contestRecordEntityService.update(updateWrapper); - } - } else { - String token = task.getStr("token"); - // 调用判题服务 - dispatcher.dispatcherJudge("judge", "/judge", new ToJudgeDTO() - .setJudge(judge) - .setToken(token) - .setRemoteJudgeProblem(null)); - } - } - - } - // 接着处理任务 - processWaitingTask(); - } - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/account/AdminAccountManager.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/account/AdminAccountManager.java deleted file mode 100644 index 9e33fa3..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/account/AdminAccountManager.java +++ /dev/null @@ -1,100 +0,0 @@ -package top.hcode.hoj.manager.admin.account; - -import cn.hutool.core.bean.BeanUtil; -import cn.hutool.core.map.MapUtil; -import cn.hutool.crypto.SecureUtil; -import org.apache.shiro.SecurityUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; -import org.springframework.web.context.request.RequestContextHolder; -import org.springframework.web.context.request.ServletRequestAttributes; -import top.hcode.hoj.common.exception.StatusAccessDeniedException; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.pojo.dto.LoginDto; -import top.hcode.hoj.pojo.entity.user.Role; -import top.hcode.hoj.pojo.entity.user.Session; -import top.hcode.hoj.pojo.vo.UserInfoVo; -import top.hcode.hoj.pojo.vo.UserRolesVo; -import top.hcode.hoj.dao.user.SessionEntityService; -import top.hcode.hoj.dao.user.UserRoleEntityService; -import top.hcode.hoj.utils.IpUtils; -import top.hcode.hoj.utils.JwtUtils; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; -import java.util.stream.Collectors; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/9 10:32 - * @Description: - */ -@Component -public class AdminAccountManager { - - @Autowired - private SessionEntityService sessionEntityService; - - @Autowired - private JwtUtils jwtUtils; - - @Autowired - private UserRoleEntityService userRoleEntityService; - - public UserInfoVo login(LoginDto loginDto) throws StatusFailException, StatusAccessDeniedException { - - UserRolesVo userRolesVo = userRoleEntityService.getUserRoles(null, loginDto.getUsername()); - - if (userRolesVo == null) { - throw new StatusFailException("用户名不存在"); - } - - if (!userRolesVo.getPassword().equals(SecureUtil.md5(loginDto.getPassword()))) { - throw new StatusFailException("密码不正确"); - } - - if (userRolesVo.getStatus() != 0) { - throw new StatusFailException("该账户已被封禁,请联系管理员进行处理!"); - } - - // 查询用户角色 - List rolesList = new LinkedList<>(); - userRolesVo.getRoles().stream() - .forEach(role -> rolesList.add(role.getRole())); - - - if (rolesList.contains("admin") || rolesList.contains("root") || rolesList.contains("problem_admin")) { // 超级管理员或管理员、题目管理员 - String jwt = jwtUtils.generateToken(userRolesVo.getUid()); - - ServletRequestAttributes servletRequestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes(); - HttpServletRequest request = servletRequestAttributes.getRequest(); - HttpServletResponse response = servletRequestAttributes.getResponse(); - - response.setHeader("Authorization", jwt); //放到信息头部 - response.setHeader("Access-Control-Expose-Headers", "Authorization"); - // 会话记录 - sessionEntityService.save(new Session().setUid(userRolesVo.getUid()) - .setIp(IpUtils.getUserIpAddr(request)).setUserAgent(request.getHeader("User-Agent"))); - // 异步检查是否异地登录 - sessionEntityService.checkRemoteLogin(userRolesVo.getUid()); - - UserInfoVo userInfoVo = new UserInfoVo(); - BeanUtil.copyProperties(userRolesVo, userInfoVo, "roles"); - userInfoVo.setRoleList(userRolesVo.getRoles() - .stream() - .map(Role::getRole) - .collect(Collectors.toList())); - - return userInfoVo; - } else { - throw new StatusAccessDeniedException("该账号并非管理员账号,无权登录!"); - } - } - - public void logout(){ - SecurityUtils.getSubject().logout(); - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/announcement/AdminAnnouncementManager.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/announcement/AdminAnnouncementManager.java deleted file mode 100644 index 82aa69a..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/announcement/AdminAnnouncementManager.java +++ /dev/null @@ -1,52 +0,0 @@ -package top.hcode.hoj.manager.admin.announcement; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.pojo.entity.common.Announcement; -import top.hcode.hoj.pojo.vo.AnnouncementVo; -import top.hcode.hoj.dao.common.AnnouncementEntityService; - - -/** - * @Author: Himit_ZH - * @Date: 2022/3/9 21:40 - * @Description: - */ -@Component -public class AdminAnnouncementManager { - - @Autowired - private AnnouncementEntityService announcementEntityService; - - public IPage getAnnouncementList(Integer limit, Integer currentPage) { - - if (currentPage == null || currentPage < 1) currentPage = 1; - if (limit == null || limit < 1) limit = 10; - return announcementEntityService.getAnnouncementList(limit, currentPage, false); - - } - - public void deleteAnnouncement(long aid) throws StatusFailException { - boolean isOk = announcementEntityService.removeById(aid); - if (!isOk) { - throw new StatusFailException("删除失败"); - } - } - - - public void addAnnouncement(Announcement announcement) throws StatusFailException { - boolean isOk = announcementEntityService.save(announcement); - if (!isOk) { - throw new StatusFailException("添加失败"); - } - } - - public void updateAnnouncement(Announcement announcement) throws StatusFailException { - boolean isOk = announcementEntityService.saveOrUpdate(announcement); - if (!isOk) { - throw new StatusFailException("修改失败"); - } - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestAnnouncementManager.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestAnnouncementManager.java deleted file mode 100644 index 861fc7d..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestAnnouncementManager.java +++ /dev/null @@ -1,59 +0,0 @@ -package top.hcode.hoj.manager.admin.contest; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; -import org.springframework.transaction.annotation.Transactional; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.pojo.dto.AnnouncementDto; -import top.hcode.hoj.pojo.entity.contest.ContestAnnouncement; -import top.hcode.hoj.pojo.vo.AnnouncementVo; -import top.hcode.hoj.dao.common.AnnouncementEntityService; -import top.hcode.hoj.dao.contest.ContestAnnouncementEntityService; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/9 11:19 - * @Description: - */ -@Component -public class AdminContestAnnouncementManager { - - @Autowired - private AnnouncementEntityService announcementEntityService; - - @Autowired - private ContestAnnouncementEntityService contestAnnouncementEntityService; - - public IPage getAnnouncementList(Integer limit, Integer currentPage, Long cid){ - - if (currentPage == null || currentPage < 1) currentPage = 1; - if (limit == null || limit < 1) limit = 10; - return announcementEntityService.getContestAnnouncement(cid, false, limit, currentPage); - } - - public void deleteAnnouncement(Long aid) throws StatusFailException { - boolean isOk = announcementEntityService.removeById(aid); - if (!isOk) { - throw new StatusFailException("删除失败!"); - } - } - - @Transactional(rollbackFor = Exception.class) - public void addAnnouncement(AnnouncementDto announcementDto) throws StatusFailException { - boolean saveAnnouncement = announcementEntityService.save(announcementDto.getAnnouncement()); - boolean saveContestAnnouncement = contestAnnouncementEntityService.saveOrUpdate(new ContestAnnouncement() - .setAid(announcementDto.getAnnouncement().getId()) - .setCid(announcementDto.getCid())); - if (!saveAnnouncement || !saveContestAnnouncement) { - throw new StatusFailException("添加失败"); - } - } - - public void updateAnnouncement(AnnouncementDto announcementDto) throws StatusFailException { - boolean isOk = announcementEntityService.saveOrUpdate(announcementDto.getAnnouncement()); - if (!isOk) { // 删除成功 - throw new StatusFailException("更新失败!"); - } - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestManager.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestManager.java deleted file mode 100644 index 20d3609..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestManager.java +++ /dev/null @@ -1,179 +0,0 @@ -package top.hcode.hoj.manager.admin.contest; - -import cn.hutool.core.bean.BeanUtil; -import cn.hutool.json.JSONObject; -import cn.hutool.json.JSONUtil; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import org.apache.shiro.SecurityUtils; -import org.apache.shiro.session.Session; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; -import org.springframework.util.StringUtils; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.exception.StatusForbiddenException; -import top.hcode.hoj.common.exception.StatusSystemErrorException; -import top.hcode.hoj.pojo.entity.contest.Contest; -import top.hcode.hoj.pojo.entity.contest.ContestRegister; -import top.hcode.hoj.pojo.vo.AdminContestVo; -import top.hcode.hoj.pojo.vo.UserRolesVo; -import top.hcode.hoj.dao.contest.ContestRegisterEntityService; -import top.hcode.hoj.dao.contest.ContestEntityService; -import top.hcode.hoj.utils.Constants; - -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/9 11:20 - * @Description: - */ -@Component -public class AdminContestManager { - - @Autowired - private ContestEntityService contestEntityService; - - @Autowired - private ContestRegisterEntityService contestRegisterEntityService; - - public IPage getContestList(Integer limit, Integer currentPage, String keyword) { - - if (currentPage == null || currentPage < 1) currentPage = 1; - if (limit == null || limit < 1) limit = 10; - IPage iPage = new Page<>(currentPage, limit); - QueryWrapper queryWrapper = new QueryWrapper<>(); - // 过滤密码 - queryWrapper.select(Contest.class, info -> !info.getColumn().equals("pwd")); - if (!StringUtils.isEmpty(keyword)) { - keyword = keyword.trim(); - queryWrapper - .like("title", keyword).or() - .like("id", keyword); - } - queryWrapper.eq("is_group", false).orderByDesc("start_time"); - return contestEntityService.page(iPage, queryWrapper); - } - - public AdminContestVo getContest(Long cid) throws StatusFailException, StatusForbiddenException { - // 获取本场比赛的状态 - Contest contest = contestEntityService.getById(cid); - if (contest == null) { // 查询不存在 - throw new StatusFailException("查询失败:该比赛不存在,请检查参数cid是否准确!"); - } - // 获取当前登录的用户 - UserRolesVo userRolesVo = (UserRolesVo) SecurityUtils.getSubject().getSession().getAttribute("userInfo"); - - // 是否为超级管理员 - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - // 只有超级管理员和比赛拥有者才能操作 - if (!isRoot && !userRolesVo.getUid().equals(contest.getUid())) { - throw new StatusForbiddenException("对不起,你无权限操作!"); - } - AdminContestVo adminContestVo = BeanUtil.copyProperties(contest, AdminContestVo.class, "starAccount"); - if (StringUtils.isEmpty(contest.getStarAccount())) { - adminContestVo.setStarAccount(new ArrayList<>()); - } else { - JSONObject jsonObject = JSONUtil.parseObj(contest.getStarAccount()); - List starAccount = jsonObject.get("star_account", List.class); - adminContestVo.setStarAccount(starAccount); - } - return adminContestVo; - } - - public void deleteContest(Long cid) throws StatusFailException { - boolean isOk = contestEntityService.removeById(cid); - /* - contest的id为其他表的外键的表中的对应数据都会被一起删除! - */ - if (!isOk) { // 删除成功 - throw new StatusFailException("删除失败"); - } - } - - public void addContest(AdminContestVo adminContestVo) throws StatusFailException { - Contest contest = BeanUtil.copyProperties(adminContestVo, Contest.class, "starAccount"); - JSONObject accountJson = new JSONObject(); - if (adminContestVo.getStarAccount() == null) { - accountJson.set("star_account", new ArrayList<>()); - } else { - accountJson.set("star_account", adminContestVo.getStarAccount()); - } - contest.setStarAccount(accountJson.toString()); - boolean isOk = contestEntityService.save(contest); - if (!isOk) { // 删除成功 - throw new StatusFailException("添加失败"); - } - } - - public void cloneContest(Long cid) throws StatusSystemErrorException { - Contest contest = contestEntityService.getById(cid); - if (contest == null){ - throw new StatusSystemErrorException("该比赛不存在,无法克隆!"); - } - // 获取当前登录的用户 - UserRolesVo userRolesVo = (UserRolesVo) SecurityUtils.getSubject().getSession().getAttribute("userInfo"); - contest.setUid(userRolesVo.getUid()) - .setAuthor(userRolesVo.getUsername()) - .setSource(cid.intValue()) - .setId(null) - .setGmtCreate(null) - .setGmtModified(null); - contest.setTitle(contest.getTitle()+" [Cloned]"); - boolean isOk = contestEntityService.save(contest); - - } - - public void updateContest(AdminContestVo adminContestVo) throws StatusForbiddenException, StatusFailException { - // 获取当前登录的用户 - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - // 是否为超级管理员 - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - // 只有超级管理员和比赛拥有者才能操作 - if (!isRoot && !userRolesVo.getUid().equals(adminContestVo.getUid())) { - throw new StatusForbiddenException("对不起,你无权限操作!"); - } - Contest contest = BeanUtil.copyProperties(adminContestVo, Contest.class, "starAccount"); - JSONObject accountJson = new JSONObject(); - accountJson.set("star_account", adminContestVo.getStarAccount()); - contest.setStarAccount(accountJson.toString()); - Contest oldContest = contestEntityService.getById(contest.getId()); - boolean isOk = contestEntityService.saveOrUpdate(contest); - if (isOk) { - if (!contest.getAuth().equals(Constants.Contest.AUTH_PUBLIC.getCode())) { - if (!Objects.equals(oldContest.getPwd(), contest.getPwd())) { // 改了比赛密码则需要删掉已有的注册比赛用户 - UpdateWrapper updateWrapper = new UpdateWrapper<>(); - updateWrapper.eq("cid", contest.getId()); - contestRegisterEntityService.remove(updateWrapper); - } - } - } else { - throw new StatusFailException("修改失败"); - } - } - - public void changeContestVisible(Long cid, String uid, Boolean visible) throws StatusFailException, StatusForbiddenException { - // 获取当前登录的用户 - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - // 是否为超级管理员 - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - // 只有超级管理员和比赛拥有者才能操作 - if (!isRoot && !userRolesVo.getUid().equals(uid)) { - throw new StatusForbiddenException("对不起,你无权限操作!"); - } - - boolean isOK = contestEntityService.saveOrUpdate(new Contest().setId(cid).setVisible(visible)); - - if (!isOK) { - throw new StatusFailException("修改失败"); - } - } - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestProblemManager.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestProblemManager.java deleted file mode 100644 index d63f1f6..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/contest/AdminContestProblemManager.java +++ /dev/null @@ -1,341 +0,0 @@ -package top.hcode.hoj.manager.admin.contest; - -import cn.hutool.core.io.FileUtil; -import cn.hutool.core.map.MapUtil; -import top.hcode.hoj.dao.contest.ContestEntityService; -import top.hcode.hoj.pojo.entity.contest.Contest; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import org.apache.shiro.SecurityUtils; -import org.apache.shiro.session.Session; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; -import org.springframework.transaction.annotation.Transactional; -import org.springframework.util.StringUtils; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.exception.StatusForbiddenException; -import top.hcode.hoj.crawler.problem.ProblemStrategy; -import top.hcode.hoj.manager.admin.problem.RemoteProblemManager; -import top.hcode.hoj.pojo.dto.ContestProblemDto; -import top.hcode.hoj.pojo.dto.ProblemDto; -import top.hcode.hoj.pojo.entity.contest.ContestProblem; -import top.hcode.hoj.pojo.entity.judge.Judge; -import top.hcode.hoj.pojo.entity.problem.Problem; -import top.hcode.hoj.pojo.vo.UserRolesVo; -import top.hcode.hoj.dao.contest.ContestProblemEntityService; -import top.hcode.hoj.dao.judge.JudgeEntityService; -import top.hcode.hoj.dao.problem.ProblemEntityService; -import top.hcode.hoj.utils.Constants; - -import java.io.File; -import java.util.*; -import java.util.stream.Collectors; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/9 11:20 - * @Description: - */ -@Component -public class AdminContestProblemManager { - - @Autowired - private ContestProblemEntityService contestProblemEntityService; - - @Autowired - private ProblemEntityService problemEntityService; - - @Autowired - private JudgeEntityService judgeEntityService; - - @Autowired - private RemoteProblemManager remoteProblemManager; - - @Autowired - private ContestEntityService contestEntityService; - - public HashMap getProblemList(Integer limit, Integer currentPage, String keyword, - Long cid, Integer problemType, String oj) { - if (currentPage == null || currentPage < 1) currentPage = 1; - if (limit == null || limit < 1) limit = 10; - IPage iPage = new Page<>(currentPage, limit); - // 根据cid在ContestProblem表中查询到对应pid集合 - QueryWrapper contestProblemQueryWrapper = new QueryWrapper<>(); - contestProblemQueryWrapper.eq("cid", cid); - List pidList = new LinkedList<>(); - - List contestProblemList = contestProblemEntityService.list(contestProblemQueryWrapper); - HashMap contestProblemMap = new HashMap<>(); - contestProblemList.forEach(contestProblem -> { - contestProblemMap.put(contestProblem.getPid(), contestProblem); - pidList.add(contestProblem.getPid()); - }); - - HashMap contestProblem = new HashMap<>(); - - QueryWrapper problemQueryWrapper = new QueryWrapper<>(); - - if (problemType != null) { // 必备条件 隐藏的不可取来做比赛题目 - problemQueryWrapper.eq("is_group", false) - // vj题目不限制赛制 - .and(wrapper -> wrapper.eq("type", problemType) - .or().eq("is_remote", true)) - .ne("auth", 2); // 同时需要与比赛相同类型的题目,权限需要是公开的(隐藏的不可加入!) - Contest contest = contestEntityService.getById(cid); - if (contest.getGid() != null) { //团队比赛不能查看公共题库的隐藏题目 - problemQueryWrapper.ne("auth", 3); - } - } - - // 逻辑判断,如果是查询已有的就应该是in,如果是查询不要重复的,使用not in - if (problemType != null) { - problemQueryWrapper.notIn(pidList.size() > 0, "id", pidList); - } else { - problemQueryWrapper.in(pidList.size() > 0, "id", pidList); - } - - // 根据oj筛选过滤 - if (oj != null && !"All".equals(oj)) { - if (!Constants.RemoteOJ.isRemoteOJ(oj)) { - problemQueryWrapper.eq("is_remote", false); - } else { - problemQueryWrapper.eq("is_remote", true).likeRight("problem_id", oj); - } - } - - if (!StringUtils.isEmpty(keyword)) { - problemQueryWrapper.and(wrapper -> wrapper.like("title", keyword).or() - .like("problem_id", keyword).or() - .like("author", keyword)); - } - - if (pidList.size() == 0 && problemType == null) { - problemQueryWrapper = new QueryWrapper<>(); - problemQueryWrapper.eq("id", null); - } - - IPage problemListPage = problemEntityService.page(iPage, problemQueryWrapper); - - if (pidList.size() > 0 && problemType == null) { - List problemList = problemListPage.getRecords(); - - List sortedProblemList = problemList.stream().sorted(Comparator.comparing(Problem::getId, (a, b) -> { - ContestProblem x = contestProblemMap.get(a); - ContestProblem y = contestProblemMap.get(b); - if (x == null && y != null) { - return 1; - } else if (x != null && y == null) { - return -1; - } else if (x == null) { - return -1; - } else { - return x.getDisplayId().compareTo(y.getDisplayId()); - } - })).collect(Collectors.toList()); - problemListPage.setRecords(sortedProblemList); - } - - contestProblem.put("problemList", problemListPage); - contestProblem.put("contestProblemMap", contestProblemMap); - - return contestProblem; - } - - public Problem getProblem(Long pid) throws StatusFailException, StatusForbiddenException { - - Problem problem = problemEntityService.getById(pid); - - if (problem != null) { // 查询成功 - // 获取当前登录的用户 - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - boolean isProblemAdmin = SecurityUtils.getSubject().hasRole("problem_admin"); - // 只有超级管理员和题目管理员、题目创建者才能操作 - if (!isRoot && !isProblemAdmin && !userRolesVo.getUsername().equals(problem.getAuthor())) { - throw new StatusForbiddenException("对不起,你无权限查看题目!"); - } - - return problem; - } else { - throw new StatusFailException("查询失败!"); - } - } - - public void deleteProblem(Long pid, Long cid) { - // 比赛id不为null,表示就是从比赛列表移除而已 - if (cid != null) { - QueryWrapper contestProblemQueryWrapper = new QueryWrapper<>(); - contestProblemQueryWrapper.eq("cid", cid).eq("pid", pid); - contestProblemEntityService.remove(contestProblemQueryWrapper); - // 把该题目在比赛的提交全部删掉 - UpdateWrapper judgeUpdateWrapper = new UpdateWrapper<>(); - judgeUpdateWrapper.eq("cid", cid).eq("pid", pid); - judgeEntityService.remove(judgeUpdateWrapper); - } else { - /* - problem的id为其他表的外键的表中的对应数据都会被一起删除! - */ - problemEntityService.removeById(pid); - } - - if (cid == null) { - FileUtil.del(Constants.File.TESTCASE_BASE_FOLDER.getPath() + File.separator + "problem_" + pid); - } - } - - public Map addProblem(ProblemDto problemDto) throws StatusFailException { - - QueryWrapper queryWrapper = new QueryWrapper<>(); - queryWrapper.eq("problem_id", problemDto.getProblem().getProblemId().toUpperCase()); - Problem problem = problemEntityService.getOne(queryWrapper); - if (problem != null) { - throw new StatusFailException("该题目的Problem ID已存在,请更换!"); - } - // 设置为比赛题目 - problemDto.getProblem().setAuth(3); - boolean isOk = problemEntityService.adminAddProblem(problemDto); - if (isOk) { // 添加成功 - // 顺便返回新的题目id,好下一步添加外键操作 - return MapUtil.builder().put("pid", problemDto.getProblem().getId()).map(); - } else { - throw new StatusFailException("添加失败"); - } - } - - public void updateProblem(ProblemDto problemDto) throws StatusForbiddenException, StatusFailException { - // 获取当前登录的用户 - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - boolean isProblemAdmin = SecurityUtils.getSubject().hasRole("problem_admin"); - // 只有超级管理员和题目管理员、题目创建者才能操作 - if (!isRoot && !isProblemAdmin && !userRolesVo.getUsername().equals(problemDto.getProblem().getAuthor())) { - throw new StatusForbiddenException("对不起,你无权限修改题目!"); - } - - QueryWrapper queryWrapper = new QueryWrapper<>(); - queryWrapper.eq("problem_id", problemDto.getProblem().getProblemId().toUpperCase()); - Problem problem = problemEntityService.getOne(queryWrapper); - - // 如果problem_id不是原来的且已存在该problem_id,则修改失败! - if (problem != null && problem.getId().longValue() != problemDto.getProblem().getId()) { - throw new StatusFailException("当前的Problem ID 已被使用,请重新更换新的!"); - } - - // 记录修改题目的用户 - problemDto.getProblem().setModifiedUser(userRolesVo.getUsername()); - - boolean isOk = problemEntityService.adminUpdateProblem(problemDto); - if (!isOk) { - throw new StatusFailException("修改失败"); - } - } - - public ContestProblem getContestProblem(Long cid, Long pid) throws StatusFailException { - QueryWrapper queryWrapper = new QueryWrapper<>(); - queryWrapper.eq("cid", cid).eq("pid", pid); - ContestProblem contestProblem = contestProblemEntityService.getOne(queryWrapper); - if (contestProblem == null) { - throw new StatusFailException("查询失败"); - } - return contestProblem; - } - - public ContestProblem setContestProblem(ContestProblem contestProblem) throws StatusFailException { - boolean isOk = contestProblemEntityService.saveOrUpdate(contestProblem); - if (isOk) { - contestProblemEntityService.syncContestRecord(contestProblem.getPid(), contestProblem.getCid(), contestProblem.getDisplayId()); - return contestProblem; - } else { - throw new StatusFailException("更新失败"); - } - } - - @Transactional(rollbackFor = Exception.class) - public void addProblemFromPublic(ContestProblemDto contestProblemDto) throws StatusFailException { - - Long pid = contestProblemDto.getPid(); - Long cid = contestProblemDto.getCid(); - String displayId = contestProblemDto.getDisplayId(); - - QueryWrapper contestProblemQueryWrapper = new QueryWrapper<>(); - contestProblemQueryWrapper.eq("cid", cid) - .and(wrapper -> wrapper.eq("pid", pid) - .or() - .eq("display_id", displayId)); - ContestProblem contestProblem = contestProblemEntityService.getOne(contestProblemQueryWrapper, false); - if (contestProblem != null) { - throw new StatusFailException("添加失败,该题目已添加或者题目的比赛展示ID已存在!"); - } - - // 比赛中题目显示默认为原标题 - Problem problem = problemEntityService.getById(pid); - String displayName = problem.getTitle(); - - // 修改成比赛题目 - boolean updateProblem = problemEntityService.saveOrUpdate(problem.setAuth(3)); - - boolean isOk = contestProblemEntityService.saveOrUpdate(new ContestProblem() - .setCid(cid).setPid(pid).setDisplayTitle(displayName).setDisplayId(displayId)); - if (!isOk || !updateProblem) { - throw new StatusFailException("添加失败"); - } - } - - @Transactional(rollbackFor = Exception.class) - public void importContestRemoteOJProblem(String name, String problemId, Long cid, String displayId) throws StatusFailException { - QueryWrapper queryWrapper = new QueryWrapper<>(); - queryWrapper.eq("problem_id", name.toUpperCase() + "-" + problemId); - Problem problem = problemEntityService.getOne(queryWrapper, false); - - // 如果该题目不存在,需要先导入 - if (problem == null) { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - try { - ProblemStrategy.RemoteProblemInfo otherOJProblemInfo = remoteProblemManager.getOtherOJProblemInfo(name.toUpperCase(), problemId, userRolesVo.getUsername()); - if (otherOJProblemInfo != null) { - problem = remoteProblemManager.adminAddOtherOJProblem(otherOJProblemInfo, name); - if (problem == null) { - throw new StatusFailException("导入新题目失败!请重新尝试!"); - } - } else { - throw new StatusFailException("导入新题目失败!原因:可能是与该OJ链接超时或题号格式错误!"); - } - } catch (Exception e) { - throw new StatusFailException(e.getMessage()); - } - } - - QueryWrapper contestProblemQueryWrapper = new QueryWrapper<>(); - Problem finalProblem = problem; - contestProblemQueryWrapper.eq("cid", cid) - .and(wrapper -> wrapper.eq("pid", finalProblem.getId()) - .or() - .eq("display_id", displayId)); - ContestProblem contestProblem = contestProblemEntityService.getOne(contestProblemQueryWrapper, false); - if (contestProblem != null) { - throw new StatusFailException("添加失败,该题目已添加或者题目的比赛展示ID已存在!"); - } - - - // 比赛中题目显示默认为原标题 - String displayName = problem.getTitle(); - - // 修改成比赛题目 - boolean updateProblem = problemEntityService.saveOrUpdate(problem.setAuth(3)); - - boolean isOk = contestProblemEntityService.saveOrUpdate(new ContestProblem() - .setCid(cid).setPid(problem.getId()).setDisplayTitle(displayName).setDisplayId(displayId)); - - if (!isOk || !updateProblem) { - throw new StatusFailException("添加失败"); - } - } - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/discussion/AdminDiscussionManager.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/discussion/AdminDiscussionManager.java deleted file mode 100644 index 72a8f73..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/discussion/AdminDiscussionManager.java +++ /dev/null @@ -1,54 +0,0 @@ -package top.hcode.hoj.manager.admin.discussion; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.dao.discussion.DiscussionEntityService; -import top.hcode.hoj.dao.discussion.DiscussionReportEntityService; -import top.hcode.hoj.pojo.entity.discussion.Discussion; -import top.hcode.hoj.pojo.entity.discussion.DiscussionReport; -import top.hcode.hoj.pojo.vo.DiscussionReportVo; - -import java.util.List; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/9 16:02 - * @Description: - */ -@Component -public class AdminDiscussionManager { - - @Autowired - private DiscussionEntityService discussionEntityService; - - @Autowired - private DiscussionReportEntityService discussionReportEntityService; - - public void updateDiscussion(Discussion discussion) throws StatusFailException { - boolean isOk = discussionEntityService.updateById(discussion); - if (!isOk) { - throw new StatusFailException("修改失败"); - } - } - - public void removeDiscussion(List didList) throws StatusFailException { - boolean isOk = discussionEntityService.removeByIds(didList); - if (!isOk) { - throw new StatusFailException("删除失败"); - } - } - - public IPage getDiscussionReport(Integer limit, Integer currentPage) { - return discussionReportEntityService.getDiscussionReportList(limit,currentPage); - } - - public void updateDiscussionReport(DiscussionReport discussionReport) throws StatusFailException { - boolean isOk = discussionReportEntityService.updateById(discussionReport); - if (!isOk) { - throw new StatusFailException("修改失败"); - } - } - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/problem/AdminGroupProblemManager.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/problem/AdminGroupProblemManager.java deleted file mode 100644 index 67278c1..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/problem/AdminGroupProblemManager.java +++ /dev/null @@ -1,74 +0,0 @@ -package top.hcode.hoj.manager.admin.problem; - -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import org.springframework.stereotype.Component; -import org.springframework.util.StringUtils; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.dao.problem.ProblemEntityService; -import top.hcode.hoj.pojo.dto.ChangeGroupProblemProgressDto; -import top.hcode.hoj.pojo.entity.problem.Problem; - -import javax.annotation.Resource; - -/** - * @Author Himit_ZH - * @Date 2022/4/13 - */ -@Component -public class AdminGroupProblemManager { - - @Resource - private ProblemEntityService problemEntityService; - - public IPage list(Integer currentPage, Integer limit, String keyword, Long gid) { - if (currentPage == null || currentPage < 1) currentPage = 1; - if (limit == null || limit < 1) limit = 10; - IPage iPage = new Page<>(currentPage, limit); - QueryWrapper problemQueryWrapper = new QueryWrapper<>(); - problemQueryWrapper.select("id", "gid", "apply_public_progress", "problem_id", "title", "author", "type", "judge_mode") - .eq(gid != null, "gid", gid) - .isNotNull("gid") - .isNotNull("apply_public_progress") - .orderByAsc("apply_public_progress", "gid"); - - if (!StringUtils.isEmpty(keyword)) { - problemQueryWrapper.and(wrapper -> wrapper.like("title", keyword).or() - .like("author", keyword).or() - .like("problem_id", keyword)); - } - - return problemEntityService.page(iPage, problemQueryWrapper); - } - - public void changeProgress(ChangeGroupProblemProgressDto changeGroupProblemProgressDto) throws StatusFailException { - Long pid = changeGroupProblemProgressDto.getPid(); - Integer progress = changeGroupProblemProgressDto.getProgress(); - if (pid == null || progress == null) { - throw new StatusFailException("请求参数pid或者progress不能为空!"); - } - QueryWrapper problemQueryWrapper = new QueryWrapper<>(); - problemQueryWrapper.select("id", "is_group", "gid", "apply_public_progress").eq("id", pid); - Problem problem = problemEntityService.getOne(problemQueryWrapper); - if (problem == null) { - throw new StatusFailException("错误:当前题目已不存在!"); - } - problem.setApplyPublicProgress(progress); - switch (progress) { - case 1: - case 3: - problem.setIsGroup(true); - break; - case 2: - problem.setIsGroup(false); - break; - default: - throw new StatusFailException("请求参数错误:progress请使用1~3"); - } - boolean isOk = problemEntityService.updateById(problem); - if (!isOk) { - throw new StatusFailException("修改失败!"); - } - } -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/problem/AdminProblemManager.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/problem/AdminProblemManager.java deleted file mode 100644 index 02efd86..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/problem/AdminProblemManager.java +++ /dev/null @@ -1,264 +0,0 @@ -package top.hcode.hoj.manager.admin.problem; - -import cn.hutool.core.io.FileUtil; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import org.apache.shiro.SecurityUtils; -import org.apache.shiro.session.Session; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.cloud.context.config.annotation.RefreshScope; -import org.springframework.stereotype.Component; -import org.springframework.transaction.annotation.Transactional; -import org.springframework.util.StringUtils; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.exception.StatusForbiddenException; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.crawler.problem.ProblemStrategy; -import top.hcode.hoj.judge.Dispatcher; -import top.hcode.hoj.pojo.dto.ProblemDto; -import top.hcode.hoj.pojo.dto.CompileDTO; -import top.hcode.hoj.pojo.entity.judge.Judge; -import top.hcode.hoj.pojo.entity.problem.*; -import top.hcode.hoj.pojo.vo.UserRolesVo; -import top.hcode.hoj.dao.judge.JudgeEntityService; -import top.hcode.hoj.dao.problem.ProblemCaseEntityService; -import top.hcode.hoj.dao.problem.ProblemEntityService; -import top.hcode.hoj.utils.Constants; - -import javax.annotation.Resource; -import java.io.File; -import java.util.List; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/9 16:32 - * @Description: - */ - -@Component -@RefreshScope -public class AdminProblemManager { - @Autowired - private ProblemEntityService problemEntityService; - - @Autowired - private ProblemCaseEntityService problemCaseEntityService; - - @Autowired - private Dispatcher dispatcher; - - @Value("${hoj.judge.token}") - private String judgeToken; - - @Resource - private JudgeEntityService judgeEntityService; - - @Autowired - private RemoteProblemManager remoteProblemManager; - - public IPage getProblemList(Integer limit, Integer currentPage, String keyword, Integer auth, String oj) { - if (currentPage == null || currentPage < 1) currentPage = 1; - if (limit == null || limit < 1) limit = 10; - IPage iPage = new Page<>(currentPage, limit); - IPage problemList; - - QueryWrapper queryWrapper = new QueryWrapper<>(); - queryWrapper.eq("is_group", false) - .orderByDesc("id"); - - // 根据oj筛选过滤 - if (oj != null && !"All".equals(oj)) { - if (!Constants.RemoteOJ.isRemoteOJ(oj)) { - queryWrapper.eq("is_remote", false); - } else { - queryWrapper.eq("is_remote", true).likeRight("problem_id", oj); - } - } - - if (auth != null && auth != 0) { - queryWrapper.eq("auth", auth); - } - - if (!StringUtils.isEmpty(keyword)) { - final String key = keyword.trim(); - queryWrapper.and(wrapper -> wrapper.like("title", key).or() - .like("author", key).or() - .like("problem_id", key)); - problemList = problemEntityService.page(iPage, queryWrapper); - } else { - problemList = problemEntityService.page(iPage, queryWrapper); - } - return problemList; - } - - public Problem getProblem(Long pid) throws StatusForbiddenException, StatusFailException { - Problem problem = problemEntityService.getById(pid); - - if (problem != null) { // 查询成功 - // 获取当前登录的用户 - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - boolean isProblemAdmin = SecurityUtils.getSubject().hasRole("problem_admin"); - // 只有超级管理员和题目管理员、题目创建者才能操作 - if (!isRoot && !isProblemAdmin && !userRolesVo.getUsername().equals(problem.getAuthor())) { - throw new StatusForbiddenException("对不起,你无权限查看题目!"); - } - - return problem; - } else { - throw new StatusFailException("查询失败!"); - } - } - - public void deleteProblem(Long pid) throws StatusFailException { - boolean isOk = problemEntityService.removeById(pid); - /* - problem的id为其他表的外键的表中的对应数据都会被一起删除! - */ - if (isOk) { // 删除成功 - FileUtil.del(Constants.File.TESTCASE_BASE_FOLDER.getPath() + File.separator + "problem_" + pid); - } else { - throw new StatusFailException("删除失败!"); - } - } - - public void addProblem(ProblemDto problemDto) throws StatusFailException { - QueryWrapper queryWrapper = new QueryWrapper<>(); - queryWrapper.eq("problem_id", problemDto.getProblem().getProblemId().toUpperCase()); - Problem problem = problemEntityService.getOne(queryWrapper); - if (problem != null) { - throw new StatusFailException("该题目的Problem ID已存在,请更换!"); - } - - boolean isOk = problemEntityService.adminAddProblem(problemDto); - if (!isOk) { - throw new StatusFailException("添加失败"); - } - } - - @Transactional(rollbackFor = Exception.class) - public void updateProblem(ProblemDto problemDto) throws StatusForbiddenException, StatusFailException { - // 获取当前登录的用户 - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - boolean isProblemAdmin = SecurityUtils.getSubject().hasRole("problem_admin"); - // 只有超级管理员和题目管理员、题目创建者才能操作 - if (!isRoot && !isProblemAdmin && !userRolesVo.getUsername().equals(problemDto.getProblem().getAuthor())) { - throw new StatusForbiddenException("对不起,你无权限修改题目!"); - } - - String problemId = problemDto.getProblem().getProblemId().toUpperCase(); - QueryWrapper queryWrapper = new QueryWrapper<>(); - queryWrapper.eq("problem_id", problemId); - Problem problem = problemEntityService.getOne(queryWrapper); - - // 如果problem_id不是原来的且已存在该problem_id,则修改失败! - if (problem != null && problem.getId().longValue() != problemDto.getProblem().getId()) { - throw new StatusFailException("当前的Problem ID 已被使用,请重新更换新的!"); - } - - // 记录修改题目的用户 - problemDto.getProblem().setModifiedUser(userRolesVo.getUsername()); - - boolean result = problemEntityService.adminUpdateProblem(problemDto); - if (result) { // 更新成功 - if (problem == null) { // 说明改了problemId,同步一下judge表 - UpdateWrapper judgeUpdateWrapper = new UpdateWrapper<>(); - judgeUpdateWrapper.eq("pid", problemDto.getProblem().getId()) - .set("display_pid", problemId); - judgeEntityService.update(judgeUpdateWrapper); - } - - } else { - throw new StatusFailException("修改失败"); - } - } - - public List getProblemCases(Long pid, Boolean isUpload) { - QueryWrapper problemCaseQueryWrapper = new QueryWrapper<>(); - problemCaseQueryWrapper.eq("pid", pid).eq("status", 0); - if (isUpload) { - problemCaseQueryWrapper.last("order by length(input) asc,input asc"); - } - return problemCaseEntityService.list(problemCaseQueryWrapper); - } - - public CommonResult compileSpj(CompileDTO compileDTO) { - if (StringUtils.isEmpty(compileDTO.getCode()) || - StringUtils.isEmpty(compileDTO.getLanguage())) { - return CommonResult.errorResponse("参数不能为空!"); - } - - compileDTO.setToken(judgeToken); - return dispatcher.dispatcherJudge("compile", "/compile-spj", compileDTO); - } - - public CommonResult compileInteractive(CompileDTO compileDTO) { - if (StringUtils.isEmpty(compileDTO.getCode()) || - StringUtils.isEmpty(compileDTO.getLanguage())) { - return CommonResult.errorResponse("参数不能为空!"); - } - - compileDTO.setToken(judgeToken); - return dispatcher.dispatcherJudge("compile", "/compile-interactive", compileDTO); - } - - @Transactional(rollbackFor = Exception.class) - public void importRemoteOJProblem(String name, String problemId) throws StatusFailException { - QueryWrapper queryWrapper = new QueryWrapper<>(); - queryWrapper.eq("problem_id", name.toUpperCase() + "-" + problemId); - Problem problem = problemEntityService.getOne(queryWrapper); - if (problem != null) { - throw new StatusFailException("该题目已添加,请勿重复添加!"); - } - - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - try { - ProblemStrategy.RemoteProblemInfo otherOJProblemInfo = remoteProblemManager.getOtherOJProblemInfo(name.toUpperCase(), problemId, userRolesVo.getUsername()); - if (otherOJProblemInfo != null) { - Problem importProblem = remoteProblemManager.adminAddOtherOJProblem(otherOJProblemInfo, name); - if (importProblem == null) { - throw new StatusFailException("导入新题目失败!请重新尝试!"); - } - } else { - throw new StatusFailException("导入新题目失败!原因:可能是与该OJ链接超时或题号格式错误!"); - } - } catch (Exception e) { - throw new StatusFailException(e.getMessage()); - } - } - - public void changeProblemAuth(Problem problem) throws StatusFailException, StatusForbiddenException { - // 普通管理员只能将题目变成隐藏题目和比赛题目 - boolean root = SecurityUtils.getSubject().hasRole("root"); - - boolean problemAdmin = SecurityUtils.getSubject().hasRole("problem_admin"); - - if (!problemAdmin && !root && problem.getAuth() == 1) { - throw new StatusForbiddenException("修改失败!你无权限公开题目!"); - } - - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - UpdateWrapper problemUpdateWrapper = new UpdateWrapper<>(); - problemUpdateWrapper.eq("id", problem.getId()) - .set("auth", problem.getAuth()) - .set("modified_user", userRolesVo.getUsername()); - - boolean isOk = problemEntityService.update(problemUpdateWrapper); - if (!isOk) { - throw new StatusFailException("修改失败"); - } - } - - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/problem/RemoteProblemManager.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/problem/RemoteProblemManager.java deleted file mode 100644 index eba4b63..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/problem/RemoteProblemManager.java +++ /dev/null @@ -1,149 +0,0 @@ -package top.hcode.hoj.manager.admin.problem; - -import cn.hutool.core.collection.CollectionUtil; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; -import org.springframework.transaction.annotation.Transactional; -import top.hcode.hoj.crawler.language.LanguageContext; -import top.hcode.hoj.crawler.problem.*; -import top.hcode.hoj.pojo.entity.problem.*; -import top.hcode.hoj.dao.problem.*; - -import java.util.HashMap; -import java.util.LinkedList; -import java.util.List; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/9 17:33 - * @Description: - */ -@Component -public class RemoteProblemManager { - - @Autowired - private ProblemEntityService problemEntityService; - - @Autowired - private ProblemTagEntityService problemTagEntityService; - - @Autowired - private TagEntityService tagEntityService; - - @Autowired - private LanguageEntityService languageEntityService; - - @Autowired - private ProblemLanguageEntityService problemLanguageEntityService; - - - public ProblemStrategy.RemoteProblemInfo getOtherOJProblemInfo(String OJName, String problemId, String author) throws Exception { - - ProblemStrategy problemStrategy; - switch (OJName) { - case "HDU": - problemStrategy = new HDUProblemStrategy(); - break; - case "CF": - problemStrategy = new CFProblemStrategy(); - break; - case "POJ": - problemStrategy = new POJProblemStrategy(); - break; - case "GYM": - problemStrategy = new GYMProblemStrategy(); - break; - case "SPOJ": - problemStrategy = new SPOJProblemStrategy(); - break; - case "AC": - problemStrategy = new AtCoderProblemStrategy(); - break; - default: - throw new Exception("未知的OJ的名字,暂时不支持!"); - } - - ProblemContext problemContext = new ProblemContext(problemStrategy); - return problemContext.getProblemInfo(problemId, author); - } - - @Transactional(rollbackFor = Exception.class) - public Problem adminAddOtherOJProblem(ProblemStrategy.RemoteProblemInfo remoteProblemInfo, String OJName) { - - Problem problem = remoteProblemInfo.getProblem(); - boolean addProblemResult = problemEntityService.save(problem); - // 为新的其它oj题目添加对应的language - QueryWrapper languageQueryWrapper = new QueryWrapper<>(); - if (OJName.equals("GYM")) { - languageQueryWrapper.eq("oj", "CF"); - } else { - languageQueryWrapper.eq("oj", OJName); - } - List OJLanguageList = languageEntityService.list(languageQueryWrapper); - List problemLanguageList = new LinkedList<>(); - if (!CollectionUtil.isEmpty(remoteProblemInfo.getLangIdList())) { - LanguageContext languageContext = new LanguageContext(remoteProblemInfo.getRemoteOJ()); - List languageList = languageContext.buildLanguageListByIds(OJLanguageList, remoteProblemInfo.getLangIdList()); - for (Language language : languageList) { - problemLanguageList.add(new ProblemLanguage().setPid(problem.getId()).setLid(language.getId())); - } - } else { - for (Language language : OJLanguageList) { - problemLanguageList.add(new ProblemLanguage().setPid(problem.getId()).setLid(language.getId())); - } - } - boolean addProblemLanguageResult = problemLanguageEntityService.saveOrUpdateBatch(problemLanguageList); - - boolean addProblemTagResult = true; - List addTagList = remoteProblemInfo.getTagList(); - - List needAddTagList = new LinkedList<>(); - - HashMap tagFlag = new HashMap<>(); - - if (addTagList != null && addTagList.size() > 0) { - QueryWrapper tagQueryWrapper = new QueryWrapper<>(); - tagQueryWrapper.eq("oj", OJName); - List tagList = tagEntityService.list(tagQueryWrapper); - // 已存在的tag不进行添加 - for (Tag hasTag : tagList) { - tagFlag.put(hasTag.getName().toUpperCase(), hasTag); - } - for (Tag tmp : addTagList) { - Tag tag = tagFlag.get(tmp.getName().toUpperCase()); - if (tag == null) { - tmp.setOj(OJName); - needAddTagList.add(tmp); - } else { - needAddTagList.add(tag); - } - } - tagEntityService.saveOrUpdateBatch(needAddTagList); - - List problemTagList = new LinkedList<>(); - for (Tag tmp : needAddTagList) { - problemTagList.add(new ProblemTag().setTid(tmp.getId()).setPid(problem.getId())); - } - addProblemTagResult = problemTagEntityService.saveOrUpdateBatch(problemTagList); - } else { - QueryWrapper tagQueryWrapper = new QueryWrapper<>(); - tagQueryWrapper.eq("name", OJName); - Tag OJNameTag = tagEntityService.getOne(tagQueryWrapper, false); - if (OJNameTag == null) { - OJNameTag = new Tag(); - OJNameTag.setOj(OJName); - OJNameTag.setName(OJName); - tagEntityService.saveOrUpdate(OJNameTag); - } - addProblemTagResult = problemTagEntityService.saveOrUpdate(new ProblemTag().setTid(OJNameTag.getId()) - .setPid(problem.getId())); - } - - if (addProblemResult && addProblemTagResult && addProblemLanguageResult) { - return problem; - } else { - return null; - } - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/rejudge/RejudgeManager.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/rejudge/RejudgeManager.java deleted file mode 100644 index 153e87b..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/rejudge/RejudgeManager.java +++ /dev/null @@ -1,351 +0,0 @@ -package top.hcode.hoj.manager.admin.rejudge; - -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; -import org.apache.shiro.SecurityUtils; -import org.apache.shiro.session.Session; -import org.springframework.stereotype.Component; -import org.springframework.transaction.annotation.Transactional; -import org.springframework.util.StringUtils; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.dao.contest.ContestRecordEntityService; -import top.hcode.hoj.dao.judge.JudgeCaseEntityService; -import top.hcode.hoj.dao.judge.JudgeEntityService; -import top.hcode.hoj.dao.problem.ProblemEntityService; -import top.hcode.hoj.dao.user.UserAcproblemEntityService; -import top.hcode.hoj.judge.remote.RemoteJudgeDispatcher; -import top.hcode.hoj.judge.self.JudgeDispatcher; -import top.hcode.hoj.pojo.entity.contest.ContestRecord; -import top.hcode.hoj.pojo.entity.judge.Judge; -import top.hcode.hoj.pojo.entity.judge.JudgeCase; -import top.hcode.hoj.pojo.entity.problem.Problem; -import top.hcode.hoj.pojo.entity.user.UserAcproblem; -import top.hcode.hoj.pojo.vo.UserRolesVo; -import top.hcode.hoj.utils.Constants; - -import javax.annotation.Resource; -import java.util.*; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/9 16:21 - * @Description: - */ -@Component -public class RejudgeManager { - - @Resource - private JudgeEntityService judgeEntityService; - - @Resource - private UserAcproblemEntityService userAcproblemEntityService; - - @Resource - private ContestRecordEntityService contestRecordEntityService; - - @Resource - private JudgeCaseEntityService judgeCaseEntityService; - - @Resource - private ProblemEntityService problemEntityService; - - @Resource - private JudgeDispatcher judgeDispatcher; - - @Resource - private RemoteJudgeDispatcher remoteJudgeDispatcher; - - private static List penaltyStatus = Arrays.asList( - Constants.Judge.STATUS_PRESENTATION_ERROR.getStatus(), - Constants.Judge.STATUS_WRONG_ANSWER.getStatus(), - Constants.Judge.STATUS_TIME_LIMIT_EXCEEDED.getStatus(), - Constants.Judge.STATUS_MEMORY_LIMIT_EXCEEDED.getStatus(), - Constants.Judge.STATUS_RUNTIME_ERROR.getStatus()); - - - public Judge rejudge(Long submitId) throws StatusFailException { - Judge judge = judgeEntityService.getById(submitId); - - boolean isContestSubmission = judge.getCid() != 0; - - boolean hasSubmitIdRemoteRejudge = checkAndUpdateJudge(isContestSubmission, judge, submitId); - // 调用判题服务 - QueryWrapper problemQueryWrapper = new QueryWrapper<>(); - problemQueryWrapper.select("id", "is_remote", "problem_id") - .eq("id", judge.getPid()); - Problem problem = problemEntityService.getOne(problemQueryWrapper); - if (problem.getIsRemote()) { // 如果是远程oj判题 - remoteJudgeDispatcher.sendTask(judge.getSubmitId(), judge.getPid(), problem.getProblemId(), - isContestSubmission, hasSubmitIdRemoteRejudge); - } else { - judgeDispatcher.sendTask(judge.getSubmitId(), judge.getPid(), isContestSubmission); - } - return judge; - } - - @Transactional(rollbackFor = Exception.class) - public void rejudgeContestProblem(Long cid, Long pid) throws StatusFailException { - QueryWrapper queryWrapper = new QueryWrapper<>(); - queryWrapper.eq("cid", cid).eq("pid", pid); - List rejudgeList = judgeEntityService.list(queryWrapper); - - if (rejudgeList.size() == 0) { - throw new StatusFailException("当前该题目无提交,不可重判!"); - } - HashMap idMapStatus = new HashMap<>(); - // 全部设置默认值 - checkAndUpdateJudgeBatch(rejudgeList, idMapStatus); - QueryWrapper problemQueryWrapper = new QueryWrapper<>(); - problemQueryWrapper.select("id", "is_remote", "problem_id") - .eq("id", pid); - Problem problem = problemEntityService.getOne(problemQueryWrapper); - // 调用重判服务 - if (problem.getIsRemote()) { // 如果是远程oj判题 - for (Judge judge : rejudgeList) { - // 进入重判队列,等待调用判题服务 - remoteJudgeDispatcher.sendTask(judge.getSubmitId(), - pid, - problem.getProblemId(), - judge.getCid() != 0, - isHasSubmitIdRemoteRejudge(judge.getVjudgeSubmitId(), idMapStatus.get(judge.getSubmitId()))); - } - } else { - for (Judge judge : rejudgeList) { - // 进入重判队列,等待调用判题服务 - judgeDispatcher.sendTask(judge.getSubmitId(), judge.getPid(), judge.getCid() != 0); - } - } - - } - - @Transactional(rollbackFor = Exception.class) - public boolean checkAndUpdateJudge(Boolean isContestSubmission, Judge judge, Long submitId) throws StatusFailException { - // 如果是非比赛题目 - boolean resetContestRecordResult = true; - if (!isContestSubmission) { - // 重判前,需要将该题目对应记录表一并更新 - // 如果该题已经是AC通过状态,更新该题目的用户ac做题表 user_acproblem - if (judge.getStatus().intValue() == Constants.Judge.STATUS_ACCEPTED.getStatus().intValue()) { - QueryWrapper userAcproblemQueryWrapper = new QueryWrapper<>(); - userAcproblemQueryWrapper.eq("submit_id", judge.getSubmitId()); - userAcproblemEntityService.remove(userAcproblemQueryWrapper); - } - } else { - // 将对应比赛记录设置成默认值 - UpdateWrapper updateWrapper = new UpdateWrapper<>(); - updateWrapper.eq("submit_id", submitId).setSql("status=null,score=null"); - resetContestRecordResult = contestRecordEntityService.update(updateWrapper); - } - - // 清除该提交对应的测试点结果 - QueryWrapper judgeCaseQueryWrapper = new QueryWrapper<>(); - judgeCaseQueryWrapper.eq("submit_id", submitId); - judgeCaseEntityService.remove(judgeCaseQueryWrapper); - - boolean hasSubmitIdRemoteRejudge = isHasSubmitIdRemoteRejudge(judge.getVjudgeSubmitId(), judge.getStatus()); - - // 设置默认值 - judge.setStatus(Constants.Judge.STATUS_PENDING.getStatus()); // 开始进入判题队列 - judge.setVersion(judge.getVersion() + 1); - judge.setJudger("") - .setIsManual(false) - .setTime(null) - .setMemory(null) - .setErrorMessage(null) - .setOiRankScore(null) - .setScore(null); - boolean isUpdateJudgeOk = judgeEntityService.updateById(judge); - - if (!resetContestRecordResult || !isUpdateJudgeOk) { - throw new StatusFailException("重判失败!请重新尝试!"); - } - return hasSubmitIdRemoteRejudge; - } - - @Transactional(rollbackFor = Exception.class) - public void checkAndUpdateJudgeBatch(List rejudgeList, HashMap idMapStatus) throws StatusFailException { - List submitIdList = new LinkedList<>(); - // 全部设置默认值 - for (Judge judge : rejudgeList) { - idMapStatus.put(judge.getSubmitId(), judge.getStatus()); - judge.setStatus(Constants.Judge.STATUS_PENDING.getStatus()); // 开始进入判题队列 - judge.setVersion(judge.getVersion() + 1); - judge.setJudger("") - .setTime(null) - .setMemory(null) - .setErrorMessage(null) - .setOiRankScore(null) - .setIsManual(false) - .setScore(null); - submitIdList.add(judge.getSubmitId()); - } - boolean resetJudgeResult = judgeEntityService.updateBatchById(rejudgeList); - // 清除每个提交对应的测试点结果 - QueryWrapper judgeCaseQueryWrapper = new QueryWrapper<>(); - judgeCaseQueryWrapper.in("submit_id", submitIdList); - judgeCaseEntityService.remove(judgeCaseQueryWrapper); - // 将对应比赛记录设置成默认值 - UpdateWrapper updateWrapper = new UpdateWrapper<>(); - updateWrapper.in("submit_id", submitIdList).setSql("status=null,score=null"); - boolean resetContestRecordResult = contestRecordEntityService.update(updateWrapper); - - if (!resetContestRecordResult || !resetJudgeResult) { - throw new StatusFailException("重判失败!请重新尝试!"); - } - } - - private boolean isHasSubmitIdRemoteRejudge(Long vjudgeSubmitId, int status) { - boolean isHasSubmitIdRemoteRejudge = false; - if (vjudgeSubmitId != null && - (status == Constants.Judge.STATUS_SUBMITTED_FAILED.getStatus() - || status == Constants.Judge.STATUS_COMPILING.getStatus() - || status == Constants.Judge.STATUS_PENDING.getStatus() - || status == Constants.Judge.STATUS_JUDGING.getStatus() - || status == Constants.Judge.STATUS_SYSTEM_ERROR.getStatus())) { - isHasSubmitIdRemoteRejudge = true; - } - return isHasSubmitIdRemoteRejudge; - } - - @Transactional(rollbackFor = Exception.class) - public Judge manualJudge(Long submitId, Integer status, Integer score) throws StatusFailException { - QueryWrapper judgeQueryWrapper = new QueryWrapper<>(); - judgeQueryWrapper - .select("submit_id", "status", "judger", "cid", "pid", "uid") - .eq("submit_id", submitId); - Judge judge = judgeEntityService.getOne(judgeQueryWrapper); - if (judge == null) { - throw new StatusFailException("错误:该提交数据已不存在!"); - } - if (judge.getStatus().equals(Constants.Judge.STATUS_JUDGING.getStatus()) - || judge.getStatus().equals(Constants.Judge.STATUS_COMPILING.getStatus()) - || judge.getStatus().equals(Constants.Judge.STATUS_PENDING.getStatus())) { - throw new StatusFailException("错误:该提交正在评测中,无法修改,请稍后再尝试!"); - } - if (judge.getStatus().equals(Constants.Judge.STATUS_COMPILE_ERROR.getStatus())) { - throw new StatusFailException("错误:编译失败的提交无法修改!"); - } - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - UpdateWrapper judgeUpdateWrapper = new UpdateWrapper<>(); - judgeUpdateWrapper - .set("status", status) - .set("is_manual", true) - .set("judger", userRolesVo.getUsername()) - .eq("submit_id", judge.getSubmitId()); - Integer oiRankScore = null; - if (score != null) { - Problem problem = problemEntityService.getById(judge.getPid()); - if (problem != null && Objects.equals(problem.getType(), Constants.Contest.TYPE_OI.getCode()) - && problem.getIoScore() != null) { - if (score > problem.getIoScore()) { - score = problem.getIoScore(); - } else if (score < 0) { - score = 0; - } - oiRankScore = (int) Math.round(problem.getDifficulty() * 2 + 0.1 * score); - judgeUpdateWrapper.set("score", score) - .set("oi_rank_score", oiRankScore); - } else { - score = null; - } - } - - boolean isUpdateOK = judgeEntityService.update(judgeUpdateWrapper); - if (!isUpdateOK) { - throw new StatusFailException("错误:该提交正在评测中,无法取消,请稍后再尝试!"); - } - - // 如果原是AC,现在人工评测后不是AC,就移除user_acproblem表对应的记录 - if (Objects.equals(judge.getStatus(), Constants.Judge.STATUS_ACCEPTED.getStatus()) - && !Objects.equals(status, Constants.Judge.STATUS_ACCEPTED.getStatus())) { - QueryWrapper userAcproblemQueryWrapper = new QueryWrapper<>(); - userAcproblemQueryWrapper.eq("submit_id", judge.getSubmitId()); - userAcproblemEntityService.remove(userAcproblemQueryWrapper); - } else if (!Objects.equals(judge.getStatus(), Constants.Judge.STATUS_ACCEPTED.getStatus()) - && Objects.equals(status, Constants.Judge.STATUS_ACCEPTED.getStatus())) { - // 如果原先不是AC,现在人工评测后是AC,就更新user_acproblem表 - if (status.intValue() == Constants.Judge.STATUS_ACCEPTED.getStatus() && judge.getGid() == null) { - userAcproblemEntityService.saveOrUpdate(new UserAcproblem() - .setPid(judge.getPid()) - .setUid(judge.getUid()) - .setSubmitId(submitId) - ); - } - } - - if (judge.getCid() != 0) { - UpdateWrapper contestRecordUpdateWrapper = new UpdateWrapper<>(); - contestRecordUpdateWrapper.eq("submit_id", submitId) - .eq("cid", judge.getCid()); - if (Objects.equals(status, Constants.Judge.STATUS_ACCEPTED.getStatus())) { - contestRecordUpdateWrapper.set("status", Constants.Contest.RECORD_AC.getCode()); - } else if (penaltyStatus.contains(status)) { - contestRecordUpdateWrapper.set("status", Constants.Contest.RECORD_NOT_AC_PENALTY.getCode()); - } else { - contestRecordUpdateWrapper.set("status", Constants.Contest.RECORD_NOT_AC_NOT_PENALTY.getCode()); - } - contestRecordUpdateWrapper.set(score != null, "score", score); - contestRecordEntityService.update(contestRecordUpdateWrapper); - } - Judge res = new Judge(); - res.setSubmitId(submitId) - .setJudger(userRolesVo.getUsername()) - .setStatus(status) - .setScore(score) - .setOiRankScore(oiRankScore); - return res; - } - - @Transactional(rollbackFor = Exception.class) - public Judge cancelJudge(Long submitId) throws StatusFailException { - QueryWrapper judgeQueryWrapper = new QueryWrapper<>(); - judgeQueryWrapper - .select("submit_id", "status", "judger", "cid") - .eq("submit_id", submitId) - .last("for update"); - Judge judge = judgeEntityService.getOne(judgeQueryWrapper); - if (judge == null) { - throw new StatusFailException("错误:该提交数据已不存在!"); - } - if (judge.getStatus().equals(Constants.Judge.STATUS_JUDGING.getStatus()) - || judge.getStatus().equals(Constants.Judge.STATUS_COMPILING.getStatus()) - || (judge.getStatus().equals(Constants.Judge.STATUS_PENDING.getStatus()) - && !StringUtils.isEmpty(judge.getJudger()))) { - throw new StatusFailException("错误:该提交正在评测中,无法取消,请稍后再尝试!"); - } - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - UpdateWrapper judgeUpdateWrapper = new UpdateWrapper<>(); - judgeUpdateWrapper - .setSql("status=-4,score=null,oi_rank_score=null,is_manual=true,judger='" + userRolesVo.getUsername() + "'") - .eq("submit_id", judge.getSubmitId()); - boolean isUpdateOK = judgeEntityService.update(judgeUpdateWrapper); - if (!isUpdateOK) { - throw new StatusFailException("错误:该提交正在评测中,无法取消,请稍后再尝试!"); - } - - // 如果该题已经是AC通过状态,更新该题目的用户ac做题表 user_acproblem - if (judge.getStatus().intValue() == Constants.Judge.STATUS_ACCEPTED.getStatus().intValue()) { - QueryWrapper userAcproblemQueryWrapper = new QueryWrapper<>(); - userAcproblemQueryWrapper.eq("submit_id", judge.getSubmitId()); - userAcproblemEntityService.remove(userAcproblemQueryWrapper); - } - - if (judge.getCid() != 0) { - UpdateWrapper contestRecordUpdateWrapper = new UpdateWrapper<>(); - contestRecordUpdateWrapper.eq("submit_id", submitId) - .eq("cid", judge.getCid()) - .setSql("score=null") - .set("status", Constants.Contest.RECORD_NOT_AC_NOT_PENALTY.getCode()); - contestRecordEntityService.update(contestRecordUpdateWrapper); - } - Judge res = new Judge(); - res.setSubmitId(submitId) - .setJudger(userRolesVo.getUsername()) - .setStatus(Constants.Judge.STATUS_CANCELLED.getStatus()); - return res; - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/system/ConfigManager.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/system/ConfigManager.java deleted file mode 100644 index 4a528d2..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/system/ConfigManager.java +++ /dev/null @@ -1,514 +0,0 @@ -package top.hcode.hoj.manager.admin.system; - -import cn.hutool.core.io.FileUtil; -import cn.hutool.core.lang.Validator; -import cn.hutool.core.text.UnicodeUtil; -import cn.hutool.json.JSONObject; -import cn.hutool.json.JSONUtil; -import cn.hutool.system.oshi.OshiUtil; -import com.alibaba.nacos.api.NacosFactory; -import com.alibaba.nacos.api.exception.NacosException; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.cloud.client.ServiceInstance; -import org.springframework.cloud.client.discovery.DiscoveryClient; -import org.springframework.stereotype.Component; -import org.springframework.transaction.annotation.Transactional; -import org.springframework.util.CollectionUtils; -import org.springframework.util.StringUtils; -import org.springframework.web.client.RestTemplate; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.dao.common.FileEntityService; -import top.hcode.hoj.dao.judge.RemoteJudgeAccountEntityService; -import top.hcode.hoj.manager.email.EmailManager; -import top.hcode.hoj.pojo.dto.*; -import top.hcode.hoj.pojo.entity.common.File; -import top.hcode.hoj.pojo.entity.judge.RemoteJudgeAccount; -import top.hcode.hoj.pojo.vo.ConfigVo; -import top.hcode.hoj.utils.ConfigUtils; -import top.hcode.hoj.utils.Constants; - -import java.util.*; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/9 21:50 - * @Description: 动态修改网站配置,获取后台服务状态及判题服务器的状态 - */ - -@Component -@Slf4j(topic = "hoj") -public class ConfigManager { - @Autowired - private ConfigVo configVo; - - @Autowired - private EmailManager emailManager; - - @Autowired - private FileEntityService fileEntityService; - - @Autowired - private RemoteJudgeAccountEntityService remoteJudgeAccountEntityService; - - @Autowired - private ConfigUtils configUtils; - - @Autowired - private RestTemplate restTemplate; - - @Autowired - private DiscoveryClient discoveryClient; - - @Value("${service-url.name}") - private String judgeServiceName; - - @Value("${spring.application.name}") - private String currentServiceName; - - @Value("${spring.cloud.nacos.url}") - private String NACOS_URL; - - @Value("${spring.cloud.nacos.config.prefix}") - private String prefix; - - @Value("${spring.profiles.active}") - private String active; - - @Value("${spring.cloud.nacos.config.file-extension}") - private String fileExtension; - - @Value("${spring.cloud.nacos.config.group}") - private String GROUP; - - @Value("${spring.cloud.nacos.config.type}") - private String TYPE; - - @Value("${spring.cloud.nacos.config.username}") - private String nacosUsername; - - @Value("${spring.cloud.nacos.config.password}") - private String nacosPassword; - - /** - * @MethodName getServiceInfo - * @Params * @param null - * @Description 获取当前服务的相关信息以及当前系统的cpu情况,内存使用情况 - * @Return CommonResult - * @Since 2020/12/3 - */ - - public JSONObject getServiceInfo() { - - JSONObject result = new JSONObject(); - - List serviceInstances = discoveryClient.getInstances(currentServiceName); - - // 获取nacos中心配置所在的机器环境 - String response = restTemplate.getForObject(NACOS_URL + "/nacos/v1/ns/operator/metrics", String.class); - - JSONObject jsonObject = JSONUtil.parseObj(response); - // 获取当前数据后台所在机器环境 - int cores = OshiUtil.getCpuInfo().getCpuNum(); // 当前机器的cpu核数 - double cpuLoad = 100 - OshiUtil.getCpuInfo().getFree(); - String percentCpuLoad = String.format("%.2f", cpuLoad) + "%"; // 当前服务所在机器cpu使用率 - - double totalVirtualMemory = OshiUtil.getMemory().getTotal(); // 当前服务所在机器总内存 - double freePhysicalMemorySize = OshiUtil.getMemory().getAvailable(); // 当前服务所在机器空闲内存 - double value = freePhysicalMemorySize / totalVirtualMemory; - String percentMemoryLoad = String.format("%.2f", (1 - value) * 100) + "%"; // 当前服务所在机器内存使用率 - - result.put("nacos", jsonObject); - result.put("backupCores", cores); - result.put("backupService", serviceInstances); - result.put("backupPercentCpuLoad", percentCpuLoad); - result.put("backupPercentMemoryLoad", percentMemoryLoad); - return result; - } - - public List getJudgeServiceInfo() { - List serviceInfoList = new LinkedList<>(); - List serviceInstances = discoveryClient.getInstances(judgeServiceName); - for (ServiceInstance serviceInstance : serviceInstances) { - String result = restTemplate.getForObject(serviceInstance.getUri() + "/get-sys-config", String.class); - JSONObject jsonObject = JSONUtil.parseObj(result); - jsonObject.put("service", serviceInstance); - serviceInfoList.add(jsonObject); - } - return serviceInfoList; - } - - - public WebConfigDto getWebConfig() { - - return WebConfigDto.builder() - .baseUrl(UnicodeUtil.toString(configVo.getBaseUrl())) - .name(UnicodeUtil.toString(configVo.getName())) - .shortName(UnicodeUtil.toString(configVo.getShortName())) - .description(UnicodeUtil.toString(configVo.getDescription())) - .register(configVo.getRegister()) - .recordName(UnicodeUtil.toString(configVo.getRecordName())) - .recordUrl(UnicodeUtil.toString(configVo.getRecordUrl())) - .projectName(UnicodeUtil.toString(configVo.getProjectName())) - .projectUrl(UnicodeUtil.toString(configVo.getProjectUrl())) - .build(); - } - - - public void deleteHomeCarousel(Long id) throws StatusFailException { - - File imgFile = fileEntityService.getById(id); - if (imgFile == null) { - throw new StatusFailException("文件id错误,图片不存在"); - } - boolean isOk = fileEntityService.removeById(id); - if (isOk) { - FileUtil.del(imgFile.getFilePath()); - } else { - throw new StatusFailException("删除失败!"); - } - } - - public void setWebConfig(WebConfigDto config) throws StatusFailException { - - if (!StringUtils.isEmpty(config.getBaseUrl())) { - configVo.setBaseUrl(config.getBaseUrl()); - } - if (!StringUtils.isEmpty(config.getName())) { - configVo.setName(config.getName()); - } - if (!StringUtils.isEmpty(config.getShortName())) { - configVo.setShortName(config.getShortName()); - } - if (!StringUtils.isEmpty(config.getDescription())) { - configVo.setDescription(config.getDescription()); - } - if (config.getRegister() != null) { - configVo.setRegister(config.getRegister()); - } - if (!StringUtils.isEmpty(config.getRecordName())) { - configVo.setRecordName(config.getRecordName()); - } - if (!StringUtils.isEmpty(config.getRecordUrl())) { - configVo.setRecordUrl(config.getRecordUrl()); - } - if (!StringUtils.isEmpty(config.getProjectName())) { - configVo.setProjectName(config.getProjectName()); - } - if (!StringUtils.isEmpty(config.getProjectUrl())) { - configVo.setProjectUrl(config.getProjectUrl()); - } - boolean isOk = sendNewConfigToNacos(); - if (!isOk) { - throw new StatusFailException("修改失败"); - } - } - - public EmailConfigDto getEmailConfig() { - return EmailConfigDto.builder() - .emailUsername(configVo.getEmailUsername()) - .emailPassword(configVo.getEmailPassword()) - .emailHost(configVo.getEmailHost()) - .emailPort(configVo.getEmailPort()) - .emailBGImg(configVo.getEmailBGImg()) - .emailSsl(configVo.getEmailSsl()) - .build(); - } - - - public void setEmailConfig(EmailConfigDto config) throws StatusFailException { - - if (!StringUtils.isEmpty(config.getEmailHost())) { - configVo.setEmailHost(config.getEmailHost()); - } - if (!StringUtils.isEmpty(config.getEmailPassword())) { - configVo.setEmailPassword(config.getEmailPassword()); - } - - if (config.getEmailPort() != null) { - configVo.setEmailPort(config.getEmailPort()); - } - - if (!StringUtils.isEmpty(config.getEmailUsername())) { - configVo.setEmailUsername(config.getEmailUsername()); - } - - if (!StringUtils.isEmpty(config.getEmailBGImg())) { - configVo.setEmailBGImg(config.getEmailBGImg()); - } - - if (config.getEmailSsl() != null) { - configVo.setEmailSsl(config.getEmailSsl()); - } - - boolean isOk = sendNewConfigToNacos(); - if (!isOk) { - throw new StatusFailException("修改失败"); - } - } - - - public void testEmail(TestEmailDto testEmailDto) throws StatusFailException { - String email = testEmailDto.getEmail(); - if (StringUtils.isEmpty(email)) { - throw new StatusFailException("测试的邮箱不能为空!"); - } - boolean isEmail = Validator.isEmail(email); - if (isEmail) { - emailManager.testEmail(email); - } else { - throw new StatusFailException("测试的邮箱格式不正确!"); - } - } - - public DBAndRedisConfigDto getDBAndRedisConfig() { - return DBAndRedisConfigDto.builder() - .dbName(configVo.getMysqlDBName()) - .dbHost(configVo.getMysqlHost()) - .dbPort(configVo.getMysqlPort()) - .dbUsername(configVo.getMysqlUsername()) - .dbPassword(configVo.getMysqlPassword()) - .redisHost(configVo.getRedisHost()) - .redisPort(configVo.getRedisPort()) - .redisPassword(configVo.getRedisPassword()) - .build(); - } - - - public void setDBAndRedisConfig(DBAndRedisConfigDto config) throws StatusFailException { - - if (!StringUtils.isEmpty(config.getDbName())) { - configVo.setMysqlDBName(config.getDbName()); - } - - if (!StringUtils.isEmpty(config.getDbHost())) { - configVo.setMysqlHost(config.getDbHost()); - } - if (config.getDbPort() != null) { - configVo.setMysqlPort(config.getDbPort()); - } - if (!StringUtils.isEmpty(config.getDbUsername())) { - configVo.setMysqlUsername(config.getDbUsername()); - } - if (!StringUtils.isEmpty(config.getDbPassword())) { - configVo.setMysqlPassword(config.getDbPassword()); - } - - if (!StringUtils.isEmpty(config.getRedisHost())) { - configVo.setRedisHost(config.getRedisHost()); - } - - if (config.getRedisPort() != null) { - configVo.setRedisPort(config.getRedisPort()); - } - if (!StringUtils.isEmpty(config.getRedisPassword())) { - configVo.setRedisPassword(config.getRedisPassword()); - } - - boolean isOk = sendNewConfigToNacos(); - - if (!isOk) { - throw new StatusFailException("修改失败"); - } - } - - public SwitchConfigDto getSwitchConfig() { - return SwitchConfigDto.builder() - .openPublicDiscussion(configVo.getOpenPublicDiscussion()) - .openGroupDiscussion(configVo.getOpenGroupDiscussion()) - .openContestComment(configVo.getOpenContestComment()) - .openPublicJudge(configVo.getOpenPublicJudge()) - .openContestJudge(configVo.getOpenContestJudge()) - .openGroupJudge(configVo.getOpenGroupJudge()) - .hideNonContestSubmissionCode(configVo.getHideNonContestSubmissionCode()) - .defaultCreateCommentACInitValue(configVo.getDefaultCreateCommentACInitValue()) - .defaultCreateDiscussionACInitValue(configVo.getDefaultCreateDiscussionACInitValue()) - .defaultCreateDiscussionDailyLimit(configVo.getDefaultCreateDiscussionDailyLimit()) - .defaultCreateGroupACInitValue(configVo.getDefaultCreateGroupACInitValue()) - .defaultSubmitInterval(configVo.getDefaultSubmitInterval()) - .defaultCreateGroupDailyLimit(configVo.getDefaultCreateGroupDailyLimit()) - .defaultCreateGroupLimit(configVo.getDefaultCreateGroupLimit()) - .hduUsernameList(configVo.getHduUsernameList()) - .hduPasswordList(configVo.getHduPasswordList()) - .cfUsernameList(configVo.getCfUsernameList()) - .cfPasswordList(configVo.getCfPasswordList()) - .pojUsernameList(configVo.getPojUsernameList()) - .pojPasswordList(configVo.getPojPasswordList()) - .atcoderUsernameList(configVo.getAtcoderUsernameList()) - .atcoderPasswordList(configVo.getAtcoderPasswordList()) - .spojUsernameList(configVo.getSpojUsernameList()) - .spojPasswordList(configVo.getSpojPasswordList()) - .build(); - } - - @Transactional(rollbackFor = Exception.class) - public void setSwitchConfig(SwitchConfigDto config) throws StatusFailException { - if (config.getOpenPublicDiscussion() != null) { - configVo.setOpenPublicDiscussion(config.getOpenPublicDiscussion()); - } - if (config.getOpenGroupDiscussion() != null) { - configVo.setOpenGroupDiscussion(config.getOpenGroupDiscussion()); - } - if (config.getOpenContestComment() != null) { - configVo.setOpenContestComment(config.getOpenContestComment()); - } - if (config.getOpenPublicJudge() != null) { - configVo.setOpenPublicJudge(config.getOpenPublicJudge()); - } - if (config.getOpenGroupJudge() != null) { - configVo.setOpenGroupJudge(config.getOpenGroupJudge()); - } - if (config.getOpenContestJudge() != null) { - configVo.setOpenContestJudge(config.getOpenContestJudge()); - } - - if (config.getHideNonContestSubmissionCode() != null) { - configVo.setHideNonContestSubmissionCode(config.getHideNonContestSubmissionCode()); - } - - if (config.getDefaultCreateDiscussionACInitValue() != null) { - configVo.setDefaultCreateDiscussionACInitValue(config.getDefaultCreateDiscussionACInitValue()); - } - - if (config.getDefaultCreateDiscussionDailyLimit() != null) { - configVo.setDefaultCreateDiscussionDailyLimit(config.getDefaultCreateDiscussionDailyLimit()); - } - - if (config.getDefaultCreateCommentACInitValue() != null) { - configVo.setDefaultCreateCommentACInitValue(config.getDefaultCreateCommentACInitValue()); - } - - if (config.getDefaultSubmitInterval() != null) { - if (config.getDefaultSubmitInterval() >= 0) { - configVo.setDefaultSubmitInterval(config.getDefaultSubmitInterval()); - } else { - configVo.setDefaultSubmitInterval(0); - } - } - - if (config.getDefaultCreateGroupACInitValue() != null) { - configVo.setDefaultCreateGroupACInitValue(config.getDefaultCreateGroupACInitValue()); - } - - if (config.getDefaultCreateGroupDailyLimit() != null) { - configVo.setDefaultCreateGroupDailyLimit(config.getDefaultCreateGroupDailyLimit()); - } - - if (config.getDefaultCreateGroupLimit() != null) { - configVo.setDefaultCreateGroupLimit(config.getDefaultCreateGroupLimit()); - } - - if (checkListDiff(config.getCfUsernameList(), configVo.getCfUsernameList()) || - checkListDiff(config.getCfPasswordList(), configVo.getCfPasswordList())) { - configVo.setCfUsernameList(config.getCfUsernameList()); - configVo.setCfPasswordList(config.getCfPasswordList()); - changeRemoteJudgeAccount(config.getCfUsernameList(), - config.getCfPasswordList(), - Constants.RemoteOJ.CODEFORCES.getName()); - } - - if (checkListDiff(config.getHduUsernameList(), configVo.getHduUsernameList()) || - checkListDiff(config.getHduPasswordList(), configVo.getHduPasswordList())) { - configVo.setHduUsernameList(config.getHduUsernameList()); - configVo.setHduPasswordList(config.getHduPasswordList()); - changeRemoteJudgeAccount(config.getHduUsernameList(), - config.getHduPasswordList(), - Constants.RemoteOJ.HDU.getName()); - } - - if (checkListDiff(config.getPojUsernameList(), configVo.getPojUsernameList()) || - checkListDiff(config.getPojPasswordList(), configVo.getPojPasswordList())) { - configVo.setPojUsernameList(config.getPojUsernameList()); - configVo.setPojPasswordList(config.getPojPasswordList()); - changeRemoteJudgeAccount(config.getPojUsernameList(), - config.getPojPasswordList(), - Constants.RemoteOJ.POJ.getName()); - } - - if (checkListDiff(config.getSpojUsernameList(), configVo.getSpojUsernameList()) || - checkListDiff(config.getSpojPasswordList(), configVo.getSpojPasswordList())) { - configVo.setSpojUsernameList(config.getSpojUsernameList()); - configVo.setSpojPasswordList(config.getSpojPasswordList()); - changeRemoteJudgeAccount(config.getSpojUsernameList(), - config.getSpojPasswordList(), - Constants.RemoteOJ.SPOJ.getName()); - } - - if (checkListDiff(config.getAtcoderUsernameList(), configVo.getAtcoderUsernameList()) || - checkListDiff(config.getAtcoderPasswordList(), configVo.getAtcoderPasswordList())) { - configVo.setAtcoderUsernameList(config.getAtcoderUsernameList()); - configVo.setAtcoderPasswordList(config.getAtcoderPasswordList()); - changeRemoteJudgeAccount(config.getAtcoderUsernameList(), - config.getAtcoderPasswordList(), - Constants.RemoteOJ.ATCODER.getName()); - } - - boolean isOk = sendNewConfigToNacos(); - if (!isOk) { - throw new StatusFailException("修改失败"); - } - } - - private boolean checkListDiff(List list1, List list2) { - if (list1.size() != list2.size()) { - return true; - } - return !list1.toString().equals(list2.toString()); - } - - private void changeRemoteJudgeAccount(List usernameList, - List passwordList, - String oj) { - - if (CollectionUtils.isEmpty(usernameList) || CollectionUtils.isEmpty(passwordList) || usernameList.size() != passwordList.size()) { - log.error("[Change by Switch] [{}]: There is no account or password configured for remote judge, " + - "username list:{}, password list:{}", oj, Arrays.toString(usernameList.toArray()), - Arrays.toString(passwordList.toArray())); - } - - QueryWrapper remoteJudgeAccountQueryWrapper = new QueryWrapper<>(); - remoteJudgeAccountQueryWrapper.eq("oj", oj); - remoteJudgeAccountEntityService.remove(remoteJudgeAccountQueryWrapper); - - List newRemoteJudgeAccountList = new ArrayList<>(); - - for (int i = 0; i < usernameList.size(); i++) { - newRemoteJudgeAccountList.add(new RemoteJudgeAccount() - .setUsername(usernameList.get(i)) - .setPassword(passwordList.get(i)) - .setStatus(true) - .setVersion(0L) - .setOj(oj)); - } - - if (newRemoteJudgeAccountList.size() > 0) { - boolean addOk = remoteJudgeAccountEntityService.saveOrUpdateBatch(newRemoteJudgeAccountList); - if (!addOk) { - log.error("Remote judge initialization failed. Failed to add account for: [{}]. Please check the configuration file and restart!", oj); - } - } - } - - - public boolean sendNewConfigToNacos() { - - Properties properties = new Properties(); - properties.put("serverAddr", NACOS_URL); - - // if need username and password to login - properties.put("username", nacosUsername); - properties.put("password", nacosPassword); - - com.alibaba.nacos.api.config.ConfigService configService = null; - boolean isOK = false; - try { - configService = NacosFactory.createConfigService(properties); - isOK = configService.publishConfig(prefix + "-" + active + "." + fileExtension, GROUP, configUtils.getConfigContent(), TYPE); - } catch (NacosException e) { - log.error("通过nacos修改网站配置异常--------------->{}", e.getMessage()); - } - return isOK; - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/system/DashboardManager.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/system/DashboardManager.java deleted file mode 100644 index 3cd92ae..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/system/DashboardManager.java +++ /dev/null @@ -1,61 +0,0 @@ -package top.hcode.hoj.manager.admin.system; - -import cn.hutool.core.map.MapUtil; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import org.apache.shiro.SecurityUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; -import top.hcode.hoj.pojo.entity.user.Session; -import top.hcode.hoj.pojo.vo.UserRolesVo; -import top.hcode.hoj.dao.contest.ContestEntityService; -import top.hcode.hoj.dao.judge.JudgeEntityService; -import top.hcode.hoj.dao.user.SessionEntityService; -import top.hcode.hoj.dao.user.UserInfoEntityService; - -import java.util.List; -import java.util.Map; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/9 21:44 - * @Description: - */ -@Component -public class DashboardManager { - - @Autowired - private ContestEntityService contestEntityService; - - @Autowired - private JudgeEntityService judgeEntityService; - - @Autowired - private UserInfoEntityService userInfoEntityService; - - @Autowired - private SessionEntityService sessionEntityService; - - public Session getRecentSession(){ - // 需要获取一下该token对应用户的数据 - org.apache.shiro.session.Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - QueryWrapper wrapper = new QueryWrapper().eq("uid",userRolesVo.getUid()).orderByDesc("gmt_create"); - List sessionList = sessionEntityService.list(wrapper); - if (sessionList.size()>1){ - return sessionList.get(1); - }else{ - return sessionList.get(0); - } - } - - public Map getDashboardInfo(){ - int userNum = userInfoEntityService.count(); - int recentContestNum = contestEntityService.getWithinNext14DaysContests().size(); - int todayJudgeNum = judgeEntityService.getTodayJudgeNum(); - return MapUtil.builder() - .put("userNum",userNum) - .put("recentContestNum",recentContestNum) - .put("todayJudgeNum",todayJudgeNum).map(); - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/tag/AdminTagManager.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/tag/AdminTagManager.java deleted file mode 100644 index 4a3296a..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/tag/AdminTagManager.java +++ /dev/null @@ -1,100 +0,0 @@ -package top.hcode.hoj.manager.admin.tag; - -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.dao.problem.TagClassificationEntityService; -import top.hcode.hoj.dao.problem.TagEntityService; -import top.hcode.hoj.pojo.entity.problem.Tag; -import top.hcode.hoj.pojo.entity.problem.TagClassification; - -import java.util.List; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/9 17:47 - * @Description: - */ -@Component -public class AdminTagManager { - - @Autowired - private TagEntityService tagEntityService; - - @Autowired - private TagClassificationEntityService tagClassificationEntityService; - - public Tag addTag(Tag tag) throws StatusFailException { - QueryWrapper tagQueryWrapper = new QueryWrapper<>(); - tagQueryWrapper.eq(tag.getGid() != null, "gid", tag.getGid()) - .eq("name", tag.getName()) - .eq("oj", tag.getOj()); - Tag existTag = tagEntityService.getOne(tagQueryWrapper, false); - - if (existTag != null) { - throw new StatusFailException("该标签名称已存在!请勿重复添加!"); - } - - boolean isOk = tagEntityService.save(tag); - if (!isOk) { - throw new StatusFailException("添加失败"); - } - return tag; - } - - public void updateTag(Tag tag) throws StatusFailException { - boolean isOk = tagEntityService.updateById(tag); - if (!isOk) { - throw new StatusFailException("更新失败"); - } - } - - public void deleteTag(Long tid) throws StatusFailException { - boolean isOk = tagEntityService.removeById(tid); - if (!isOk) { - throw new StatusFailException("删除失败"); - } - } - - public List getTagClassification(String oj) { - oj = oj.toUpperCase(); - if (oj.equals("ALL")) { - return tagClassificationEntityService.list(); - } else { - QueryWrapper tagClassificationQueryWrapper = new QueryWrapper<>(); - tagClassificationQueryWrapper.eq("oj", oj).orderByAsc("`rank`"); - return tagClassificationEntityService.list(tagClassificationQueryWrapper); - } - } - - public TagClassification addTagClassification(TagClassification tagClassification) throws StatusFailException { - QueryWrapper tagClassificationQueryWrapper = new QueryWrapper<>(); - tagClassificationQueryWrapper.eq("name", tagClassification.getName()) - .eq("oj", tagClassification.getOj()); - TagClassification existTagClassification = tagClassificationEntityService.getOne(tagClassificationQueryWrapper, false); - - if (existTagClassification != null) { - throw new StatusFailException("该标签分类名称已存在!请勿重复!"); - } - boolean isOk = tagClassificationEntityService.save(tagClassification); - if (!isOk) { - throw new StatusFailException("添加失败"); - } - return tagClassification; - } - - public void updateTagClassification(TagClassification tagClassification) throws StatusFailException { - boolean isOk = tagClassificationEntityService.updateById(tagClassification); - if (!isOk) { - throw new StatusFailException("更新失败"); - } - } - - public void deleteTagClassification(Long tcid) throws StatusFailException { - boolean isOk = tagClassificationEntityService.removeById(tcid); - if (!isOk) { - throw new StatusFailException("删除失败"); - } - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/training/AdminTrainingCategoryManager.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/training/AdminTrainingCategoryManager.java deleted file mode 100644 index c4a0ea7..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/training/AdminTrainingCategoryManager.java +++ /dev/null @@ -1,55 +0,0 @@ -package top.hcode.hoj.manager.admin.training; - -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import org.springframework.stereotype.Component; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.dao.training.TrainingCategoryEntityService; -import top.hcode.hoj.pojo.entity.training.TrainingCategory; - -import javax.annotation.Resource; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/9 19:29 - * @Description: - */ - -@Component -public class AdminTrainingCategoryManager { - - @Resource - private TrainingCategoryEntityService trainingCategoryEntityService; - - public TrainingCategory addTrainingCategory(TrainingCategory trainingCategory) throws StatusFailException { - QueryWrapper trainingCategoryQueryWrapper = new QueryWrapper<>(); - trainingCategoryQueryWrapper.eq(trainingCategory.getGid() != null, "gid", trainingCategory.getGid()) - .eq("name", trainingCategory.getName()); - TrainingCategory existedTrainingCategory = trainingCategoryEntityService.getOne(trainingCategoryQueryWrapper, false); - - if (existedTrainingCategory != null) { - throw new StatusFailException("该分类名称已存在!请勿重复添加!"); - } - - boolean isOk = trainingCategoryEntityService.save(trainingCategory); - if (!isOk) { - throw new StatusFailException("添加失败"); - } - return trainingCategory; - } - - public void updateTrainingCategory(TrainingCategory trainingCategory) throws StatusFailException { - boolean isOk = trainingCategoryEntityService.updateById(trainingCategory); - if (!isOk) { - throw new StatusFailException("更新失败!"); - } - } - - public void deleteTrainingCategory(Long cid) throws StatusFailException { - boolean isOk = trainingCategoryEntityService.removeById(cid); - if (!isOk) { - throw new StatusFailException("删除失败!"); - } - } - - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/training/AdminTrainingManager.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/training/AdminTrainingManager.java deleted file mode 100644 index 9cff8d8..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/training/AdminTrainingManager.java +++ /dev/null @@ -1,216 +0,0 @@ -package top.hcode.hoj.manager.admin.training; - -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import org.apache.shiro.SecurityUtils; -import org.apache.shiro.session.Session; -import org.springframework.stereotype.Component; -import org.springframework.transaction.annotation.Transactional; -import org.springframework.util.StringUtils; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.exception.StatusForbiddenException; -import top.hcode.hoj.pojo.dto.TrainingDto; -import top.hcode.hoj.pojo.entity.training.MappingTrainingCategory; -import top.hcode.hoj.pojo.entity.training.Training; -import top.hcode.hoj.pojo.entity.training.TrainingCategory; -import top.hcode.hoj.pojo.entity.training.TrainingRegister; -import top.hcode.hoj.pojo.vo.UserRolesVo; -import top.hcode.hoj.dao.training.*; -import top.hcode.hoj.utils.Constants; - -import javax.annotation.Resource; -import java.util.Objects; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/9 19:46 - * @Description: - */ - -@Component -public class AdminTrainingManager { - - @Resource - private TrainingEntityService trainingEntityService; - - @Resource - private MappingTrainingCategoryEntityService mappingTrainingCategoryEntityService; - - @Resource - private TrainingCategoryEntityService trainingCategoryEntityService; - - @Resource - private TrainingRegisterEntityService trainingRegisterEntityService; - - @Resource - private AdminTrainingRecordManager adminTrainingRecordManager; - - public IPage getTrainingList(Integer limit, Integer currentPage, String keyword) { - - if (currentPage == null || currentPage < 1) currentPage = 1; - if (limit == null || limit < 1) limit = 10; - IPage iPage = new Page<>(currentPage, limit); - QueryWrapper queryWrapper = new QueryWrapper<>(); - // 过滤密码 - queryWrapper.select(Training.class, info -> !info.getColumn().equals("private_pwd")); - if (!StringUtils.isEmpty(keyword)) { - keyword = keyword.trim(); - queryWrapper - .like("title", keyword).or() - .like("id", keyword).or() - .like("`rank`", keyword); - } - - queryWrapper.eq("is_group", false).orderByAsc("`rank`"); - - return trainingEntityService.page(iPage, queryWrapper); - } - - - public TrainingDto getTraining(Long tid) throws StatusFailException, StatusForbiddenException { - // 获取本场训练的信息 - Training training = trainingEntityService.getById(tid); - if (training == null) { // 查询不存在 - throw new StatusFailException("查询失败:该训练不存在,请检查参数tid是否准确!"); - } - - // 获取当前登录的用户 - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - // 是否为超级管理员 - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - // 只有超级管理员和训练拥有者才能操作 - if (!isRoot && !userRolesVo.getUsername().equals(training.getAuthor())) { - throw new StatusForbiddenException("对不起,你无权限操作!"); - } - - TrainingDto trainingDto = new TrainingDto(); - trainingDto.setTraining(training); - - QueryWrapper queryWrapper = new QueryWrapper<>(); - queryWrapper.eq("tid", tid); - MappingTrainingCategory mappingTrainingCategory = mappingTrainingCategoryEntityService.getOne(queryWrapper, false); - TrainingCategory trainingCategory = null; - if (mappingTrainingCategory != null) { - trainingCategory = trainingCategoryEntityService.getById(mappingTrainingCategory.getCid()); - } - trainingDto.setTrainingCategory(trainingCategory); - return trainingDto; - } - - - public void deleteTraining(Long tid) throws StatusFailException { - - boolean isOk = trainingEntityService.removeById(tid); - /* - Training的id为其他表的外键的表中的对应数据都会被一起删除! - */ - if (!isOk) { - throw new StatusFailException("删除失败!"); - } - } - - @Transactional(rollbackFor = Exception.class) - public void addTraining(TrainingDto trainingDto) throws StatusFailException { - - Training training = trainingDto.getTraining(); - trainingEntityService.save(training); - TrainingCategory trainingCategory = trainingDto.getTrainingCategory(); - if (trainingCategory.getId() == null) { - try { - trainingCategoryEntityService.save(trainingCategory); - } catch (Exception ignored) { - QueryWrapper queryWrapper = new QueryWrapper<>(); - queryWrapper.eq("name", trainingCategory.getName()); - trainingCategory = trainingCategoryEntityService.getOne(queryWrapper, false); - } - } - - boolean isOk = mappingTrainingCategoryEntityService.save(new MappingTrainingCategory() - .setTid(training.getId()) - .setCid(trainingCategory.getId())); - if (!isOk) { - throw new StatusFailException("添加失败!"); - } - } - - @Transactional(rollbackFor = Exception.class) - public void updateTraining(TrainingDto trainingDto) throws StatusForbiddenException, StatusFailException { - // 获取当前登录的用户 - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - // 是否为超级管理员 - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - // 只有超级管理员和训练拥有者才能操作 - if (!isRoot && !userRolesVo.getUsername().equals(trainingDto.getTraining().getAuthor())) { - throw new StatusForbiddenException("对不起,你无权限操作!"); - } - Training training = trainingDto.getTraining(); - Training oldTraining = trainingEntityService.getById(training.getId()); - trainingEntityService.updateById(training); - - // 私有训练 修改密码 需要清空之前注册训练的记录 - if (training.getAuth().equals(Constants.Training.AUTH_PRIVATE.getValue())) { - if (!Objects.equals(training.getPrivatePwd(), oldTraining.getPrivatePwd())) { - UpdateWrapper updateWrapper = new UpdateWrapper<>(); - updateWrapper.eq("tid", training.getId()); - trainingRegisterEntityService.remove(updateWrapper); - } - } - - - TrainingCategory trainingCategory = trainingDto.getTrainingCategory(); - if (trainingCategory.getId() == null) { - try { - trainingCategoryEntityService.save(trainingCategory); - } catch (Exception ignored) { - QueryWrapper queryWrapper = new QueryWrapper<>(); - queryWrapper.eq("name", trainingCategory.getName()); - trainingCategory = trainingCategoryEntityService.getOne(queryWrapper, false); - } - } - - MappingTrainingCategory mappingTrainingCategory = mappingTrainingCategoryEntityService - .getOne(new QueryWrapper().eq("tid", training.getId()), - false); - - if (mappingTrainingCategory == null) { - mappingTrainingCategoryEntityService.save(new MappingTrainingCategory() - .setTid(training.getId()).setCid(trainingCategory.getId())); - adminTrainingRecordManager.checkSyncRecord(trainingDto.getTraining()); - } else { - if (!mappingTrainingCategory.getCid().equals(trainingCategory.getId())) { - UpdateWrapper updateWrapper = new UpdateWrapper<>(); - updateWrapper.eq("tid", training.getId()).set("cid", trainingCategory.getId()); - boolean isOk = mappingTrainingCategoryEntityService.update(null, updateWrapper); - if (isOk) { - adminTrainingRecordManager.checkSyncRecord(trainingDto.getTraining()); - } else { - throw new StatusFailException("修改失败"); - } - } - } - - } - - public void changeTrainingStatus(Long tid, String author, Boolean status) throws StatusForbiddenException, StatusFailException { - // 获取当前登录的用户 - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - // 是否为超级管理员 - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - // 只有超级管理员和训练拥有者才能操作 - if (!isRoot && !userRolesVo.getUsername().equals(author)) { - throw new StatusForbiddenException("对不起,你无权限操作!"); - } - - boolean isOk = trainingEntityService.saveOrUpdate(new Training().setId(tid).setStatus(status)); - if (!isOk) { - throw new StatusFailException("修改失败"); - } - } - - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/training/AdminTrainingProblemManager.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/training/AdminTrainingProblemManager.java deleted file mode 100644 index 1748a35..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/training/AdminTrainingProblemManager.java +++ /dev/null @@ -1,237 +0,0 @@ -package top.hcode.hoj.manager.admin.training; - -import cn.hutool.core.io.FileUtil; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import org.apache.shiro.SecurityUtils; -import org.apache.shiro.session.Session; -import org.springframework.stereotype.Component; -import org.springframework.util.StringUtils; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.crawler.problem.ProblemStrategy; -import top.hcode.hoj.manager.admin.problem.RemoteProblemManager; -import top.hcode.hoj.pojo.dto.TrainingProblemDto; -import top.hcode.hoj.pojo.entity.problem.Problem; -import top.hcode.hoj.pojo.entity.training.Training; -import top.hcode.hoj.pojo.entity.training.TrainingProblem; -import top.hcode.hoj.pojo.vo.UserRolesVo; -import top.hcode.hoj.dao.problem.ProblemEntityService; -import top.hcode.hoj.dao.training.TrainingProblemEntityService; -import top.hcode.hoj.dao.training.TrainingEntityService; -import top.hcode.hoj.utils.Constants; - -import javax.annotation.Resource; -import java.io.File; -import java.util.*; -import java.util.stream.Collectors; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/9 20:20 - * @Description: - */ -@Component -public class AdminTrainingProblemManager { - - @Resource - private TrainingProblemEntityService trainingProblemEntityService; - - @Resource - private TrainingEntityService trainingEntityService; - - @Resource - private ProblemEntityService problemEntityService; - - @Resource - private AdminTrainingRecordManager adminTrainingRecordManager; - - @Resource - private RemoteProblemManager remoteProblemManager; - - public HashMap getProblemList(Integer limit, Integer currentPage, String keyword, Boolean queryExisted, Long tid) { - if (currentPage == null || currentPage < 1) currentPage = 1; - if (limit == null || limit < 1) limit = 10; - - IPage iPage = new Page<>(currentPage, limit); - // 根据tid在TrainingProblem表中查询到对应pid集合 - QueryWrapper trainingProblemQueryWrapper = new QueryWrapper<>(); - trainingProblemQueryWrapper.eq("tid", tid).orderByAsc("display_id"); - List pidList = new LinkedList<>(); - List trainingProblemList = trainingProblemEntityService.list(trainingProblemQueryWrapper); - HashMap trainingProblemMap = new HashMap<>(); - trainingProblemList.forEach(trainingProblem -> { - if (!trainingProblemMap.containsKey(trainingProblem.getPid())) { - trainingProblemMap.put(trainingProblem.getPid(), trainingProblem); - } - pidList.add(trainingProblem.getPid()); - }); - - HashMap trainingProblem = new HashMap<>(); - - QueryWrapper problemQueryWrapper = new QueryWrapper<>(); - - // 逻辑判断,如果是查询已有的就应该是in,如果是查询不要重复的,使用not in - if (queryExisted) { - problemQueryWrapper.in(pidList.size() > 0, "id", pidList); - } else { - // 权限需要是公开的(隐藏的,比赛中不可加入!) - problemQueryWrapper.eq("auth", 1).eq("is_group", false); - problemQueryWrapper.notIn(pidList.size() > 0, "id", pidList); - } - - if (!StringUtils.isEmpty(keyword)) { - problemQueryWrapper.and(wrapper -> wrapper.like("title", keyword).or() - .like("problem_id", keyword).or() - .like("author", keyword)); - } - - if (pidList.size() == 0 && queryExisted) { - problemQueryWrapper = new QueryWrapper<>(); - problemQueryWrapper.eq("id", null); - } - - IPage problemListPage = problemEntityService.page(iPage, problemQueryWrapper); - - if (queryExisted && pidList.size() > 0) { - List problemListPageRecords = problemListPage.getRecords(); - List sortProblemList = problemListPageRecords - .stream() - .sorted(Comparator.comparingInt(problem -> trainingProblemMap.get(problem.getId()).getRank())) - .collect(Collectors.toList()); - problemListPage.setRecords(sortProblemList); - } - - trainingProblem.put("problemList", problemListPage); - trainingProblem.put("trainingProblemMap", trainingProblemMap); - - return trainingProblem; - } - - public void updateProblem(TrainingProblem trainingProblem) throws StatusFailException { - boolean isOk = trainingProblemEntityService.saveOrUpdate(trainingProblem); - - if (!isOk) { - throw new StatusFailException("修改失败!"); - } - } - - public void deleteProblem(Long pid,Long tid) throws StatusFailException { - boolean isOk = false; - // 训练id不为null,表示就是从比赛列表移除而已 - if (tid != null) { - QueryWrapper trainingProblemQueryWrapper = new QueryWrapper<>(); - trainingProblemQueryWrapper.eq("tid", tid).eq("pid", pid); - isOk = trainingProblemEntityService.remove(trainingProblemQueryWrapper); - - } else { - /* - problem的id为其他表的外键的表中的对应数据都会被一起删除! - */ - isOk = problemEntityService.removeById(pid); - } - - if (isOk) { // 删除成功 - if (tid == null) { - FileUtil.del(Constants.File.TESTCASE_BASE_FOLDER.getPath() + File.separator + "problem_" + pid); - } - - // 更新训练最近更新时间 - UpdateWrapper trainingUpdateWrapper = new UpdateWrapper<>(); - trainingUpdateWrapper.set("gmt_modified", new Date()) - .eq("id", tid); - trainingEntityService.update(trainingUpdateWrapper); - - } else { - throw new StatusFailException("删除失败!"); - } - } - - public void addProblemFromPublic(TrainingProblemDto trainingProblemDto) throws StatusFailException { - - Long pid = trainingProblemDto.getPid(); - Long tid = trainingProblemDto.getTid(); - String displayId = trainingProblemDto.getDisplayId(); - - QueryWrapper trainingProblemQueryWrapper = new QueryWrapper<>(); - trainingProblemQueryWrapper.eq("tid", tid) - .and(wrapper -> wrapper.eq("pid", pid) - .or() - .eq("display_id", displayId)); - TrainingProblem trainingProblem = trainingProblemEntityService.getOne(trainingProblemQueryWrapper, false); - if (trainingProblem != null) { - throw new StatusFailException("添加失败,该题目已添加或者题目的训练展示ID已存在!"); - } - - TrainingProblem newTProblem = new TrainingProblem(); - boolean isOk = trainingProblemEntityService.saveOrUpdate(newTProblem - .setTid(tid).setPid(pid).setDisplayId(displayId)); - if (isOk) { // 添加成功 - - // 更新训练最近更新时间 - UpdateWrapper trainingUpdateWrapper = new UpdateWrapper<>(); - trainingUpdateWrapper.set("gmt_modified", new Date()) - .eq("id", tid); - trainingEntityService.update(trainingUpdateWrapper); - - // 异步地同步用户对该题目的提交数据 - adminTrainingRecordManager.syncAlreadyRegisterUserRecord(tid, pid, newTProblem.getId()); - } else { - throw new StatusFailException("添加失败!"); - } - } - - public void importTrainingRemoteOJProblem(String name, String problemId, Long tid) throws StatusFailException { - QueryWrapper queryWrapper = new QueryWrapper<>(); - queryWrapper.eq("problem_id", name.toUpperCase() + "-" + problemId); - Problem problem = problemEntityService.getOne(queryWrapper, false); - - // 如果该题目不存在,需要先导入 - if (problem == null) { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - try { - ProblemStrategy.RemoteProblemInfo otherOJProblemInfo = remoteProblemManager.getOtherOJProblemInfo(name.toUpperCase(), problemId, userRolesVo.getUsername()); - if (otherOJProblemInfo != null) { - problem = remoteProblemManager.adminAddOtherOJProblem(otherOJProblemInfo, name); - if (problem == null) { - throw new StatusFailException("导入新题目失败!请重新尝试!"); - } - } else { - throw new StatusFailException("导入新题目失败!原因:可能是与该OJ链接超时或题号格式错误!"); - } - } catch (Exception e) { - throw new StatusFailException(e.getMessage()); - } - } - - QueryWrapper trainingProblemQueryWrapper = new QueryWrapper<>(); - Problem finalProblem = problem; - trainingProblemQueryWrapper.eq("tid", tid) - .and(wrapper -> wrapper.eq("pid", finalProblem.getId()) - .or() - .eq("display_id", finalProblem.getProblemId())); - TrainingProblem trainingProblem = trainingProblemEntityService.getOne(trainingProblemQueryWrapper, false); - if (trainingProblem != null) { - throw new StatusFailException("添加失败,该题目已添加或者题目的训练展示ID已存在!"); - } - - TrainingProblem newTProblem = new TrainingProblem(); - boolean isOk = trainingProblemEntityService.saveOrUpdate(newTProblem - .setTid(tid).setPid(problem.getId()).setDisplayId(problem.getProblemId())); - if (isOk) { // 添加成功 - - // 更新训练最近更新时间 - UpdateWrapper trainingUpdateWrapper = new UpdateWrapper<>(); - trainingUpdateWrapper.set("gmt_modified", new Date()) - .eq("id", tid); - trainingEntityService.update(trainingUpdateWrapper); - - // 异步地同步用户对该题目的提交数据 - adminTrainingRecordManager.syncAlreadyRegisterUserRecord(tid, problem.getId(), newTProblem.getId()); - } else { - throw new StatusFailException("添加失败!"); - } - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/training/AdminTrainingRecordManager.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/training/AdminTrainingRecordManager.java deleted file mode 100644 index 8fddc58..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/training/AdminTrainingRecordManager.java +++ /dev/null @@ -1,155 +0,0 @@ -package top.hcode.hoj.manager.admin.training; - -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import org.springframework.scheduling.annotation.Async; -import org.springframework.stereotype.Component; -import org.springframework.util.CollectionUtils; -import top.hcode.hoj.pojo.entity.judge.Judge; -import top.hcode.hoj.pojo.entity.training.Training; -import top.hcode.hoj.pojo.entity.training.TrainingProblem; -import top.hcode.hoj.pojo.entity.training.TrainingRecord; -import top.hcode.hoj.dao.judge.JudgeEntityService; -import top.hcode.hoj.dao.training.TrainingProblemEntityService; -import top.hcode.hoj.dao.training.TrainingRecordEntityService; -import top.hcode.hoj.dao.training.TrainingRegisterEntityService; -import top.hcode.hoj.dao.training.TrainingEntityService; -import top.hcode.hoj.utils.Constants; - -import javax.annotation.Resource; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/9 20:09 - * @Description: - */ -@Component -public class AdminTrainingRecordManager { - - @Resource - private TrainingEntityService trainingEntityService; - - @Resource - private TrainingProblemEntityService trainingProblemEntityService; - - @Resource - private TrainingRecordEntityService trainingRecordEntityService; - - @Resource - private TrainingRegisterEntityService trainingRegisterEntityService; - - @Resource - private JudgeEntityService judgeEntityService; - - @Async - public void syncUserSubmissionToRecordByTid(Long tid, String uid) { - QueryWrapper queryWrapper = new QueryWrapper<>(); - queryWrapper.eq("tid", tid); - List trainingProblemList = trainingProblemEntityService.list(queryWrapper); - List pidList = new ArrayList<>(); - HashMap pidMapTPid = new HashMap<>(); - for (TrainingProblem trainingProblem : trainingProblemList) { - pidList.add(trainingProblem.getPid()); - pidMapTPid.put(trainingProblem.getPid(), trainingProblem.getId()); - } - if (!CollectionUtils.isEmpty(pidList)) { - QueryWrapper judgeQueryWrapper = new QueryWrapper<>(); - judgeQueryWrapper.in("pid", pidList) - .eq("cid", 0) - .eq("status", Constants.Judge.STATUS_ACCEPTED.getStatus()) // 只同步ac的提交 - .eq("uid", uid); - List judgeList = judgeEntityService.list(judgeQueryWrapper); - saveBatchNewRecordByJudgeList(judgeList, tid, null, pidMapTPid); - } - } - - @Async - public void syncAlreadyRegisterUserRecord(Long tid, Long pid, Long tpId) { - Training training = trainingEntityService.getById(tid); - if (!Constants.Training.AUTH_PRIVATE.getValue().equals(training.getAuth())){ - return; - } - List uidList = trainingRegisterEntityService.getAlreadyRegisterUidList(tid); - syncNewProblemUserSubmissionToRecord(pid, tpId, tid, uidList); - } - - - @Async - public void checkSyncRecord(Training training) { - if (!Constants.Training.AUTH_PRIVATE.getValue().equals(training.getAuth())) { - return; - } - QueryWrapper trainingRecordQueryWrapper = new QueryWrapper<>(); - trainingRecordQueryWrapper.eq("tid", training.getId()); - int count = trainingRecordEntityService.count(trainingRecordQueryWrapper); - if (count <= 0) { - syncAllUserProblemRecord(training.getId()); - } - - } - - private void syncNewProblemUserSubmissionToRecord(Long pid, Long tpId, Long tid, List uidList) { - if (!CollectionUtils.isEmpty(uidList)) { - QueryWrapper judgeQueryWrapper = new QueryWrapper<>(); - judgeQueryWrapper.eq("pid", pid) - .eq("cid", 0) - .eq("status", Constants.Judge.STATUS_ACCEPTED.getStatus()) // 只同步ac的提交 - .in("uid", uidList); - List judgeList = judgeEntityService.list(judgeQueryWrapper); - saveBatchNewRecordByJudgeList(judgeList, tid, tpId, null); - } - } - - - private void syncAllUserProblemRecord(Long tid) { - QueryWrapper trainingProblemQueryWrapper = new QueryWrapper<>(); - trainingProblemQueryWrapper.eq("tid", tid); - List trainingProblemList = trainingProblemEntityService.list(trainingProblemQueryWrapper); - if (trainingProblemList.size() == 0) { - return; - } - List pidList = new ArrayList<>(); - HashMap pidMapTPid = new HashMap<>(); - for (TrainingProblem trainingProblem : trainingProblemList) { - pidList.add(trainingProblem.getPid()); - pidMapTPid.put(trainingProblem.getPid(), trainingProblem.getId()); - } - - List uidList = trainingRegisterEntityService.getAlreadyRegisterUidList(tid); - if (uidList.size() == 0) { - return; - } - QueryWrapper judgeQueryWrapper = new QueryWrapper<>(); - judgeQueryWrapper.in("pid", pidList) - .eq("cid", 0) - .eq("status", Constants.Judge.STATUS_ACCEPTED.getStatus()) // 只同步ac的提交 - .in("uid", uidList); - List judgeList = judgeEntityService.list(judgeQueryWrapper); - saveBatchNewRecordByJudgeList(judgeList, tid, null, pidMapTPid); - } - - - private void saveBatchNewRecordByJudgeList(List judgeList, Long tid, Long tpId, HashMap pidMapTPid) { - if (!CollectionUtils.isEmpty(judgeList)) { - List trainingRecordList = new ArrayList<>(); - for (Judge judge : judgeList) { - TrainingRecord trainingRecord = new TrainingRecord() - .setPid(judge.getPid()) - .setSubmitId(judge.getSubmitId()) - .setTid(tid) - .setUid(judge.getUid()); - if (pidMapTPid != null) { - trainingRecord.setTpid(pidMapTPid.get(judge.getPid())); - } - if (tpId != null) { - trainingRecord.setTpid(tpId); - } - trainingRecordList.add(trainingRecord); - } - trainingRecordEntityService.saveBatch(trainingRecordList); - } - } - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/user/AdminUserManager.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/user/AdminUserManager.java deleted file mode 100644 index 9a60717..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/admin/user/AdminUserManager.java +++ /dev/null @@ -1,257 +0,0 @@ -package top.hcode.hoj.manager.admin.user; - -import cn.hutool.core.map.MapUtil; -import cn.hutool.core.util.IdUtil; -import cn.hutool.core.util.RandomUtil; -import cn.hutool.crypto.SecureUtil; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.apache.shiro.SecurityUtils; -import org.apache.shiro.session.Session; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; -import org.springframework.transaction.annotation.Transactional; -import org.springframework.util.StringUtils; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.manager.msg.AdminNoticeManager; -import top.hcode.hoj.pojo.dto.AdminEditUserDto; -import top.hcode.hoj.pojo.entity.user.UserInfo; -import top.hcode.hoj.pojo.entity.user.UserRecord; -import top.hcode.hoj.pojo.entity.user.UserRole; -import top.hcode.hoj.pojo.vo.UserRolesVo; -import top.hcode.hoj.dao.user.UserInfoEntityService; -import top.hcode.hoj.dao.user.UserRecordEntityService; -import top.hcode.hoj.dao.user.UserRoleEntityService; -import top.hcode.hoj.utils.Constants; -import top.hcode.hoj.utils.RedisUtils; - -import java.util.HashMap; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; -import java.util.stream.Collectors; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/9 21:05 - * @Description: - */ -@Component -public class AdminUserManager { - - @Autowired - private UserRoleEntityService userRoleEntityService; - - @Autowired - private UserInfoEntityService userInfoEntityService; - - @Autowired - private AdminNoticeManager adminNoticeManager; - - @Autowired - private UserRecordEntityService userRecordEntityService; - - @Autowired - private RedisUtils redisUtils; - - public IPage getUserList(Integer limit, Integer currentPage, Boolean onlyAdmin, String keyword) { - if (currentPage == null || currentPage < 1) currentPage = 1; - if (limit == null || limit < 1) limit = 10; - if (keyword != null) { - keyword = keyword.trim(); - } - return userRoleEntityService.getUserList(limit, currentPage, keyword, onlyAdmin); - } - - public void editUser(AdminEditUserDto adminEditUserDto) throws StatusFailException { - - String username = adminEditUserDto.getUsername(); - String uid = adminEditUserDto.getUid(); - String realname = adminEditUserDto.getRealname(); - String email = adminEditUserDto.getEmail(); - String password = adminEditUserDto.getPassword(); - int type = adminEditUserDto.getType(); - int status = adminEditUserDto.getStatus(); - boolean setNewPwd = adminEditUserDto.getSetNewPwd(); - - String titleName = adminEditUserDto.getTitleName(); - String titleColor = adminEditUserDto.getTitleColor(); - - if (!StringUtils.isEmpty(realname) && realname.length() > 50) { - throw new StatusFailException("真实姓名的长度不能超过50位"); - } - - if (!StringUtils.isEmpty(titleName) && titleName.length() > 20) { - throw new StatusFailException("头衔的长度建议不要超过20位"); - } - - if (!StringUtils.isEmpty(password) && (password.length() < 6 || password.length() > 20)) { - throw new StatusFailException("密码长度建议为6~20位!"); - } - - if (username.length() > 20) { - throw new StatusFailException("用户名长度建议不能超过20位!"); - } - - - UpdateWrapper userInfoUpdateWrapper = new UpdateWrapper<>(); - - userInfoUpdateWrapper.eq("uuid", uid) - .set("username", username) - .set("realname", realname) - .set("email", email) - .set(setNewPwd, "password", SecureUtil.md5(password)) - .set("title_name", titleName) - .set("title_color", titleColor) - .set("status", status); - boolean updateUserInfo = userInfoEntityService.update(userInfoUpdateWrapper); - - QueryWrapper userRoleQueryWrapper = new QueryWrapper<>(); - userRoleQueryWrapper.eq("uid", uid); - UserRole userRole = userRoleEntityService.getOne(userRoleQueryWrapper, false); - boolean changeUserRole = false; - int oldType = userRole.getRoleId().intValue(); - if (userRole.getRoleId().intValue() != type) { - userRole.setRoleId((long) type); - changeUserRole = userRoleEntityService.updateById(userRole); - if (type == 1000 || oldType == 1000) { - // 新增或者去除超级管理员需要删除缓存 - String cacheKey = Constants.Account.SUPER_ADMIN_UID_LIST_CACHE.getCode(); - redisUtils.del(cacheKey); - } - } - if (updateUserInfo && setNewPwd) { - // 需要重新登录 - userRoleEntityService.deleteCache(uid, true); - } else if (changeUserRole) { - // 需要重新授权 - userRoleEntityService.deleteCache(uid, false); - } - - if (changeUserRole) { - // 获取当前登录的用户 - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - String title = "权限变更通知(Authority Change Notice)"; - String content = userRoleEntityService.getAuthChangeContent(oldType, type); - adminNoticeManager.addSingleNoticeToUser(userRolesVo.getUid(), uid, title, content, "Sys"); - } - - } - - public void deleteUser(List deleteUserIdList) throws StatusFailException { - boolean isOk = userInfoEntityService.removeByIds(deleteUserIdList); - if (!isOk) { - throw new StatusFailException("删除失败!"); - } - } - - @Transactional(rollbackFor = Exception.class) - public void insertBatchUser(List> users) throws StatusFailException { - List userInfoList = new LinkedList<>(); - List userRoleList = new LinkedList<>(); - List userRecordList = new LinkedList<>(); - if (users != null) { - for (List user : users) { - String uuid = IdUtil.simpleUUID(); - UserInfo userInfo = new UserInfo() - .setUuid(uuid) - .setUsername(user.get(0)) - .setPassword(SecureUtil.md5(user.get(1))) - .setEmail(StringUtils.isEmpty(user.get(2)) ? null : user.get(2)); - - if (user.size() >= 4) { - String realname = user.get(3); - if (!StringUtils.isEmpty(realname)) { - userInfo.setRealname(user.get(3)); - } - } - - if (user.size() >= 5) { - String gender = user.get(4); - if ("male".equals(gender.toLowerCase()) || "0".equals(gender)) { - userInfo.setGender("male"); - } else if ("female".equals(gender.toLowerCase()) || "1".equals(gender)) { - userInfo.setGender("female"); - } - } - - if (user.size() >= 6) { - String nickname = user.get(5); - if (!StringUtils.isEmpty(nickname)) { - userInfo.setNickname(nickname); - } - } - - if (user.size() >= 7) { - String school = user.get(6); - if (!StringUtils.isEmpty(school)) { - userInfo.setSchool(school); - } - } - - userInfoList.add(userInfo); - userRoleList.add(new UserRole() - .setRoleId(1002L) - .setUid(uuid)); - userRecordList.add(new UserRecord().setUid(uuid)); - } - boolean result1 = userInfoEntityService.saveBatch(userInfoList); - boolean result2 = userRoleEntityService.saveBatch(userRoleList); - boolean result3 = userRecordEntityService.saveBatch(userRecordList); - if (result1 && result2 && result3) { - // 异步同步系统通知 - List uidList = userInfoList.stream().map(UserInfo::getUuid).collect(Collectors.toList()); - adminNoticeManager.syncNoticeToNewRegisterBatchUser(uidList); - } else { - throw new StatusFailException("删除失败"); - } - } else { - throw new StatusFailException("插入的用户数据不能为空!"); - } - } - - @Transactional(rollbackFor = Exception.class) - public Map generateUser(Map params) throws StatusFailException { - - String prefix = (String) params.getOrDefault("prefix", ""); - String suffix = (String) params.getOrDefault("suffix", ""); - int numberFrom = (int) params.getOrDefault("number_from", 1); - int numberTo = (int) params.getOrDefault("number_to", 10); - int passwordLength = (int) params.getOrDefault("password_length", 6); - - List userInfoList = new LinkedList<>(); - List userRoleList = new LinkedList<>(); - List userRecordList = new LinkedList<>(); - - HashMap userInfo = new HashMap<>(); // 存储账号密码放入redis中,等待导出excel - for (int num = numberFrom; num <= numberTo; num++) { - String uuid = IdUtil.simpleUUID(); - String password = RandomUtil.randomString(passwordLength); - String username = prefix + num + suffix; - userInfoList.add(new UserInfo() - .setUuid(uuid) - .setUsername(username) - .setPassword(SecureUtil.md5(password))); - userInfo.put(username, password); - userRoleList.add(new UserRole() - .setRoleId(1002L) - .setUid(uuid)); - userRecordList.add(new UserRecord().setUid(uuid)); - } - boolean result1 = userInfoEntityService.saveBatch(userInfoList); - boolean result2 = userRoleEntityService.saveBatch(userRoleList); - boolean result3 = userRecordEntityService.saveBatch(userRecordList); - if (result1 && result2 && result3) { - String key = IdUtil.simpleUUID(); - redisUtils.hmset(key, userInfo, 1800); // 存储半小时 - // 异步同步系统通知 - List uidList = userInfoList.stream().map(UserInfo::getUuid).collect(Collectors.toList()); - adminNoticeManager.syncNoticeToNewRegisterBatchUser(uidList); - return MapUtil.builder().put("key", key).map(); - } else { - throw new StatusFailException("生成指定用户失败!"); - } - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/email/EmailManager.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/email/EmailManager.java deleted file mode 100644 index e85548e..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/email/EmailManager.java +++ /dev/null @@ -1,235 +0,0 @@ -package top.hcode.hoj.manager.email; - -import cn.hutool.core.date.DateTime; -import cn.hutool.core.date.DateUtil; -import cn.hutool.core.lang.Validator; -import cn.hutool.core.text.UnicodeUtil; -import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.cloud.context.config.annotation.RefreshScope; -import org.springframework.mail.javamail.JavaMailSenderImpl; -import org.springframework.mail.javamail.MimeMessageHelper; -import org.springframework.scheduling.annotation.Async; -import org.springframework.stereotype.Component; -import org.thymeleaf.TemplateEngine; -import org.thymeleaf.context.Context; -import top.hcode.hoj.utils.Constants; - -import javax.mail.MessagingException; -import javax.mail.internet.MimeMessage; -import java.util.Date; -import java.util.Properties; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/9 22:01 - * @Description: - */ - -@Component -@RefreshScope -@Slf4j(topic = "hoj") -public class EmailManager { - - @Autowired - private TemplateEngine templateEngine; - - @Value("${hoj.web-config.base-url}") - public String ojAddr; - - @Value("${hoj.web-config.name}") - public String ojName; - - @Value("${hoj.web-config.short-name}") - public String ojShortName; - - @Value("${hoj.mail.background-img}") - public String ojEmailBg; - - @Value("${hoj.mail.username}") - public String ojEmailFrom; - - @Value("${hoj.mail.password}") - public String ojEmailPassword; - - @Value("${hoj.mail.host}") - public String ojEmailHost; - - @Value("${hoj.mail.port}") - public Integer ojEmailPort; - - @Value("${hoj.mail.ssl}") - public String ojEmailSsl; - - /** - * @MethodName getMailSender - * @Params * @param - * @Description 获取邮件系统配置 - * @Return - * @Since 2021/5/21 - */ - private JavaMailSenderImpl getMailSender() { - - JavaMailSenderImpl sender = new JavaMailSenderImpl(); - sender.setHost(ojEmailHost); - sender.setPort(ojEmailPort); - sender.setDefaultEncoding("UTF-8"); - sender.setUsername(ojEmailFrom); - sender.setPassword(ojEmailPassword); - - Properties p = new Properties(); - p.setProperty("mail.smtp.ssl.enable", ojEmailSsl); - p.setProperty("mail.smtp.auth", "true"); - p.setProperty("mail.smtp.starttls.enable", ojEmailSsl); - sender.setJavaMailProperties(p); - return sender; - } - - /** - * @MethodName isOk - * @Params * @param null - * @Description 验证当前邮箱系统是否已配置。 - * @Return - * @Since 2021/6/12 - */ - public boolean isOk() { - return ojEmailFrom != null - && ojEmailPassword != null - && !ojEmailFrom.equals("your_email_username") - && !ojEmailPassword.equals("your_email_password") - && Validator.isEmail(ojEmailFrom); - } - - /** - * @param email 用户邮箱 - * @param code 生成的六位随机数字验证码 - * @MethodName sendCode - * @Description 为正在注册的用户发送一份注册验证码。 - * @Return - * @Since 2021/1/14 - */ - - @Async - public void sendCode(String email, String code) { - DateTime expireTime = DateUtil.offsetMinute(new Date(), 10); - JavaMailSenderImpl mailSender = getMailSender(); - MimeMessage mimeMessage = mailSender.createMimeMessage(); - try { - MimeMessageHelper mimeMessageHelper = new MimeMessageHelper(mimeMessage, - true); - // 设置渲染到html页面对应的值 - Context context = new Context(); - context.setVariable(Constants.Email.OJ_NAME.name(), UnicodeUtil.toString(ojName)); - context.setVariable(Constants.Email.OJ_SHORT_NAME.name(), UnicodeUtil.toString(ojShortName)); - context.setVariable(Constants.Email.OJ_URL.name(), ojAddr); - context.setVariable(Constants.Email.EMAIL_BACKGROUND_IMG.name(), ojEmailBg); - context.setVariable("CODE", code); - context.setVariable("EXPIRE_TIME", expireTime.toString()); - - //利用模板引擎加载html文件进行渲染并生成对应的字符串 - String emailContent = templateEngine.process("emailTemplate_registerCode", context); - - // 设置邮件标题 - mimeMessageHelper.setSubject(UnicodeUtil.toString(ojShortName)+ "的注册邮件"); - mimeMessageHelper.setText(emailContent, true); - // 收件人 - mimeMessageHelper.setTo(email); - // 发送人 - mimeMessageHelper.setFrom(ojEmailFrom); - - mailSender.send(mimeMessage); - } catch (MessagingException e) { - log.error("用户注册的邮件任务发生异常------------>{}", e.getMessage()); - } - } - - - /** - * @param username 需要重置密码的用户名 - * @param email 用户邮箱 - * @param code 随机生成20位数字与字母的组合 - * @MethodName sendResetPassword - * @Description 给指定的邮箱的用户发送重置密码链接的邮件。 - * @Return - * @Since 2021/1/14 - */ - @Async - public void sendResetPassword(String username, String code, String email) { - DateTime expireTime = DateUtil.offsetMinute(new Date(), 10); - JavaMailSenderImpl mailSender = getMailSender(); - MimeMessage mimeMessage = mailSender.createMimeMessage(); - try { - MimeMessageHelper mimeMessageHelper = new MimeMessageHelper(mimeMessage, - true); - // 设置渲染到html页面对应的值 - Context context = new Context(); - context.setVariable(Constants.Email.OJ_NAME.name(), UnicodeUtil.toString(ojName)); - context.setVariable(Constants.Email.OJ_SHORT_NAME.name(), UnicodeUtil.toString(ojShortName)); - context.setVariable(Constants.Email.OJ_URL.name(), ojAddr); - context.setVariable(Constants.Email.EMAIL_BACKGROUND_IMG.name(), ojEmailBg); - - String resetUrl; - if (ojAddr.endsWith("/")) { - resetUrl = ojAddr + "reset-password?username=" + username + "&code=" + code; - } else { - resetUrl = ojAddr + "/reset-password?username=" + username + "&code=" + code; - } - - context.setVariable("RESET_URL", resetUrl); - context.setVariable("EXPIRE_TIME", expireTime.toString()); - context.setVariable("USERNAME", username); - - //利用模板引擎加载html文件进行渲染并生成对应的字符串 - String emailContent = templateEngine.process("emailTemplate_resetPassword", context); - - mimeMessageHelper.setSubject(UnicodeUtil.toString(ojShortName)+ "的重置密码邮件"); - - mimeMessageHelper.setText(emailContent, true); - // 收件人 - mimeMessageHelper.setTo(email); - // 发送人 - mimeMessageHelper.setFrom(ojEmailFrom); - mailSender.send(mimeMessage); - } catch (MessagingException e) { - log.error("用户重置密码的邮件任务发生异常------------>{}", e.getMessage()); - } - } - - - /** - * @param email 用户邮箱 - * @MethodName testEmail - * @Description 超级管理员后台修改邮件系统配置后发送的测试邮箱可用性的测试邮件。 - * @Return - * @Since 2021/1/14 - */ - @Async - public void testEmail(String email) { - JavaMailSenderImpl mailSender = getMailSender(); - MimeMessage mimeMessage = mailSender.createMimeMessage(); - try { - MimeMessageHelper mimeMessageHelper = new MimeMessageHelper(mimeMessage, - true); - // 设置渲染到html页面对应的值 - Context context = new Context(); - context.setVariable(Constants.Email.OJ_NAME.name(), UnicodeUtil.toString(ojName)); - context.setVariable(Constants.Email.OJ_SHORT_NAME.name(), UnicodeUtil.toString(ojShortName)); - context.setVariable(Constants.Email.OJ_URL.name(), ojAddr); - context.setVariable(Constants.Email.EMAIL_BACKGROUND_IMG.name(), ojEmailBg); - //利用模板引擎加载html文件进行渲染并生成对应的字符串 - String emailContent = templateEngine.process("emailTemplate_testEmail", context); - - mimeMessageHelper.setSubject(UnicodeUtil.toString(ojShortName) + "的测试邮件"); - - mimeMessageHelper.setText(emailContent, true); - // 收件人 - mimeMessageHelper.setTo(email); - // 发送人 - mimeMessageHelper.setFrom(ojEmailFrom); - mailSender.send(mimeMessage); - } catch (MessagingException e) { - log.error("超级管理员重置邮件系统配置的测试邮箱可用性的任务发生异常------------>{}", e.getMessage()); - } - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ContestFileManager.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ContestFileManager.java deleted file mode 100644 index f601e40..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ContestFileManager.java +++ /dev/null @@ -1,469 +0,0 @@ -package top.hcode.hoj.manager.file; - -import cn.hutool.core.io.FileUtil; -import cn.hutool.core.io.file.FileReader; -import cn.hutool.core.io.file.FileWriter; -import cn.hutool.core.util.IdUtil; -import cn.hutool.core.util.ZipUtil; -import cn.hutool.json.JSONUtil; -import top.hcode.hoj.validator.GroupValidator; -import com.alibaba.excel.EasyExcel; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import lombok.extern.slf4j.Slf4j; -import org.apache.shiro.SecurityUtils; -import org.apache.shiro.session.Session; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.exception.StatusForbiddenException; -import top.hcode.hoj.common.result.ResultStatus; -import top.hcode.hoj.manager.oj.ContestCalculateRankManager; -import top.hcode.hoj.pojo.entity.contest.Contest; -import top.hcode.hoj.pojo.entity.contest.ContestPrint; -import top.hcode.hoj.pojo.entity.contest.ContestProblem; -import top.hcode.hoj.pojo.entity.judge.Judge; -import top.hcode.hoj.pojo.vo.ACMContestRankVo; -import top.hcode.hoj.pojo.vo.OIContestRankVo; -import top.hcode.hoj.pojo.vo.UserRolesVo; -import top.hcode.hoj.dao.common.FileEntityService; -import top.hcode.hoj.dao.contest.ContestPrintEntityService; -import top.hcode.hoj.dao.contest.ContestProblemEntityService; -import top.hcode.hoj.dao.contest.ContestEntityService; -import top.hcode.hoj.dao.judge.JudgeEntityService; -import top.hcode.hoj.dao.user.UserInfoEntityService; -import top.hcode.hoj.utils.Constants; -import top.hcode.hoj.validator.ContestValidator; - -import javax.servlet.http.HttpServletResponse; -import java.io.*; -import java.net.URLEncoder; -import java.text.SimpleDateFormat; -import java.util.*; -import java.util.concurrent.ConcurrentHashMap; -import java.util.function.Function; -import java.util.function.Predicate; -import java.util.stream.Collectors; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/10 14:27 - * @Description: - */ -@Component -@Slf4j(topic = "hoj") -public class ContestFileManager { - - @Autowired - private ContestEntityService contestEntityService; - - @Autowired - private ContestProblemEntityService contestProblemEntityService; - - @Autowired - private ContestPrintEntityService contestPrintEntityService; - - @Autowired - private FileEntityService fileEntityService; - - @Autowired - private JudgeEntityService judgeEntityService; - - @Autowired - private UserInfoEntityService userInfoEntityService; - - @Autowired - private ContestCalculateRankManager contestCalculateRankManager; - - @Autowired - private ContestValidator contestValidator; - - @Autowired - private GroupValidator groupValidator; - - public void downloadContestRank(Long cid, Boolean forceRefresh, Boolean removeStar, HttpServletResponse response) throws IOException, StatusFailException, StatusForbiddenException { - // 获取当前登录的用户 - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - // 获取本场比赛的状态 - Contest contest = contestEntityService.getById(cid); - - if (contest == null) { - throw new StatusFailException("错误:该比赛不存在!"); - } - - // 是否为超级管理员 - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - Long gid = contest.getGid(); - - if (!isRoot - && !contest.getUid().equals(userRolesVo.getUid()) - && !(contest.getIsGroup() && groupValidator.isGroupRoot(userRolesVo.getUid(), gid))) { - throw new StatusForbiddenException("错误:您并非该比赛的管理员,无权下载榜单!"); - } - - // 检查是否需要开启封榜模式 - Boolean isOpenSealRank = contestValidator.isSealRank(userRolesVo.getUid(), contest, forceRefresh, isRoot); - response.setContentType("application/vnd.ms-excel"); - response.setCharacterEncoding("utf-8"); - // 这里URLEncoder.encode可以防止中文乱码 - String fileName = URLEncoder.encode("contest_" + contest.getId() + "_rank", "UTF-8"); - response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx"); - response.setHeader("Content-Type", "application/xlsx"); - - // 获取题目displayID列表 - QueryWrapper contestProblemQueryWrapper = new QueryWrapper<>(); - contestProblemQueryWrapper.eq("cid", contest.getId()).select("display_id").orderByAsc("display_id"); - List contestProblemDisplayIDList = contestProblemEntityService.list(contestProblemQueryWrapper) - .stream().map(ContestProblem::getDisplayId).collect(Collectors.toList()); - - if (contest.getType().intValue() == Constants.Contest.TYPE_ACM.getCode()) { // ACM比赛 - - List acmContestRankVoList = contestCalculateRankManager.calcACMRank( - isOpenSealRank, - removeStar, - contest, - null, - null, - null); - EasyExcel.write(response.getOutputStream()) - .head(fileEntityService.getContestRankExcelHead(contestProblemDisplayIDList, true)) - .sheet("rank") - .doWrite(fileEntityService.changeACMContestRankToExcelRowList(acmContestRankVoList, contestProblemDisplayIDList, contest.getRankShowName())); - } else { - List oiContestRankVoList = contestCalculateRankManager.calcOIRank( - isOpenSealRank, - removeStar, - contest, - null, - null, - null); - EasyExcel.write(response.getOutputStream()) - .head(fileEntityService.getContestRankExcelHead(contestProblemDisplayIDList, false)) - .sheet("rank") - .doWrite(fileEntityService.changOIContestRankToExcelRowList(oiContestRankVoList, contestProblemDisplayIDList, contest.getRankShowName())); - } - } - - public void downloadContestACSubmission(Long cid, Boolean excludeAdmin, String splitType, HttpServletResponse response) throws StatusForbiddenException, StatusFailException { - - Contest contest = contestEntityService.getById(cid); - - if (contest == null) { - throw new StatusFailException("错误:该比赛不存在!"); - } - - // 获取当前登录的用户 - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - // 除非是root 其它管理员只能下载自己的比赛ac记录 - - Long gid = contest.getGid(); - if (!isRoot - && !contest.getUid().equals(userRolesVo.getUid()) - && !(contest.getIsGroup() && groupValidator.isGroupRoot(userRolesVo.getUid(), gid))) { - throw new StatusForbiddenException("错误:您并非该比赛的管理员,无权下载AC记录!"); - } - - boolean isACM = contest.getType().intValue() == Constants.Contest.TYPE_ACM.getCode(); - - QueryWrapper contestProblemQueryWrapper = new QueryWrapper<>(); - contestProblemQueryWrapper.eq("cid", contest.getId()); - List contestProblemList = contestProblemEntityService.list(contestProblemQueryWrapper); - - List superAdminUidList = userInfoEntityService.getSuperAdminUidList(); - - QueryWrapper judgeQueryWrapper = new QueryWrapper<>(); - judgeQueryWrapper.eq("cid", cid) - .eq(isACM, "status", Constants.Judge.STATUS_ACCEPTED.getStatus()) - .isNotNull(!isACM, "score") // OI模式取得分不为null的 - .between("submit_time", contest.getStartTime(), contest.getEndTime()) - .ne(excludeAdmin, "uid", contest.getUid()) // 排除比赛创建者和root - .notIn(excludeAdmin && superAdminUidList.size() > 0, "uid", superAdminUidList) - .orderByDesc("submit_time"); - - List judgeList = judgeEntityService.list(judgeQueryWrapper); - - // 打包文件的临时路径 -> username为文件夹名字 - String tmpFilesDir = Constants.File.CONTEST_AC_SUBMISSION_TMP_FOLDER.getPath() + File.separator + IdUtil.fastSimpleUUID(); - FileUtil.mkdir(tmpFilesDir); - - HashMap recordMap = new HashMap<>(); - if ("user".equals(splitType)) { - /** - * 以用户来分割提交的代码 - */ - List usernameList = judgeList.stream() - .filter(distinctByKey(Judge::getUsername)) // 根据用户名过滤唯一 - .map(Judge::getUsername).collect(Collectors.toList()); // 映射出用户名列表 - - - HashMap cpIdMap = new HashMap<>(); - for (ContestProblem contestProblem : contestProblemList) { - cpIdMap.put(contestProblem.getId(), contestProblem.getDisplayId()); - } - - for (String username : usernameList) { - // 对于每个用户生成对应的文件夹 - String userDir = tmpFilesDir + File.separator + username; - FileUtil.mkdir(userDir); - // 如果是ACM模式,则所有提交代码都要生成,如果同一题多次提交AC,加上提交时间秒后缀 ---> A_(666666).c - // 如果是OI模式就生成最近一次提交即可,且带上分数 ---> A_(666666)_100.c - List userSubmissionList = judgeList.stream() - .filter(judge -> judge.getUsername().equals(username)) // 过滤出对应用户的提交 - .sorted(Comparator.comparing(Judge::getSubmitTime).reversed()) // 根据提交时间进行降序 - .collect(Collectors.toList()); - - for (Judge judge : userSubmissionList) { - String filePath = userDir + File.separator + cpIdMap.getOrDefault(judge.getCpid(), "null"); - - // OI模式只取最后一次提交 - if (!isACM) { - String key = judge.getUsername() + "_" + judge.getPid(); - if (!recordMap.containsKey(key)) { - filePath += "_" + judge.getScore() + "_(" + threadLocalTime.get().format(judge.getSubmitTime()) + ")." - + languageToFileSuffix(judge.getLanguage().toLowerCase()); - FileWriter fileWriter = new FileWriter(filePath); - fileWriter.write(judge.getCode()); - recordMap.put(key, true); - } - - } else { - filePath += "_(" + threadLocalTime.get().format(judge.getSubmitTime()) + ")." - + languageToFileSuffix(judge.getLanguage().toLowerCase()); - FileWriter fileWriter = new FileWriter(filePath); - fileWriter.write(judge.getCode()); - } - - } - } - } else if ("problem".equals(splitType)) { - /** - * 以比赛题目编号来分割提交的代码 - */ - - for (ContestProblem contestProblem : contestProblemList) { - // 对于每题目生成对应的文件夹 - String problemDir = tmpFilesDir + File.separator + contestProblem.getDisplayId(); - FileUtil.mkdir(problemDir); - // 如果是ACM模式,则所有提交代码都要生成,如果同一题多次提交AC,加上提交时间秒后缀 ---> username_(666666).c - // 如果是OI模式就生成最近一次提交即可,且带上分数 ---> username_(666666)_100.c - List problemSubmissionList = judgeList.stream() - .filter(judge -> judge.getPid().equals(contestProblem.getPid())) // 过滤出对应题目的提交 - .sorted(Comparator.comparing(Judge::getSubmitTime).reversed()) // 根据提交时间进行降序 - .collect(Collectors.toList()); - - for (Judge judge : problemSubmissionList) { - String filePath = problemDir + File.separator + judge.getUsername(); - if (!isACM) { - String key = judge.getUsername() + "_" + contestProblem.getDisplayId(); - // OI模式只取最后一次提交 - if (!recordMap.containsKey(key)) { - filePath += "_" + judge.getScore() + "_(" + threadLocalTime.get().format(judge.getSubmitTime()) + ")." - + languageToFileSuffix(judge.getLanguage().toLowerCase()); - FileWriter fileWriter = new FileWriter(filePath); - fileWriter.write(judge.getCode()); - recordMap.put(key, true); - } - } else { - filePath += "_(" + threadLocalTime.get().format(judge.getSubmitTime()) + ")." - + languageToFileSuffix(judge.getLanguage().toLowerCase()); - FileWriter fileWriter = new FileWriter(filePath); - fileWriter.write(judge.getCode()); - } - } - } - } - - String zipFileName = "contest_" + contest.getId() + "_" + System.currentTimeMillis() + ".zip"; - String zipPath = Constants.File.CONTEST_AC_SUBMISSION_TMP_FOLDER.getPath() + File.separator + zipFileName; - ZipUtil.zip(tmpFilesDir, zipPath); - // 将zip变成io流返回给前端 - FileReader zipFileReader = new FileReader(zipPath); - BufferedInputStream bins = new BufferedInputStream(zipFileReader.getInputStream());//放到缓冲流里面 - OutputStream outs = null;//获取文件输出IO流 - BufferedOutputStream bouts = null; - try { - outs = response.getOutputStream(); - bouts = new BufferedOutputStream(outs); - response.setContentType("application/x-download"); - response.setHeader("Content-disposition", "attachment;filename=" + URLEncoder.encode(zipFileName, "UTF-8")); - int bytesRead = 0; - byte[] buffer = new byte[1024 * 10]; - //开始向网络传输文件流 - while ((bytesRead = bins.read(buffer, 0, 1024 * 10)) != -1) { - bouts.write(buffer, 0, bytesRead); - } - // 刷新缓存 - bouts.flush(); - } catch (IOException e) { - log.error("下载比赛AC提交代码的压缩文件异常------------>", e); - response.reset(); - response.setContentType("application/json"); - response.setCharacterEncoding("utf-8"); - Map map = new HashMap<>(); - map.put("status", ResultStatus.SYSTEM_ERROR); - map.put("msg", "下载文件失败,请重新尝试!"); - map.put("data", null); - try { - response.getWriter().println(JSONUtil.toJsonStr(map)); - } catch (IOException ioException) { - ioException.printStackTrace(); - } - } finally { - try { - bins.close(); - if (outs != null) { - outs.close(); - } - if (bouts != null) { - bouts.close(); - } - } catch (IOException e) { - e.printStackTrace(); - } - } - - FileUtil.del(tmpFilesDir); - FileUtil.del(zipPath); - - } - - public void downloadContestPrintText(Long id, HttpServletResponse response) throws StatusForbiddenException { - ContestPrint contestPrint = contestPrintEntityService.getById(id); - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - Long cid = contestPrint.getCid(); - - Contest contest = contestEntityService.getById(cid); - - Long gid = contest.getGid(); - - if (!isRoot && !contest.getUid().equals(userRolesVo.getUid()) - && !(contest.getIsGroup() && groupValidator.isGroupRoot(userRolesVo.getUid(), gid))) { - throw new StatusForbiddenException("错误:您并非该比赛的管理员,无权下载打印代码!"); - } - - String filename = contestPrint.getUsername() + "_Contest_Print.txt"; - String filePath = Constants.File.CONTEST_TEXT_PRINT_FOLDER.getPath() + File.separator + id + File.separator + filename; - if (!FileUtil.exist(filePath)) { - - FileWriter fileWriter = new FileWriter(filePath); - fileWriter.write(contestPrint.getContent()); - } - - FileReader zipFileReader = new FileReader(filePath); - BufferedInputStream bins = new BufferedInputStream(zipFileReader.getInputStream());//放到缓冲流里面 - OutputStream outs = null;//获取文件输出IO流 - BufferedOutputStream bouts = null; - try { - outs = response.getOutputStream(); - bouts = new BufferedOutputStream(outs); - response.setContentType("application/x-download"); - response.setHeader("Content-disposition", "attachment;filename=" + URLEncoder.encode(filename, "UTF-8")); - int bytesRead = 0; - byte[] buffer = new byte[1024 * 10]; - //开始向网络传输文件流 - while ((bytesRead = bins.read(buffer, 0, 1024 * 10)) != -1) { - bouts.write(buffer, 0, bytesRead); - } - // 刷新缓存 - bouts.flush(); - } catch (IOException e) { - log.error("下载比赛打印文本文件异常------------>", e); - response.reset(); - response.setContentType("application/json"); - response.setCharacterEncoding("utf-8"); - Map map = new HashMap<>(); - map.put("status", ResultStatus.SYSTEM_ERROR); - map.put("msg", "下载文件失败,请重新尝试!"); - map.put("data", null); - try { - response.getWriter().println(JSONUtil.toJsonStr(map)); - } catch (IOException ioException) { - ioException.printStackTrace(); - } - } finally { - try { - bins.close(); - if (outs != null) { - outs.close(); - } - if (bouts != null) { - bouts.close(); - } - } catch (IOException e) { - e.printStackTrace(); - } - } - } - - - private static final ThreadLocal threadLocalTime = new ThreadLocal() { - @Override - protected SimpleDateFormat initialValue() { - return new SimpleDateFormat("yyyyMMddHHmmss"); - } - }; - - private static Predicate distinctByKey(Function keyExtractor) { - Map seen = new ConcurrentHashMap<>(); - return t -> seen.putIfAbsent(keyExtractor.apply(t), Boolean.TRUE) == null; - } - - private static String languageToFileSuffix(String language) { - - List CLang = Arrays.asList("c", "gcc", "clang"); - List CPPLang = Arrays.asList("c++", "g++", "clang++"); - List PythonLang = Arrays.asList("python", "pypy"); - - for (String lang : CPPLang) { - if (language.contains(lang)) { - return "cpp"; - } - } - - if (language.contains("c#")) { - return "cs"; - } - - for (String lang : CLang) { - if (language.contains(lang)) { - return "c"; - } - } - - for (String lang : PythonLang) { - if (language.contains(lang)) { - return "py"; - } - } - - if (language.contains("javascript")) { - return "js"; - } - - if (language.contains("java")) { - return "java"; - } - - if (language.contains("pascal")) { - return "pas"; - } - - if (language.contains("go")) { - return "go"; - } - - if (language.contains("php")) { - return "php"; - } - - return "txt"; - } - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImageManager.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImageManager.java deleted file mode 100644 index c83ed8f..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImageManager.java +++ /dev/null @@ -1,216 +0,0 @@ -package top.hcode.hoj.manager.file; - -import cn.hutool.core.io.FileUtil; -import cn.hutool.core.map.MapUtil; -import cn.hutool.core.util.IdUtil; -import top.hcode.hoj.common.exception.StatusForbiddenException; -import top.hcode.hoj.dao.group.GroupEntityService; -import top.hcode.hoj.pojo.entity.group.Group; -import top.hcode.hoj.validator.GroupValidator; -import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; -import lombok.extern.slf4j.Slf4j; -import org.apache.shiro.SecurityUtils; -import org.apache.shiro.session.Session; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; -import org.springframework.transaction.annotation.Transactional; -import org.springframework.web.multipart.MultipartFile; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.exception.StatusSystemErrorException; -import top.hcode.hoj.pojo.entity.user.Role; -import top.hcode.hoj.pojo.entity.user.UserInfo; -import top.hcode.hoj.pojo.vo.UserRolesVo; -import top.hcode.hoj.dao.common.FileEntityService; -import top.hcode.hoj.dao.user.UserInfoEntityService; -import top.hcode.hoj.utils.Constants; - -import java.io.File; -import java.util.Map; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/10 14:31 - * @Description: - */ -@Component -@Slf4j(topic = "hoj") -public class ImageManager { - - @Autowired - private FileEntityService fileEntityService; - - @Autowired - private UserInfoEntityService userInfoEntityService; - - @Autowired - private GroupEntityService groupEntityService; - - @Autowired - private GroupValidator groupValidator; - - @Transactional(rollbackFor = Exception.class) - public Map uploadAvatar(MultipartFile image) throws StatusFailException, StatusSystemErrorException { - if (image == null) { - throw new StatusFailException("上传的头像图片文件不能为空!"); - } - if (image.getSize() > 1024 * 1024 * 2) { - throw new StatusFailException("上传的头像图片文件大小不能大于2M!"); - } - //获取文件后缀 - String suffix = image.getOriginalFilename().substring(image.getOriginalFilename().lastIndexOf(".") + 1); - if (!"jpg,jpeg,gif,png,webp".toUpperCase().contains(suffix.toUpperCase())) { - throw new StatusFailException("请选择jpg,jpeg,gif,png,webp格式的头像图片!"); - } - //若不存在该目录,则创建目录 - FileUtil.mkdir(Constants.File.USER_AVATAR_FOLDER.getPath()); - //通过UUID生成唯一文件名 - String filename = IdUtil.simpleUUID() + "." + suffix; - try { - //将文件保存指定目录 - image.transferTo(FileUtil.file(Constants.File.USER_AVATAR_FOLDER.getPath() + File.separator + filename)); - } catch (Exception e) { - log.error("头像文件上传异常-------------->", e); - throw new StatusSystemErrorException("服务器异常:头像上传失败!"); - } - - // 获取当前登录用户 - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - - // 将当前用户所属的file表中avatar类型的实体的delete设置为1; - fileEntityService.updateFileToDeleteByUidAndType(userRolesVo.getUid(), "avatar"); - - //更新user_info里面的avatar - UpdateWrapper userInfoUpdateWrapper = new UpdateWrapper<>(); - userInfoUpdateWrapper.set("avatar", Constants.File.IMG_API.getPath() + filename) - .eq("uuid", userRolesVo.getUid()); - userInfoEntityService.update(userInfoUpdateWrapper); - - // 插入file表记录 - top.hcode.hoj.pojo.entity.common.File imgFile = new top.hcode.hoj.pojo.entity.common.File(); - imgFile.setName(filename).setFolderPath(Constants.File.USER_AVATAR_FOLDER.getPath()) - .setFilePath(Constants.File.USER_AVATAR_FOLDER.getPath() + File.separator + filename) - .setSuffix(suffix) - .setType("avatar") - .setUid(userRolesVo.getUid()); - fileEntityService.saveOrUpdate(imgFile); - - // 更新session - userRolesVo.setAvatar(Constants.File.IMG_API.getPath() + filename); - session.setAttribute("userInfo", userRolesVo); - return MapUtil.builder() - .put("uid", userRolesVo.getUid()) - .put("username", userRolesVo.getUsername()) - .put("nickname", userRolesVo.getNickname()) - .put("avatar", Constants.File.IMG_API.getPath() + filename) - .put("email", userRolesVo.getEmail()) - .put("number", userRolesVo.getNumber()) - .put("school", userRolesVo.getSchool()) - .put("course", userRolesVo.getCourse()) - .put("signature", userRolesVo.getSignature()) - .put("realname", userRolesVo.getRealname()) - .put("github", userRolesVo.getGithub()) - .put("blog", userRolesVo.getBlog()) - .put("cfUsername", userRolesVo.getCfUsername()) - .put("roleList", userRolesVo.getRoles().stream().map(Role::getRole)) - .map(); - } - - @Transactional(rollbackFor = Exception.class) - public Group uploadGroupAvatar(MultipartFile image, Long gid) throws StatusFailException, StatusSystemErrorException, StatusForbiddenException { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - if (!isRoot && !groupValidator.isGroupRoot(userRolesVo.getUid(), gid)) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - - if (image == null) { - throw new StatusFailException("上传的头像图片文件不能为空!"); - } - if (image.getSize() > 1024 * 1024 * 2) { - throw new StatusFailException("上传的头像图片文件大小不能大于2M!"); - } - - String suffix = image.getOriginalFilename().substring(image.getOriginalFilename().lastIndexOf(".") + 1); - if (!"jpg,jpeg,gif,png,webp".toUpperCase().contains(suffix.toUpperCase())) { - throw new StatusFailException("请选择jpg,jpeg,gif,png,webp格式的头像图片!"); - } - - FileUtil.mkdir(Constants.File.GROUP_AVATAR_FOLDER.getPath()); - - String filename = IdUtil.simpleUUID() + "." + suffix; - try { - image.transferTo(FileUtil.file(Constants.File.GROUP_AVATAR_FOLDER.getPath() + File.separator + filename)); - } catch (Exception e) { - log.error("头像文件上传异常-------------->", e); - throw new StatusSystemErrorException("服务器异常:头像上传失败!"); - } - - fileEntityService.updateFileToDeleteByGidAndType(gid, "avatar"); - - UpdateWrapper GroupUpdateWrapper = new UpdateWrapper<>(); - GroupUpdateWrapper.set("avatar", Constants.File.IMG_API.getPath() + filename) - .eq("id", gid); - groupEntityService.update(GroupUpdateWrapper); - - top.hcode.hoj.pojo.entity.common.File imgFile = new top.hcode.hoj.pojo.entity.common.File(); - imgFile.setName(filename).setFolderPath(Constants.File.GROUP_AVATAR_FOLDER.getPath()) - .setFilePath(Constants.File.GROUP_AVATAR_FOLDER.getPath() + File.separator + filename) - .setSuffix(suffix) - .setType("avatar") - .setGid(gid); - fileEntityService.saveOrUpdate(imgFile); - - Group group = groupEntityService.getById(gid); - - return group; - } - - @Transactional(rollbackFor = Exception.class) - public Map uploadCarouselImg(MultipartFile image) throws StatusFailException, StatusSystemErrorException { - - if (image == null) { - throw new StatusFailException("上传的图片文件不能为空!"); - } - - //获取文件后缀 - String suffix = image.getOriginalFilename().substring(image.getOriginalFilename().lastIndexOf(".") + 1); - if (!"jpg,jpeg,gif,png,webp,jfif,svg".toUpperCase().contains(suffix.toUpperCase())) { - throw new StatusFailException("请选择jpg,jpeg,gif,png,webp,jfif,svg格式的头像图片!"); - } - //若不存在该目录,则创建目录 - FileUtil.mkdir(Constants.File.HOME_CAROUSEL_FOLDER.getPath()); - //通过UUID生成唯一文件名 - String filename = IdUtil.simpleUUID() + "." + suffix; - try { - //将文件保存指定目录 - image.transferTo(FileUtil.file(Constants.File.HOME_CAROUSEL_FOLDER.getPath() + File.separator + filename)); - } catch (Exception e) { - log.error("图片文件上传异常-------------->{}", e.getMessage()); - throw new StatusSystemErrorException("服务器异常:图片上传失败!"); - } - - // 获取当前登录用户 - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - - // 插入file表记录 - top.hcode.hoj.pojo.entity.common.File imgFile = new top.hcode.hoj.pojo.entity.common.File(); - imgFile.setName(filename).setFolderPath(Constants.File.HOME_CAROUSEL_FOLDER.getPath()) - .setFilePath(Constants.File.HOME_CAROUSEL_FOLDER.getPath() + File.separator + filename) - .setSuffix(suffix) - .setType("carousel") - .setUid(userRolesVo.getUid()); - fileEntityService.saveOrUpdate(imgFile); - - return MapUtil.builder() - .put("id", imgFile.getId()) - .put("url", Constants.File.IMG_API.getPath() + filename) - .map(); - } - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImportFpsProblemManager.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImportFpsProblemManager.java deleted file mode 100644 index 7cb2ae2..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImportFpsProblemManager.java +++ /dev/null @@ -1,325 +0,0 @@ -package top.hcode.hoj.manager.file; - -import cn.hutool.core.io.FileUtil; -import cn.hutool.core.io.file.FileWriter; -import cn.hutool.core.util.IdUtil; -import cn.hutool.core.util.XmlUtil; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import lombok.extern.slf4j.Slf4j; -import org.apache.shiro.SecurityUtils; -import org.apache.shiro.session.Session; -import org.springframework.stereotype.Component; -import org.springframework.transaction.annotation.Transactional; -import org.springframework.util.CollectionUtils; -import org.springframework.util.StringUtils; -import org.springframework.web.multipart.MultipartFile; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.xml.sax.SAXException; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.pojo.dto.ProblemDto; -import top.hcode.hoj.pojo.entity.problem.CodeTemplate; -import top.hcode.hoj.pojo.entity.problem.Language; -import top.hcode.hoj.pojo.entity.problem.Problem; -import top.hcode.hoj.pojo.entity.problem.ProblemCase; -import top.hcode.hoj.pojo.vo.UserRolesVo; -import top.hcode.hoj.dao.problem.LanguageEntityService; -import top.hcode.hoj.dao.problem.ProblemEntityService; -import top.hcode.hoj.utils.Constants; - -import javax.annotation.Resource; -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; -import java.io.File; -import java.io.IOException; -import java.io.InputStream; -import java.util.*; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/10 14:44 - * @Description: - */ - -@Component -@Slf4j -public class ImportFpsProblemManager { - - private final static List timeUnits = Arrays.asList("ms", "s"); - private final static List memoryUnits = Arrays.asList("kb", "mb"); - private static final Map fpsMapHOJ = new HashMap() { - { - put("Python", "Python3"); - put("Go", "Golang"); - put("C", "C"); - put("C++", "C++"); - put("Java", "Java"); - put("C#", "C#"); - } - }; - - @Resource - private LanguageEntityService languageEntityService; - - @Resource - private ProblemEntityService problemEntityService; - - /** - * @param file - * @MethodName importFpsProblem - * @Description zip文件导入题目 仅超级管理员可操作 - * @Return - * @Since 2021/10/06 - */ - @Transactional(rollbackFor = Exception.class) - public void importFPSProblem(MultipartFile file) throws IOException, StatusFailException { - String suffix = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".") + 1); - if (!"xml".toUpperCase().contains(suffix.toUpperCase())) { - throw new StatusFailException("请上传xml后缀格式的fps题目文件!"); - } - // 获取当前登录的用户 - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - List problemDtoList = parseFps(file.getInputStream(), userRolesVo.getUsername()); - if (problemDtoList.size() == 0) { - throw new StatusFailException("警告:未成功导入一道以上的题目,请检查文件格式是否正确!"); - } else { - for (ProblemDto problemDto : problemDtoList) { - problemEntityService.adminAddProblem(problemDto); - } - } - - } - - private List parseFps(InputStream inputStream, String username) throws StatusFailException { - - Document document = null; - try { - DocumentBuilderFactory documentBuilderFactory = XmlUtil.createDocumentBuilderFactory(); - documentBuilderFactory.setFeature("http://apache.org/xml/features/disallow-doctype-decl", false); - DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder(); - document = documentBuilder.parse(inputStream); - } catch (ParserConfigurationException e) { - log.error("build DocumentBuilder error:", e); - } catch (IOException e) { - log.error("read xml file error:", e); - } catch (SAXException e) { - log.error("parse xml file error:", e); - } - if (document == null) { - throw new StatusFailException("读取xml失败,请检查FPS文件格式是否准确!"); - } - - Element rootElement = XmlUtil.getRootElement(document); - String version = rootElement.getAttribute("version"); - - List problemDtoList = new ArrayList<>(); - - String fileDirId = IdUtil.simpleUUID(); - String fileDir = Constants.File.TESTCASE_TMP_FOLDER.getPath() + File.separator + fileDirId; - long time = System.currentTimeMillis(); - int index = 1; - for (Element item : XmlUtil.getElements(rootElement, "item")) { - - Problem problem = new Problem(); - - problem.setAuthor(username) - .setType(0) - .setIsUploadCase(true) - .setDifficulty(1) - .setIsRemoveEndBlank(true) - .setOpenCaseResult(true) - .setCodeShare(false) - .setIsRemote(false) - .setAuth(1) - .setIsGroup(false) - .setProblemId(String.valueOf(time + index)); - - Element title = XmlUtil.getElement(item, "title"); - // 标题 - problem.setTitle(title.getTextContent()); - - HashMap srcMapUrl = new HashMap<>(); - List images = XmlUtil.getElements(item, "img"); - for (Element img : images) { - Element srcElement = XmlUtil.getElement(img, "src"); - if (srcElement == null) { - continue; - } - String src = srcElement.getTextContent(); - String base64 = XmlUtil.getElement(img, "base64").getTextContent(); - String[] split = src.split("\\."); - - byte[] decode = Base64.getDecoder().decode(base64); - String fileName = IdUtil.fastSimpleUUID() + "." + split[split.length - 1]; - - FileUtil.writeBytes(decode, Constants.File.MARKDOWN_FILE_FOLDER.getPath() + File.separator + fileName); - srcMapUrl.put(src, Constants.File.IMG_API.getPath() + fileName); - } - - Element descriptionElement = XmlUtil.getElement(item, "description"); - String description = descriptionElement.getTextContent(); - for (Map.Entry entry : srcMapUrl.entrySet()) { - description = description.replaceAll(entry.getKey(), entry.getValue()); - } - // 题目描述 - problem.setDescription(description); - - Element inputElement = XmlUtil.getElement(item, "input"); - String input = inputElement.getTextContent(); - for (Map.Entry entry : srcMapUrl.entrySet()) { - input = input.replaceAll(entry.getKey(), entry.getValue()); - } - // 输入描述 - problem.setInput(input); - - Element outputElement = XmlUtil.getElement(item, "output"); - String output = outputElement.getTextContent(); - for (Map.Entry entry : srcMapUrl.entrySet()) { - output = output.replaceAll(entry.getKey(), entry.getValue()); - } - // 输出描述 - problem.setOutput(output); - - // 提示 - Element hintElement = XmlUtil.getElement(item, "hint"); - String hint = hintElement.getTextContent(); - for (Map.Entry entry : srcMapUrl.entrySet()) { - hint = hint.replaceAll(entry.getKey(), entry.getValue()); - } - problem.setHint(hint); - - // 来源 - Element sourceElement = XmlUtil.getElement(item, "source"); - String source = sourceElement.getTextContent(); - problem.setSource(source); - - // ms - Integer timeLimit = getTimeLimit(version, item); - problem.setTimeLimit(timeLimit); - - // mb - Integer memoryLimit = getMemoryLimit(item); - problem.setMemoryLimit(memoryLimit); - - // 题面用例 - List sampleInputs = XmlUtil.getElements(item, "sample_input"); - List sampleOutputs = XmlUtil.getElements(item, "sample_output"); - StringBuilder sb = new StringBuilder(); - for (int i = 0; i < sampleInputs.size(); i++) { - sb.append("").append(sampleInputs.get(i).getTextContent()).append(""); - sb.append("").append(sampleOutputs.get(i).getTextContent()).append(""); - } - problem.setExamples(sb.toString()); - - - QueryWrapper languageQueryWrapper = new QueryWrapper<>(); - languageQueryWrapper.eq("oj", "ME"); - List languageList = languageEntityService.list(languageQueryWrapper); - - HashMap languageMap = new HashMap<>(); - for (Language language : languageList) { - languageMap.put(language.getName(), language.getId()); - } - - // 题目模板 - List templateNodes = XmlUtil.getElements(item, "template"); - List codeTemplates = new ArrayList<>(); - for (Element templateNode : templateNodes) { - String templateLanguage = templateNode.getAttribute("language"); - String templateCode = templateNode.getTextContent(); - if (templateLanguage == null || templateCode == null) { - continue; - } - String lang = fpsMapHOJ.get(templateLanguage); - if (lang != null) { - codeTemplates.add(new CodeTemplate() - .setCode(templateCode) - .setLid(languageMap.get(lang))); - } - - } - - // spj - Element spjNode = XmlUtil.getElement(item, "spj"); - if (spjNode != null) { - String spjLanguage = spjNode.getAttribute("language"); - String spjCode = spjNode.getTextContent(); - if (("C".equals(spjLanguage) || "C++".equals(spjLanguage)) && !StringUtils.isEmpty(spjCode)) { - problem.setSpjLanguage(spjLanguage) - .setSpjCode(spjCode); - } - } - - // 题目评测数据 - List testInputs = XmlUtil.getElements(item, "test_input"); - List testOutputs = XmlUtil.getElements(item, "test_output"); - - boolean isNotOutputTestCase = CollectionUtils.isEmpty(testOutputs); - - List problemSamples = new LinkedList<>(); - String problemTestCaseDir = fileDir + File.separator + index; - for (int i = 0; i < testInputs.size(); i++) { - String infileName = (i + 1) + ".in"; - String outfileName = (i + 1) + ".out"; - FileWriter infileWriter = new FileWriter(problemTestCaseDir + File.separator + infileName); - FileWriter outfileWriter = new FileWriter(problemTestCaseDir + File.separator + outfileName); - infileWriter.write(testInputs.get(i).getTextContent()); - outfileWriter.write(isNotOutputTestCase ? "" : testOutputs.get(i).getTextContent()); - problemSamples.add(new ProblemCase() - .setInput(infileName).setOutput(outfileName)); - } - if (CollectionUtils.isEmpty(problemSamples)) { - throw new StatusFailException("[" + problem.getTitle() + "] 题目的评测数据不能为空,请检查FPS文件内该题目是否有test_input和test_output!"); - } - String mode = Constants.JudgeMode.DEFAULT.getMode(); - if (problem.getSpjLanguage() != null) { - mode = Constants.JudgeMode.SPJ.getMode(); - } - ProblemDto problemDto = new ProblemDto(); - problemDto.setSamples(problemSamples) - .setIsUploadTestCase(true) - .setUploadTestcaseDir(problemTestCaseDir) - .setLanguages(languageList) - .setTags(null) - .setJudgeMode(mode) - .setProblem(problem) - .setCodeTemplates(codeTemplates); - - problemDtoList.add(problemDto); - index++; - } - return problemDtoList; - } - - - private Integer getTimeLimit(String version, Element item) { - Element timeLimitNode = XmlUtil.getElement(item, "time_limit"); - String timeUnit = timeLimitNode.getAttribute("unit"); - String timeLimit = timeLimitNode.getTextContent(); - int index = timeUnits.indexOf(timeUnit.toLowerCase()); - if (index == -1) { - throw new RuntimeException("Invalid time limit unit:" + timeUnit); - } - if ("1.1".equals(version)) { - return Integer.parseInt(timeLimit) * (int) Math.pow(1000, index); - } else { - double tmp = (Double.parseDouble(timeLimit) * Math.pow(1000, index)); - return (int) tmp; - } - } - - private Integer getMemoryLimit(Element item) { - Element memoryLimitNode = XmlUtil.getElement(item, "memory_limit"); - String memoryUnit = memoryLimitNode.getAttribute("unit"); - String memoryLimit = memoryLimitNode.getTextContent(); - int index = memoryUnits.indexOf(memoryUnit.toLowerCase()); - if (index == -1) { - throw new RuntimeException("Invalid memory limit unit:" + memoryUnit); - } - - return Integer.parseInt(memoryLimit) * (int) Math.pow(1000, index - 1); - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImportQDUOJProblemManager.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImportQDUOJProblemManager.java deleted file mode 100644 index a445c23..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ImportQDUOJProblemManager.java +++ /dev/null @@ -1,273 +0,0 @@ -package top.hcode.hoj.manager.file; - -import cn.hutool.core.io.FileUtil; -import cn.hutool.core.io.file.FileReader; -import cn.hutool.core.text.UnicodeUtil; -import cn.hutool.core.util.IdUtil; -import cn.hutool.core.util.ZipUtil; -import cn.hutool.json.JSONArray; -import cn.hutool.json.JSONObject; -import cn.hutool.json.JSONUtil; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import lombok.extern.slf4j.Slf4j; -import org.apache.shiro.SecurityUtils; -import org.apache.shiro.session.Session; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; -import org.springframework.transaction.annotation.Transactional; -import org.springframework.web.multipart.MultipartFile; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.exception.StatusSystemErrorException; -import top.hcode.hoj.dao.problem.LanguageEntityService; -import top.hcode.hoj.dao.problem.ProblemEntityService; -import top.hcode.hoj.dao.problem.TagEntityService; -import top.hcode.hoj.pojo.dto.ProblemDto; -import top.hcode.hoj.pojo.dto.QDOJProblemDto; -import top.hcode.hoj.pojo.entity.problem.Language; -import top.hcode.hoj.pojo.entity.problem.Problem; -import top.hcode.hoj.pojo.entity.problem.ProblemCase; -import top.hcode.hoj.pojo.entity.problem.Tag; -import top.hcode.hoj.pojo.vo.UserRolesVo; -import top.hcode.hoj.utils.Constants; - -import java.io.File; -import java.io.IOException; -import java.util.Arrays; -import java.util.HashMap; -import java.util.LinkedList; -import java.util.List; -import java.util.stream.Collectors; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/10 14:47 - * @Description: - */ -@Component -@Slf4j(topic = "hoj") -public class ImportQDUOJProblemManager { - - @Autowired - private LanguageEntityService languageEntityService; - - @Autowired - private ProblemEntityService problemEntityService; - - @Autowired - private TagEntityService tagEntityService; - - /** - * @param file - * @MethodName importQDOJProblem - * @Description zip文件导入题目 仅超级管理员可操作 - * @Return - * @Since 2021/5/27 - */ - - @Transactional(rollbackFor = Exception.class) - public void importQDOJProblem(MultipartFile file) throws StatusFailException, StatusSystemErrorException { - - String suffix = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".") + 1); - if (!"zip".toUpperCase().contains(suffix.toUpperCase())) { - throw new StatusFailException("请上传zip格式的题目文件压缩包!"); - } - - String fileDirId = IdUtil.simpleUUID(); - String fileDir = Constants.File.TESTCASE_TMP_FOLDER.getPath() + File.separator + fileDirId; - String filePath = fileDir + File.separator + file.getOriginalFilename(); - // 文件夹不存在就新建 - FileUtil.mkdir(fileDir); - try { - file.transferTo(new File(filePath)); - } catch (IOException e) { - FileUtil.del(fileDir); - throw new StatusSystemErrorException("服务器异常:qduoj题目上传失败!"); - } - - // 将压缩包压缩到指定文件夹 - ZipUtil.unzip(filePath, fileDir); - - // 删除zip文件 - FileUtil.del(filePath); - - - // 检查文件是否存在 - File testCaseFileList = new File(fileDir); - File[] files = testCaseFileList.listFiles(); - if (files == null || files.length == 0) { - FileUtil.del(fileDir); - throw new StatusFailException("评测数据压缩包里文件不能为空!"); - } - - - HashMap problemInfo = new HashMap<>(); - for (File tmp : files) { - if (tmp.isDirectory()) { - File[] problemAndTestcase = tmp.listFiles(); - if (problemAndTestcase == null || problemAndTestcase.length == 0) { - FileUtil.del(fileDir); - throw new StatusFailException("编号为:" + tmp.getName() + "的文件夹为空!"); - } - for (File problemFile : problemAndTestcase) { - if (problemFile.isFile()) { - // 检查文件是否时json文件 - if (!problemFile.getName().endsWith("json")) { - FileUtil.del(fileDir); - throw new StatusFailException("编号为:" + tmp.getName() + "的文件夹里面的题目数据格式错误,请使用json文件!"); - } - problemInfo.put(tmp.getName(), problemFile); - } - } - } - } - - // 读取json文件生成对象 - HashMap problemVoMap = new HashMap<>(); - for (String key : problemInfo.keySet()) { - try { - FileReader fileReader = new FileReader(problemInfo.get(key)); - JSONObject problemJson = JSONUtil.parseObj(fileReader.readString()); - QDOJProblemDto qdojProblemDto = QDOJProblemToProblemVo(problemJson); - problemVoMap.put(key, qdojProblemDto); - } catch (Exception e) { - FileUtil.del(fileDir); - throw new StatusFailException("请检查编号为:" + key + "的题目json文件的格式:" + e.getLocalizedMessage()); - } - } - - QueryWrapper languageQueryWrapper = new QueryWrapper<>(); - languageQueryWrapper.eq("oj", "ME"); - List languageList = languageEntityService.list(languageQueryWrapper); - - HashMap languageMap = new HashMap<>(); - for (Language language : languageList) { - languageMap.put(language.getName(), language.getId()); - } - - // 获取当前登录的用户 - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - List tagList = tagEntityService.list(new QueryWrapper().eq("oj", "ME")); - HashMap tagMap = new HashMap<>(); - for (Tag tag : tagList) { - tagMap.put(tag.getName().toUpperCase(), tag); - } - - List problemDtos = new LinkedList<>(); - for (String key : problemInfo.keySet()) { - QDOJProblemDto qdojProblemDto = problemVoMap.get(key); - // 格式化题目语言 - List languages = new LinkedList<>(); - for (String lang : qdojProblemDto.getLanguages()) { - Long lid = languageMap.getOrDefault(lang, null); - languages.add(new Language().setId(lid).setName(lang)); - } - - // 格式化标签 - List tags = new LinkedList<>(); - for (String tagStr : qdojProblemDto.getTags()) { - Tag tag = tagMap.getOrDefault(tagStr.toUpperCase(), null); - if (tag == null) { - tags.add(new Tag().setName(tagStr).setOj("ME")); - } else { - tags.add(tag); - } - } - - Problem problem = qdojProblemDto.getProblem(); - if (problem.getAuthor() == null) { - problem.setAuthor(userRolesVo.getUsername()); - } - ProblemDto problemDto = new ProblemDto(); - - String mode = Constants.JudgeMode.DEFAULT.getMode(); - if (qdojProblemDto.getIsSpj()) { - mode = Constants.JudgeMode.SPJ.getMode(); - } - - problemDto.setJudgeMode(mode) - .setProblem(problem) - .setCodeTemplates(qdojProblemDto.getCodeTemplates()) - .setTags(tags) - .setLanguages(languages) - .setUploadTestcaseDir(fileDir + File.separator + key + File.separator + "testcase") - .setIsUploadTestCase(true) - .setSamples(qdojProblemDto.getSamples()); - - problemDtos.add(problemDto); - } - if (problemDtos.size() == 0) { - throw new StatusFailException("警告:未成功导入一道以上的题目,请检查文件格式是否正确!"); - } else { - for (ProblemDto problemDto : problemDtos) { - problemEntityService.adminAddProblem(problemDto); - } - } - } - - private QDOJProblemDto QDOJProblemToProblemVo(JSONObject problemJson) { - QDOJProblemDto qdojProblemDto = new QDOJProblemDto(); - List tags = (List) problemJson.get("tags"); - qdojProblemDto.setTags(tags.stream().map(UnicodeUtil::toString).collect(Collectors.toList())); - qdojProblemDto.setLanguages(Arrays.asList("C", "C With O2", "C++", "C++ With O2", "Java", "Python3", "Python2", "Golang", "C#")); - Object spj = problemJson.getObj("spj"); - boolean isSpj = !JSONUtil.isNull(spj); - qdojProblemDto.setIsSpj(isSpj); - - Problem problem = new Problem(); - if (isSpj) { - JSONObject spjJson = JSONUtil.parseObj(spj); - problem.setSpjCode(spjJson.getStr("code")) - .setSpjLanguage(spjJson.getStr("language")); - } - problem.setAuth(1) - .setIsGroup(false) - .setIsUploadCase(true) - .setSource(problemJson.getStr("source", null)) - .setDifficulty(1) - .setProblemId(problemJson.getStr("display_id")) - .setIsRemoveEndBlank(true) - .setOpenCaseResult(true) - .setCodeShare(false) - .setType(problemJson.getStr("rule_type").equals("ACM") ? 0 : 1) - .setTitle(problemJson.getStr("title")) - .setDescription(UnicodeUtil.toString(problemJson.getJSONObject("description").getStr("value"))) - .setInput(UnicodeUtil.toString(problemJson.getJSONObject("input_description").getStr("value"))) - .setOutput(UnicodeUtil.toString(problemJson.getJSONObject("output_description").getStr("value"))) - .setHint(UnicodeUtil.toString(problemJson.getJSONObject("hint").getStr("value"))) - .setTimeLimit(problemJson.getInt("time_limit")) - .setMemoryLimit(problemJson.getInt("memory_limit")); - - JSONArray samples = problemJson.getJSONArray("samples"); - StringBuilder sb = new StringBuilder(); - for (int i = 0; i < samples.size(); i++) { - JSONObject sample = (JSONObject) samples.get(i); - String input = sample.getStr("input"); - String output = sample.getStr("output"); - sb.append("").append(input).append(""); - sb.append("").append(output).append(""); - } - problem.setExamples(sb.toString()); - - int sumScore = 0; - JSONArray testcaseList = problemJson.getJSONArray("test_case_score"); - List problemSamples = new LinkedList<>(); - for (int i = 0; i < testcaseList.size(); i++) { - JSONObject testcase = (JSONObject) testcaseList.get(i); - String input = testcase.getStr("input_name"); - String output = testcase.getStr("output_name"); - Integer score = testcase.getInt("score", null); - problemSamples.add(new ProblemCase().setInput(input).setOutput(output).setScore(score)); - if (score != null) { - sumScore += score; - } - } - problem.setIsRemote(false); - problem.setIoScore(sumScore); - qdojProblemDto.setSamples(problemSamples); - qdojProblemDto.setProblem(problem); - return qdojProblemDto; - - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/MarkDownFileManager.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/MarkDownFileManager.java deleted file mode 100644 index 02779f7..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/MarkDownFileManager.java +++ /dev/null @@ -1,173 +0,0 @@ -package top.hcode.hoj.manager.file; - -import cn.hutool.core.io.FileUtil; -import cn.hutool.core.map.MapUtil; -import cn.hutool.core.util.IdUtil; -import top.hcode.hoj.validator.GroupValidator; -import lombok.extern.slf4j.Slf4j; -import org.apache.shiro.SecurityUtils; -import org.apache.shiro.session.Session; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; -import org.springframework.web.multipart.MultipartFile; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.exception.StatusForbiddenException; -import top.hcode.hoj.common.exception.StatusSystemErrorException; -import top.hcode.hoj.pojo.vo.UserRolesVo; -import top.hcode.hoj.dao.common.FileEntityService; -import top.hcode.hoj.utils.Constants; - -import javax.annotation.Resource; -import java.io.File; -import java.util.Map; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/10 14:50 - * @Description: - */ -@Component -@Slf4j(topic = "hoj") -public class MarkDownFileManager { - - @Resource - private FileEntityService fileEntityService; - - @Autowired - private GroupValidator groupValidator; - - public Map uploadMDImg(MultipartFile image, Long gid) throws StatusFailException, StatusSystemErrorException, StatusForbiddenException { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - boolean isProblemAdmin = SecurityUtils.getSubject().hasRole("problem_admin"); - boolean isAdmin = SecurityUtils.getSubject().hasRole("admin"); - - if (!isRoot - && !isProblemAdmin - && !isAdmin - && !(gid != null && groupValidator.isGroupAdmin(userRolesVo.getUid(), gid))) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - - if (image == null) { - throw new StatusFailException("上传的图片不能为空!"); - } - if (image.getSize() > 1024 * 1024 * 4) { - throw new StatusFailException("上传的图片文件大小不能大于4M!"); - } - //获取文件后缀 - String suffix = image.getOriginalFilename().substring(image.getOriginalFilename().lastIndexOf(".") + 1); - if (!"jpg,jpeg,gif,png,webp".toUpperCase().contains(suffix.toUpperCase())) { - throw new StatusFailException("请选择jpg,jpeg,gif,png,webp格式的图片!"); - } - - //若不存在该目录,则创建目录 - FileUtil.mkdir(Constants.File.MARKDOWN_FILE_FOLDER.getPath()); - - //通过UUID生成唯一文件名 - String filename = IdUtil.simpleUUID() + "." + suffix; - try { - //将文件保存指定目录 - image.transferTo(FileUtil.file(Constants.File.MARKDOWN_FILE_FOLDER.getPath() + File.separator + filename)); - } catch (Exception e) { - log.error("图片文件上传异常-------------->", e); - throw new StatusSystemErrorException("服务器异常:图片文件上传失败!"); - } - - top.hcode.hoj.pojo.entity.common.File file = new top.hcode.hoj.pojo.entity.common.File(); - file.setFolderPath(Constants.File.MARKDOWN_FILE_FOLDER.getPath()) - .setName(filename) - .setFilePath(Constants.File.MARKDOWN_FILE_FOLDER.getPath() + File.separator + filename) - .setSuffix(suffix) - .setType("md") - .setUid(userRolesVo.getUid()); - fileEntityService.save(file); - - return MapUtil.builder() - .put("link", Constants.File.IMG_API.getPath() + filename) - .put("fileId", file.getId()).map(); - - } - - public void deleteMDImg(Long fileId) throws StatusFailException, StatusForbiddenException { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - top.hcode.hoj.pojo.entity.common.File file = fileEntityService.getById(fileId); - - if (file == null) { - throw new StatusFailException("错误:文件不存在!"); - } - - if (!file.getType().equals("md")) { - throw new StatusForbiddenException("错误:不支持删除!"); - } - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - boolean isProblemAdmin = SecurityUtils.getSubject().hasRole("problem_admin"); - - Long gid = file.getGid(); - - if (!file.getUid().equals(userRolesVo.getUid()) - && !isRoot - && !isProblemAdmin - && !(gid != null && groupValidator.isGroupAdmin(userRolesVo.getUid(), gid))) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - - boolean isOk = FileUtil.del(file.getFilePath()); - if (isOk) { - fileEntityService.removeById(fileId); - } else { - throw new StatusFailException("删除失败"); - } - } - - public Map uploadMd(MultipartFile file, Long gid) throws StatusFailException, StatusSystemErrorException, StatusForbiddenException { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - boolean isProblemAdmin = SecurityUtils.getSubject().hasRole("problem_admin"); - boolean isAdmin = SecurityUtils.getSubject().hasRole("admin"); - - if (!isRoot && !isProblemAdmin && !isAdmin - && !(gid != null && groupValidator.isGroupAdmin(userRolesVo.getUid(), gid))) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - - if (file == null) { - throw new StatusFailException("上传的文件不能为空!"); - } - if (file.getSize() >= 1024 * 1024 * 128) { - throw new StatusFailException("上传的文件大小不能大于128M!"); - } - //获取文件后缀 - String suffix = ""; - String filename = ""; - if (file.getOriginalFilename() != null && file.getOriginalFilename().contains(".")) { - suffix = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".") + 1); - //通过UUID生成唯一文件名 - filename = IdUtil.simpleUUID() + "." + suffix; - } else { - filename = IdUtil.simpleUUID(); - } - //若不存在该目录,则创建目录 - FileUtil.mkdir(Constants.File.MARKDOWN_FILE_FOLDER.getPath()); - - try { - //将文件保存指定目录 - file.transferTo(FileUtil.file(Constants.File.MARKDOWN_FILE_FOLDER.getPath() + File.separator + filename)); - } catch (Exception e) { - log.error("文件上传异常-------------->", e); - throw new StatusSystemErrorException("服务器异常:文件上传失败!"); - } - - return MapUtil.builder() - .put("link", Constants.File.FILE_API.getPath() + filename) - .map(); - } - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ProblemFileManager.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ProblemFileManager.java deleted file mode 100644 index 5bfec45..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/ProblemFileManager.java +++ /dev/null @@ -1,417 +0,0 @@ -package top.hcode.hoj.manager.file; - -import cn.hutool.core.bean.BeanUtil; -import cn.hutool.core.io.FileUtil; -import cn.hutool.core.io.file.FileReader; -import cn.hutool.core.io.file.FileWriter; -import cn.hutool.core.util.IdUtil; -import cn.hutool.core.util.ZipUtil; -import cn.hutool.json.JSONArray; -import cn.hutool.json.JSONObject; -import cn.hutool.json.JSONUtil; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import lombok.extern.slf4j.Slf4j; -import org.apache.shiro.SecurityUtils; -import org.apache.shiro.session.Session; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; -import org.springframework.transaction.annotation.Transactional; -import org.springframework.web.multipart.MultipartFile; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.exception.StatusSystemErrorException; -import top.hcode.hoj.common.result.ResultStatus; -import top.hcode.hoj.pojo.dto.ProblemDto; -import top.hcode.hoj.pojo.entity.problem.*; -import top.hcode.hoj.pojo.vo.ImportProblemVo; -import top.hcode.hoj.pojo.vo.UserRolesVo; -import top.hcode.hoj.dao.problem.LanguageEntityService; -import top.hcode.hoj.dao.problem.ProblemCaseEntityService; -import top.hcode.hoj.dao.problem.ProblemEntityService; -import top.hcode.hoj.dao.problem.TagEntityService; -import top.hcode.hoj.utils.Constants; - - -import javax.servlet.http.HttpServletResponse; -import java.io.*; -import java.net.URLEncoder; -import java.util.*; -import java.util.concurrent.*; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/10 14:40 - * @Description: - */ -@Component -@Slf4j(topic = "hoj") -public class ProblemFileManager { - @Autowired - private LanguageEntityService languageEntityService; - - @Autowired - private ProblemEntityService problemEntityService; - - @Autowired - private ProblemCaseEntityService problemCaseEntityService; - - @Autowired - private TagEntityService tagEntityService; - - /** - * @param file - * @MethodName importProblem - * @Description zip文件导入题目 仅超级管理员可操作 - * @Return - * @Since 2021/5/27 - */ - @Transactional(rollbackFor = Exception.class) - public void importProblem(MultipartFile file) throws StatusFailException, StatusSystemErrorException { - - String suffix = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".") + 1); - if (!"zip".toUpperCase().contains(suffix.toUpperCase())) { - throw new StatusFailException("请上传zip格式的题目文件压缩包!"); - } - - String fileDirId = IdUtil.simpleUUID(); - String fileDir = Constants.File.TESTCASE_TMP_FOLDER.getPath() + File.separator + fileDirId; - String filePath = fileDir + File.separator + file.getOriginalFilename(); - // 文件夹不存在就新建 - FileUtil.mkdir(fileDir); - try { - file.transferTo(new File(filePath)); - } catch (IOException e) { - FileUtil.del(fileDir); - throw new StatusSystemErrorException("服务器异常:评测数据上传失败!"); - } - - // 将压缩包压缩到指定文件夹 - ZipUtil.unzip(filePath, fileDir); - - // 删除zip文件 - FileUtil.del(filePath); - - - // 检查文件是否存在 - File testCaseFileList = new File(fileDir); - File[] files = testCaseFileList.listFiles(); - if (files == null || files.length == 0) { - FileUtil.del(fileDir); - throw new StatusFailException("评测数据压缩包里文件不能为空!"); - } - - - HashMap problemInfo = new HashMap<>(); - HashMap testcaseInfo = new HashMap<>(); - - for (File tmp : files) { - if (tmp.isFile()) { - // 检查文件是否时json文件 - if (!tmp.getName().endsWith("json")) { - FileUtil.del(fileDir); - throw new StatusFailException("编号为:" + tmp.getName() + "的文件格式错误,请使用json文件!"); - } - String tmpPreName = tmp.getName().substring(0, tmp.getName().lastIndexOf(".")); - problemInfo.put(tmpPreName, tmp); - } - if (tmp.isDirectory()) { - testcaseInfo.put(tmp.getName(), tmp); - } - } - - // 读取json文件生成对象 - HashMap problemVoMap = new HashMap<>(); - for (String key : problemInfo.keySet()) { - // 若有名字不对应,直接返回失败 - if (testcaseInfo.getOrDefault(key, null) == null) { - FileUtil.del(fileDir); - throw new StatusFailException("请检查编号为:" + key + "的题目数据文件与测试数据文件夹是否一一对应!"); - } - try { - FileReader fileReader = new FileReader(problemInfo.get(key)); - ImportProblemVo importProblemVo = JSONUtil.toBean(fileReader.readString(), ImportProblemVo.class); - problemVoMap.put(key, importProblemVo); - } catch (Exception e) { - FileUtil.del(fileDir); - throw new StatusFailException("请检查编号为:" + key + "的题目json文件的格式:" + e.getLocalizedMessage()); - } - } - - QueryWrapper languageQueryWrapper = new QueryWrapper<>(); - languageQueryWrapper.eq("oj", "ME"); - List languageList = languageEntityService.list(languageQueryWrapper); - - HashMap languageMap = new HashMap<>(); - for (Language language : languageList) { - languageMap.put(language.getName(), language.getId()); - } - - // 获取当前登录的用户 - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - List problemDtos = new LinkedList<>(); - List tagList = tagEntityService.list(new QueryWrapper().eq("oj", "ME")); - HashMap tagMap = new HashMap<>(); - for (Tag tag : tagList) { - tagMap.put(tag.getName().toUpperCase(), tag); - } - for (String key : problemInfo.keySet()) { - ImportProblemVo importProblemVo = problemVoMap.get(key); - // 格式化题目语言 - List languages = new LinkedList<>(); - for (String lang : importProblemVo.getLanguages()) { - Long lid = languageMap.getOrDefault(lang, null); - - if (lid == null) { - throw new StatusFailException("请检查编号为:" + key + "的题目的代码语言是否有错,不要添加不支持的语言!"); - } - languages.add(new Language().setId(lid).setName(lang)); - } - - // 格式化题目代码模板 - List codeTemplates = new LinkedList<>(); - for (Map tmp : importProblemVo.getCodeTemplates()) { - String language = tmp.getOrDefault("language", null); - String code = tmp.getOrDefault("code", null); - Long lid = languageMap.getOrDefault(language, null); - if (language == null || code == null || lid == null) { - FileUtil.del(fileDir); - throw new StatusFailException("请检查编号为:" + key + "的题目的代码模板列表是否有错,不要添加不支持的语言!"); - } - codeTemplates.add(new CodeTemplate().setCode(code).setStatus(true).setLid(lid)); - } - - // 格式化标签 - List tags = new LinkedList<>(); - for (String tagStr : importProblemVo.getTags()) { - Tag tag = tagMap.getOrDefault(tagStr.toUpperCase(), null); - if (tag == null) { - tags.add(new Tag().setName(tagStr).setOj("ME")); - } else { - tags.add(tag); - } - } - - Problem problem = BeanUtil.mapToBean(importProblemVo.getProblem(), Problem.class, true); - if (problem.getAuthor() == null) { - problem.setAuthor(userRolesVo.getUsername()); - } - problem.setIsGroup(false); - List problemCaseList = new LinkedList<>(); - for (Map tmp : importProblemVo.getSamples()) { - problemCaseList.add(BeanUtil.mapToBean(tmp, ProblemCase.class, true)); - } - - // 格式化用户额外文件和判题额外文件 - if (importProblemVo.getUserExtraFile() != null) { - JSONObject userExtraFileJson = JSONUtil.parseObj(importProblemVo.getUserExtraFile()); - problem.setUserExtraFile(userExtraFileJson.toString()); - } - if (importProblemVo.getJudgeExtraFile() != null) { - JSONObject judgeExtraFileJson = JSONUtil.parseObj(importProblemVo.getJudgeExtraFile()); - problem.setJudgeExtraFile(judgeExtraFileJson.toString()); - } - - - ProblemDto problemDto = new ProblemDto(); - problemDto.setProblem(problem) - .setCodeTemplates(codeTemplates) - .setTags(tags) - .setLanguages(languages) - .setUploadTestcaseDir(fileDir + File.separator + key) - .setIsUploadTestCase(true) - .setSamples(problemCaseList); - - Constants.JudgeMode judgeMode = Constants.JudgeMode.getJudgeMode(importProblemVo.getJudgeMode()); - if (judgeMode == null) { - problemDto.setJudgeMode(Constants.JudgeMode.DEFAULT.getMode()); - } else { - problemDto.setJudgeMode(judgeMode.getMode()); - } - problemDtos.add(problemDto); - } - - if (problemDtos.size() == 0) { - throw new StatusFailException("警告:未成功导入一道以上的题目,请检查文件格式是否正确!"); - } else { - for (ProblemDto problemDto : problemDtos) { - problemEntityService.adminAddProblem(problemDto); - } - } - } - - - /** - * @param pidList - * @param response - * @MethodName exportProblem - * @Description 导出指定的题目包括测试数据生成zip 仅超级管理员可操作 - * @Return - * @Since 2021/5/28 - */ - public void exportProblem(List pidList, HttpServletResponse response) { - - QueryWrapper languageQueryWrapper = new QueryWrapper<>(); - languageQueryWrapper.eq("oj", "ME"); - List languageList = languageEntityService.list(languageQueryWrapper); - - HashMap languageMap = new HashMap<>(); - for (Language language : languageList) { - languageMap.put(language.getId(), language.getName()); - } - - List tagList = tagEntityService.list(); - - HashMap tagMap = new HashMap<>(); - for (Tag tag : tagList) { - tagMap.put(tag.getId(), tag.getName()); - } - - String workDir = Constants.File.FILE_DOWNLOAD_TMP_FOLDER.getPath() + File.separator + IdUtil.simpleUUID(); - - // 使用线程池 - ExecutorService threadPool = new ThreadPoolExecutor( - 2, // 核心线程数 - 4, // 最大线程数。最多几个线程并发。 - 3,//当非核心线程无任务时,几秒后结束该线程 - TimeUnit.SECONDS,// 结束线程时间单位 - new LinkedBlockingDeque<>(200), //阻塞队列,限制等候线程数 - Executors.defaultThreadFactory(), - new ThreadPoolExecutor.DiscardOldestPolicy());//队列满了,尝试去和最早的竞争,也不会抛出异常! - - List> futureTasks = new ArrayList<>(); - - for (Long pid : pidList) { - - futureTasks.add(new FutureTask<>(new Callable() { - @Override - public Void call() throws Exception { - String testcaseWorkDir = Constants.File.TESTCASE_BASE_FOLDER.getPath() + File.separator + "problem_" + pid; - File file = new File(testcaseWorkDir); - - List> problemCases = new LinkedList<>(); - if (!file.exists() || file.listFiles() == null) { // 本地为空 尝试去数据库查找 - QueryWrapper problemCaseQueryWrapper = new QueryWrapper<>(); - problemCaseQueryWrapper.eq("pid", pid); - List problemCaseList = problemCaseEntityService.list(problemCaseQueryWrapper); - FileUtil.mkdir(testcaseWorkDir); - // 写入本地 - for (int i = 0; i < problemCaseList.size(); i++) { - String filePreName = testcaseWorkDir + File.separator + (i + 1); - String inputName = filePreName + ".in"; - String outputName = filePreName + ".out"; - FileWriter infileWriter = new FileWriter(inputName); - infileWriter.write(problemCaseList.get(i).getInput()); - FileWriter outfileWriter = new FileWriter(outputName); - outfileWriter.write(problemCaseList.get(i).getOutput()); - - ProblemCase problemCase = problemCaseList.get(i).setPid(null) - .setInput(inputName) - .setOutput(outputName) - .setGmtCreate(null) - .setStatus(null) - .setId(null) - .setGmtModified(null); - HashMap problemCaseMap = new HashMap<>(); - BeanUtil.beanToMap(problemCase, problemCaseMap, false, true); - problemCases.add(problemCaseMap); - } - FileUtil.copy(testcaseWorkDir, workDir, true); - - } else { - String infoPath = testcaseWorkDir + File.separator + "info"; - if (FileUtil.exist(infoPath)) { - FileReader reader = new FileReader(infoPath); - JSONObject jsonObject = JSONUtil.parseObj(reader.readString()); - JSONArray testCases = jsonObject.getJSONArray("testCases"); - for (int i = 0; i < testCases.size(); i++) { - JSONObject jsonObject1 = testCases.get(i, JSONObject.class); - HashMap problemCaseMap = new HashMap<>(); - problemCaseMap.put("input", jsonObject1.getStr("inputName")); - problemCaseMap.put("output", jsonObject1.getStr("outputName")); - Integer score = jsonObject1.getInt("score"); - if (score != null && score > 0) { - problemCaseMap.put("score", score); - } - problemCases.add(problemCaseMap); - } - } - FileUtil.copy(testcaseWorkDir, workDir, true); - } - ImportProblemVo importProblemVo = problemEntityService.buildExportProblem(pid, problemCases, languageMap, tagMap); - String content = JSONUtil.toJsonStr(importProblemVo); - FileWriter fileWriter = new FileWriter(workDir + File.separator + "problem_" + pid + ".json"); - fileWriter.write(content); - return null; - } - })); - - } - // 提交到线程池进行执行 - for (FutureTask futureTask : futureTasks) { - threadPool.submit(futureTask); - } - // 所有任务执行完成且等待队列中也无任务关闭线程池 - if (!threadPool.isShutdown()) { - threadPool.shutdown(); - } - // 阻塞主线程, 直至线程池关闭 - try { - threadPool.awaitTermination(Long.MAX_VALUE, TimeUnit.NANOSECONDS); - } catch (InterruptedException e) { - log.error("线程池异常--------------->", e); - } - - String fileName = "problem_export_" + System.currentTimeMillis() + ".zip"; - // 将对应文件夹的文件压缩成zip - ZipUtil.zip(workDir, Constants.File.FILE_DOWNLOAD_TMP_FOLDER.getPath() + File.separator + fileName); - // 将zip变成io流返回给前端 - FileReader fileReader = new FileReader(Constants.File.FILE_DOWNLOAD_TMP_FOLDER.getPath() + File.separator + fileName); - BufferedInputStream bins = new BufferedInputStream(fileReader.getInputStream());//放到缓冲流里面 - OutputStream outs = null;//获取文件输出IO流 - BufferedOutputStream bouts = null; - try { - outs = response.getOutputStream(); - bouts = new BufferedOutputStream(outs); - response.setContentType("application/x-download"); - response.setHeader("Content-disposition", "attachment;filename=" + URLEncoder.encode(fileName, "UTF-8")); - int bytesRead = 0; - byte[] buffer = new byte[1024 * 10]; - //开始向网络传输文件流 - while ((bytesRead = bins.read(buffer, 0, 1024 * 10)) != -1) { - bouts.write(buffer, 0, bytesRead); - } - bouts.flush(); - } catch (IOException e) { - log.error("导出题目数据的压缩文件异常------------>", e); - response.reset(); - response.setContentType("application/json"); - response.setCharacterEncoding("utf-8"); - Map map = new HashMap<>(); - map.put("status", ResultStatus.SYSTEM_ERROR); - map.put("msg", "导出题目数据失败,请重新尝试!"); - map.put("data", null); - try { - response.getWriter().println(JSONUtil.toJsonStr(map)); - } catch (IOException ioException) { - ioException.printStackTrace(); - } - } finally { - try { - bins.close(); - if (outs != null) { - outs.close(); - } - if (bouts != null) { - bouts.close(); - } - } catch (IOException e) { - e.printStackTrace(); - } - // 清空临时文件 - FileUtil.del(workDir); - FileUtil.del(Constants.File.FILE_DOWNLOAD_TMP_FOLDER.getPath() + File.separator + fileName); - } - } - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/TestCaseManager.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/TestCaseManager.java deleted file mode 100644 index e2e650f..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/TestCaseManager.java +++ /dev/null @@ -1,271 +0,0 @@ -package top.hcode.hoj.manager.file; - -import cn.hutool.core.io.FileUtil; -import cn.hutool.core.io.file.FileReader; -import cn.hutool.core.io.file.FileWriter; -import cn.hutool.core.map.MapUtil; -import cn.hutool.core.util.IdUtil; -import cn.hutool.core.util.ZipUtil; -import cn.hutool.json.JSONUtil; -import top.hcode.hoj.common.exception.StatusForbiddenException; -import top.hcode.hoj.dao.problem.ProblemEntityService; -import top.hcode.hoj.pojo.entity.problem.Problem; -import top.hcode.hoj.pojo.vo.UserRolesVo; -import top.hcode.hoj.validator.GroupValidator; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import lombok.extern.slf4j.Slf4j; -import org.apache.shiro.SecurityUtils; -import org.apache.shiro.session.Session; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; -import org.springframework.util.CollectionUtils; -import org.springframework.web.multipart.MultipartFile; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.exception.StatusSystemErrorException; -import top.hcode.hoj.common.result.ResultStatus; -import top.hcode.hoj.pojo.entity.problem.ProblemCase; -import top.hcode.hoj.dao.problem.ProblemCaseEntityService; -import top.hcode.hoj.utils.Constants; - -import javax.servlet.http.HttpServletResponse; -import java.io.*; -import java.net.URLEncoder; -import java.util.HashMap; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; -import java.util.stream.Collectors; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/10 14:57 - * @Description: - */ -@Component -@Slf4j(topic = "hoj") -public class TestCaseManager { - - @Autowired - private ProblemCaseEntityService problemCaseEntityService; - - @Autowired - private ProblemEntityService problemEntityService; - - @Autowired - private GroupValidator groupValidator; - - public Map uploadTestcaseZip(MultipartFile file, Long gid) throws StatusFailException, StatusSystemErrorException, StatusForbiddenException { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - boolean isProblemAdmin = SecurityUtils.getSubject().hasRole("problem_admin"); - boolean isAdmin = SecurityUtils.getSubject().hasRole("admin"); - - if (!isRoot && !isProblemAdmin && !isAdmin - && !(gid != null && groupValidator.isGroupAdmin(userRolesVo.getUid(), gid))) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - - //获取文件后缀 - String suffix = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".") + 1); - if (!"zip".toUpperCase().contains(suffix.toUpperCase())) { - throw new StatusFailException("请上传zip格式的测试数据压缩包!"); - } - String fileDirId = IdUtil.simpleUUID(); - String fileDir = Constants.File.TESTCASE_TMP_FOLDER.getPath() + File.separator + fileDirId; - String filePath = fileDir + File.separator + file.getOriginalFilename(); - // 文件夹不存在就新建 - FileUtil.mkdir(fileDir); - try { - file.transferTo(new File(filePath)); - } catch (IOException e) { - log.error("评测数据文件上传异常-------------->{}", e.getMessage()); - throw new StatusSystemErrorException("服务器异常:评测数据上传失败!"); - } - - // 将压缩包压缩到指定文件夹 - ZipUtil.unzip(filePath, fileDir); - // 删除zip文件 - FileUtil.del(filePath); - // 检查文件是否存在 - File testCaseFileList = new File(fileDir); - File[] files = testCaseFileList.listFiles(); - if (files == null || files.length == 0) { - FileUtil.del(fileDir); - throw new StatusFailException("评测数据压缩包里文件不能为空!"); - } - - HashMap inputData = new HashMap<>(); - HashMap outputData = new HashMap<>(); - - // 遍历读取与检查是否in和out文件一一对应,否则报错 - for (File tmp : files) { - String tmpPreName = null; - if (tmp.getName().endsWith(".in")) { - tmpPreName = tmp.getName().substring(0, tmp.getName().lastIndexOf(".in")); - inputData.put(tmpPreName, tmp.getName()); - } else if (tmp.getName().endsWith(".out")) { - tmpPreName = tmp.getName().substring(0, tmp.getName().lastIndexOf(".out")); - outputData.put(tmpPreName, tmp.getName()); - } else if (tmp.getName().endsWith(".ans")) { - tmpPreName = tmp.getName().substring(0, tmp.getName().lastIndexOf(".ans")); - outputData.put(tmpPreName, tmp.getName()); - } else if (tmp.getName().endsWith(".txt")) { - tmpPreName = tmp.getName().substring(0, tmp.getName().lastIndexOf(".txt")); - if (tmpPreName.contains("input")) { - inputData.put(tmpPreName.replaceAll("input", "$*$"), tmp.getName()); - } else if (tmpPreName.contains("output")) { - outputData.put(tmpPreName.replaceAll("output", "$*$"), tmp.getName()); - } - } - } - - // 进行数据对应检查,同时生成返回数据 - List> problemCaseList = new LinkedList<>(); - for (String key : inputData.keySet()) { - HashMap testcaseMap = new HashMap<>(); - String inputFileName = inputData.get(key); - testcaseMap.put("input", inputFileName); - - // 若有名字对应的out文件不存在的,直接生成对应的out文件 - String oriOutputFileName = outputData.getOrDefault(key, null); - if (oriOutputFileName == null) { - oriOutputFileName = key + ".out"; - if (inputFileName.endsWith(".txt")) { - oriOutputFileName = inputFileName.replaceAll("input", "output"); - } - FileWriter fileWriter = new FileWriter(fileDir + File.separator + oriOutputFileName); - fileWriter.write(""); - } - - testcaseMap.put("output", oriOutputFileName); - problemCaseList.add(testcaseMap); - } - - List> fileList = problemCaseList.stream() - .sorted((o1, o2) -> { - String a = o1.get("input").split("\\.")[0]; - String b = o2.get("input").split("\\.")[0]; - if (a.length() > b.length()) { - return 1; - } else if (a.length() < b.length()) { - return -1; - } - return a.compareTo(b); - }) - .collect(Collectors.toList()); - - return MapUtil.builder() - .put("fileList", fileList) - .put("fileListDir", fileDir) - .map(); - } - - - public void downloadTestcase(Long pid, HttpServletResponse response) throws StatusFailException, StatusForbiddenException { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - boolean isProblemAdmin = SecurityUtils.getSubject().hasRole("problem_admin"); - - Problem problem = problemEntityService.getById(pid); - - Long gid = problem.getGid(); - - if (gid != null) { - if (!isRoot && !problem.getAuthor().equals(userRolesVo.getUsername()) - && !groupValidator.isGroupMember(userRolesVo.getUid(), gid)) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - } else { - if (!isRoot && !isProblemAdmin && !problem.getAuthor().equals(userRolesVo.getUsername())) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - } - - String workDir = Constants.File.TESTCASE_BASE_FOLDER.getPath() + File.separator + "problem_" + pid; - File file = new File(workDir); - if (!file.exists()) { // 本地为空 尝试去数据库查找 - QueryWrapper problemCaseQueryWrapper = new QueryWrapper<>(); - problemCaseQueryWrapper.eq("pid", pid); - List problemCaseList = problemCaseEntityService.list(problemCaseQueryWrapper); - - if (CollectionUtils.isEmpty(problemCaseList)) { - throw new StatusFailException("对不起,该题目的评测数据为空!"); - } - - boolean hasTestCase = true; - if (problemCaseList.get(0).getInput().endsWith(".in") && (problemCaseList.get(0).getOutput().endsWith(".out") || - problemCaseList.get(0).getOutput().endsWith(".ans"))) { - hasTestCase = false; - } - if (!hasTestCase) { - throw new StatusFailException("对不起,该题目的评测数据为空!"); - } - - FileUtil.mkdir(workDir); - // 写入本地 - for (int i = 0; i < problemCaseList.size(); i++) { - String filePreName = workDir + File.separator + (i + 1); - String inputName = filePreName + ".in"; - String outputName = filePreName + ".out"; - FileWriter infileWriter = new FileWriter(inputName); - infileWriter.write(problemCaseList.get(i).getInput()); - FileWriter outfileWriter = new FileWriter(outputName); - outfileWriter.write(problemCaseList.get(i).getOutput()); - } - } - - String fileName = "problem_" + pid + "_testcase_" + System.currentTimeMillis() + ".zip"; - // 将对应文件夹的文件压缩成zip - ZipUtil.zip(workDir, Constants.File.FILE_DOWNLOAD_TMP_FOLDER.getPath() + File.separator + fileName); - // 将zip变成io流返回给前端 - FileReader fileReader = new FileReader(Constants.File.FILE_DOWNLOAD_TMP_FOLDER.getPath() + File.separator + fileName); - BufferedInputStream bins = new BufferedInputStream(fileReader.getInputStream());//放到缓冲流里面 - OutputStream outs = null;//获取文件输出IO流 - BufferedOutputStream bouts = null; - try { - outs = response.getOutputStream(); - bouts = new BufferedOutputStream(outs); - response.setContentType("application/x-download"); - response.setHeader("Content-disposition", "attachment;filename=" + URLEncoder.encode(fileName, "UTF-8")); - int bytesRead = 0; - byte[] buffer = new byte[1024 * 10]; - //开始向网络传输文件流 - while ((bytesRead = bins.read(buffer, 0, 1024 * 10)) != -1) { - bouts.write(buffer, 0, bytesRead); - } - bouts.flush(); - } catch (IOException e) { - log.error("下载题目测试数据的压缩文件异常------------>{}", e.getMessage()); - response.reset(); - response.setContentType("application/json"); - response.setCharacterEncoding("utf-8"); - Map map = new HashMap<>(); - map.put("status", ResultStatus.SYSTEM_ERROR); - map.put("msg", "下载文件失败,请重新尝试!"); - map.put("data", null); - try { - response.getWriter().println(JSONUtil.toJsonStr(map)); - } catch (IOException ioException) { - ioException.printStackTrace(); - } - } finally { - try { - bins.close(); - if (outs != null) { - outs.close(); - } - if (bouts != null) { - bouts.close(); - } - } catch (IOException e) { - e.printStackTrace(); - } - // 清空临时文件 - FileUtil.del(Constants.File.FILE_DOWNLOAD_TMP_FOLDER.getPath() + File.separator + fileName); - } - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/UserFileManager.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/UserFileManager.java deleted file mode 100644 index 82e8759..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/file/UserFileManager.java +++ /dev/null @@ -1,49 +0,0 @@ -package top.hcode.hoj.manager.file; - -import com.alibaba.excel.EasyExcel; -import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; -import top.hcode.hoj.pojo.vo.ExcelUserVo; -import top.hcode.hoj.utils.RedisUtils; - -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.net.URLEncoder; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/10 15:02 - * @Description: - */ -@Component -@Slf4j(topic = "hoj") -public class UserFileManager { - - @Autowired - private RedisUtils redisUtils; - - public void generateUserExcel(String key, HttpServletResponse response) throws IOException { - response.setContentType("application/vnd.ms-excel"); - response.setCharacterEncoding("utf-8"); - // 这里URLEncoder.encode可以防止中文乱码 - String fileName = URLEncoder.encode(key, "UTF-8"); - response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx"); - response.setHeader("Content-Type", "application/xlsx"); - EasyExcel.write(response.getOutputStream(), ExcelUserVo.class).sheet("用户数据").doWrite(getGenerateUsers(key)); - } - - private List getGenerateUsers(String key) { - List result = new LinkedList<>(); - Map userInfo = redisUtils.hmget(key); - for (Object hashKey : userInfo.keySet()) { - String username = (String) hashKey; - String password = (String) userInfo.get(hashKey); - result.add(new ExcelUserVo().setUsername(username).setPassword(password)); - } - return result; - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/GroupManager.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/GroupManager.java deleted file mode 100644 index ca10d13..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/GroupManager.java +++ /dev/null @@ -1,317 +0,0 @@ -package top.hcode.hoj.manager.group; - -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.apache.shiro.SecurityUtils; -import org.apache.shiro.session.Session; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; -import org.springframework.transaction.annotation.Transactional; -import org.springframework.util.StringUtils; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.exception.StatusForbiddenException; -import top.hcode.hoj.common.exception.StatusNotFoundException; -import top.hcode.hoj.dao.group.GroupEntityService; -import top.hcode.hoj.dao.group.GroupMemberEntityService; -import top.hcode.hoj.dao.user.UserAcproblemEntityService; -import top.hcode.hoj.pojo.entity.group.Group; -import top.hcode.hoj.pojo.entity.group.GroupMember; -import top.hcode.hoj.pojo.entity.user.UserAcproblem; -import top.hcode.hoj.pojo.vo.AccessVo; -import top.hcode.hoj.pojo.vo.ConfigVo; -import top.hcode.hoj.pojo.vo.GroupVo; -import top.hcode.hoj.pojo.vo.UserRolesVo; -import top.hcode.hoj.utils.Constants; -import top.hcode.hoj.utils.RedisUtils; -import top.hcode.hoj.validator.GroupValidator; - -import java.util.List; -import java.util.stream.Collectors; - -/** - * @Author: LengYun - * @Date: 2022/3/11 13:36 - * @Description: - */ -@Component -public class GroupManager { - - @Autowired - private GroupEntityService groupEntityService; - - @Autowired - private UserAcproblemEntityService userAcproblemEntityService; - - @Autowired - private GroupMemberEntityService groupMemberEntityService; - - @Autowired - private RedisUtils redisUtils; - - @Autowired - private GroupValidator groupValidator; - - @Autowired - private ConfigVo configVo; - - public IPage getGroupList(Integer limit, Integer currentPage, String keyword, Integer auth, boolean onlyMine) { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - if (currentPage == null || currentPage < 1) currentPage = 1; - if (limit == null || limit < 1) limit = 10; - if (auth == null || auth < 1) auth = 0; - - if (!StringUtils.isEmpty(keyword)) { - keyword = keyword.trim(); - } - - String uid = ""; - boolean isRoot = false; - if (userRolesVo != null) { - uid = userRolesVo.getUid(); - isRoot = SecurityUtils.getSubject().hasRole("root"); - } - return groupEntityService.getGroupList(limit, currentPage, keyword, auth, uid, onlyMine, isRoot); - } - - public Group getGroup(Long gid) throws StatusNotFoundException, StatusForbiddenException { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - Group group = groupEntityService.getById(gid); - if (group == null || group.getStatus() == 1 && !isRoot) { - throw new StatusNotFoundException("该团队不存在或已被封禁!"); - } - if (!group.getVisible() && !isRoot && !groupValidator.isGroupMember(userRolesVo.getUid(), gid)) { - throw new StatusForbiddenException("该团队并非公开团队,不支持访问!"); - } - - if (!isRoot && !groupValidator.isGroupRoot(userRolesVo.getUid(), gid)) { - group.setCode(null); - } - - return group; - } - - public AccessVo getGroupAccess(Long gid) throws StatusFailException, StatusNotFoundException, StatusForbiddenException { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - boolean access = false; - - if (groupValidator.isGroupMember(userRolesVo.getUid(), gid) || isRoot) { - access = true; - Group group = groupEntityService.getById(gid); - if (group == null || group.getStatus() == 1 && !isRoot) { - throw new StatusNotFoundException("该团队不存在或已被封禁!"); - } - if (!isRoot && !group.getVisible() && !groupValidator.isGroupMember(userRolesVo.getUid(), gid)) { - throw new StatusForbiddenException("该团队并非公开团队,不支持访问!"); - } - } - - AccessVo accessVo = new AccessVo(); - accessVo.setAccess(access); - return accessVo; - } - - public Integer getGroupAuth(Long gid) { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - QueryWrapper groupMemberQueryWrapper = new QueryWrapper<>(); - groupMemberQueryWrapper.eq("gid", gid).eq("uid", userRolesVo.getUid()); - - GroupMember groupMember = groupMemberEntityService.getOne(groupMemberQueryWrapper); - - Integer auth = 0; - if (groupMember != null) { - auth = groupMember.getAuth(); - } - return auth; - } - - @Transactional(rollbackFor = Exception.class) - public void addGroup(Group group) throws StatusFailException, StatusForbiddenException { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - boolean isProblemAdmin = SecurityUtils.getSubject().hasRole("problem_admin"); - boolean isAdmin = SecurityUtils.getSubject().hasRole("admin"); - - if (!isRoot && !isAdmin && !isProblemAdmin) { - - QueryWrapper queryWrapper = new QueryWrapper<>(); - queryWrapper.eq("uid", userRolesVo.getUid()).select("distinct pid"); - int userAcProblemCount = userAcproblemEntityService.count(queryWrapper); - - if (userAcProblemCount < configVo.getDefaultCreateGroupACInitValue()) { - throw new StatusForbiddenException("对不起,您暂时无权限创建团队!请先去提交题目通过" + - configVo.getDefaultCreateGroupACInitValue() + "道以上!"); - } - - String lockKey = Constants.Account.GROUP_ADD_NUM_LOCK.getCode() + userRolesVo.getUid(); - Integer num = (Integer) redisUtils.get(lockKey); - if (num == null) { - redisUtils.set(lockKey, 1, 3600 * 24); - } else if (num >= configVo.getDefaultCreateGroupDailyLimit()) { - throw new StatusForbiddenException("对不起,您今天创建团队次数已超过" + configVo.getDefaultCreateGroupDailyLimit() + "次,已被限制!"); - } else { - redisUtils.incr(lockKey, 1); - } - - QueryWrapper existedGroupQueryWrapper = new QueryWrapper<>(); - existedGroupQueryWrapper.eq("owner", userRolesVo.getUsername()); - int existedGroupNum = groupEntityService.count(existedGroupQueryWrapper); - - if (existedGroupNum >= configVo.getDefaultCreateGroupLimit()) { - throw new StatusForbiddenException("对不起,您总共已创建了" + configVo.getDefaultCreateGroupLimit() + "个团队,不可再创建,已被限制!"); - } - - } - group.setOwner(userRolesVo.getUsername()); - group.setUid(userRolesVo.getUid()); - - if (!StringUtils.isEmpty(group.getName()) && (group.getName().length() < 5 || group.getName().length() > 25)) { - throw new StatusFailException("团队名称的长度应为 5 到 25!"); - } - - if (!StringUtils.isEmpty(group.getShortName()) && (group.getShortName().length() < 5 || group.getShortName().length() > 10)) { - throw new StatusFailException("团队简称的长度应为 5 到 10!"); - } - - if (!StringUtils.isEmpty(group.getBrief()) && (group.getBrief().length() < 5 || group.getBrief().length() > 50)) { - throw new StatusFailException("团队简介的长度应为 5 到 50!"); - } - - if (group.getAuth() == null || group.getAuth() < 1 || group.getAuth() > 3) { - throw new StatusFailException("团队权限不能为空且应为1~3!"); - } - - if (group.getAuth() == 2 || group.getAuth() == 3) { - if (StringUtils.isEmpty(group.getCode()) || group.getCode().length() != 6) { - throw new StatusFailException("团队邀请码不能为空且长度应为 6!"); - } - } - - if (!StringUtils.isEmpty(group.getDescription()) && (group.getDescription().length() < 5 || group.getDescription().length() > 1000)) { - throw new StatusFailException("团队描述的长度应为 5 到 1000!"); - } - - QueryWrapper groupQueryWrapper = new QueryWrapper<>(); - groupQueryWrapper.eq("name", group.getName()); - int sameNameGroupCount = groupEntityService.count(groupQueryWrapper); - if (sameNameGroupCount > 0) { - throw new StatusFailException("团队名称已存在,请修改后重试!"); - } - - groupQueryWrapper = new QueryWrapper<>(); - groupQueryWrapper.eq("short_name", group.getShortName()); - int sameShortNameGroupCount = groupEntityService.count(groupQueryWrapper); - if (sameShortNameGroupCount > 0) { - throw new StatusFailException("团队简称已存在,请修改后重试!"); - } - - boolean isOk = groupEntityService.save(group); - if (!isOk) { - throw new StatusFailException("创建失败,请重新尝试!"); - } else { - groupMemberEntityService.save(new GroupMember() - .setUid(userRolesVo.getUid()) - .setGid(group.getId()) - .setAuth(5)); - } - } - - public void updateGroup(Group group) throws StatusFailException, StatusForbiddenException { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - if (!groupValidator.isGroupRoot(userRolesVo.getUid(), group.getId()) && !isRoot) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - - if (!StringUtils.isEmpty(group.getName()) && (group.getName().length() < 5 || group.getName().length() > 25)) { - throw new StatusFailException("团队名称的长度应为 5 到 25!"); - } - - if (!StringUtils.isEmpty(group.getShortName()) && (group.getShortName().length() < 5 || group.getShortName().length() > 10)) { - throw new StatusFailException("团队简称的长度应为 5 到 10!"); - } - - if (!StringUtils.isEmpty(group.getBrief()) && (group.getBrief().length() < 5 || group.getBrief().length() > 50)) { - throw new StatusFailException("团队简介的长度应为 5 到 50!"); - } - - if (!StringUtils.isEmpty(group.getCode()) && group.getCode().length() != 6) { - throw new StatusFailException("团队邀请码的长度应为 6!"); - } - - if (!StringUtils.isEmpty(group.getDescription()) && (group.getDescription().length() < 5 || group.getDescription().length() > 1000)) { - throw new StatusFailException("团队描述的长度应为 5 到 1000!"); - } - - QueryWrapper groupQueryWrapper = new QueryWrapper<>(); - groupQueryWrapper.eq("name", group.getName()) - .ne("id", group.getId()); - int sameNameGroupCount = groupEntityService.count(groupQueryWrapper); - if (sameNameGroupCount > 0) { - throw new StatusFailException("团队名称已存在,请修改后重试!"); - } - - groupQueryWrapper = new QueryWrapper<>(); - groupQueryWrapper.eq("short_name", group.getShortName()) - .ne("id", group.getId()); - int sameShortNameGroupCount = groupEntityService.count(groupQueryWrapper); - if (sameShortNameGroupCount > 0) { - throw new StatusFailException("团队简称已存在,请修改后重试!"); - } - - boolean isOk = groupEntityService.updateById(group); - if (!isOk) { - throw new StatusFailException("更新失败,请重新尝试!"); - } - } - - public void deleteGroup(Long gid) throws StatusFailException, StatusNotFoundException, StatusForbiddenException { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - Group group = groupEntityService.getById(gid); - - if (group == null || group.getStatus() == 1 && !isRoot) { - throw new StatusNotFoundException("该团队不存在或已被封禁!"); - } - - if (!isRoot && !userRolesVo.getUid().equals(group.getUid())) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - - QueryWrapper groupMemberQueryWrapper = new QueryWrapper<>(); - groupMemberQueryWrapper.eq("gid", gid).in("auth", 3, 4, 5); - List groupMemberList = groupMemberEntityService.list(groupMemberQueryWrapper); - List groupMemberUidList = groupMemberList.stream() - .map(GroupMember::getUid) - .collect(Collectors.toList()); - - boolean isOk = groupEntityService.removeById(gid); - if (!isOk) { - throw new StatusFailException("删除失败,请重新尝试!"); - } else { - groupMemberEntityService.addDissolutionNoticeToGroupMember(gid, - group.getName(), - groupMemberUidList, - userRolesVo.getUsername()); - } - } -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/GroupRankManager.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/GroupRankManager.java deleted file mode 100644 index 7a9e68c..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/GroupRankManager.java +++ /dev/null @@ -1,100 +0,0 @@ -package top.hcode.hoj.manager.group; - -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; -import org.springframework.util.CollectionUtils; -import org.springframework.util.StringUtils; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.dao.group.GroupMemberEntityService; -import top.hcode.hoj.dao.user.UserInfoEntityService; -import top.hcode.hoj.dao.user.UserRecordEntityService; -import top.hcode.hoj.pojo.entity.group.GroupMember; -import top.hcode.hoj.pojo.entity.user.UserInfo; -import top.hcode.hoj.pojo.vo.OIRankVo; -import top.hcode.hoj.utils.Constants; - -import java.util.List; -import java.util.stream.Collectors; - -/** - * @Author Himit_ZH - * @Date 2022/4/22 - */ -@Component -public class GroupRankManager { - - @Autowired - private UserRecordEntityService userRecordEntityService; - - @Autowired - private UserInfoEntityService userInfoEntityService; - - @Autowired - private GroupMemberEntityService groupMemberEntityService; - - - public IPage getGroupRankList(Integer limit, - Integer currentPage, - String searchUser, - Integer type, - Long gid) throws StatusFailException { - - // 页数,每页题数若为空,设置默认值 - if (currentPage == null || currentPage < 1) currentPage = 1; - if (limit == null || limit < 1) limit = 30; - - // 根据type查询不同 进行不同排序方式 - String rankType; - if (type.intValue() == Constants.Contest.TYPE_ACM.getCode()) { - rankType = Constants.Contest.TYPE_ACM.getName(); - } else if (type.intValue() == Constants.Contest.TYPE_OI.getCode()) { - rankType = Constants.Contest.TYPE_OI.getName(); - } else { - throw new StatusFailException("排行榜类型代码不正确,请使用0(ACM),1(OI)!"); - } - - QueryWrapper groupMemberQueryWrapper = new QueryWrapper<>(); - groupMemberQueryWrapper.select("uid") - .eq("gid", gid).in("auth", 3, 4, 5); - - List groupMemberUidList = groupMemberEntityService.list(groupMemberQueryWrapper) - .stream() - .map(GroupMember::getUid) - .collect(Collectors.toList()); - - if (CollectionUtils.isEmpty(groupMemberUidList)) { - return new Page<>(currentPage, limit); - } - - if (!StringUtils.isEmpty(searchUser)) { - QueryWrapper userInfoQueryWrapper = new QueryWrapper<>(); - userInfoQueryWrapper.select("uuid") - .eq("status", 0) - .in("uuid", groupMemberUidList) - .and(wrapper -> wrapper - .like("username", searchUser) - .or() - .like("nickname", searchUser) - .or() - .like("realname", searchUser)); - - List uidList = userInfoEntityService.list(userInfoQueryWrapper) - .stream() - .map(UserInfo::getUuid) - .collect(Collectors.toList()); - - if (CollectionUtils.isEmpty(uidList)) { - return new Page<>(currentPage, limit); - } - Page page = new Page<>(currentPage, limit); - return userRecordEntityService.getGroupRankList(page, gid, uidList, rankType, false); - } else { - Page page = new Page<>(currentPage, limit); - return userRecordEntityService.getGroupRankList(page, gid, groupMemberUidList, rankType, true); - } - - } -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/announcement/GroupAnnouncementManager.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/announcement/GroupAnnouncementManager.java deleted file mode 100644 index f2280d8..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/announcement/GroupAnnouncementManager.java +++ /dev/null @@ -1,163 +0,0 @@ -package top.hcode.hoj.manager.group.announcement; - -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.exception.StatusForbiddenException; -import top.hcode.hoj.common.exception.StatusNotFoundException; -import top.hcode.hoj.dao.common.AnnouncementEntityService; -import top.hcode.hoj.dao.group.GroupAnnouncementEntityService; -import top.hcode.hoj.dao.group.GroupEntityService; -import top.hcode.hoj.pojo.entity.common.Announcement; -import top.hcode.hoj.pojo.entity.group.Group; -import top.hcode.hoj.pojo.vo.AnnouncementVo; -import top.hcode.hoj.pojo.vo.UserRolesVo; -import top.hcode.hoj.validator.GroupValidator; -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.apache.shiro.SecurityUtils; -import org.apache.shiro.session.Session; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; - -/** - * @Author: LengYun - * @Date: 2022/3/11 13:36 - * @Description: - */ -@Component -public class GroupAnnouncementManager { - - @Autowired - private GroupEntityService groupEntityService; - - @Autowired - private GroupAnnouncementEntityService groupAnnouncementEntityService; - - @Autowired - private AnnouncementEntityService announcementEntityService; - - @Autowired - private GroupValidator groupValidator; - - public IPage getAnnouncementList(Integer limit, Integer currentPage, Long gid) throws StatusNotFoundException, StatusForbiddenException { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - Group group = groupEntityService.getById(gid); - - if (group == null || group.getStatus() == 1 && !isRoot) { - throw new StatusNotFoundException("该团队不存在或已被封禁!"); - } - - if (!isRoot && !groupValidator.isGroupMember(userRolesVo.getUid(), gid)) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - - if (currentPage == null || currentPage < 1) currentPage = 1; - if (limit == null || limit < 1) limit = 10; - - return groupAnnouncementEntityService.getAnnouncementList(limit, currentPage, gid); - } - - public IPage getAdminAnnouncementList(Integer limit, Integer currentPage, Long gid) throws StatusNotFoundException, StatusForbiddenException { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - Group group = groupEntityService.getById(gid); - - if (group == null || group.getStatus() == 1 && !isRoot) { - throw new StatusNotFoundException("该团队不存在或已被封禁!"); - } - - if (!isRoot && !groupValidator.isGroupAdmin(userRolesVo.getUid(), gid)) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - - if (currentPage == null || currentPage < 1) currentPage = 1; - if (limit == null || limit < 1) limit = 10; - - return groupAnnouncementEntityService.getAdminAnnouncementList(limit, currentPage, gid); - } - - public void addAnnouncement(Announcement announcement) throws StatusForbiddenException, StatusNotFoundException, StatusFailException { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - Long gid = announcement.getGid(); - - Group group = groupEntityService.getById(gid); - - if (group == null || group.getStatus() == 1 && !isRoot) { - throw new StatusNotFoundException("该团队不存在或已被封禁!"); - } - - if (!isRoot && !groupValidator.isGroupAdmin(userRolesVo.getUid(), gid)) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - - boolean isOk = announcementEntityService.save(announcement); - if (!isOk) { - throw new StatusFailException("添加失败"); - } - } - - public void updateAnnouncement(Announcement announcement) throws StatusForbiddenException, StatusNotFoundException, StatusFailException { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - Long gid = announcement.getGid(); - - Group group = groupEntityService.getById(gid); - - if (group == null || group.getStatus() == 1 && !isRoot) { - throw new StatusNotFoundException("该团队不存在或已被封禁!"); - } - - if (!userRolesVo.getUid().equals(announcement.getUid()) && !isRoot - && !groupValidator.isGroupRoot(userRolesVo.getUid(), gid)) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - - boolean isOk = announcementEntityService.updateById(announcement); - if (!isOk) { - throw new StatusFailException("修改失败"); - } - } - - public void deleteAnnouncement(Long aid) throws StatusForbiddenException, StatusNotFoundException, StatusFailException { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - Announcement announcement = announcementEntityService.getById(aid); - - if (announcement == null) { - throw new StatusNotFoundException("该公告不存在!"); - } - - Long gid = announcement.getGid(); - - Group group = groupEntityService.getById(gid); - - if (group == null || group.getStatus() == 1 && !isRoot) { - throw new StatusNotFoundException("该团队不存在或已被封禁!"); - } - - if (!userRolesVo.getUid().equals(announcement.getUid()) && !isRoot - && !groupValidator.isGroupRoot(userRolesVo.getUid(), gid)) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - - boolean isOk = announcementEntityService.removeById(aid); - if (!isOk) { - throw new StatusFailException("删除失败"); - } - } -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestAnnouncementManager.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestAnnouncementManager.java deleted file mode 100644 index b0a4503..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestAnnouncementManager.java +++ /dev/null @@ -1,187 +0,0 @@ -package top.hcode.hoj.manager.group.contest; - -import org.springframework.transaction.annotation.Transactional; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.exception.StatusForbiddenException; -import top.hcode.hoj.common.exception.StatusNotFoundException; -import top.hcode.hoj.dao.common.AnnouncementEntityService; -import top.hcode.hoj.dao.contest.ContestAnnouncementEntityService; -import top.hcode.hoj.dao.contest.ContestEntityService; -import top.hcode.hoj.dao.group.GroupEntityService; -import top.hcode.hoj.pojo.dto.AnnouncementDto; -import top.hcode.hoj.pojo.entity.common.Announcement; -import top.hcode.hoj.pojo.entity.contest.Contest; -import top.hcode.hoj.pojo.entity.contest.ContestAnnouncement; -import top.hcode.hoj.pojo.entity.group.Group; -import top.hcode.hoj.pojo.vo.AnnouncementVo; -import top.hcode.hoj.pojo.vo.UserRolesVo; -import top.hcode.hoj.validator.GroupValidator; -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.apache.shiro.SecurityUtils; -import org.apache.shiro.session.Session; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; - -/** - * @Author: LengYun - * @Date: 2022/3/11 13:36 - * @Description: - */ -@Component -public class GroupContestAnnouncementManager { - - @Autowired - private GroupEntityService groupEntityService; - - @Autowired - private ContestEntityService contestEntityService; - - @Autowired - private AnnouncementEntityService announcementEntityService; - - @Autowired - private ContestAnnouncementEntityService contestAnnouncementEntityService; - - @Autowired - private GroupValidator groupValidator; - - public IPage getContestAnnouncementList(Integer limit, Integer currentPage, Long cid) throws StatusNotFoundException, StatusForbiddenException { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - Contest contest = contestEntityService.getById(cid); - - if (contest == null) { - throw new StatusNotFoundException("该比赛不存在!"); - } - - Long gid = contest.getGid(); - - Group group = groupEntityService.getById(gid); - - if (group == null || group.getStatus() == 1 && !isRoot) { - throw new StatusNotFoundException("该团队不存在或已被封禁!"); - } - - if (!userRolesVo.getUid().equals(contest.getUid()) && !isRoot - && !groupValidator.isGroupRoot(userRolesVo.getUid(), gid)) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - - if (currentPage == null || currentPage < 1) currentPage = 1; - if (limit == null || limit < 1) limit = 10; - return announcementEntityService.getContestAnnouncement(cid, false, limit, currentPage); - } - - @Transactional(rollbackFor = Exception.class) - public void addContestAnnouncement(AnnouncementDto announcementDto) throws StatusNotFoundException, StatusForbiddenException, StatusFailException { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - Long cid = announcementDto.getCid(); - - Contest contest = contestEntityService.getById(cid); - - if (contest == null) { - throw new StatusNotFoundException("该比赛不存在!"); - } - - Long gid = contest.getGid(); - - Group group = groupEntityService.getById(gid); - - if (group == null || group.getStatus() == 1 && !isRoot) { - throw new StatusNotFoundException("该团队不存在或已被封禁!"); - } - - if (!userRolesVo.getUid().equals(contest.getUid()) && !isRoot - && !groupValidator.isGroupRoot(userRolesVo.getUid(), gid)) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - - announcementDto.getAnnouncement().setGid(gid); - - boolean isOk = announcementEntityService.save(announcementDto.getAnnouncement()); - if (isOk) { - contestAnnouncementEntityService.saveOrUpdate(new ContestAnnouncement() - .setAid(announcementDto.getAnnouncement().getId()) - .setCid(announcementDto.getCid())); - } else { - throw new StatusFailException("添加失败!"); - } - } - - public void updateContestAnnouncement(AnnouncementDto announcementDto) throws StatusNotFoundException, StatusForbiddenException, StatusFailException { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - Long cid = announcementDto.getCid(); - - Contest contest = contestEntityService.getById(cid); - - if (contest == null) { - throw new StatusNotFoundException("该比赛不存在!"); - } - - Long gid = contest.getGid(); - - Group group = groupEntityService.getById(gid); - - if (group == null || group.getStatus() == 1 && !isRoot) { - throw new StatusNotFoundException("该团队不存在或已被封禁!"); - } - - if (!userRolesVo.getUid().equals(contest.getUid()) && !isRoot - && !groupValidator.isGroupRoot(userRolesVo.getUid(), gid)) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - - boolean isOk = announcementEntityService.updateById(announcementDto.getAnnouncement()); - if (!isOk) { - throw new StatusFailException("更新失败!"); - } - } - - public void deleteContestAnnouncement(Long aid, Long cid) throws StatusNotFoundException, StatusForbiddenException, StatusFailException { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - Contest contest = contestEntityService.getById(cid); - - if (contest == null) { - throw new StatusNotFoundException("该比赛不存在!"); - } - - Long gid = contest.getGid(); - - Group group = groupEntityService.getById(gid); - - if (group == null || group.getStatus() == 1 && !isRoot) { - throw new StatusNotFoundException("该团队不存在或已被封禁!"); - } - - Announcement announcement = announcementEntityService.getById(aid); - - if (announcement == null) { - throw new StatusNotFoundException("该公告不存在!"); - } - - if (!userRolesVo.getUid().equals(contest.getUid()) && !isRoot - && !groupValidator.isGroupRoot(userRolesVo.getUid(), gid)) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - - boolean isOk = announcementEntityService.removeById(aid); - if (!isOk) { - throw new StatusFailException("删除失败!"); - } - } -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestManager.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestManager.java deleted file mode 100644 index 126017f..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestManager.java +++ /dev/null @@ -1,276 +0,0 @@ -package top.hcode.hoj.manager.group.contest; - -import cn.hutool.core.bean.BeanUtil; -import cn.hutool.json.JSONObject; -import cn.hutool.json.JSONUtil; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.exception.StatusForbiddenException; -import top.hcode.hoj.common.exception.StatusNotFoundException; -import top.hcode.hoj.dao.contest.ContestEntityService; -import top.hcode.hoj.dao.contest.ContestRegisterEntityService; -import top.hcode.hoj.dao.group.GroupContestEntityService; -import top.hcode.hoj.dao.group.GroupEntityService; -import top.hcode.hoj.pojo.entity.contest.Contest; -import top.hcode.hoj.pojo.entity.contest.ContestRegister; -import top.hcode.hoj.pojo.entity.group.Group; -import top.hcode.hoj.pojo.vo.AdminContestVo; -import top.hcode.hoj.pojo.vo.ContestVo; -import top.hcode.hoj.pojo.vo.UserRolesVo; -import top.hcode.hoj.utils.Constants; -import top.hcode.hoj.validator.GroupValidator; -import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.apache.shiro.SecurityUtils; -import org.apache.shiro.session.Session; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; -import org.springframework.util.StringUtils; - -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** - * @Author: LengYun - * @Date: 2022/3/11 13:36 - * @Description: - */ -@Component -public class GroupContestManager { - @Autowired - private GroupEntityService groupEntityService; - - @Autowired - private GroupContestEntityService groupContestEntityService; - - @Autowired - private ContestEntityService contestEntityService; - - @Autowired - private ContestRegisterEntityService contestRegisterEntityService; - - @Autowired - private GroupValidator groupValidator; - - public IPage getContestList(Integer limit, Integer currentPage, Long gid) throws StatusNotFoundException, StatusForbiddenException { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - Group group = groupEntityService.getById(gid); - - if (group == null || group.getStatus() == 1 && !isRoot) { - throw new StatusNotFoundException("该团队不存在或已被封禁!"); - } - - if (!isRoot && !groupValidator.isGroupMember(userRolesVo.getUid(), gid)) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - - if (currentPage == null || currentPage < 1) currentPage = 1; - if (limit == null || limit < 1) limit = 10; - - return groupContestEntityService.getContestList(limit, currentPage, gid); - } - - public IPage getAdminContestList(Integer limit, Integer currentPage, Long gid) throws StatusNotFoundException, StatusForbiddenException { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - Group group = groupEntityService.getById(gid); - - if (group == null || group.getStatus() == 1 && !isRoot) { - throw new StatusNotFoundException("该团队不存在或已被封禁!"); - } - - if (!isRoot && !groupValidator.isGroupAdmin(userRolesVo.getUid(), gid)) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - - if (currentPage == null || currentPage < 1) currentPage = 1; - if (limit == null || limit < 1) limit = 10; - - return groupContestEntityService.getAdminContestList(limit, currentPage, gid); - } - - public AdminContestVo getContest(Long cid) throws StatusForbiddenException, StatusNotFoundException, StatusFailException { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - Contest contest = contestEntityService.getById(cid); - - if (contest == null) { - throw new StatusNotFoundException("该比赛不存在!"); - } - - Long gid = contest.getGid(); - - Group group = groupEntityService.getById(gid); - - if (group == null || group.getStatus() == 1 && !isRoot) { - throw new StatusNotFoundException("该团队不存在或已被封禁!"); - } - - if (!userRolesVo.getUid().equals(contest.getUid()) && !isRoot - && !groupValidator.isGroupRoot(userRolesVo.getUid(), gid)) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - - AdminContestVo adminContestVo = BeanUtil.copyProperties(contest, AdminContestVo.class, "starAccount"); - if (StringUtils.isEmpty(contest.getStarAccount())) { - adminContestVo.setStarAccount(new ArrayList<>()); - } else { - JSONObject jsonObject = JSONUtil.parseObj(contest.getStarAccount()); - List starAccount = jsonObject.get("star_account", List.class); - adminContestVo.setStarAccount(starAccount); - } - return adminContestVo; - } - - public void addContest(AdminContestVo adminContestVo) throws StatusForbiddenException, StatusNotFoundException, StatusFailException { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - Long gid = adminContestVo.getGid(); - - Group group = groupEntityService.getById(gid); - - if (group == null || group.getStatus() == 1 && !isRoot) { - throw new StatusNotFoundException("该团队不存在或已被封禁!"); - } - - if (!isRoot && !groupValidator.isGroupAdmin(userRolesVo.getUid(), gid)) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - - Contest contest = BeanUtil.copyProperties(adminContestVo, Contest.class, "starAccount"); - JSONObject accountJson = new JSONObject(); - accountJson.set("star_account", adminContestVo.getStarAccount()); - contest.setStarAccount(accountJson.toString()); - - contest.setIsGroup(true); - - boolean isOk = contestEntityService.save(contest); - if (!isOk) { - throw new StatusFailException("添加失败"); - } - } - - public void updateContest(AdminContestVo adminContestVo) throws StatusForbiddenException, StatusNotFoundException, StatusFailException { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - Long cid = adminContestVo.getId(); - - Contest contest = contestEntityService.getById(cid); - - if (contest == null) { - throw new StatusNotFoundException("该比赛不存在!"); - } - - Long gid = contest.getGid(); - - Group group = groupEntityService.getById(gid); - - if (group == null || group.getStatus() == 1 && !isRoot) { - throw new StatusNotFoundException("该团队不存在或已被封禁!"); - } - - if (!userRolesVo.getUid().equals(contest.getUid()) && !isRoot - && !groupValidator.isGroupRoot(userRolesVo.getUid(), gid)) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - - Contest contest1 = BeanUtil.copyProperties(adminContestVo, Contest.class, "starAccount"); - JSONObject accountJson = new JSONObject(); - accountJson.set("star_account", adminContestVo.getStarAccount()); - contest1.setStarAccount(accountJson.toString()); - Contest oldContest = contestEntityService.getById(contest1.getId()); - boolean isOk = contestEntityService.saveOrUpdate(contest1); - if (isOk) { - if (!contest1.getAuth().equals(Constants.Contest.AUTH_PUBLIC.getCode())) { - if (!Objects.equals(oldContest.getPwd(), contest1.getPwd())) { - UpdateWrapper updateWrapper = new UpdateWrapper<>(); - updateWrapper.eq("cid", contest1.getId()); - contestRegisterEntityService.remove(updateWrapper); - } - } - } else { - throw new StatusFailException("修改失败"); - } - } - - public void deleteContest(Long cid) throws StatusForbiddenException, StatusNotFoundException, StatusFailException { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - Contest contest = contestEntityService.getById(cid); - - if (contest == null) { - throw new StatusNotFoundException("该比赛不存在!"); - } - - Long gid = contest.getGid(); - - Group group = groupEntityService.getById(gid); - - if (group == null || group.getStatus() == 1 && !isRoot) { - throw new StatusNotFoundException("该团队不存在或已被封禁!"); - } - - if (!userRolesVo.getUid().equals(contest.getUid()) && !isRoot - && !groupValidator.isGroupRoot(userRolesVo.getUid(), gid)) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - - boolean isOk = contestEntityService.removeById(cid); - if (!isOk) { - throw new StatusFailException("删除失败"); - } - } - - public void changeContestVisible(Long cid, Boolean visible) throws StatusForbiddenException, StatusNotFoundException, StatusFailException { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - Contest contest = contestEntityService.getById(cid); - - if (contest == null) { - throw new StatusNotFoundException("该比赛不存在!"); - } - - Long gid = contest.getGid(); - - Group group = groupEntityService.getById(gid); - - if (group == null || group.getStatus() == 1 && !isRoot) { - throw new StatusNotFoundException("该团队不存在或已被封禁!"); - } - - if (!userRolesVo.getUid().equals(contest.getUid()) && !isRoot - && !groupValidator.isGroupRoot(userRolesVo.getUid(), gid)) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - - UpdateWrapper contestUpdateWrapper = new UpdateWrapper<>(); - contestUpdateWrapper.eq("id", cid).set("visible", visible); - - boolean isOK = contestEntityService.update(contestUpdateWrapper); - if (!isOK) { - throw new StatusFailException("修改失败"); - } - } -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestProblemManager.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestProblemManager.java deleted file mode 100644 index de064e1..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/contest/GroupContestProblemManager.java +++ /dev/null @@ -1,365 +0,0 @@ -package top.hcode.hoj.manager.group.contest; - -import cn.hutool.core.map.MapUtil; -import org.springframework.transaction.annotation.Transactional; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.exception.StatusForbiddenException; -import top.hcode.hoj.common.exception.StatusNotFoundException; -import top.hcode.hoj.dao.contest.ContestEntityService; -import top.hcode.hoj.dao.contest.ContestProblemEntityService; -import top.hcode.hoj.dao.group.GroupEntityService; -import top.hcode.hoj.dao.judge.JudgeEntityService; -import top.hcode.hoj.dao.problem.ProblemEntityService; -import top.hcode.hoj.manager.admin.contest.AdminContestProblemManager; -import top.hcode.hoj.pojo.dto.ContestProblemDto; -import top.hcode.hoj.pojo.dto.ProblemDto; -import top.hcode.hoj.pojo.entity.contest.Contest; -import top.hcode.hoj.pojo.entity.contest.ContestProblem; -import top.hcode.hoj.pojo.entity.group.Group; -import top.hcode.hoj.pojo.entity.judge.Judge; -import top.hcode.hoj.pojo.entity.problem.Problem; -import top.hcode.hoj.pojo.entity.problem.Tag; -import top.hcode.hoj.pojo.vo.UserRolesVo; -import top.hcode.hoj.validator.GroupValidator; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; -import org.apache.shiro.SecurityUtils; -import org.apache.shiro.session.Session; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; - -import java.util.*; - -/** - * @Author: LengYun - * @Date: 2022/3/11 13:36 - * @Description: - */ -@Component -public class GroupContestProblemManager { - - @Autowired - private GroupEntityService groupEntityService; - - @Autowired - private ContestEntityService contestEntityService; - - @Autowired - private AdminContestProblemManager adminContestProblemManager; - - @Autowired - private ProblemEntityService problemEntityService; - - @Autowired - private ContestProblemEntityService contestProblemEntityService; - - @Autowired - private JudgeEntityService judgeEntityService; - - @Autowired - private GroupValidator groupValidator; - - public HashMap getContestProblemList(Integer limit, Integer currentPage, String keyword, Long cid, Integer problemType, String oj) throws StatusNotFoundException, StatusForbiddenException { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - Contest contest = contestEntityService.getById(cid); - - if (contest == null) { - throw new StatusNotFoundException("该比赛不存在!"); - } - - Long gid = contest.getGid(); - - Group group = groupEntityService.getById(gid); - - if (group == null || group.getStatus() == 1 && !isRoot) { - throw new StatusNotFoundException("该团队不存在或已被封禁!"); - } - - if (!groupValidator.isGroupRoot(userRolesVo.getUid(), gid) && !userRolesVo.getUid().equals(contest.getUid()) && !isRoot) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - - return adminContestProblemManager.getProblemList(limit, currentPage, keyword, cid, problemType, oj); - } - - public Map addProblem(ProblemDto problemDto) throws StatusNotFoundException, StatusForbiddenException, StatusFailException { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - Long gid = problemDto.getProblem().getGid(); - - Group group = groupEntityService.getById(gid); - - if (group == null || group.getStatus() == 1 && !isRoot) { - throw new StatusNotFoundException("该团队不存在或已被封禁!"); - } - - if (!isRoot && !groupValidator.isGroupAdmin(userRolesVo.getUid(), gid)) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - - problemDto.getProblem().setProblemId(group.getShortName() + problemDto.getProblem().getProblemId()); - - QueryWrapper queryWrapper = new QueryWrapper<>(); - queryWrapper.eq("problem_id", problemDto.getProblem().getProblemId().toUpperCase()); - - Problem problem = problemEntityService.getOne(queryWrapper); - if (problem != null) { - throw new StatusFailException("该题目的Problem ID已存在,请更换!"); - } - - problemDto.getProblem().setAuth(3); - problemDto.getProblem().setIsGroup(true); - - List tagList = new LinkedList<>(); - for (Tag tag : problemDto.getTags()) { - if (tag.getGid() != null && !tag.getGid().equals(gid)) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - - if (tag.getId() == null) { - tag.setGid(gid); - } - - tagList.add(tag); - } - - problemDto.setTags(tagList); - - boolean isOk = problemEntityService.adminAddProblem(problemDto); - if (isOk) { - return MapUtil.builder().put("pid", problemDto.getProblem().getId()).map(); - } else { - throw new StatusFailException("添加失败"); - } - } - - public ContestProblem getContestProblem(Long pid, Long cid) throws StatusNotFoundException, StatusForbiddenException, StatusFailException { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - Contest contest = contestEntityService.getById(cid); - - if (contest == null) { - throw new StatusNotFoundException("该比赛不存在!"); - } - - Long gid = contest.getGid(); - - Group group = groupEntityService.getById(gid); - - if (group == null || group.getStatus() == 1 && !isRoot) { - throw new StatusNotFoundException("该团队不存在或已被封禁!"); - } - - if (!userRolesVo.getUid().equals(contest.getUid()) && !isRoot - && !groupValidator.isGroupRoot(userRolesVo.getUid(), gid)) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - - QueryWrapper queryWrapper = new QueryWrapper<>(); - queryWrapper.eq("cid", cid).eq("pid", pid); - - ContestProblem contestProblem = contestProblemEntityService.getOne(queryWrapper); - if (contestProblem == null) { - throw new StatusFailException("该比赛题目不存在!"); - } - return contestProblem; - } - - public void updateContestProblem(ContestProblem contestProblem) throws StatusNotFoundException, StatusForbiddenException, StatusFailException { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - Long cid = contestProblem.getCid(); - - Contest contest = contestEntityService.getById(cid); - - if (contest == null) { - throw new StatusNotFoundException("该比赛不存在!"); - } - - Long gid = contest.getGid(); - - Group group = groupEntityService.getById(gid); - - if (group == null || group.getStatus() == 1 && !isRoot) { - throw new StatusNotFoundException("该团队不存在或已被封禁!"); - } - - if (!userRolesVo.getUid().equals(contest.getUid()) && !isRoot - && !groupValidator.isGroupRoot(userRolesVo.getUid(), gid)) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - - boolean isOk = contestProblemEntityService.saveOrUpdate(contestProblem); - if (isOk) { - contestProblemEntityService.syncContestRecord(contestProblem.getPid(), contestProblem.getCid(), contestProblem.getDisplayId()); - } else { - throw new StatusFailException("更新失败!"); - } - } - - public void deleteContestProblem(Long pid, Long cid) throws StatusNotFoundException, StatusForbiddenException, StatusFailException { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - Contest contest = contestEntityService.getById(cid); - - if (contest == null) { - throw new StatusNotFoundException("该比赛不存在!"); - } - - Long gid = contest.getGid(); - - Group group = groupEntityService.getById(gid); - - if (group == null || group.getStatus() == 1 && !isRoot) { - throw new StatusNotFoundException("该团队不存在或已被封禁!"); - } - - if (!userRolesVo.getUid().equals(contest.getUid()) && !isRoot - && !groupValidator.isGroupRoot(userRolesVo.getUid(), gid)) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - - QueryWrapper contestProblemQueryWrapper = new QueryWrapper<>(); - contestProblemQueryWrapper.eq("cid", cid).eq("pid", pid); - boolean isOk = contestProblemEntityService.remove(contestProblemQueryWrapper); - if (isOk) { - UpdateWrapper judgeUpdateWrapper = new UpdateWrapper<>(); - judgeUpdateWrapper.eq("cid", cid).eq("pid", pid); - judgeEntityService.remove(judgeUpdateWrapper); - } else { - throw new StatusFailException("删除失败!"); - } - } - - public void addProblemFromPublic(ContestProblemDto contestProblemDto) throws StatusNotFoundException, StatusForbiddenException, StatusFailException { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - Long pid = contestProblemDto.getPid(); - - Problem problem = problemEntityService.getById(pid); - - if (problem == null || problem.getAuth() != 1 || problem.getIsGroup()) { - throw new StatusNotFoundException("该题目不存在或已被隐藏!"); - } - - Long cid = contestProblemDto.getCid(); - - Contest contest = contestEntityService.getById(cid); - - if (contest == null) { - throw new StatusNotFoundException("该比赛不存在!"); - } - - Long gid = contest.getGid(); - - Group group = groupEntityService.getById(gid); - - if (group == null || group.getStatus() == 1 && !isRoot) { - throw new StatusNotFoundException("该团队不存在或已被封禁!"); - } - - if (!userRolesVo.getUid().equals(contest.getUid()) && !isRoot - && !groupValidator.isGroupRoot(userRolesVo.getUid(), gid)) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - - String displayId = contestProblemDto.getDisplayId(); - - QueryWrapper contestProblemQueryWrapper = new QueryWrapper<>(); - contestProblemQueryWrapper.eq("cid", cid) - .and(wrapper -> wrapper.eq("pid", pid) - .or() - .eq("display_id", displayId)); - ContestProblem contestProblem = contestProblemEntityService.getOne(contestProblemQueryWrapper, false); - if (contestProblem != null) { - throw new StatusFailException("添加失败,该题目已添加或者题目的比赛展示ID已存在!"); - } - - String displayName = problem.getTitle(); - - ContestProblem newCProblem = new ContestProblem(); - - boolean isOk = contestProblemEntityService.saveOrUpdate(newCProblem - .setCid(cid).setPid(pid).setDisplayTitle(displayName).setDisplayId(displayId)); - if (!isOk) { - throw new StatusFailException("添加失败"); - } - } - - @Transactional(rollbackFor = Exception.class) - public void addProblemFromGroup(String problemId, Long cid, String displayId) throws StatusNotFoundException, StatusForbiddenException, StatusFailException { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - Contest contest = contestEntityService.getById(cid); - - if (contest == null) { - throw new StatusNotFoundException("该训练不存在!"); - } - - Long gid = contest.getGid(); - - Group group = groupEntityService.getById(gid); - - if (group == null || group.getStatus() == 1 && !isRoot) { - throw new StatusNotFoundException("该团队不存在或已被封禁!"); - } - - if (!userRolesVo.getUid().equals(contest.getUid()) && !isRoot - && !groupValidator.isGroupRoot(userRolesVo.getUid(), gid)) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - - QueryWrapper problemQueryWrapper = new QueryWrapper<>(); - problemQueryWrapper.eq("problem_id", problemId).eq("gid", gid); - - Problem problem = problemEntityService.getOne(problemQueryWrapper); - - if (problem == null) { - throw new StatusNotFoundException("该题目不存在或不是团队题目!"); - } - - QueryWrapper contestProblemQueryWrapper = new QueryWrapper<>(); - contestProblemQueryWrapper.eq("cid", cid) - .and(wrapper -> wrapper.eq("pid", problem.getId()) - .or() - .eq("display_id", displayId)); - - ContestProblem contestProblem = contestProblemEntityService.getOne(contestProblemQueryWrapper); - if (contestProblem != null) { - throw new StatusFailException("添加失败,该题目已添加或者题目的比赛展示ID已存在!"); - } - - ContestProblem newCProblem = new ContestProblem(); - String displayName = problem.getTitle(); - - boolean updateProblem = problemEntityService.saveOrUpdate(problem.setAuth(3)); - - boolean isOk = contestProblemEntityService.saveOrUpdate(newCProblem - .setCid(cid).setPid(problem.getId()).setDisplayTitle(displayName).setDisplayId(displayId)); - if (!isOk || !updateProblem) { - throw new StatusFailException("添加失败"); - } - } -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/discussion/GroupDiscussionManager.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/discussion/GroupDiscussionManager.java deleted file mode 100644 index 616512a..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/discussion/GroupDiscussionManager.java +++ /dev/null @@ -1,241 +0,0 @@ -package top.hcode.hoj.manager.group.discussion; - -import org.springframework.util.StringUtils; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.exception.StatusForbiddenException; -import top.hcode.hoj.common.exception.StatusNotFoundException; -import top.hcode.hoj.dao.discussion.DiscussionEntityService; -import top.hcode.hoj.dao.group.GroupEntityService; -import top.hcode.hoj.dao.problem.ProblemEntityService; -import top.hcode.hoj.dao.user.UserAcproblemEntityService; -import top.hcode.hoj.pojo.entity.discussion.Discussion; -import top.hcode.hoj.pojo.entity.group.Group; -import top.hcode.hoj.pojo.entity.problem.Problem; -import top.hcode.hoj.pojo.entity.user.UserAcproblem; -import top.hcode.hoj.pojo.vo.UserRolesVo; -import top.hcode.hoj.utils.Constants; -import top.hcode.hoj.utils.RedisUtils; -import top.hcode.hoj.validator.GroupValidator; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import org.apache.shiro.SecurityUtils; -import org.apache.shiro.session.Session; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; - -/** - * @Author: LengYun - * @Date: 2022/3/11 13:36 - * @Description: - */ -@Component -public class GroupDiscussionManager { - - @Autowired - private GroupEntityService groupEntityService; - - @Autowired - private DiscussionEntityService discussionEntityService; - - @Autowired - private GroupValidator groupValidator; - - @Autowired - private ProblemEntityService problemEntityService; - - @Autowired - private UserAcproblemEntityService userAcproblemEntityService; - - @Autowired - private RedisUtils redisUtils; - - public IPage getDiscussionList(Integer limit, - Integer currentPage, - Long gid, - String pid) throws StatusNotFoundException, StatusForbiddenException { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - Group group = groupEntityService.getById(gid); - - if (group == null || group.getStatus() == 1 && !isRoot) { - throw new StatusNotFoundException("该团队不存在或已被封禁!"); - } - - if (!groupValidator.isGroupMember(userRolesVo.getUid(), gid) && !isRoot) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - - QueryWrapper discussionQueryWrapper = new QueryWrapper<>(); - - if (!StringUtils.isEmpty(pid)) { - discussionQueryWrapper.eq("pid", pid); - } - - IPage iPage = new Page<>(currentPage, limit); - - discussionQueryWrapper - .eq("status", 0) - .eq("gid", gid) - .orderByDesc("top_priority") - .orderByDesc("gmt_create") - .orderByDesc("like_num") - .orderByDesc("view_num"); - - return discussionEntityService.page(iPage, discussionQueryWrapper); - } - - public IPage getAdminDiscussionList(Integer limit, Integer currentPage, Long gid) throws StatusNotFoundException, StatusForbiddenException { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - Group group = groupEntityService.getById(gid); - - if (group == null || group.getStatus() == 1 && !isRoot) { - throw new StatusNotFoundException("该团队不存在或已被封禁!"); - } - - if (!isRoot && !groupValidator.isGroupAdmin(userRolesVo.getUid(), gid)) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - - QueryWrapper discussionQueryWrapper = new QueryWrapper<>(); - - IPage iPage = new Page<>(currentPage, limit); - - discussionQueryWrapper - .eq("gid", gid) - .orderByDesc("top_priority") - .orderByDesc("gmt_create") - .orderByDesc("like_num") - .orderByDesc("view_num"); - - return discussionEntityService.page(iPage, discussionQueryWrapper); - } - - public void addDiscussion(Discussion discussion) throws StatusForbiddenException, StatusNotFoundException, StatusFailException { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - boolean isProblemAdmin = SecurityUtils.getSubject().hasRole("problem_admin"); - boolean isAdmin = SecurityUtils.getSubject().hasRole("admin"); - - Long gid = discussion.getGid(); - - Group group = groupEntityService.getById(gid); - - if (group == null || group.getStatus() == 1 && !isRoot) { - throw new StatusNotFoundException("该团队不存在或已被封禁!"); - } - - if (!isRoot && !groupValidator.isGroupMember(userRolesVo.getUid(), gid)) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - - String problemId = discussion.getPid(); - if (problemId != null) { - QueryWrapper problemQueryWrapper = new QueryWrapper<>(); - problemQueryWrapper.eq("problem_id", problemId); - Problem problem = problemEntityService.getOne(problemQueryWrapper); - - if (problem == null) { - throw new StatusNotFoundException("该题目不存在"); - } else if (problem.getIsGroup()) { - discussion.setGid(problem.getGid()); - } - } - - if (!isRoot && !isProblemAdmin && !isAdmin) { - QueryWrapper queryWrapper = new QueryWrapper<>(); - queryWrapper.eq("uid", userRolesVo.getUid()).select("distinct pid"); - int userAcProblemCount = userAcproblemEntityService.count(queryWrapper); - - if (userAcProblemCount < 10) { - throw new StatusForbiddenException("对不起,您暂时不能评论!请先去提交题目通过10道以上!"); - } - - String lockKey = Constants.Account.DISCUSSION_ADD_NUM_LOCK.getCode() + userRolesVo.getUid(); - Integer num = (Integer) redisUtils.get(lockKey); - if (num == null) { - redisUtils.set(lockKey, 1, 3600 * 24); - } else if (num >= 5) { - throw new StatusForbiddenException("对不起,您今天发帖次数已超过5次,已被限制!"); - } else { - redisUtils.incr(lockKey, 1); - } - } - - discussion.setAuthor(userRolesVo.getUsername()) - .setAvatar(userRolesVo.getAvatar()) - .setUid(userRolesVo.getUid()); - - if (groupValidator.isGroupRoot(userRolesVo.getUid(), gid)) { - discussion.setRole("root"); - } else if (groupValidator.isGroupAdmin(userRolesVo.getUid(), gid)) { - discussion.setRole("admin"); - } else { - discussion.setTopPriority(false); - } - - boolean isOk = discussionEntityService.save(discussion); - if (!isOk) { - throw new StatusFailException("添加失败"); - } - } - - public void updateDiscussion(Discussion discussion) throws StatusForbiddenException, StatusNotFoundException, StatusFailException { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - Long gid = discussion.getGid(); - - Group group = groupEntityService.getById(gid); - - if (group == null || group.getStatus() == 1 && !isRoot) { - throw new StatusNotFoundException("该团队不存在或已被封禁!"); - } - - if (!groupValidator.isGroupAdmin(userRolesVo.getUid(), gid) && !discussion.getUid().equals(userRolesVo.getUid()) && !isRoot) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - - boolean isOk = discussionEntityService.updateById(discussion); - if (!isOk) { - throw new StatusFailException("修改失败"); - } - } - - public void deleteDiscussion(Long did) throws StatusForbiddenException, StatusNotFoundException, StatusFailException { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - Discussion discussion = discussionEntityService.getById(did); - - Long gid = discussion.getGid(); - - Group group = groupEntityService.getById(gid); - - if (group == null || group.getStatus() == 1 && !isRoot) { - throw new StatusNotFoundException("该团队不存在或已被封禁!"); - } - - if (!groupValidator.isGroupAdmin(userRolesVo.getUid(), gid) && !discussion.getUid().equals(userRolesVo.getUid()) && !isRoot) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - - boolean isOk = discussionEntityService.removeById(did); - if (!isOk) { - throw new StatusFailException("删除失败"); - } - } -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/member/GroupMemberManager.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/member/GroupMemberManager.java deleted file mode 100644 index f33db07..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/member/GroupMemberManager.java +++ /dev/null @@ -1,297 +0,0 @@ -package top.hcode.hoj.manager.group.member; - -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.exception.StatusForbiddenException; -import top.hcode.hoj.common.exception.StatusNotFoundException; -import top.hcode.hoj.dao.group.GroupEntityService; -import top.hcode.hoj.dao.group.GroupMemberEntityService; -import top.hcode.hoj.pojo.entity.group.GroupMember; -import top.hcode.hoj.pojo.entity.group.Group; -import top.hcode.hoj.pojo.vo.GroupMemberVo; -import top.hcode.hoj.pojo.vo.UserRolesVo; -import top.hcode.hoj.validator.GroupValidator; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.apache.shiro.SecurityUtils; -import org.apache.shiro.session.Session; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; -import org.springframework.util.StringUtils; - -import java.util.List; -import java.util.stream.Collectors; - -/** - * @Author: LengYun - * @Date: 2022/3/11 13:36 - * @Description: - */ -@Component -public class GroupMemberManager { - - @Autowired - private GroupEntityService groupEntityService; - - @Autowired - private GroupMemberEntityService groupMemberEntityService; - - - @Autowired - private GroupValidator groupValidator; - - public IPage getMemberList(Integer limit, Integer currentPage, String keyword, Integer auth, Long gid) throws StatusNotFoundException, StatusForbiddenException { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - Group group = groupEntityService.getById(gid); - - if (group == null || group.getStatus() == 1 && !isRoot) { - throw new StatusNotFoundException("该团队不存在或已被封禁!"); - } - - if (!groupValidator.isGroupMember(userRolesVo.getUid(), gid) && !isRoot) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - - if (currentPage == null || currentPage < 1) currentPage = 1; - if (limit == null || limit < 1) limit = 10; - if (auth == null || auth < 1) auth = 0; - - if (!StringUtils.isEmpty(keyword)) { - keyword = keyword.trim(); - } - - return groupMemberEntityService.getMemberList(limit, currentPage, keyword, auth, gid); - } - - public IPage getApplyList(Integer limit, Integer currentPage, String keyword, Integer auth, Long gid) throws StatusNotFoundException, StatusForbiddenException { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - Group group = groupEntityService.getById(gid); - - if (group == null || group.getStatus() == 1 && !isRoot) { - throw new StatusNotFoundException("该团队不存在或已被封禁!"); - } - - if (!groupValidator.isGroupAdmin(userRolesVo.getUid(), gid) && !isRoot) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - - if (currentPage == null || currentPage < 1) currentPage = 1; - if (limit == null || limit < 1) limit = 10; - if (auth == null || auth < 1) auth = 0; - - if (!StringUtils.isEmpty(keyword)) { - keyword = keyword.trim(); - } - - return groupMemberEntityService.getApplyList(limit, currentPage, keyword, auth, gid); - } - - public void addMember(Long gid, String code, String reason) throws StatusFailException, StatusNotFoundException, StatusForbiddenException { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - Group group = groupEntityService.getById(gid); - - if (group == null) { - throw new StatusNotFoundException("该团队不存在!"); - } - - if (!isRoot && (group.getStatus() == 1 || !group.getVisible())) { - throw new StatusNotFoundException("该团队已被封禁或未公开显示!"); - } - - if (group.getAuth() == 3 && !code.equals(group.getCode())) { - throw new StatusFailException("邀请码错误,请重新尝试!"); - } - - if (group.getAuth() != 1 && !StringUtils.isEmpty(reason) && (reason.length() < 5 || reason.length() > 100)) { - throw new StatusFailException("申请理由的长度应为 5 到 100!"); - } - - QueryWrapper groupMemberQueryWrapper = new QueryWrapper<>(); - groupMemberQueryWrapper.eq("uid", userRolesVo.getUid()).eq("gid", gid); - - GroupMember groupMember = groupMemberEntityService.getOne(groupMemberQueryWrapper); - - if (groupMember != null) { - if (groupMember.getAuth() == 1) { - throw new StatusForbiddenException("您已申请过,请勿重复申请!"); - } else if (groupMember.getAuth() >= 3) { - throw new StatusForbiddenException("您已经加入了该团队,请勿再申请!!"); - } - } - - GroupMember newGroupMember = new GroupMember(); - newGroupMember.setUid(userRolesVo.getUid()).setGid(gid).setReason(reason); - if (group.getAuth() == 1) { - newGroupMember.setAuth(3); - } else { - newGroupMember.setAuth(1); - } - - boolean isOk = groupMemberEntityService.save(newGroupMember); - - if (!isOk) { - throw new StatusFailException("申请失败,请重新尝试!"); - } else { - if (group.getAuth() == 1) { - groupMemberEntityService.addWelcomeNoticeToGroupNewMember(gid, group.getName(), userRolesVo.getUid()); - } else { - groupMemberEntityService.addApplyNoticeToGroupRoot(gid, group.getName(), userRolesVo.getUid()); - } - } - } - - public void updateMember(GroupMember groupMemberDto) throws StatusFailException, StatusForbiddenException, StatusNotFoundException { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - Long gid = groupMemberDto.getGid(); - - Group group = groupEntityService.getById(gid); - - if (group == null || group.getStatus() == 1 && !isRoot) { - throw new StatusNotFoundException("该团队不存在或已被封禁!"); - } - - if (group.getUid().equals(groupMemberDto.getUid())) { - throw new StatusNotFoundException("对不起,不允许操作团队的Owner权限!"); - } - - boolean isAgreedNewMember = false; - - QueryWrapper groupMemberQueryWrapper = new QueryWrapper<>(); - groupMemberQueryWrapper.eq("gid", gid) - .eq("uid", userRolesVo.getUid()) - .in("auth", 4, 5); - - GroupMember currentGroupMember = groupMemberEntityService.getOne(groupMemberQueryWrapper); - - if (!isRoot && currentGroupMember == null) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - - QueryWrapper changeGroupMemberQueryWrapper = new QueryWrapper<>(); - changeGroupMemberQueryWrapper.eq("gid", gid).eq("uid", groupMemberDto.getUid()); - - GroupMember changeGroupMember = groupMemberEntityService.getOne(changeGroupMemberQueryWrapper); - - if (changeGroupMember == null) { - throw new StatusNotFoundException("该用户不在团队中!"); - } - - if (!isRoot && (changeGroupMember.getAuth() >= currentGroupMember.getAuth() - || groupMemberDto.getAuth() >= currentGroupMember.getAuth())) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - - boolean isOk = groupMemberEntityService.updateById(groupMemberDto); - if (!isOk) { - throw new StatusFailException("更新失败,请重新尝试!"); - } else { - if (changeGroupMember.getAuth() <= 2) { // 之前是申请中,则之后通过审批就要发消息 - groupMemberEntityService.addWelcomeNoticeToGroupNewMember(gid, group.getName(), groupMemberDto.getUid()); - } - } - } - - public void deleteMember(String uid, Long gid) throws StatusFailException, StatusNotFoundException, StatusForbiddenException { - - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - Group group = groupEntityService.getById(gid); - - if (group == null || group.getStatus() == 1 && !isRoot) { - throw new StatusNotFoundException("该团队不存在或已被封禁!"); - } - - if (userRolesVo.getUid().equals(uid)) { - throw new StatusNotFoundException("对不起,您无法删除自己!"); - } - - if (group.getUid().equals(uid)) { - throw new StatusNotFoundException("对不起,不允许删除团队的Owner!"); - } - - QueryWrapper groupMemberQueryWrapper = new QueryWrapper<>(); - groupMemberQueryWrapper.eq("gid", gid) - .eq("uid", userRolesVo.getUid()) - .in("auth", 4, 5); - - GroupMember currentGroupMember = groupMemberEntityService.getOne(groupMemberQueryWrapper); - - if (currentGroupMember == null && !isRoot) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - - - QueryWrapper changeGroupMemberQueryWrapper = new QueryWrapper<>(); - changeGroupMemberQueryWrapper.eq("gid", gid).eq("uid", uid); - - GroupMember changeGroupMember = groupMemberEntityService.getOne(changeGroupMemberQueryWrapper); - - if (changeGroupMember == null) { - throw new StatusNotFoundException("该用户不在团队中!"); - } - - if (!isRoot && currentGroupMember.getAuth() <= changeGroupMember.getAuth()) { - throw new StatusNotFoundException("对不起,您无权限操作!"); - } - - boolean isOk = groupMemberEntityService.remove(changeGroupMemberQueryWrapper); - if (!isOk) { - throw new StatusFailException("删除失败,请重新尝试!"); - } else { - groupMemberEntityService.addRemoveNoticeToGroupMember(gid, group.getName(), userRolesVo.getUsername(), uid); - } - } - - public void exitGroup(Long gid) throws StatusNotFoundException, StatusForbiddenException, StatusFailException { - - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - Group group = groupEntityService.getById(gid); - - if (group == null || group.getStatus() == 1 && !isRoot) { - throw new StatusNotFoundException("该团队不存在或已被封禁!"); - } - - if (userRolesVo.getUid().equals(group.getUid())) { - throw new StatusNotFoundException("对不起,作为该团队Owner,您只可以解散团队,不允许退出团队!"); - } - - QueryWrapper groupMemberQueryWrapper = new QueryWrapper<>(); - groupMemberQueryWrapper.eq("gid", gid) - .eq("uid", userRolesVo.getUid()); - - GroupMember currentGroupMember = groupMemberEntityService.getOne(groupMemberQueryWrapper); - - if (currentGroupMember == null || currentGroupMember.getAuth() == null || currentGroupMember.getAuth() <= 2) { - throw new StatusForbiddenException("对不起,您并未在当前团队,无法退出!"); - } - - boolean isOk = groupMemberEntityService.remove(groupMemberQueryWrapper); - if (!isOk) { - throw new StatusFailException("退出团队失败,请重新尝试!"); - } - } - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java deleted file mode 100644 index 593ff42..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/problem/GroupProblemManager.java +++ /dev/null @@ -1,477 +0,0 @@ -package top.hcode.hoj.manager.group.problem; - -import cn.hutool.core.io.FileUtil; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.apache.shiro.SecurityUtils; -import org.apache.shiro.session.Session; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.cloud.context.config.annotation.RefreshScope; -import org.springframework.stereotype.Component; -import org.springframework.util.StringUtils; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.exception.StatusForbiddenException; -import top.hcode.hoj.common.exception.StatusNotFoundException; -import top.hcode.hoj.dao.group.GroupEntityService; -import top.hcode.hoj.dao.group.GroupProblemEntityService; -import top.hcode.hoj.dao.judge.JudgeEntityService; -import top.hcode.hoj.dao.problem.ProblemCaseEntityService; -import top.hcode.hoj.dao.problem.ProblemEntityService; -import top.hcode.hoj.dao.problem.TagEntityService; -import top.hcode.hoj.judge.Dispatcher; -import top.hcode.hoj.pojo.dto.ProblemDto; -import top.hcode.hoj.pojo.entity.group.Group; -import top.hcode.hoj.pojo.dto.CompileDTO; -import top.hcode.hoj.pojo.entity.judge.Judge; -import top.hcode.hoj.pojo.entity.problem.Problem; -import top.hcode.hoj.pojo.entity.problem.ProblemCase; -import top.hcode.hoj.pojo.entity.problem.Tag; -import top.hcode.hoj.pojo.vo.ProblemVo; -import top.hcode.hoj.pojo.vo.UserRolesVo; -import top.hcode.hoj.utils.Constants; -import top.hcode.hoj.validator.GroupValidator; - -import java.io.File; -import java.util.LinkedList; -import java.util.List; - -/** - * @Author: LengYun - * @Date: 2022/3/11 13:36 - * @Description: - */ -@Component -@RefreshScope -public class GroupProblemManager { - - @Autowired - private GroupProblemEntityService groupProblemEntityService; - - @Autowired - private GroupEntityService groupEntityService; - - @Autowired - private ProblemEntityService problemEntityService; - - @Autowired - private JudgeEntityService judgeEntityService; - - @Autowired - private ProblemCaseEntityService problemCaseEntityService; - - @Autowired - private GroupValidator groupValidator; - - @Autowired - private TagEntityService tagEntityService; - - @Autowired - private Dispatcher dispatcher; - - @Value("${hoj.judge.token}") - private String judgeToken; - - public IPage getProblemList(Integer limit, Integer currentPage, Long gid) throws StatusNotFoundException, StatusForbiddenException { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - Group group = groupEntityService.getById(gid); - - if (group == null || group.getStatus() == 1 && !isRoot) { - throw new StatusNotFoundException("该团队不存在或已被封禁!"); - } - - if (!groupValidator.isGroupMember(userRolesVo.getUid(), gid) && !isRoot) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - - if (currentPage == null || currentPage < 1) currentPage = 1; - if (limit == null || limit < 1) limit = 10; - - return groupProblemEntityService.getProblemList(limit, currentPage, gid); - } - - public IPage getAdminProblemList(Integer limit, Integer currentPage, Long gid) throws StatusNotFoundException, StatusForbiddenException { - - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - Group group = groupEntityService.getById(gid); - - if (group == null || group.getStatus() == 1 && !isRoot) { - throw new StatusNotFoundException("该团队不存在或已被封禁!"); - } - - if (!groupValidator.isGroupAdmin(userRolesVo.getUid(), gid) && !isRoot) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - - if (currentPage == null || currentPage < 1) currentPage = 1; - if (limit == null || limit < 1) limit = 10; - - return groupProblemEntityService.getAdminProblemList(limit, currentPage, gid); - } - - public Problem getProblem(Long pid) throws StatusForbiddenException, StatusNotFoundException, StatusFailException { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - Problem problem = problemEntityService.getById(pid); - - if (problem == null) { - throw new StatusNotFoundException("该题目不存在!"); - } - - Long gid = problem.getGid(); - - Group group = groupEntityService.getById(gid); - - if (group == null || group.getStatus() == 1 && !isRoot) { - throw new StatusNotFoundException("该团队不存在或已被封禁!"); - } - - if (!groupValidator.isGroupRoot(userRolesVo.getUid(), gid) && !userRolesVo.getUsername().equals(problem.getAuthor()) && !isRoot) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - - return problem; - } - - public void addProblem(ProblemDto problemDto) throws StatusForbiddenException, StatusNotFoundException, StatusFailException { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - Long gid = problemDto.getProblem().getGid(); - - Group group = groupEntityService.getById(gid); - - if (group == null || group.getStatus() == 1 && !isRoot) { - throw new StatusNotFoundException("该团队不存在或已被封禁!"); - } - - if (!isRoot && !groupValidator.isGroupAdmin(userRolesVo.getUid(), gid)) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - - problemDto.getProblem().setProblemId(group.getShortName() + problemDto.getProblem().getProblemId()); - - QueryWrapper problemQueryWrapper = new QueryWrapper<>(); - problemQueryWrapper.eq("problem_id", problemDto.getProblem().getProblemId().toUpperCase()); - int sameProblemIDCount = problemEntityService.count(problemQueryWrapper); - if (sameProblemIDCount > 0) { - throw new StatusFailException("该题目的Problem ID已存在,请更换!"); - } - - problemDto.getProblem().setIsGroup(true); - - List tagList = new LinkedList<>(); - for (Tag tag : problemDto.getTags()) { - if (tag.getGid() != null && tag.getGid().longValue() != gid) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - - if (tag.getId() == null) { - tag.setGid(gid); - } - - tagList.add(tag); - } - - problemDto.setTags(tagList); - - boolean isOk = problemEntityService.adminAddProblem(problemDto); - if (!isOk) { - throw new StatusFailException("添加失败"); - } - } - - public void updateProblem(ProblemDto problemDto) throws StatusForbiddenException, StatusNotFoundException, StatusFailException { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - Long pid = problemDto.getProblem().getId(); - - Problem problem = problemEntityService.getById(pid); - - if (problem == null) { - throw new StatusNotFoundException("该题目不存在!"); - } - - Long gid = problem.getGid(); - - Group group = groupEntityService.getById(gid); - - if (group == null || group.getStatus() == 1 && !isRoot) { - throw new StatusNotFoundException("该团队不存在或已被封禁!"); - } - - if (!userRolesVo.getUsername().equals(problem.getAuthor()) && !isRoot - && !groupValidator.isGroupRoot(userRolesVo.getUid(), gid)) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - - problemDto.getProblem().setProblemId(group.getShortName() + problemDto.getProblem().getProblemId()); - String problemId = problemDto.getProblem().getProblemId().toUpperCase(); - - QueryWrapper problemQueryWrapper = new QueryWrapper<>(); - problemQueryWrapper.eq("problem_id", problemId); - - Problem existedProblem = problemEntityService.getOne(problemQueryWrapper); - - problemDto.getProblem().setModifiedUser(userRolesVo.getUsername()); - - if (existedProblem != null && existedProblem.getId().longValue() != pid) { - throw new StatusFailException("当前的Problem ID 已被使用,请重新更换新的!"); - } - - problemDto.getProblem().setIsGroup(problem.getIsGroup()); - - List tagList = new LinkedList<>(); - for (Tag tag : problemDto.getTags()) { - if (tag.getGid() != null && tag.getGid().longValue() != gid) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - - if (tag.getId() == null) { - tag.setGid(gid); - } - - tagList.add(tag); - } - - problemDto.setTags(tagList); - - boolean isOk = problemEntityService.adminUpdateProblem(problemDto); - if (isOk) { - if (existedProblem == null) { - UpdateWrapper judgeUpdateWrapper = new UpdateWrapper<>(); - judgeUpdateWrapper.eq("pid", problemDto.getProblem().getId()) - .set("display_pid", problemId); - judgeEntityService.update(judgeUpdateWrapper); - } - } else { - throw new StatusFailException("修改失败"); - } - } - - public void deleteProblem(Long pid) throws StatusForbiddenException, StatusNotFoundException, StatusFailException { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - Problem problem = problemEntityService.getById(pid); - - if (problem == null) { - throw new StatusNotFoundException("该题目不存在!"); - } - - Long gid = problem.getGid(); - - Group group = groupEntityService.getById(gid); - - if (group == null || group.getStatus() == 1 && !isRoot) { - throw new StatusNotFoundException("该团队不存在或已被封禁!"); - } - - if (!groupValidator.isGroupRoot(userRolesVo.getUid(), gid) && !userRolesVo.getUsername().equals(problem.getAuthor()) && !isRoot) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - - boolean isOk = problemEntityService.removeById(pid); - if (isOk) { - FileUtil.del(Constants.File.TESTCASE_BASE_FOLDER.getPath() + File.separator + "problem_" + pid); - } else { - throw new StatusFailException("删除失败!"); - } - } - - public List getProblemCases(Long pid, Boolean isUpload) throws StatusForbiddenException, StatusNotFoundException, StatusFailException { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - Problem problem = problemEntityService.getById(pid); - - if (problem == null) { - throw new StatusNotFoundException("该题目不存在!"); - } - - Long gid = problem.getGid(); - - Group group = groupEntityService.getById(gid); - - if (group == null || group.getStatus() == 1 && !isRoot) { - throw new StatusNotFoundException("该团队不存在或已被封禁!"); - } - - if (!userRolesVo.getUsername().equals(problem.getAuthor()) && !isRoot - && !groupValidator.isGroupRoot(userRolesVo.getUid(), gid)) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - - QueryWrapper problemCaseQueryWrapper = new QueryWrapper<>(); - problemCaseQueryWrapper.eq("pid", pid).eq("status", 0); - if (isUpload) { - problemCaseQueryWrapper.last("order by length(input) asc,input asc"); - } - return problemCaseEntityService.list(problemCaseQueryWrapper); - } - - public List getAllProblemTagsList(Long gid) throws StatusNotFoundException, StatusForbiddenException { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - Group group = groupEntityService.getById(gid); - - if (group == null || group.getStatus() == 1 && !isRoot) { - throw new StatusNotFoundException("该团队不存在或已被封禁!"); - } - - if (!isRoot && !groupValidator.isGroupAdmin(userRolesVo.getUid(), gid)) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - - List tagList; - QueryWrapper tagQueryWrapper = new QueryWrapper<>(); - tagQueryWrapper.isNull("gid").or().eq("gid", gid); - tagList = tagEntityService.list(tagQueryWrapper); - - return tagList; - } - - public void compileSpj(CompileDTO compileDTO, Long gid) throws StatusForbiddenException, StatusNotFoundException, StatusFailException { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - Group group = groupEntityService.getById(gid); - - if (group == null || group.getStatus() == 1 && !isRoot) { - throw new StatusNotFoundException("该团队不存在或已被封禁!"); - } - - if (!isRoot && !groupValidator.isGroupAdmin(userRolesVo.getUid(), gid)) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - - if (StringUtils.isEmpty(compileDTO.getCode()) || - StringUtils.isEmpty(compileDTO.getLanguage())) { - throw new StatusFailException("参数不能为空!"); - } - - compileDTO.setToken(judgeToken); - dispatcher.dispatcherJudge("compile", "/compile-spj", compileDTO); - } - - public void compileInteractive(CompileDTO compileDTO, Long gid) throws StatusForbiddenException, StatusNotFoundException, StatusFailException { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - Group group = groupEntityService.getById(gid); - - if (group == null || group.getStatus() == 1 && !isRoot) { - throw new StatusNotFoundException("该团队不存在或已被封禁!"); - } - - if (!isRoot && !groupValidator.isGroupAdmin(userRolesVo.getUid(), gid)) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - - if (StringUtils.isEmpty(compileDTO.getCode()) || - StringUtils.isEmpty(compileDTO.getLanguage())) { - throw new StatusFailException("参数不能为空!"); - } - - compileDTO.setToken(judgeToken); - dispatcher.dispatcherJudge("compile", "/compile-interactive", compileDTO); - } - - public void changeProblemAuth(Long pid, Integer auth) throws StatusForbiddenException, StatusNotFoundException, StatusFailException { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - Problem problem = problemEntityService.getById(pid); - - if (problem == null) { - throw new StatusNotFoundException("该题目不存在!"); - } - - Long gid = problem.getGid(); - - Group group = groupEntityService.getById(gid); - - if (group == null || group.getStatus() == 1 && !isRoot) { - throw new StatusNotFoundException("该团队不存在或已被封禁!"); - } - - if (!userRolesVo.getUsername().equals(problem.getAuthor()) && !isRoot - && !groupValidator.isGroupRoot(userRolesVo.getUid(), gid)) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - - UpdateWrapper problemUpdateWrapper = new UpdateWrapper<>(); - problemUpdateWrapper.eq("id", pid) - .set("auth", auth) - .set("modified_user", userRolesVo.getUsername()); - - boolean isOk = problemEntityService.update(problemUpdateWrapper); - if (!isOk) { - throw new StatusFailException("修改失败"); - } - } - - public void applyPublic(Long pid, Boolean isApplied) throws StatusNotFoundException, StatusForbiddenException, StatusFailException { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - Problem problem = problemEntityService.getById(pid); - - if (problem == null) { - throw new StatusNotFoundException("该题目不存在!"); - } - Long gid = problem.getGid(); - Group group = groupEntityService.getById(gid); - if (group == null || group.getStatus() == 1 && !isRoot) { - throw new StatusNotFoundException("该团队不存在或已被封禁!"); - } - if (!userRolesVo.getUsername().equals(problem.getAuthor()) && !isRoot - && !groupValidator.isGroupRoot(userRolesVo.getUid(), gid)) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - UpdateWrapper problemUpdateWrapper = new UpdateWrapper<>(); - problemUpdateWrapper.eq("id", pid); - if (isApplied) { // 申请 - problemUpdateWrapper.set("apply_public_progress", 1); - } else { // 取消 - problemUpdateWrapper.set("apply_public_progress", null); - problemUpdateWrapper.set("is_group", true); - } - boolean isOk = problemEntityService.update(problemUpdateWrapper); - if (!isOk) { - throw new StatusFailException("修改失败"); - } - } -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingManager.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingManager.java deleted file mode 100644 index eb6d739..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingManager.java +++ /dev/null @@ -1,336 +0,0 @@ -package top.hcode.hoj.manager.group.training; - -import org.springframework.transaction.annotation.Transactional; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.exception.StatusForbiddenException; -import top.hcode.hoj.common.exception.StatusNotFoundException; -import top.hcode.hoj.dao.group.GroupEntityService; -import top.hcode.hoj.dao.group.GroupTrainingEntityService; -import top.hcode.hoj.dao.training.*; -import top.hcode.hoj.manager.admin.training.AdminTrainingRecordManager; -import top.hcode.hoj.pojo.dto.TrainingDto; -import top.hcode.hoj.pojo.entity.group.Group; -import top.hcode.hoj.pojo.entity.training.*; -import top.hcode.hoj.pojo.vo.TrainingVo; -import top.hcode.hoj.pojo.vo.UserRolesVo; -import top.hcode.hoj.utils.Constants; -import top.hcode.hoj.validator.GroupValidator; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.apache.shiro.SecurityUtils; -import org.apache.shiro.session.Session; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; - -import java.util.Objects; - -/** - * @Author: LengYun - * @Date: 2022/3/11 13:36 - * @Description: - */ -@Component -public class GroupTrainingManager { - - @Autowired - private GroupTrainingEntityService groupTrainingEntityService; - - @Autowired - private GroupEntityService groupEntityService; - - @Autowired - private TrainingEntityService trainingEntityService; - - @Autowired - private TrainingCategoryEntityService trainingCategoryEntityService; - - @Autowired - private MappingTrainingCategoryEntityService mappingTrainingCategoryEntityService; - - @Autowired - private TrainingRegisterEntityService trainingRegisterEntityService; - - @Autowired - private AdminTrainingRecordManager adminTrainingRecordManager; - - @Autowired - private GroupValidator groupValidator; - - public IPage getTrainingList(Integer limit, Integer currentPage, Long gid) throws StatusNotFoundException, StatusForbiddenException { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - Group group = groupEntityService.getById(gid); - - if (group == null || group.getStatus() == 1 && !isRoot) { - throw new StatusNotFoundException("该团队不存在或已被封禁!"); - } - - if (!isRoot && !groupValidator.isGroupMember(userRolesVo.getUid(), gid)) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - - if (currentPage == null || currentPage < 1) currentPage = 1; - if (limit == null || limit < 1) limit = 10; - - return groupTrainingEntityService.getTrainingList(limit, currentPage, gid); - } - - public IPage getAdminTrainingList(Integer limit, Integer currentPage, Long gid) throws StatusNotFoundException, StatusForbiddenException { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - Group group = groupEntityService.getById(gid); - - if (group == null || group.getStatus() == 1 && !isRoot) { - throw new StatusNotFoundException("该团队不存在或已被封禁!"); - } - - if (!isRoot && !groupValidator.isGroupAdmin(userRolesVo.getUid(), gid)) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - - if (currentPage == null || currentPage < 1) currentPage = 1; - if (limit == null || limit < 1) limit = 10; - - return groupTrainingEntityService.getAdminTrainingList(limit, currentPage, gid); - } - - public TrainingDto getTraining(Long tid) throws StatusForbiddenException, StatusNotFoundException, StatusFailException { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - Training training = trainingEntityService.getById(tid); - - if (training == null) { - throw new StatusNotFoundException("该训练不存在!"); - } - - Long gid = training.getGid(); - - Group group = groupEntityService.getById(gid); - - if (group == null || group.getStatus() == 1 && !isRoot) { - throw new StatusNotFoundException("该团队不存在或已被封禁!"); - } - - if (!userRolesVo.getUsername().equals(training.getAuthor()) && !isRoot - && !groupValidator.isGroupRoot(userRolesVo.getUid(), gid)) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - - TrainingDto trainingDto = new TrainingDto(); - trainingDto.setTraining(training); - - QueryWrapper mappingTrainingCategoryQueryWrapper = new QueryWrapper<>(); - mappingTrainingCategoryQueryWrapper.eq("tid", tid); - - MappingTrainingCategory mappingTrainingCategory = mappingTrainingCategoryEntityService.getOne(mappingTrainingCategoryQueryWrapper); - TrainingCategory trainingCategory = null; - - if (mappingTrainingCategory != null) { - trainingCategory = trainingCategoryEntityService.getById(mappingTrainingCategory.getCid()); - } - trainingDto.setTrainingCategory(trainingCategory); - return trainingDto; - } - - @Transactional(rollbackFor = Exception.class) - public void addTraining(TrainingDto trainingDto) throws StatusForbiddenException, StatusNotFoundException, StatusFailException { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - Long gid = trainingDto.getTraining().getGid(); - - Group group = groupEntityService.getById(gid); - - if (group == null || group.getStatus() == 1 && !isRoot) { - throw new StatusNotFoundException("该团队不存在或已被封禁!"); - } - - if (!isRoot && !groupValidator.isGroupAdmin(userRolesVo.getUid(), gid)) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - - trainingDto.getTraining().setIsGroup(true); - - Training training = trainingDto.getTraining(); - trainingEntityService.save(training); - TrainingCategory trainingCategory = trainingDto.getTrainingCategory(); - - if (trainingCategory.getGid() != null && trainingCategory.getGid() != gid) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - - if (trainingCategory.getId() == null) { - try { - trainingCategory.setGid(gid); - trainingCategoryEntityService.save(trainingCategory); - } catch (Exception ignored) { - QueryWrapper queryWrapper = new QueryWrapper<>(); - queryWrapper.eq("name", trainingCategory.getName()); - trainingCategory = trainingCategoryEntityService.getOne(queryWrapper, false); - } - } - - boolean isOk = mappingTrainingCategoryEntityService.save(new MappingTrainingCategory() - .setTid(training.getId()) - .setCid(trainingCategory.getId())); - if (!isOk) { - throw new StatusFailException("添加失败!"); - } - } - - @Transactional(rollbackFor = Exception.class) - public void updateTraining(TrainingDto trainingDto) throws StatusForbiddenException, StatusNotFoundException, StatusFailException { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - Long tid = trainingDto.getTraining().getId(); - - Training training = trainingEntityService.getById(tid); - - if (training == null) { - throw new StatusNotFoundException("该训练不存在!"); - } - - Long gid = training.getGid(); - - Group group = groupEntityService.getById(gid); - - if (group == null || group.getStatus() == 1 && !isRoot) { - throw new StatusNotFoundException("该团队不存在或已被封禁!"); - } - - if (!userRolesVo.getUsername().equals(training.getAuthor()) && !isRoot - && !groupValidator.isGroupRoot(userRolesVo.getUid(), gid)) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - - trainingDto.getTraining().setIsGroup(training.getIsGroup()); - - trainingEntityService.updateById(trainingDto.getTraining()); - - if (trainingDto.getTraining().getAuth().equals(Constants.Training.AUTH_PRIVATE.getValue())) { - if (!Objects.equals(training.getPrivatePwd(), trainingDto.getTraining().getPrivatePwd())) { - UpdateWrapper updateWrapper = new UpdateWrapper<>(); - updateWrapper.eq("tid", tid); - trainingRegisterEntityService.remove(updateWrapper); - } - } - - TrainingCategory trainingCategory = trainingDto.getTrainingCategory(); - - if (trainingCategory.getGid() != null && trainingCategory.getGid().longValue() != gid) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - - if (trainingCategory.getId() == null) { - try { - trainingCategory.setGid(gid); - trainingCategoryEntityService.save(trainingCategory); - } catch (Exception ignored) { - QueryWrapper queryWrapper = new QueryWrapper<>(); - queryWrapper.eq("name", trainingCategory.getName()); - trainingCategory = trainingCategoryEntityService.getOne(queryWrapper, false); - } - } - - MappingTrainingCategory mappingTrainingCategory = mappingTrainingCategoryEntityService - .getOne(new QueryWrapper().eq("tid", training.getId()), - false); - - if (mappingTrainingCategory == null) { - mappingTrainingCategoryEntityService.save(new MappingTrainingCategory() - .setTid(training.getId()).setCid(trainingCategory.getId())); - adminTrainingRecordManager.checkSyncRecord(trainingDto.getTraining()); - } else { - if (!mappingTrainingCategory.getCid().equals(trainingCategory.getId())) { - UpdateWrapper updateWrapper = new UpdateWrapper<>(); - updateWrapper.eq("tid", training.getId()).set("cid", trainingCategory.getId()); - boolean isOk = mappingTrainingCategoryEntityService.update(null, updateWrapper); - if (isOk) { - adminTrainingRecordManager.checkSyncRecord(trainingDto.getTraining()); - } else { - throw new StatusFailException("修改失败"); - } - } - } - } - - public void deleteTraining(Long tid) throws StatusForbiddenException, StatusNotFoundException, StatusFailException { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - Training training = trainingEntityService.getById(tid); - - if (training == null) { - throw new StatusNotFoundException("该训练不存在!"); - } - - Long gid = training.getGid(); - - Group group = groupEntityService.getById(gid); - - if (group == null || group.getStatus() == 1 && !isRoot) { - throw new StatusNotFoundException("该团队不存在或已被封禁!"); - } - - if (!userRolesVo.getUsername().equals(training.getAuthor()) && !isRoot - && !groupValidator.isGroupRoot(userRolesVo.getUid(), gid)) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - - boolean isOk = trainingEntityService.removeById(tid); - if (!isOk) { - throw new StatusFailException("删除失败!"); - } - } - - public void changeTrainingStatus(Long tid, Boolean status) throws StatusForbiddenException, StatusNotFoundException, StatusFailException { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - Training training = trainingEntityService.getById(tid); - - if (training == null) { - throw new StatusNotFoundException("该训练不存在!"); - } - - Long gid = training.getGid(); - - Group group = groupEntityService.getById(gid); - - if (group == null || group.getStatus() == 1 && !isRoot) { - throw new StatusNotFoundException("该团队不存在或已被封禁!"); - } - - if (!userRolesVo.getUsername().equals(training.getAuthor()) && !isRoot - && !groupValidator.isGroupRoot(userRolesVo.getUid(), gid)) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - - UpdateWrapper trainingUpdateWrapper = new UpdateWrapper<>(); - trainingUpdateWrapper.eq("id", tid).set("status", status); - - boolean isOk = trainingEntityService.update(trainingUpdateWrapper); - if (!isOk) { - throw new StatusFailException("修改失败"); - } - } -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingProblemManager.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingProblemManager.java deleted file mode 100644 index 9fd1bde..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/group/training/GroupTrainingProblemManager.java +++ /dev/null @@ -1,277 +0,0 @@ -package top.hcode.hoj.manager.group.training; - -import org.springframework.transaction.annotation.Transactional; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.exception.StatusForbiddenException; -import top.hcode.hoj.common.exception.StatusNotFoundException; -import top.hcode.hoj.dao.group.GroupEntityService; -import top.hcode.hoj.dao.problem.ProblemEntityService; -import top.hcode.hoj.dao.training.*; -import top.hcode.hoj.manager.admin.training.AdminTrainingProblemManager; -import top.hcode.hoj.manager.admin.training.AdminTrainingRecordManager; -import top.hcode.hoj.pojo.dto.TrainingProblemDto; -import top.hcode.hoj.pojo.entity.group.Group; -import top.hcode.hoj.pojo.entity.problem.Problem; -import top.hcode.hoj.pojo.entity.training.*; -import top.hcode.hoj.pojo.vo.UserRolesVo; -import top.hcode.hoj.validator.GroupValidator; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; -import org.apache.shiro.SecurityUtils; -import org.apache.shiro.session.Session; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; - -import java.util.Date; -import java.util.HashMap; - -/** - * @Author: LengYun - * @Date: 2022/3/11 13:36 - * @Description: - */ -@Component -public class GroupTrainingProblemManager { - - @Autowired - private GroupEntityService groupEntityService; - - @Autowired - private TrainingEntityService trainingEntityService; - - @Autowired - private ProblemEntityService problemEntityService; - - @Autowired - private AdminTrainingProblemManager adminTrainingProblemManager; - - @Autowired - private TrainingProblemEntityService trainingProblemEntityService; - - @Autowired - private AdminTrainingRecordManager adminTrainingRecordManager; - - @Autowired - private GroupValidator groupValidator; - - public HashMap getTrainingProblemList(Integer limit, Integer currentPage, String keyword, Boolean queryExisted, Long tid) throws StatusNotFoundException, StatusForbiddenException { - - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - Training training = trainingEntityService.getById(tid); - - if (training == null) { - throw new StatusNotFoundException("该训练不存在!"); - } - - Long gid = training.getGid(); - - Group group = groupEntityService.getById(gid); - - if (group == null || group.getStatus() == 1 && !isRoot) { - throw new StatusNotFoundException("该团队不存在或已被封禁!"); - } - - if (!userRolesVo.getUsername().equals(training.getAuthor()) && !isRoot - && !groupValidator.isGroupRoot(userRolesVo.getUid(), gid)) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - - return adminTrainingProblemManager.getProblemList(limit, currentPage, keyword, queryExisted, tid); - } - - public void updateTrainingProblem(TrainingProblem trainingProblem) throws StatusNotFoundException, StatusForbiddenException, StatusFailException { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - Training training = trainingEntityService.getById(trainingProblem.getTid()); - - if (training == null) { - throw new StatusNotFoundException("该训练不存在!"); - } - - Long gid = training.getGid(); - - Group group = groupEntityService.getById(gid); - - if (group == null || group.getStatus() == 1 && !isRoot) { - throw new StatusNotFoundException("该团队不存在或已被封禁!"); - } - - if (!userRolesVo.getUsername().equals(training.getAuthor()) && !isRoot - && !groupValidator.isGroupRoot(userRolesVo.getUid(), gid)) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - - boolean isOk = trainingProblemEntityService.updateById(trainingProblem); - if (!isOk) { - throw new StatusFailException("修改失败!"); - } - } - - public void deleteTrainingProblem(Long pid, Long tid) throws StatusNotFoundException, StatusForbiddenException, StatusFailException { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - Training training = trainingEntityService.getById(tid); - - if (training == null) { - throw new StatusNotFoundException("该训练不存在!"); - } - - Long gid = training.getGid(); - - Group group = groupEntityService.getById(gid); - - if (group == null || group.getStatus() == 1 && !isRoot) { - throw new StatusNotFoundException("该团队不存在或已被封禁!"); - } - - if (!userRolesVo.getUsername().equals(training.getAuthor()) && !isRoot - && !groupValidator.isGroupRoot(userRolesVo.getUid(), gid)) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - - QueryWrapper trainingProblemQueryWrapper = new QueryWrapper<>(); - trainingProblemQueryWrapper.eq("tid", tid).eq("pid", pid); - - boolean isOk = trainingProblemEntityService.remove(trainingProblemQueryWrapper); - if (!isOk) { - throw new StatusFailException("删除失败!"); - } - } - - @Transactional(rollbackFor = Exception.class) - public void addProblemFromPublic(TrainingProblemDto trainingProblemDto) throws StatusNotFoundException, StatusForbiddenException, StatusFailException { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - Long pid = trainingProblemDto.getPid(); - - Problem problem = problemEntityService.getById(pid); - - if (problem == null || problem.getAuth() != 1 || problem.getIsGroup()) { - throw new StatusNotFoundException("该题目不存在或已被隐藏!"); - } - - Long tid = trainingProblemDto.getTid(); - - Training training = trainingEntityService.getById(tid); - - if (training == null) { - throw new StatusNotFoundException("该训练不存在!"); - } - - Long gid = training.getGid(); - - Group group = groupEntityService.getById(gid); - - if (group == null || group.getStatus() == 1 && !isRoot) { - throw new StatusNotFoundException("该团队不存在或已被封禁!"); - } - - if (!userRolesVo.getUsername().equals(training.getAuthor()) && !isRoot - && !groupValidator.isGroupRoot(userRolesVo.getUid(), gid)) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - - String displayId = trainingProblemDto.getDisplayId(); - - QueryWrapper trainingProblemQueryWrapper = new QueryWrapper<>(); - trainingProblemQueryWrapper.eq("tid", tid) - .and(wrapper -> wrapper.eq("pid", pid) - .or() - .eq("display_id", displayId)); - TrainingProblem trainingProblem = trainingProblemEntityService.getOne(trainingProblemQueryWrapper); - if (trainingProblem != null) { - throw new StatusFailException("添加失败,该题目已添加或者题目的训练展示ID已存在!"); - } - - TrainingProblem newTProblem = new TrainingProblem(); - - boolean isOk = trainingProblemEntityService.saveOrUpdate(newTProblem - .setTid(tid).setPid(pid).setDisplayId(displayId)); - if (isOk) { // 添加成功 - - // 更新训练最近更新时间 - UpdateWrapper trainingUpdateWrapper = new UpdateWrapper<>(); - trainingUpdateWrapper.set("gmt_modified", new Date()) - .eq("id", tid); - trainingEntityService.update(trainingUpdateWrapper); - - adminTrainingRecordManager.syncAlreadyRegisterUserRecord(tid, pid, newTProblem.getId()); - } else { - throw new StatusFailException("添加失败!"); - } - } - - @Transactional(rollbackFor = Exception.class) - public void addProblemFromGroup(String problemId, Long tid) throws StatusNotFoundException, StatusForbiddenException, StatusFailException { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - Training training = trainingEntityService.getById(tid); - - if (training == null) { - throw new StatusNotFoundException("该训练不存在!"); - } - - Long gid = training.getGid(); - - Group group = groupEntityService.getById(gid); - - if (group == null || group.getStatus() == 1 && !isRoot) { - throw new StatusNotFoundException("该团队不存在或已被封禁!"); - } - - if (!userRolesVo.getUsername().equals(training.getAuthor()) && !isRoot - && !groupValidator.isGroupRoot(userRolesVo.getUid(), gid)) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - - QueryWrapper problemQueryWrapper = new QueryWrapper<>(); - problemQueryWrapper.eq("problem_id", problemId).eq("gid", gid); - - Problem problem = problemEntityService.getOne(problemQueryWrapper); - - if (problem == null) { - throw new StatusNotFoundException("该题目不存在或不是团队题目!"); - } - - QueryWrapper queryWrapper = new QueryWrapper<>(); - queryWrapper.eq("tid", tid) - .and(wrapper -> wrapper.eq("pid", problem.getId()) - .or() - .eq("display_id", problem.getProblemId())); - - TrainingProblem trainingProblem = trainingProblemEntityService.getOne(queryWrapper); - - if (trainingProblem != null) { - throw new StatusFailException("添加失败,该题目已添加或者题目的训练展示ID已存在!"); - } - - TrainingProblem newTProblem = new TrainingProblem(); - boolean isOk = trainingProblemEntityService.save(newTProblem - .setTid(tid).setPid(problem.getId()).setDisplayId(problem.getProblemId())); - if (isOk) { - UpdateWrapper trainingUpdateWrapper = new UpdateWrapper<>(); - trainingUpdateWrapper.set("gmt_modified", new Date()) - .eq("id", tid); - trainingEntityService.update(trainingUpdateWrapper); - adminTrainingRecordManager.syncAlreadyRegisterUserRecord(tid, problem.getId(), newTProblem.getId()); - } else { - throw new StatusFailException("添加失败!"); - } - } -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/msg/AdminNoticeManager.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/msg/AdminNoticeManager.java deleted file mode 100644 index 774613c..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/msg/AdminNoticeManager.java +++ /dev/null @@ -1,142 +0,0 @@ -package top.hcode.hoj.manager.msg; - -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.springframework.scheduling.annotation.Async; -import org.springframework.stereotype.Component; -import org.springframework.transaction.annotation.Transactional; -import org.springframework.util.CollectionUtils; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.pojo.entity.msg.AdminSysNotice; -import top.hcode.hoj.pojo.entity.msg.UserSysNotice; -import top.hcode.hoj.pojo.vo.AdminSysNoticeVo; -import top.hcode.hoj.dao.msg.AdminSysNoticeEntityService; -import top.hcode.hoj.dao.msg.UserSysNoticeEntityService; - -import javax.annotation.Resource; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/9 21:19 - * @Description: - */ - -@Component -public class AdminNoticeManager { - - @Resource - private AdminSysNoticeEntityService adminSysNoticeEntityService; - - @Resource - private UserSysNoticeEntityService userSysNoticeEntityService; - - - public IPage getSysNotice(Integer limit, Integer currentPage, String type) { - - // 页数,每页题数若为空,设置默认值 - if (currentPage == null || currentPage < 1) currentPage = 1; - if (limit == null || limit < 1) limit = 5; - - return adminSysNoticeEntityService.getSysNotice(limit, currentPage, type); - } - - public void addSysNotice(AdminSysNotice adminSysNotice) throws StatusFailException { - - boolean isOk = adminSysNoticeEntityService.saveOrUpdate(adminSysNotice); - if (!isOk) { - throw new StatusFailException("发布失败"); - } - } - - public void deleteSysNotice(Long id) throws StatusFailException { - - boolean isOk = adminSysNoticeEntityService.removeById(id); - if (!isOk) { - throw new StatusFailException("删除失败"); - } - } - - public void updateSysNotice(AdminSysNotice adminSysNotice) throws StatusFailException { - boolean isOk = adminSysNoticeEntityService.saveOrUpdate(adminSysNotice); - if (!isOk) { - throw new StatusFailException("更新失败"); - } - } - - @Async - public void syncNoticeToNewRegisterBatchUser(List uidList) { - QueryWrapper adminSysNoticeQueryWrapper = new QueryWrapper<>(); - adminSysNoticeQueryWrapper - .eq("type", "All") - .le("gmt_create", new Date()) - .eq("state", true); - List adminSysNotices = adminSysNoticeEntityService.list(adminSysNoticeQueryWrapper); - if (adminSysNotices.size() == 0) { - return; - } - List userSysNoticeList = new ArrayList<>(); - for (String uid : uidList) { - for (AdminSysNotice adminSysNotice : adminSysNotices) { - UserSysNotice userSysNotice = new UserSysNotice(); - userSysNotice.setType("Sys") - .setSysNoticeId(adminSysNotice.getId()) - .setRecipientId(uid); - userSysNoticeList.add(userSysNotice); - } - } - userSysNoticeEntityService.saveOrUpdateBatch(userSysNoticeList); - } - - @Transactional(rollbackFor = Exception.class) - @Async - public void addSingleNoticeToUser(String adminId, String recipientId, String title, String content, String type) { - AdminSysNotice adminSysNotice = new AdminSysNotice(); - adminSysNotice.setAdminId(adminId) - .setType("Single") - .setTitle(title) - .setContent(content) - .setState(true) - .setRecipientId(recipientId); - boolean isOk = adminSysNoticeEntityService.save(adminSysNotice); - if (isOk) { - UserSysNotice userSysNotice = new UserSysNotice(); - userSysNotice.setRecipientId(recipientId) - .setSysNoticeId(adminSysNotice.getId()) - .setType(type); - userSysNoticeEntityService.save(userSysNotice); - } - } - - @Transactional(rollbackFor = Exception.class) - @Async - public void addSingleNoticeToBatchUser(String adminId, - List recipientIdList, - String title, - String content, - String type) { - if (CollectionUtils.isEmpty(recipientIdList)) { - return; - } - AdminSysNotice adminSysNotice = new AdminSysNotice(); - adminSysNotice.setAdminId(adminId) - .setType("Single") - .setTitle(title) - .setContent(content) - .setState(true); - boolean isOk = adminSysNoticeEntityService.save(adminSysNotice); - if (isOk) { - List userSysNoticeList = new ArrayList<>(); - for (String recipientId : recipientIdList) { - UserSysNotice userSysNotice = new UserSysNotice(); - userSysNotice.setRecipientId(recipientId) - .setSysNoticeId(adminSysNotice.getId()) - .setType(type); - userSysNoticeList.add(userSysNotice); - } - userSysNoticeEntityService.saveBatch(userSysNoticeList); - } - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/msg/NoticeManager.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/msg/NoticeManager.java deleted file mode 100644 index 9e98bd5..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/msg/NoticeManager.java +++ /dev/null @@ -1,108 +0,0 @@ -package top.hcode.hoj.manager.msg; - -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.apache.shiro.SecurityUtils; -import org.apache.shiro.session.Session; -import org.springframework.context.ApplicationContext; -import org.springframework.scheduling.annotation.Async; -import org.springframework.stereotype.Component; -import top.hcode.hoj.pojo.entity.msg.AdminSysNotice; -import top.hcode.hoj.pojo.entity.msg.UserSysNotice; -import top.hcode.hoj.pojo.vo.SysMsgVo; -import top.hcode.hoj.pojo.vo.UserRolesVo; -import top.hcode.hoj.dao.msg.AdminSysNoticeEntityService; -import top.hcode.hoj.dao.msg.UserSysNoticeEntityService; - -import javax.annotation.Resource; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; -import java.util.stream.Collectors; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/10 11:37 - * @Description: - */ -@Component -public class NoticeManager { - - @Resource - private UserSysNoticeEntityService userSysNoticeEntityService; - - @Resource - private AdminSysNoticeEntityService adminSysNoticeEntityService; - - @Resource - private ApplicationContext applicationContext; - - public IPage getSysNotice(Integer limit,Integer currentPage) { - - // 页数,每页题数若为空,设置默认值 - if (currentPage == null || currentPage < 1) currentPage = 1; - if (limit == null || limit < 1) limit = 5; - // 获取当前登录的用户 - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - IPage sysNotice = userSysNoticeEntityService.getSysNotice(limit, currentPage, userRolesVo.getUid()); - applicationContext.getBean(NoticeManager.class).updateSysOrMineMsgRead(sysNotice); - return sysNotice; - } - - - - public IPage getMineNotice(Integer limit, Integer currentPage) { - - // 页数,每页题数若为空,设置默认值 - if (currentPage == null || currentPage < 1) currentPage = 1; - if (limit == null || limit < 1) limit = 5; - // 获取当前登录的用户 - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - IPage mineNotice = userSysNoticeEntityService.getMineNotice(limit, currentPage, userRolesVo.getUid()); - applicationContext.getBean(NoticeManager.class).updateSysOrMineMsgRead(mineNotice); - return mineNotice; - } - - - @Async - public void updateSysOrMineMsgRead(IPage userMsgList) { - List idList = userMsgList.getRecords().stream() - .filter(userMsgVo -> !userMsgVo.getState()) - .map(SysMsgVo::getId) - .collect(Collectors.toList()); - if (idList.size() == 0) { - return; - } - UpdateWrapper updateWrapper = new UpdateWrapper<>(); - updateWrapper.in("id", idList) - .set("state", true); - userSysNoticeEntityService.update(null, updateWrapper); - } - - @Async - public void syncNoticeToNewRegisterUser(String uid) { - QueryWrapper adminSysNoticeQueryWrapper = new QueryWrapper<>(); - adminSysNoticeQueryWrapper - .eq("type", "All") - .le("gmt_create", new Date()) - .eq("state", true); - List adminSysNotices = adminSysNoticeEntityService.list(adminSysNoticeQueryWrapper); - if (adminSysNotices.size() == 0) { - return; - } - List userSysNoticeList = new ArrayList<>(); - for (AdminSysNotice adminSysNotice : adminSysNotices) { - UserSysNotice userSysNotice = new UserSysNotice(); - userSysNotice.setType("Sys") - .setSysNoticeId(adminSysNotice.getId()) - .setRecipientId(uid); - userSysNoticeList.add(userSysNotice); - } - userSysNoticeEntityService.saveOrUpdateBatch(userSysNoticeList); - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/msg/UserMessageManager.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/msg/UserMessageManager.java deleted file mode 100644 index 66cee93..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/msg/UserMessageManager.java +++ /dev/null @@ -1,288 +0,0 @@ -package top.hcode.hoj.manager.msg; - -import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import org.apache.shiro.SecurityUtils; -import org.apache.shiro.session.Session; -import org.springframework.context.ApplicationContext; -import org.springframework.scheduling.annotation.Async; -import org.springframework.stereotype.Component; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.pojo.entity.contest.Contest; -import top.hcode.hoj.pojo.entity.discussion.Comment; -import top.hcode.hoj.pojo.entity.discussion.Discussion; -import top.hcode.hoj.pojo.entity.discussion.Reply; -import top.hcode.hoj.pojo.entity.msg.MsgRemind; -import top.hcode.hoj.pojo.entity.msg.UserSysNotice; -import top.hcode.hoj.pojo.vo.UserMsgVo; -import top.hcode.hoj.pojo.vo.UserRolesVo; -import top.hcode.hoj.pojo.vo.UserUnreadMsgCountVo; -import top.hcode.hoj.dao.contest.ContestEntityService; -import top.hcode.hoj.dao.discussion.CommentEntityService; -import top.hcode.hoj.dao.discussion.DiscussionEntityService; -import top.hcode.hoj.dao.discussion.ReplyEntityService; -import top.hcode.hoj.dao.msg.MsgRemindEntityService; -import top.hcode.hoj.dao.msg.UserSysNoticeEntityService; - -import javax.annotation.Resource; -import java.util.Collection; -import java.util.List; -import java.util.Objects; -import java.util.stream.Collectors; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/10 10:36 - * @Description: - */ -@Component -public class UserMessageManager { - - @Resource - private MsgRemindEntityService msgRemindEntityService; - - @Resource - private ContestEntityService contestEntityService; - - @Resource - private ApplicationContext applicationContext; - - @Resource - private DiscussionEntityService discussionEntityService; - - @Resource - private CommentEntityService commentEntityService; - - @Resource - private ReplyEntityService replyEntityService; - - @Resource - private UserSysNoticeEntityService userSysNoticeEntityService; - - public UserUnreadMsgCountVo getUnreadMsgCount() { - // 获取当前登录的用户 - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - UserUnreadMsgCountVo userUnreadMsgCount = msgRemindEntityService.getUserUnreadMsgCount(userRolesVo.getUid()); - if (userUnreadMsgCount == null) { - userUnreadMsgCount = new UserUnreadMsgCountVo(0, 0, 0, 0, 0); - } - return userUnreadMsgCount; - } - - - public void cleanMsg( String type, Long id) throws StatusFailException { - - // 获取当前登录的用户 - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - boolean isOk = cleanMsgByType(type, id, userRolesVo.getUid()); - if (!isOk) { - throw new StatusFailException("清空失败"); - } - } - - - public IPage getCommentMsg(Integer limit, Integer currentPage) { - - // 页数,每页题数若为空,设置默认值 - if (currentPage == null || currentPage < 1) currentPage = 1; - if (limit == null || limit < 1) limit = 5; - // 获取当前登录的用户 - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - return getUserMsgList(userRolesVo.getUid(), "Discuss", limit, currentPage); - } - - - public IPage getReplyMsg(Integer limit, Integer currentPage) { - - // 页数,每页题数若为空,设置默认值 - if (currentPage == null || currentPage < 1) currentPage = 1; - if (limit == null || limit < 1) limit = 5; - - // 获取当前登录的用户 - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - return getUserMsgList(userRolesVo.getUid(), "Reply", limit, currentPage); - } - - - public IPage getLikeMsg(Integer limit, Integer currentPage) { - - // 页数,每页题数若为空,设置默认值 - if (currentPage == null || currentPage < 1) currentPage = 1; - if (limit == null || limit < 1) limit = 5; - - // 获取当前登录的用户 - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - return getUserMsgList(userRolesVo.getUid(), "Like", limit, currentPage); - } - - - private boolean cleanMsgByType(String type, Long id, String uid) { - - switch (type) { - case "Like": - case "Discuss": - case "Reply": - UpdateWrapper updateWrapper1 = new UpdateWrapper<>(); - updateWrapper1 - .eq(id != null, "id", id) - .eq("recipient_id", uid); - return msgRemindEntityService.remove(updateWrapper1); - case "Sys": - case "Mine": - UpdateWrapper updateWrapper2 = new UpdateWrapper<>(); - updateWrapper2 - .eq(id != null, "id", id) - .eq("recipient_id", uid); - return userSysNoticeEntityService.remove(updateWrapper2); - } - return false; - } - - - private IPage getUserMsgList(String uid, String action, int limit, int currentPage) { - Page page = new Page<>(currentPage, limit); - IPage userMsgList = msgRemindEntityService.getUserMsg(page, uid, action); - if (userMsgList.getTotal() > 0) { - switch (action) { - case "Discuss": // 评论我的 - return getUserDiscussMsgList(userMsgList); - case "Reply": // 回复我的 - return getUserReplyMsgList(userMsgList); - case "Like": - return getUserLikeMsgList(userMsgList); - default: - throw new RuntimeException("invalid action:" + action); - } - } else { - return userMsgList; - } - } - - - private IPage getUserDiscussMsgList(IPage userMsgList) { - - List discussionIds = userMsgList.getRecords() - .stream() - .map(UserMsgVo::getSourceId) - .collect(Collectors.toList()); - Collection discussions = discussionEntityService.listByIds(discussionIds); - for (Discussion discussion : discussions) { - for (UserMsgVo userMsgVo : userMsgList.getRecords()) { - if (Objects.equals(discussion.getId(), userMsgVo.getSourceId())) { - userMsgVo.setSourceTitle(discussion.getTitle()); - break; - } - } - } - applicationContext.getBean(UserMessageManager.class).updateUserMsgRead(userMsgList); - return userMsgList; - } - - private IPage getUserReplyMsgList(IPage userMsgList) { - - for (UserMsgVo userMsgVo : userMsgList.getRecords()) { - if ("Discussion".equals(userMsgVo.getSourceType())) { - Discussion discussion = discussionEntityService.getById(userMsgVo.getSourceId()); - if (discussion != null) { - userMsgVo.setSourceTitle(discussion.getTitle()); - } else { - userMsgVo.setSourceTitle("原讨论帖已被删除!【The original discussion post has been deleted!】"); - } - } else if ("Contest".equals(userMsgVo.getSourceType())) { - Contest contest = contestEntityService.getById(userMsgVo.getSourceId()); - if (contest != null) { - userMsgVo.setSourceTitle(contest.getTitle()); - } else { - userMsgVo.setSourceTitle("原比赛已被删除!【The original contest has been deleted!】"); - } - } - - if ("Comment".equals(userMsgVo.getQuoteType())) { - Comment comment = commentEntityService.getById(userMsgVo.getQuoteId()); - if (comment != null) { - String content; - if (comment.getContent().length() < 100) { - content = comment.getFromName() + " : " - + comment.getContent(); - - } else { - content = comment.getFromName() + " : " - + comment.getContent().substring(0, 100) + "..."; - } - userMsgVo.setQuoteContent(content); - } else { - userMsgVo.setQuoteContent("您的原评论信息已被删除!【Your original comments have been deleted!】"); - } - - } else if ("Reply".equals(userMsgVo.getQuoteType())) { - Reply reply = replyEntityService.getById(userMsgVo.getQuoteId()); - if (reply != null) { - String content; - if (reply.getContent().length() < 100) { - content = reply.getFromName() + " : @" + reply.getToName() + ":" - + reply.getContent(); - - } else { - content = reply.getFromName() + " : @" + reply.getToName() + ":" - + reply.getContent().substring(0, 100) + "..."; - } - userMsgVo.setQuoteContent(content); - } else { - userMsgVo.setQuoteContent("您的原回复信息已被删除!【Your original reply has been deleted!】"); - } - } - - } - - applicationContext.getBean(UserMessageManager.class).updateUserMsgRead(userMsgList); - return userMsgList; - } - - private IPage getUserLikeMsgList(IPage userMsgList) { - for (UserMsgVo userMsgVo : userMsgList.getRecords()) { - if ("Discussion".equals(userMsgVo.getSourceType())) { - Discussion discussion = discussionEntityService.getById(userMsgVo.getSourceId()); - if (discussion != null) { - userMsgVo.setSourceTitle(discussion.getTitle()); - } else { - userMsgVo.setSourceTitle("原讨论帖已被删除!【The original discussion post has been deleted!】"); - } - } else if ("Contest".equals(userMsgVo.getSourceType())) { - Contest contest = contestEntityService.getById(userMsgVo.getSourceId()); - if (contest != null) { - userMsgVo.setSourceTitle(contest.getTitle()); - } else { - userMsgVo.setSourceTitle("原比赛已被删除!【The original contest has been deleted!】"); - } - } - } - applicationContext.getBean(UserMessageManager.class).updateUserMsgRead(userMsgList); - return userMsgList; - } - - - @Async - public void updateUserMsgRead(IPage userMsgList) { - List idList = userMsgList.getRecords().stream() - .filter(userMsgVo -> !userMsgVo.getState()) - .map(UserMsgVo::getId) - .collect(Collectors.toList()); - if (idList.size() == 0) { - return; - } - UpdateWrapper updateWrapper = new UpdateWrapper<>(); - updateWrapper.in("id", idList) - .set("state", true); - msgRemindEntityService.update(null, updateWrapper); - } - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/AccountManager.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/AccountManager.java deleted file mode 100644 index fb71aa7..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/AccountManager.java +++ /dev/null @@ -1,415 +0,0 @@ -package top.hcode.hoj.manager.oj; - -import cn.hutool.core.bean.BeanUtil; -import cn.hutool.core.date.DateUtil; -import cn.hutool.core.lang.Validator; -import cn.hutool.crypto.SecureUtil; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; -import org.apache.shiro.SecurityUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; -import org.springframework.util.CollectionUtils; -import org.springframework.util.StringUtils; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.exception.StatusSystemErrorException; -import top.hcode.hoj.pojo.dto.ChangeEmailDto; -import top.hcode.hoj.pojo.dto.ChangePasswordDto; -import top.hcode.hoj.pojo.dto.CheckUsernameOrEmailDto; -import top.hcode.hoj.pojo.entity.judge.Judge; -import top.hcode.hoj.pojo.entity.problem.Problem; -import top.hcode.hoj.pojo.entity.user.*; -import top.hcode.hoj.pojo.vo.*; -import top.hcode.hoj.dao.problem.ProblemEntityService; -import top.hcode.hoj.dao.user.*; -import top.hcode.hoj.utils.Constants; -import top.hcode.hoj.utils.RedisUtils; - -import java.text.SimpleDateFormat; -import java.util.*; -import java.util.stream.Collectors; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/10 16:53 - * @Description: - */ -@Component -public class AccountManager { - - @Autowired - private RedisUtils redisUtils; - - @Autowired - private UserInfoEntityService userInfoEntityService; - - @Autowired - private UserRoleEntityService userRoleEntityService; - - @Autowired - private UserRecordEntityService userRecordEntityService; - - @Autowired - private UserAcproblemEntityService userAcproblemEntityService; - - @Autowired - private ProblemEntityService problemEntityService; - - @Autowired - private SessionEntityService sessionEntityService; - - - /** - * @MethodName checkUsernameOrEmail - * @Params * @param null - * @Description 检验用户名和邮箱是否存在 - * @Return - * @Since 2020/11/5 - */ - public CheckUsernameOrEmailVo checkUsernameOrEmail(CheckUsernameOrEmailDto checkUsernameOrEmailDto) { - - String email = checkUsernameOrEmailDto.getEmail(); - - String username = checkUsernameOrEmailDto.getUsername(); - - boolean rightEmail = false; - - boolean rightUsername = false; - - if (!StringUtils.isEmpty(email)) { - email = email.trim(); - boolean isEmail = Validator.isEmail(email); - if (!isEmail) { - rightEmail = false; - } else { - QueryWrapper wrapper = new QueryWrapper().eq("email", email); - UserInfo user = userInfoEntityService.getOne(wrapper, false); - if (user != null) { - rightEmail = true; - } else { - rightEmail = false; - } - } - } - - if (!StringUtils.isEmpty(username)) { - username = username.trim(); - QueryWrapper wrapper = new QueryWrapper().eq("username", username); - UserInfo user = userInfoEntityService.getOne(wrapper, false); - if (user != null) { - rightUsername = true; - } else { - rightUsername = false; - } - } - - CheckUsernameOrEmailVo checkUsernameOrEmailVo = new CheckUsernameOrEmailVo(); - checkUsernameOrEmailVo.setEmail(rightEmail); - checkUsernameOrEmailVo.setUsername(rightUsername); - return checkUsernameOrEmailVo; - } - - /** - * @param uid - * @MethodName getUserHomeInfo - * @Description 前端userHome用户个人主页的数据请求,主要是返回解决题目数,AC的题目列表,提交总数,AC总数,Rating分, - * @Since 2021/01/07 - */ - public UserHomeVo getUserHomeInfo(String uid, String username) throws StatusFailException { - - org.apache.shiro.session.Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - // 如果没有uid和username,默认查询当前登录用户的 - if (StringUtils.isEmpty(uid) && StringUtils.isEmpty(username)) { - if (userRolesVo != null) { - uid = userRolesVo.getUid(); - } else { - throw new StatusFailException("请求参数错误:uid和username不能都为空!"); - } - } - - UserHomeVo userHomeInfo = userRecordEntityService.getUserHomeInfo(uid, username); - if (userHomeInfo == null) { - throw new StatusFailException("用户不存在"); - } - QueryWrapper queryWrapper = new QueryWrapper<>(); - queryWrapper.eq("uid", userHomeInfo.getUid()) - .select("distinct pid", "submit_id") - .orderByAsc("submit_id"); - List pidList = new LinkedList<>(); - List acProblemList = userAcproblemEntityService.list(queryWrapper); - acProblemList.forEach(acProblem -> { - pidList.add(acProblem.getPid()); - }); - - List disPlayIdList = new LinkedList<>(); - - if (pidList.size() > 0) { - QueryWrapper problemQueryWrapper = new QueryWrapper<>(); - problemQueryWrapper.in("id", pidList); - List problems = problemEntityService.list(problemQueryWrapper); - problems.forEach(problem -> { - disPlayIdList.add(problem.getProblemId()); - }); - } - - userHomeInfo.setSolvedList(disPlayIdList); - QueryWrapper sessionQueryWrapper = new QueryWrapper<>(); - sessionQueryWrapper.eq("uid", userHomeInfo.getUid()) - .orderByDesc("gmt_create") - .last("limit 1"); - - Session recentSession = sessionEntityService.getOne(sessionQueryWrapper, false); - if (recentSession != null) { - userHomeInfo.setRecentLoginTime(recentSession.getGmtCreate()); - } - return userHomeInfo; - } - - /** - * @param uid - * @param username - * @return - * @Description 获取用户最近一年的提交热力图数据 - */ - public UserCalendarHeatmapVo getUserCalendarHeatmap(String uid, String username) throws StatusFailException { - org.apache.shiro.session.Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - if (StringUtils.isEmpty(uid) && StringUtils.isEmpty(username)) { - if (userRolesVo != null) { - uid = userRolesVo.getUid(); - } else { - throw new StatusFailException("请求参数错误:uid和username不能都为空!"); - } - } - UserCalendarHeatmapVo userCalendarHeatmapVo = new UserCalendarHeatmapVo(); - userCalendarHeatmapVo.setEndDate(DateUtil.format(new Date(), "yyyy-MM-dd")); - List lastYearUserJudgeList = userRecordEntityService.getLastYearUserJudgeList(uid, username); - if (CollectionUtils.isEmpty(lastYearUserJudgeList)) { - userCalendarHeatmapVo.setDataList(new ArrayList<>()); - return userCalendarHeatmapVo; - } - HashMap tmpRecordMap = new HashMap<>(); - for (Judge judge : lastYearUserJudgeList) { - Date submitTime = judge.getSubmitTime(); - String dateStr = DateUtil.format(submitTime, "yyyy-MM-dd"); - tmpRecordMap.merge(dateStr, 1, Integer::sum); - } - List> dataList = new ArrayList<>(); - for (Map.Entry record : tmpRecordMap.entrySet()) { - HashMap tmp = new HashMap<>(2); - tmp.put("date", record.getKey()); - tmp.put("count", record.getValue()); - dataList.add(tmp); - } - userCalendarHeatmapVo.setDataList(dataList); - return userCalendarHeatmapVo; - } - - - /** - * @MethodName changePassword - * @Description 修改密码的操作,连续半小时内修改密码错误5次,则需要半个小时后才可以再次尝试修改密码 - * @Return - * @Since 2021/1/8 - */ - public ChangeAccountVo changePassword(ChangePasswordDto changePasswordDto) throws StatusSystemErrorException, StatusFailException { - String oldPassword = changePasswordDto.getOldPassword(); - String newPassword = changePasswordDto.getNewPassword(); - - // 数据可用性判断 - if (StringUtils.isEmpty(oldPassword) || StringUtils.isEmpty(newPassword)) { - throw new StatusFailException("错误:原始密码或新密码不能为空!"); - } - if (newPassword.length() < 6 || newPassword.length() > 20) { - throw new StatusFailException("新密码长度应该为6~20位!"); - } - // 获取当前登录的用户 - org.apache.shiro.session.Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - // 如果已经被锁定半小时不能修改 - String lockKey = Constants.Account.CODE_CHANGE_PASSWORD_LOCK + userRolesVo.getUid(); - // 统计失败的key - String countKey = Constants.Account.CODE_CHANGE_PASSWORD_FAIL + userRolesVo.getUid(); - - ChangeAccountVo resp = new ChangeAccountVo(); - if (redisUtils.hasKey(lockKey)) { - long expire = redisUtils.getExpire(lockKey); - Date now = new Date(); - long minute = expire / 60; - long second = expire % 60; - SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); - resp.setCode(403); - Date afterDate = new Date(now.getTime() + expire * 1000); - String msg = "由于您多次修改密码失败,修改密码功能已锁定,请在" + minute + "分" + second + "秒后(" + formatter.format(afterDate) + ")再进行尝试!"; - resp.setMsg(msg); - return resp; - } - // 与当前登录用户的密码进行比较判断 - if (userRolesVo.getPassword().equals(SecureUtil.md5(oldPassword))) { // 如果相同,则进行修改密码操作 - UpdateWrapper updateWrapper = new UpdateWrapper<>(); - updateWrapper.set("password", SecureUtil.md5(newPassword))// 数据库用户密码全部用md5加密 - .eq("uuid", userRolesVo.getUid()); - boolean isOk = userInfoEntityService.update(updateWrapper); - if (isOk) { - resp.setCode(200); - resp.setMsg("修改密码成功!您将于5秒钟后退出进行重新登录操作!"); - // 清空记录 - redisUtils.del(countKey); - // 更新session - userRolesVo.setPassword(SecureUtil.md5(newPassword)); - session.setAttribute("userInfo", userRolesVo); - return resp; - } else { - throw new StatusSystemErrorException("系统错误:修改密码失败!"); - } - } else { // 如果不同,则进行记录,当失败次数达到5次,半个小时后才可重试 - Integer count = (Integer) redisUtils.get(countKey); - if (count == null) { - redisUtils.set(countKey, 1, 60 * 30); // 三十分钟不尝试,该限制会自动清空消失 - count = 0; - } else if (count < 5) { - redisUtils.incr(countKey, 1); - } - count++; - if (count == 5) { - redisUtils.del(countKey); // 清空统计 - redisUtils.set(lockKey, "lock", 60 * 30); // 设置锁定更改 - } - resp.setCode(400); - resp.setMsg("原始密码错误!您已累计修改密码失败" + count + "次..."); - return resp; - } - } - - /** - * @MethodName changeEmail - * @Description 修改邮箱的操作,连续半小时内密码错误5次,则需要半个小时后才可以再次尝试修改 - * @Return - * @Since 2021/1/9 - */ - public ChangeAccountVo changeEmail(ChangeEmailDto changeEmailDto) throws StatusSystemErrorException, StatusFailException { - - String password = changeEmailDto.getPassword(); - String newEmail = changeEmailDto.getNewEmail(); - // 数据可用性判断 - if (StringUtils.isEmpty(password) || StringUtils.isEmpty(newEmail)) { - throw new StatusFailException("错误:密码或新邮箱不能为空!"); - } - if (!Validator.isEmail(newEmail)) { - throw new StatusFailException("邮箱格式错误!"); - } - // 获取当前登录的用户 - org.apache.shiro.session.Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - // 如果已经被锁定半小时不能修改 - String lockKey = Constants.Account.CODE_CHANGE_EMAIL_LOCK + userRolesVo.getUid(); - // 统计失败的key - String countKey = Constants.Account.CODE_CHANGE_EMAIL_FAIL + userRolesVo.getUid(); - - ChangeAccountVo resp = new ChangeAccountVo(); - if (redisUtils.hasKey(lockKey)) { - long expire = redisUtils.getExpire(lockKey); - Date now = new Date(); - long minute = expire / 60; - long second = expire % 60; - SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); - resp.setCode(403); - Date afterDate = new Date(now.getTime() + expire * 1000); - String msg = "由于您多次修改邮箱失败,修改邮箱功能已锁定,请在" + minute + "分" + second + "秒后(" + formatter.format(afterDate) + ")再进行尝试!"; - resp.setMsg(msg); - return resp; - } - // 与当前登录用户的密码进行比较判断 - if (userRolesVo.getPassword().equals(SecureUtil.md5(password))) { // 如果相同,则进行修改操作 - UpdateWrapper updateWrapper = new UpdateWrapper<>(); - updateWrapper.set("email", newEmail) - .eq("uuid", userRolesVo.getUid()); - - boolean isOk = userInfoEntityService.update(updateWrapper); - if (isOk) { - - UserInfoVo userInfoVo = new UserInfoVo(); - BeanUtil.copyProperties(userRolesVo, userInfoVo, "roles"); - userInfoVo.setRoleList(userRolesVo.getRoles().stream().map(Role::getRole).collect(Collectors.toList())); - - resp.setCode(200); - resp.setMsg("修改邮箱成功!"); - resp.setUserInfo(userInfoVo); - // 清空记录 - redisUtils.del(countKey); - // 更新session - userRolesVo.setEmail(newEmail); - session.setAttribute("userInfo", userRolesVo); - return resp; - } else { - throw new StatusSystemErrorException("系统错误:修改邮箱失败!"); - } - } else { // 如果不同,则进行记录,当失败次数达到5次,半个小时后才可重试 - Integer count = (Integer) redisUtils.get(countKey); - if (count == null) { - redisUtils.set(countKey, 1, 60 * 30); // 三十分钟不尝试,该限制会自动清空消失 - count = 0; - } else if (count < 5) { - redisUtils.incr(countKey, 1); - } - count++; - if (count == 5) { - redisUtils.del(countKey); // 清空统计 - redisUtils.set(lockKey, "lock", 60 * 30); // 设置锁定更改 - } - - resp.setCode(400); - resp.setMsg("密码错误!您已累计修改邮箱失败" + count + "次..."); - return resp; - } - } - - - public UserInfoVo changeUserInfo(UserInfoVo userInfoVo) throws StatusFailException { - - // 获取当前登录的用户 - org.apache.shiro.session.Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - String realname = userInfoVo.getRealname(); - String nickname = userInfoVo.getNickname(); - if (!StringUtils.isEmpty(realname) && realname.length() > 50) { - throw new StatusFailException("真实姓名的长度不能超过50位"); - } - if (!StringUtils.isEmpty(nickname) && nickname.length() > 20) { - throw new StatusFailException("昵称的长度不能超过20位"); - } - UserInfo userInfo = new UserInfo(); - userInfo.setUuid(userRolesVo.getUid()) - .setCfUsername(userInfoVo.getCfUsername()) - .setRealname(realname) - .setNickname(nickname) - .setSignature(userInfoVo.getSignature()) - .setBlog(userInfoVo.getBlog()) - .setGender(userInfoVo.getGender()) - .setEmail(userRolesVo.getEmail()) - .setGithub(userInfoVo.getGithub()) - .setSchool(userInfoVo.getSchool()) - .setNumber(userInfoVo.getNumber()); - - boolean isOk = userInfoEntityService.updateById(userInfo); - - if (isOk) { - // 更新session - UserRolesVo userRoles = userRoleEntityService.getUserRoles(userRolesVo.getUid(), null); - session.setAttribute("userInfo", userRoles); - - UserInfoVo userInfoRes = new UserInfoVo(); - BeanUtil.copyProperties(userRoles, userInfoRes, "roles"); - userInfoRes.setRoleList(userRoles.getRoles().stream().map(Role::getRole).collect(Collectors.toList())); - - return userInfoRes; - } else { - throw new StatusFailException("更新个人信息失败!"); - } - - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/BeforeDispatchInitManager.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/BeforeDispatchInitManager.java deleted file mode 100644 index 4b461fe..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/BeforeDispatchInitManager.java +++ /dev/null @@ -1,221 +0,0 @@ -package top.hcode.hoj.manager.oj; - -import cn.hutool.core.date.DateUnit; -import cn.hutool.core.date.DateUtil; -import top.hcode.hoj.validator.GroupValidator; -import top.hcode.hoj.validator.TrainingValidator; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import org.apache.shiro.SecurityUtils; -import org.apache.shiro.session.Session; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; -import org.springframework.transaction.annotation.Transactional; -import top.hcode.hoj.common.exception.StatusAccessDeniedException; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.exception.StatusForbiddenException; -import top.hcode.hoj.common.exception.StatusNotFoundException; -import top.hcode.hoj.pojo.entity.contest.Contest; -import top.hcode.hoj.pojo.entity.contest.ContestProblem; -import top.hcode.hoj.pojo.entity.contest.ContestRecord; -import top.hcode.hoj.pojo.entity.judge.Judge; -import top.hcode.hoj.pojo.entity.problem.Problem; -import top.hcode.hoj.pojo.entity.training.Training; -import top.hcode.hoj.pojo.entity.training.TrainingProblem; -import top.hcode.hoj.pojo.entity.training.TrainingRecord; -import top.hcode.hoj.pojo.vo.UserRolesVo; -import top.hcode.hoj.dao.contest.ContestEntityService; -import top.hcode.hoj.dao.contest.ContestProblemEntityService; -import top.hcode.hoj.dao.contest.ContestRecordEntityService; -import top.hcode.hoj.dao.judge.JudgeEntityService; -import top.hcode.hoj.dao.problem.ProblemEntityService; -import top.hcode.hoj.dao.training.TrainingEntityService; -import top.hcode.hoj.dao.training.TrainingProblemEntityService; -import top.hcode.hoj.dao.training.TrainingRecordEntityService; -import top.hcode.hoj.utils.Constants; -import top.hcode.hoj.validator.ContestValidator; - -import javax.annotation.Resource; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/11 14:29 - * @Description: - */ -@Component -public class BeforeDispatchInitManager { - - @Resource - private ContestEntityService contestEntityService; - - @Resource - private ContestRecordEntityService contestRecordEntityService; - - @Resource - private ContestProblemEntityService contestProblemEntityService; - - @Resource - private JudgeEntityService judgeEntityService; - - @Resource - private ProblemEntityService problemEntityService; - - @Resource - private TrainingEntityService trainingEntityService; - - @Resource - private TrainingProblemEntityService trainingProblemEntityService; - - @Resource - private TrainingRecordEntityService trainingRecordEntityService; - - @Resource - private TrainingValidator trainingValidator; - - @Resource - private ContestValidator contestValidator; - - @Autowired - private GroupValidator groupValidator; - - public void initCommonSubmission(String problemId, Judge judge) throws StatusForbiddenException { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - QueryWrapper problemQueryWrapper = new QueryWrapper<>(); - problemQueryWrapper.eq("problem_id", problemId); - Problem problem = problemEntityService.getOne(problemQueryWrapper, false); - - if (problem.getAuth() == 2) { - throw new StatusForbiddenException("错误!当前题目不可提交!"); - } - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - if (problem.getIsGroup()) { - if (!isRoot && !groupValidator.isGroupMember(userRolesVo.getUid(), problem.getGid())) { - throw new StatusForbiddenException("对不起,您并非该题目所属的团队内成员,无权进行提交!"); - } - } - - judge.setCpid(0L) - .setPid(problem.getId()) - .setDisplayPid(problem.getProblemId()); - - // 将新提交数据插入数据库 - judgeEntityService.save(judge); - } - - - @Transactional(rollbackFor = Exception.class) - public void initContestSubmission(Long cid, String displayId, UserRolesVo userRolesVo, Judge judge) throws StatusNotFoundException, StatusForbiddenException { - // 首先判断一下比赛的状态是否是正在进行,结束状态都不能提交,比赛前比赛管理员可以提交 - Contest contest = contestEntityService.getById(cid); - - if (contest == null) { - throw new StatusNotFoundException("对不起,该比赛不存在!"); - } - - if (contest.getStatus().intValue() == Constants.Contest.STATUS_ENDED.getCode()) { - throw new StatusForbiddenException("比赛已结束,不可再提交!"); - } - - // 是否为超级管理员或者该比赛的创建者,则为比赛管理者 - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - if (!isRoot && !contest.getUid().equals(userRolesVo.getUid()) - && !(contest.getIsGroup() && groupValidator.isGroupRoot(userRolesVo.getUid(), contest.getGid()))) { - if (contest.getStatus().intValue() == Constants.Contest.STATUS_SCHEDULED.getCode()) { - throw new StatusForbiddenException("比赛未开始,不可提交!"); - } - // 需要检查是否有权限在当前比赛进行提交 - contestValidator.validateJudgeAuth(contest, userRolesVo.getUid()); - - // 需要校验当前比赛是否为保护或私有比赛,同时是否开启账号规则限制,如果有,需要对当前用户的用户名进行验证 - if (contest.getOpenAccountLimit() - && !contestValidator.validateAccountRule(contest.getAccountLimitRule(), userRolesVo.getUsername())) { - throw new StatusForbiddenException("对不起!本次比赛只允许符合特定账号规则的用户参赛!"); - } - } - - // 查询获取对应的pid和cpid - QueryWrapper contestProblemQueryWrapper = new QueryWrapper<>(); - contestProblemQueryWrapper.eq("cid", cid).eq("display_id", displayId); - ContestProblem contestProblem = contestProblemEntityService.getOne(contestProblemQueryWrapper, false); - judge.setCpid(contestProblem.getId()) - .setPid(contestProblem.getPid()) - .setGid(contest.getGid()); - - Problem problem = problemEntityService.getById(contestProblem.getPid()); - if (problem.getAuth() == 2) { - throw new StatusForbiddenException("错误!当前题目已被隐藏,不可提交!"); - } - - judge.setDisplayPid(problem.getProblemId()); - // 将新提交数据插入数据库 - judgeEntityService.save(judge); - - // 同时初始化写入contest_record表 - ContestRecord contestRecord = new ContestRecord(); - contestRecord.setDisplayId(displayId) - .setCpid(contestProblem.getId()) - .setSubmitId(judge.getSubmitId()) - .setPid(judge.getPid()) - .setUsername(userRolesVo.getUsername()) - .setRealname(userRolesVo.getRealname()) - .setUid(userRolesVo.getUid()) - .setCid(judge.getCid()) - .setSubmitTime(judge.getSubmitTime()); - - if (contest.getStatus().intValue() == Constants.Contest.STATUS_SCHEDULED.getCode()) { - contestRecord.setTime(0L); - } else { - // 设置比赛开始时间到提交时间之间的秒数 - contestRecord.setTime(DateUtil.between(contest.getStartTime(), judge.getSubmitTime(), DateUnit.SECOND)); - } - contestRecordEntityService.save(contestRecord); - } - - - @Transactional(rollbackFor = Exception.class) - public void initTrainingSubmission(Long tid, String displayId, UserRolesVo userRolesVo, Judge judge) throws StatusForbiddenException, StatusFailException, StatusAccessDeniedException { - - Training training = trainingEntityService.getById(tid); - if (training == null || !training.getStatus()) { - throw new StatusFailException("该训练不存在或不允许显示!"); - } - - trainingValidator.validateTrainingAuth(training, userRolesVo); - - // 查询获取对应的pid和cpid - QueryWrapper trainingProblemQueryWrapper = new QueryWrapper<>(); - trainingProblemQueryWrapper.eq("tid", tid) - .eq("display_id", displayId); - TrainingProblem trainingProblem = trainingProblemEntityService.getOne(trainingProblemQueryWrapper); - judge.setPid(trainingProblem.getPid()); - - Problem problem = problemEntityService.getById(trainingProblem.getPid()); - if (problem.getAuth() == 2) { - throw new StatusForbiddenException("错误!当前题目不可提交!"); - } - - judge.setDisplayPid(problem.getProblemId()) - .setGid(training.getGid()); - - // 将新提交数据插入数据库 - judgeEntityService.save(judge); - - // 非私有训练不记录 - if (!training.getAuth().equals(Constants.Training.AUTH_PRIVATE.getValue())) { - return; - } - - TrainingRecord trainingRecord = new TrainingRecord(); - trainingRecord.setPid(problem.getId()) - .setTid(tid) - .setTpid(trainingProblem.getId()) - .setSubmitId(judge.getSubmitId()) - .setUid(userRolesVo.getUid()); - trainingRecordEntityService.save(trainingRecord); - } - - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/CommentManager.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/CommentManager.java deleted file mode 100644 index 1f7ebac..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/CommentManager.java +++ /dev/null @@ -1,552 +0,0 @@ -package top.hcode.hoj.manager.oj; - -import cn.hutool.core.bean.BeanUtil; -import cn.hutool.extra.emoji.EmojiUtil; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.apache.shiro.SecurityUtils; -import org.apache.shiro.session.Session; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; -import org.springframework.transaction.annotation.Transactional; -import org.springframework.util.StringUtils; -import top.hcode.hoj.annotation.HOJAccessEnum; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.exception.StatusForbiddenException; -import top.hcode.hoj.dao.contest.ContestEntityService; -import top.hcode.hoj.dao.discussion.CommentEntityService; -import top.hcode.hoj.dao.discussion.CommentLikeEntityService; -import top.hcode.hoj.dao.discussion.DiscussionEntityService; -import top.hcode.hoj.dao.discussion.ReplyEntityService; -import top.hcode.hoj.dao.user.UserAcproblemEntityService; -import top.hcode.hoj.exception.AccessException; -import top.hcode.hoj.pojo.dto.ReplyDto; -import top.hcode.hoj.pojo.entity.contest.Contest; -import top.hcode.hoj.pojo.entity.discussion.Comment; -import top.hcode.hoj.pojo.entity.discussion.CommentLike; -import top.hcode.hoj.pojo.entity.discussion.Discussion; -import top.hcode.hoj.pojo.entity.discussion.Reply; -import top.hcode.hoj.pojo.entity.user.UserAcproblem; -import top.hcode.hoj.pojo.vo.*; -import top.hcode.hoj.validator.AccessValidator; -import top.hcode.hoj.validator.ContestValidator; -import top.hcode.hoj.validator.GroupValidator; - -import java.util.HashMap; -import java.util.LinkedList; -import java.util.List; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/11 15:59 - * @Description: - */ -@Component -public class CommentManager { - - @Autowired - private CommentEntityService commentEntityService; - - @Autowired - private CommentLikeEntityService commentLikeEntityService; - - @Autowired - private ReplyEntityService replyEntityService; - - @Autowired - private DiscussionEntityService discussionEntityService; - - @Autowired - private UserAcproblemEntityService userAcproblemEntityService; - - @Autowired - private ContestEntityService contestEntityService; - - @Autowired - private GroupValidator groupValidator; - - @Autowired - private ContestValidator contestValidator; - - @Autowired - private AccessValidator accessValidator; - - @Autowired - private ConfigVo configVo; - - private final static Pattern pattern = Pattern.compile("<.*?([a,A][u,U][t,T][o,O][p,P][l,L][a,A][y,Y]).*?>"); - - public CommentListVo getComments(Long cid, Integer did, Integer limit, Integer currentPage) throws StatusForbiddenException, AccessException { - - // 如果有登录,则获取当前登录的用户 - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - if (cid == null && did != null) { - QueryWrapper discussionQueryWrapper = new QueryWrapper<>(); - discussionQueryWrapper.select("id", "gid").eq("id", did); - Discussion discussion = discussionEntityService.getOne(discussionQueryWrapper); - if (discussion != null && discussion.getGid() != null) { - accessValidator.validateAccess(HOJAccessEnum.GROUP_DISCUSSION); - if (!isRoot && !groupValidator.isGroupMember(userRolesVo.getUid(), discussion.getGid())) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - } else { - accessValidator.validateAccess(HOJAccessEnum.PUBLIC_DISCUSSION); - } - } else { - accessValidator.validateAccess(HOJAccessEnum.CONTEST_COMMENT); - } - - IPage commentList = commentEntityService.getCommentList(limit, currentPage, cid, did, isRoot, - userRolesVo != null ? userRolesVo.getUid() : null); - - HashMap commentLikeMap = new HashMap<>(); - - if (userRolesVo != null) { - // 如果是有登录 需要检查是否对评论有点赞 - List commentIdList = new LinkedList<>(); - - for (CommentVo commentVo : commentList.getRecords()) { - commentIdList.add(commentVo.getId()); - } - - if (commentIdList.size() > 0) { - - QueryWrapper commentLikeQueryWrapper = new QueryWrapper<>(); - commentLikeQueryWrapper.in("cid", commentIdList); - - List commentLikeList = commentLikeEntityService.list(commentLikeQueryWrapper); - - // 如果存在记录需要修正Map为true - for (CommentLike tmp : commentLikeList) { - commentLikeMap.put(tmp.getCid(), true); - } - } - } - - CommentListVo commentListVo = new CommentListVo(); - commentListVo.setCommentList(commentList); - commentListVo.setCommentLikeMap(commentLikeMap); - return commentListVo; - } - - - @Transactional - public CommentVo addComment(Comment comment) throws StatusFailException, StatusForbiddenException, AccessException { - - if (StringUtils.isEmpty(comment.getContent().trim())) { - throw new StatusFailException("评论内容不能为空!"); - } - - // 获取当前登录的用户 - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - boolean isProblemAdmin = SecurityUtils.getSubject().hasRole("problem_admin"); - boolean isAdmin = SecurityUtils.getSubject().hasRole("admin"); - - Long cid = comment.getCid(); - - // 比赛外的评论 除管理员外 只有AC 10道以上才可评论 - if (cid == null) { - - QueryWrapper discussionQueryWrapper = new QueryWrapper<>(); - discussionQueryWrapper.select("id", "gid").eq("id", comment.getDid()); - Discussion discussion = discussionEntityService.getOne(discussionQueryWrapper); - - Long gid = discussion.getGid(); - if (gid != null) { - accessValidator.validateAccess(HOJAccessEnum.GROUP_DISCUSSION); - if (!isRoot && !groupValidator.isGroupMember(userRolesVo.getUid(), gid)) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - } else { - accessValidator.validateAccess(HOJAccessEnum.PUBLIC_DISCUSSION); - } - - if (!isRoot && !isProblemAdmin && !isAdmin) { - QueryWrapper queryWrapper = new QueryWrapper<>(); - queryWrapper.eq("uid", userRolesVo.getUid()).select("distinct pid"); - int userAcProblemCount = userAcproblemEntityService.count(queryWrapper); - - if (userAcProblemCount < configVo.getDefaultCreateCommentACInitValue()) { - throw new StatusForbiddenException("对不起,您暂时不能评论!请先去提交题目通过" - + configVo.getDefaultCreateCommentACInitValue() + "道以上!"); - } - } - - } else { - accessValidator.validateAccess(HOJAccessEnum.CONTEST_COMMENT); - Contest contest = contestEntityService.getById(cid); - contestValidator.validateContestAuth(contest, userRolesVo, isRoot); - } - - comment.setFromAvatar(userRolesVo.getAvatar()) - .setFromName(userRolesVo.getUsername()) - .setFromUid(userRolesVo.getUid()); - - if (SecurityUtils.getSubject().hasRole("root")) { - comment.setFromRole("root"); - } else if (SecurityUtils.getSubject().hasRole("admin") - || SecurityUtils.getSubject().hasRole("problem_admin")) { - comment.setFromRole("admin"); - } else { - comment.setFromRole("user"); - } - - // 带有表情的字符串转换为编码 - comment.setContent(EmojiUtil.toHtml(formatContentRemoveAutoPlay(comment.getContent()))); - - boolean isOk = commentEntityService.saveOrUpdate(comment); - - if (isOk) { - CommentVo commentVo = new CommentVo(); - commentVo.setContent(comment.getContent()); - commentVo.setId(comment.getId()); - commentVo.setFromAvatar(comment.getFromAvatar()); - commentVo.setFromName(comment.getFromName()); - commentVo.setFromUid(comment.getFromUid()); - commentVo.setLikeNum(0); - commentVo.setGmtCreate(comment.getGmtCreate()); - commentVo.setReplyList(new LinkedList<>()); - commentVo.setFromTitleName(userRolesVo.getTitleName()); - commentVo.setFromTitleColor(userRolesVo.getTitleColor()); - // 如果是讨论区的回复,发布成功需要添加统计该讨论的回复数 - if (comment.getDid() != null) { - Discussion discussion = discussionEntityService.getById(comment.getDid()); - if (discussion != null) { - discussion.setCommentNum(discussion.getCommentNum() + 1); - discussionEntityService.updateById(discussion); - // 更新消息 - commentEntityService.updateCommentMsg(discussion.getUid(), - userRolesVo.getUid(), - comment.getContent(), - comment.getDid(), - discussion.getGid()); - } - } - return commentVo; - } else { - throw new StatusFailException("评论失败,请重新尝试!"); - } - } - - @Transactional(rollbackFor = Exception.class) - public void deleteComment(Comment comment) throws StatusForbiddenException, StatusFailException, AccessException { - // 获取当前登录的用户 - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - boolean isProblemAdmin = SecurityUtils.getSubject().hasRole("problem_admin"); - boolean isAdmin = SecurityUtils.getSubject().hasRole("admin"); - // 如果不是评论本人 或者不是管理员 无权限删除该评论 - - Long cid = comment.getCid(); - - if (cid == null) { - QueryWrapper discussionQueryWrapper = new QueryWrapper<>(); - discussionQueryWrapper.select("id", "gid").eq("id", comment.getDid()); - Discussion discussion = discussionEntityService.getOne(discussionQueryWrapper); - Long gid = discussion.getGid(); - if (gid == null) { - accessValidator.validateAccess(HOJAccessEnum.PUBLIC_DISCUSSION); - if (!comment.getFromUid().equals(userRolesVo.getUid()) && !isRoot && !isProblemAdmin && !isAdmin) { - throw new StatusForbiddenException("无权删除该评论"); - } - } else { - accessValidator.validateAccess(HOJAccessEnum.GROUP_DISCUSSION); - if (!groupValidator.isGroupAdmin(userRolesVo.getUid(), gid) - && !comment.getFromUid().equals(userRolesVo.getUid()) - && !isRoot) { - throw new StatusForbiddenException("无权删除该评论"); - } - } - } else { - accessValidator.validateAccess(HOJAccessEnum.CONTEST_COMMENT); - Contest contest = contestEntityService.getById(cid); - Long gid = contest.getGid(); - if (!comment.getFromUid().equals(userRolesVo.getUid()) - && !isRoot - && !contest.getUid().equals(userRolesVo.getUid()) - && !(contest.getIsGroup() && groupValidator.isGroupRoot(userRolesVo.getUid(), gid))) { - throw new StatusForbiddenException("无权删除该评论"); - } - } - // 获取需要删除该评论的回复数 - int replyNum = replyEntityService.count(new QueryWrapper().eq("comment_id", comment.getId())); - - // 删除该数据 包括关联外键的reply表数据 - boolean isDeleteComment = commentEntityService.removeById(comment.getId()); - - // 同时需要删除该评论的回复表数据 - replyEntityService.remove(new UpdateWrapper().eq("comment_id", comment.getId())); - - if (isDeleteComment) { - // 如果是讨论区的回复,删除成功需要减少统计该讨论的回复数 - if (comment.getDid() != null) { - UpdateWrapper discussionUpdateWrapper = new UpdateWrapper<>(); - discussionUpdateWrapper.eq("id", comment.getDid()) - .setSql("comment_num=comment_num-" + (replyNum + 1)); - discussionEntityService.update(discussionUpdateWrapper); - } - } else { - throw new StatusFailException("删除失败,请重新尝试"); - } - } - - @Transactional(rollbackFor = Exception.class) - public void addCommentLike(Integer cid, Boolean toLike, Integer sourceId, String sourceType) throws StatusFailException { - - // 获取当前登录的用户 - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - QueryWrapper commentLikeQueryWrapper = new QueryWrapper<>(); - commentLikeQueryWrapper.eq("cid", cid).eq("uid", userRolesVo.getUid()); - - CommentLike commentLike = commentLikeEntityService.getOne(commentLikeQueryWrapper, false); - - if (toLike) { // 添加点赞 - if (commentLike == null) { // 如果不存在就添加 - boolean isSave = commentLikeEntityService.saveOrUpdate(new CommentLike() - .setUid(userRolesVo.getUid()) - .setCid(cid)); - if (!isSave) { - throw new StatusFailException("点赞失败,请重试尝试!"); - } - } - // 点赞+1 - Comment comment = commentEntityService.getById(cid); - if (comment != null) { - comment.setLikeNum(comment.getLikeNum() + 1); - commentEntityService.updateById(comment); - // 当前的评论要不是点赞者的 才发送点赞消息 - if (!userRolesVo.getUsername().equals(comment.getFromName())) { - commentEntityService.updateCommentLikeMsg(comment.getFromUid(), userRolesVo.getUid(), sourceId, sourceType); - } - } - } else { // 取消点赞 - if (commentLike != null) { // 如果存在就删除 - boolean isDelete = commentLikeEntityService.removeById(commentLike.getId()); - if (!isDelete) { - throw new StatusFailException("取消点赞失败,请重试尝试!"); - } - } - // 点赞-1 - UpdateWrapper commentUpdateWrapper = new UpdateWrapper<>(); - commentUpdateWrapper.setSql("like_num=like_num-1").eq("id", cid); - commentEntityService.update(commentUpdateWrapper); - } - - } - - public List getAllReply(Integer commentId, Long cid) throws StatusForbiddenException, StatusFailException, AccessException { - - // 如果有登录,则获取当前登录的用户 - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - if (cid == null) { - Comment comment = commentEntityService.getById(commentId); - QueryWrapper discussionQueryWrapper = new QueryWrapper<>(); - discussionQueryWrapper.select("id", "gid").eq("id", comment.getDid()); - Discussion discussion = discussionEntityService.getOne(discussionQueryWrapper); - Long gid = discussion.getGid(); - if (gid != null) { - accessValidator.validateAccess(HOJAccessEnum.GROUP_DISCUSSION); - if (!isRoot && !groupValidator.isGroupMember(userRolesVo.getUid(), gid)) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - } else { - accessValidator.validateAccess(HOJAccessEnum.PUBLIC_DISCUSSION); - } - } else { - accessValidator.validateAccess(HOJAccessEnum.CONTEST_COMMENT); - Contest contest = contestEntityService.getById(cid); - contestValidator.validateContestAuth(contest, userRolesVo, isRoot); - } - - return replyEntityService.getAllReplyByCommentId(cid, - userRolesVo != null ? userRolesVo.getUid() : null, - isRoot, - commentId); - } - - - public ReplyVo addReply(ReplyDto replyDto) throws StatusFailException, StatusForbiddenException, AccessException { - - if (StringUtils.isEmpty(replyDto.getReply().getContent().trim())) { - throw new StatusFailException("回复内容不能为空!"); - } - - // 获取当前登录的用户 - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - boolean isProblemAdmin = SecurityUtils.getSubject().hasRole("problem_admin"); - boolean isAdmin = SecurityUtils.getSubject().hasRole("admin"); - - Reply reply = replyDto.getReply(); - - Comment comment = commentEntityService.getById(reply.getCommentId()); - Long cid = comment.getCid(); - if (cid == null) { - - QueryWrapper discussionQueryWrapper = new QueryWrapper<>(); - discussionQueryWrapper.select("id", "gid").eq("id", comment.getDid()); - Discussion discussion = discussionEntityService.getOne(discussionQueryWrapper); - - Long gid = discussion.getGid(); - if (gid != null) { - accessValidator.validateAccess(HOJAccessEnum.GROUP_DISCUSSION); - if (!groupValidator.isGroupMember(userRolesVo.getUid(), gid) && !isRoot) { - throw new StatusForbiddenException("对不起,您无权限回复!"); - } - } else { - accessValidator.validateAccess(HOJAccessEnum.PUBLIC_DISCUSSION); - } - - if (!isRoot && !isProblemAdmin && !isAdmin) { - QueryWrapper queryWrapper = new QueryWrapper<>(); - queryWrapper.eq("uid", userRolesVo.getUid()).select("distinct pid"); - int userAcProblemCount = userAcproblemEntityService.count(queryWrapper); - - if (userAcProblemCount < configVo.getDefaultCreateCommentACInitValue()) { - throw new StatusForbiddenException("对不起,您暂时不能回复!请先去提交题目通过" + - configVo.getDefaultCreateCommentACInitValue() + "道以上!"); - } - } - } else { - accessValidator.validateAccess(HOJAccessEnum.CONTEST_COMMENT); - Contest contest = contestEntityService.getById(cid); - Long gid = contest.getGid(); - if (!comment.getFromUid().equals(userRolesVo.getUid()) - && !isRoot - && !contest.getUid().equals(userRolesVo.getUid()) - && !(contest.getIsGroup() && groupValidator.isGroupRoot(userRolesVo.getUid(), gid))) { - throw new StatusForbiddenException("对不起,您无权限回复!"); - } - } - reply.setFromAvatar(userRolesVo.getAvatar()) - .setFromName(userRolesVo.getUsername()) - .setFromUid(userRolesVo.getUid()); - - if (SecurityUtils.getSubject().hasRole("root")) { - reply.setFromRole("root"); - } else if (SecurityUtils.getSubject().hasRole("admin") - || SecurityUtils.getSubject().hasRole("problem_admin")) { - reply.setFromRole("admin"); - } else { - reply.setFromRole("user"); - } - // 带有表情的字符串转换为编码 - reply.setContent(EmojiUtil.toHtml(formatContentRemoveAutoPlay(reply.getContent()))); - - boolean isOk = replyEntityService.saveOrUpdate(reply); - - if (isOk) { - // 如果是讨论区的回复,发布成功需要增加统计该讨论的回复数 - if (replyDto.getDid() != null) { - UpdateWrapper discussionUpdateWrapper = new UpdateWrapper<>(); - discussionUpdateWrapper.eq("id", replyDto.getDid()) - .setSql("comment_num=comment_num+1"); - discussionEntityService.update(discussionUpdateWrapper); - // 更新消息 - replyEntityService.updateReplyMsg(replyDto.getDid(), - "Discussion", - reply.getContent(), - replyDto.getQuoteId(), - replyDto.getQuoteType(), - reply.getToUid(), - reply.getFromUid()); - } - - ReplyVo replyVo = new ReplyVo(); - BeanUtil.copyProperties(reply, replyVo); - replyVo.setFromTitleName(userRolesVo.getTitleName()); - replyVo.setFromTitleColor(userRolesVo.getTitleColor()); - return replyVo; - } else { - throw new StatusFailException("回复失败,请重新尝试!"); - } - } - - public void deleteReply(ReplyDto replyDto) throws StatusForbiddenException, StatusFailException, AccessException { - // 获取当前登录的用户 - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - boolean isProblemAdmin = SecurityUtils.getSubject().hasRole("problem_admin"); - boolean isAdmin = SecurityUtils.getSubject().hasRole("admin"); - - Reply reply = replyDto.getReply(); - - Comment comment = commentEntityService.getById(reply.getCommentId()); - - Long cid = comment.getCid(); - - if (cid == null) { - Discussion discussion = discussionEntityService.getById(comment.getDid()); - Long gid = discussion.getGid(); - if (gid == null) { - accessValidator.validateAccess(HOJAccessEnum.PUBLIC_DISCUSSION); - if (!reply.getFromUid().equals(userRolesVo.getUid()) - && !isRoot - && !isProblemAdmin - && !isAdmin) { - throw new StatusForbiddenException("无权删除该回复"); - } - } else { - accessValidator.validateAccess(HOJAccessEnum.GROUP_DISCUSSION); - if (!reply.getFromUid().equals(userRolesVo.getUid()) - && !isRoot - && !groupValidator.isGroupAdmin(userRolesVo.getUid(), gid)) { - throw new StatusForbiddenException("无权删除该回复"); - } - } - } else { - accessValidator.validateAccess(HOJAccessEnum.CONTEST_COMMENT); - Contest contest = contestEntityService.getById(cid); - if (!reply.getFromUid().equals(userRolesVo.getUid()) - && !isRoot - && !contest.getUid().equals(userRolesVo.getUid()) - && !(contest.getIsGroup() && groupValidator.isGroupRoot(userRolesVo.getUid(), contest.getGid()))) { - throw new StatusForbiddenException("无权删除该回复"); - } - } - - boolean isOk = replyEntityService.removeById(reply.getId()); - if (isOk) { - // 如果是讨论区的回复,删除成功需要减少统计该讨论的回复数 - if (replyDto.getDid() != null) { - UpdateWrapper discussionUpdateWrapper = new UpdateWrapper<>(); - discussionUpdateWrapper.eq("id", replyDto.getDid()) - .setSql("comment_num=comment_num-1"); - discussionEntityService.update(discussionUpdateWrapper); - } - } else { - throw new StatusFailException("删除失败,请重新尝试"); - } - } - - private String formatContentRemoveAutoPlay(String content) { - StringBuilder sb = new StringBuilder(content); - Matcher matcher = pattern.matcher(content); - while (matcher.find()) { - sb.replace(matcher.start(1), matcher.end(1), "controls"); - } - return sb.toString(); - } - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/CommonManager.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/CommonManager.java deleted file mode 100644 index 3f03e71..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/CommonManager.java +++ /dev/null @@ -1,226 +0,0 @@ -package top.hcode.hoj.manager.oj; - -import cn.hutool.core.util.IdUtil; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.wf.captcha.ArithmeticCaptcha; -import com.wf.captcha.base.Captcha; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; -import org.springframework.util.CollectionUtils; -import top.hcode.hoj.dao.problem.*; -import top.hcode.hoj.dao.training.TrainingCategoryEntityService; -import top.hcode.hoj.pojo.entity.problem.*; -import top.hcode.hoj.pojo.entity.training.TrainingCategory; -import top.hcode.hoj.pojo.vo.CaptchaVo; -import top.hcode.hoj.pojo.vo.ProblemTagVo; -import top.hcode.hoj.utils.RedisUtils; - -import java.util.*; -import java.util.stream.Collectors; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/11 16:28 - * @Description: - */ -@Component -public class CommonManager { - - @Autowired - private TagEntityService tagEntityService; - - @Autowired - private TagClassificationEntityService tagClassificationEntityService; - - @Autowired - private ProblemTagEntityService problemTagEntityService; - - @Autowired - private LanguageEntityService languageEntityService; - - @Autowired - private ProblemLanguageEntityService problemLanguageEntityService; - - @Autowired - private RedisUtils redisUtil; - - @Autowired - private ProblemEntityService problemEntityService; - - @Autowired - private CodeTemplateEntityService codeTemplateEntityService; - - @Autowired - private TrainingCategoryEntityService trainingCategoryEntityService; - - public CaptchaVo getCaptcha() { - ArithmeticCaptcha specCaptcha = new ArithmeticCaptcha(90, 30, 4); - specCaptcha.setCharType(Captcha.TYPE_DEFAULT); - // 2位数运算 - specCaptcha.setLen(2); - String verCode = specCaptcha.text().toLowerCase(); - String key = IdUtil.simpleUUID(); - // 存入redis并设置过期时间为30分钟 - redisUtil.set(key, verCode, 1800); - // 将key和base64返回给前端 - CaptchaVo captchaVo = new CaptchaVo(); - captchaVo.setImg(specCaptcha.toBase64()); - captchaVo.setCaptchaKey(key); - return captchaVo; - } - - - public List getTrainingCategory() { - QueryWrapper trainingCategoryQueryWrapper = new QueryWrapper<>(); - trainingCategoryQueryWrapper.isNull("gid"); - return trainingCategoryEntityService.list(trainingCategoryQueryWrapper); - } - - public List getAllProblemTagsList(String oj) { - List tagList; - oj = oj.toUpperCase(); - QueryWrapper tagQueryWrapper = new QueryWrapper<>(); - tagQueryWrapper.isNull("gid"); - if (oj.equals("ALL")) { - tagList = tagEntityService.list(tagQueryWrapper); - } else { - tagQueryWrapper.eq("oj", oj); - tagList = tagEntityService.list(tagQueryWrapper); - } - return tagList; - } - - public List getProblemTagsAndClassification(String oj) { - oj = oj.toUpperCase(); - List problemTagVoList = new ArrayList<>(); - List classificationList = null; - List tagList = null; - if (oj.equals("ALL")) { - classificationList = tagClassificationEntityService.list(); - QueryWrapper tagQueryWrapper = new QueryWrapper<>(); - tagQueryWrapper.isNull("gid"); - tagList = tagEntityService.list(tagQueryWrapper); - } else { - QueryWrapper tagClassificationQueryWrapper = new QueryWrapper<>(); - tagClassificationQueryWrapper.eq("oj", oj) - .orderByAsc("`rank`"); - classificationList = tagClassificationEntityService.list(tagClassificationQueryWrapper); - - QueryWrapper tagQueryWrapper = new QueryWrapper<>(); - tagQueryWrapper.isNull("gid"); - tagQueryWrapper.eq("oj", oj); - tagList = tagEntityService.list(tagQueryWrapper); - } - if (CollectionUtils.isEmpty(classificationList)) { - ProblemTagVo problemTagVo = new ProblemTagVo(); - problemTagVo.setTagList(tagList); - problemTagVoList.add(problemTagVo); - } else { - for (TagClassification classification : classificationList) { - ProblemTagVo problemTagVo = new ProblemTagVo(); - problemTagVo.setClassification(classification); - List tags = new ArrayList<>(); - if (!CollectionUtils.isEmpty(tagList)) { - Iterator it = tagList.iterator(); - while (it.hasNext()) { - Tag tag = it.next(); - if (classification.getId().equals(tag.getTcid())) { - tags.add(tag); - it.remove(); - } - } - } - problemTagVo.setTagList(tags); - problemTagVoList.add(problemTagVo); - } - if (tagList.size() > 0) { - ProblemTagVo problemTagVo = new ProblemTagVo(); - problemTagVo.setTagList(tagList); - problemTagVoList.add(problemTagVo); - } - } - - if (oj.equals("ALL")) { - Collections.sort(problemTagVoList, problemTagVoComparator); - } - return problemTagVoList; - } - - - public Collection getProblemTags(Long pid) { - Map map = new HashMap<>(); - map.put("pid", pid); - List tidList = problemTagEntityService.listByMap(map) - .stream() - .map(ProblemTag::getTid) - .collect(Collectors.toList()); - if (CollectionUtils.isEmpty(tidList)) { - return new ArrayList<>(); - } - return tagEntityService.listByIds(tidList); - } - - - public List getLanguages(Long pid, Boolean all) { - - String oj = "ME"; - if (pid != null) { - Problem problem = problemEntityService.getById(pid); - if (problem.getIsRemote()) { - oj = problem.getProblemId().split("-")[0]; - } - } - - if (oj.equals("GYM")) { // GYM用与CF一样的编程语言列表 - oj = "CF"; - } - - QueryWrapper queryWrapper = new QueryWrapper<>(); - // 获取对应OJ支持的语言列表 - queryWrapper.eq(all != null && !all, "oj", oj); - return languageEntityService.list(queryWrapper); - } - - public Collection getProblemLanguages(Long pid) { - QueryWrapper queryWrapper = new QueryWrapper<>(); - queryWrapper.eq("pid", pid).select("lid"); - List idList = problemLanguageEntityService.list(queryWrapper) - .stream().map(ProblemLanguage::getLid).collect(Collectors.toList()); - return languageEntityService.listByIds(idList); - - } - - public List getProblemCodeTemplate(Long pid) { - QueryWrapper queryWrapper = new QueryWrapper<>(); - queryWrapper.eq("pid", pid); - return codeTemplateEntityService.list(queryWrapper); - } - - private Comparator problemTagVoComparator = (p1, p2) -> { - if (p1 == null) { - return 1; - } - if (p2 == null) { - return 1; - } - if (p1.getClassification() == null) { - return 1; - } - if (p2.getClassification() == null) { - return -1; - } - TagClassification p1Classification = p1.getClassification(); - TagClassification p2Classification = p2.getClassification(); - if (Objects.equals(p1Classification.getOj(), p2Classification.getOj())) { - return p1Classification.getRank().compareTo(p2Classification.getRank()); - } else { - if ("ME".equals(p1Classification.getOj())) { - return -1; - } else if ("ME".equals(p2Classification.getOj())) { - return 1; - } else { - return p1Classification.getOj().compareTo(p2Classification.getOj()); - } - } - }; -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestAdminManager.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestAdminManager.java deleted file mode 100644 index 346cebd..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestAdminManager.java +++ /dev/null @@ -1,156 +0,0 @@ -package top.hcode.hoj.manager.oj; - - -import top.hcode.hoj.validator.GroupValidator; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import org.apache.shiro.SecurityUtils; -import org.apache.shiro.session.Session; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.exception.StatusForbiddenException; -import top.hcode.hoj.pojo.dto.CheckACDto; -import top.hcode.hoj.pojo.entity.contest.Contest; -import top.hcode.hoj.pojo.entity.contest.ContestPrint; -import top.hcode.hoj.pojo.entity.contest.ContestRecord; -import top.hcode.hoj.pojo.vo.UserRolesVo; -import top.hcode.hoj.dao.contest.ContestEntityService; -import top.hcode.hoj.dao.contest.ContestPrintEntityService; -import top.hcode.hoj.dao.contest.ContestRecordEntityService; -import top.hcode.hoj.utils.Constants; - - -/** - * @Author: Himit_ZH - * @Date: 2022/3/11 19:40 - * @Description: - */ -@Component -public class ContestAdminManager { - - @Autowired - private ContestEntityService contestEntityService; - - @Autowired - private ContestRecordEntityService contestRecordEntityService; - - @Autowired - private ContestPrintEntityService contestPrintEntityService; - - @Autowired - private GroupValidator groupValidator; - - public IPage getContestACInfo(Long cid, Integer currentPage, Integer limit) throws StatusForbiddenException { - - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - // 获取本场比赛的状态 - Contest contest = contestEntityService.getById(cid); - - // 超级管理员或者该比赛的创建者,则为比赛管理者 - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - if (!isRoot - && !contest.getUid().equals(userRolesVo.getUid()) - && !(contest.getIsGroup() && groupValidator.isGroupRoot(userRolesVo.getUid(), contest.getGid()))) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - - if (currentPage == null || currentPage < 1) currentPage = 1; - if (limit == null || limit < 1) limit = 30; - - // 获取当前比赛的,状态为ac,未被校验的排在前面 - return contestRecordEntityService.getACInfo(currentPage, - limit, - Constants.Contest.RECORD_AC.getCode(), - cid, - contest.getUid()); - - } - - - public void checkContestACInfo(CheckACDto checkACDto) throws StatusFailException, StatusForbiddenException { - - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - // 获取本场比赛的状态 - Contest contest = contestEntityService.getById(checkACDto.getCid()); - - // 超级管理员或者该比赛的创建者,则为比赛管理者 - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - if (!isRoot - && !contest.getUid().equals(userRolesVo.getUid()) - && !(contest.getIsGroup() && groupValidator.isGroupRoot(userRolesVo.getUid(), contest.getGid()))) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - - boolean isOk = contestRecordEntityService.updateById( - new ContestRecord().setChecked(checkACDto.getChecked()).setId(checkACDto.getId())); - - if (!isOk) { - throw new StatusFailException("修改失败!"); - } - - } - - public IPage getContestPrint(Long cid, Integer currentPage, Integer limit) throws StatusForbiddenException { - - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - // 获取本场比赛的状态 - Contest contest = contestEntityService.getById(cid); - - // 超级管理员或者该比赛的创建者,则为比赛管理者 - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - if (!isRoot - && !contest.getUid().equals(userRolesVo.getUid()) - && !(contest.getIsGroup() && groupValidator.isGroupRoot(userRolesVo.getUid(), contest.getGid()))) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - - if (currentPage == null || currentPage < 1) currentPage = 1; - if (limit == null || limit < 1) limit = 30; - - // 获取当前比赛的,未被确定的排在签名 - - IPage contestPrintIPage = new Page<>(currentPage, limit); - - QueryWrapper contestPrintQueryWrapper = new QueryWrapper<>(); - contestPrintQueryWrapper.select("id", "cid", "username", "realname", "status", "gmt_create") - .eq("cid", cid) - .orderByAsc("status") - .orderByDesc("gmt_create"); - - return contestPrintEntityService.page(contestPrintIPage, contestPrintQueryWrapper); - } - - - public void checkContestPrintStatus(Long id, Long cid) throws StatusFailException, StatusForbiddenException { - - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - // 获取本场比赛的状态 - Contest contest = contestEntityService.getById(cid); - - // 超级管理员或者该比赛的创建者,则为比赛管理者 - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - if (!isRoot && !contest.getUid().equals(userRolesVo.getUid()) - && !(contest.getIsGroup() && groupValidator.isGroupRoot(userRolesVo.getUid(), contest.getGid()))) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - - boolean isOk = contestPrintEntityService.updateById(new ContestPrint().setId(id).setStatus(1)); - - if (!isOk) { - throw new StatusFailException("修改失败!"); - } - } - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestCalculateRankManager.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestCalculateRankManager.java deleted file mode 100644 index 78fe006..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestCalculateRankManager.java +++ /dev/null @@ -1,545 +0,0 @@ -package top.hcode.hoj.manager.oj; - -import cn.hutool.core.date.DateUnit; -import cn.hutool.core.date.DateUtil; -import cn.hutool.json.JSONObject; -import cn.hutool.json.JSONUtil; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import top.hcode.hoj.dao.group.GroupMemberEntityService; -import top.hcode.hoj.pojo.entity.group.GroupMember; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; -import org.springframework.util.CollectionUtils; -import org.springframework.util.StringUtils; -import top.hcode.hoj.pojo.entity.contest.Contest; -import top.hcode.hoj.pojo.vo.ACMContestRankVo; -import top.hcode.hoj.pojo.vo.ContestRecordVo; -import top.hcode.hoj.pojo.vo.OIContestRankVo; -import top.hcode.hoj.dao.contest.ContestRecordEntityService; -import top.hcode.hoj.dao.user.UserInfoEntityService; -import top.hcode.hoj.utils.Constants; -import top.hcode.hoj.utils.RedisUtils; - -import javax.annotation.Resource; -import java.util.*; -import java.util.stream.Collectors; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/11 20:11 - * @Description: - */ -@Component -public class ContestCalculateRankManager { - - @Resource - private UserInfoEntityService userInfoEntityService; - - @Resource - private RedisUtils redisUtils; - - @Resource - private ContestRecordEntityService contestRecordEntityService; - - @Autowired - private GroupMemberEntityService groupMemberEntityService; - - public List calcACMRank(boolean isOpenSealRank, - boolean removeStar, - Contest contest, - String currentUserId, - List concernedList, - List externalCidList) { - return calcACMRank(isOpenSealRank, - removeStar, - contest, - currentUserId, - concernedList, - externalCidList, - false, - null); - } - - - public List calcOIRank(Boolean isOpenSealRank, - Boolean removeStar, - Contest contest, - String currentUserId, - List concernedList, - List externalCidList) { - - return calcOIRank(isOpenSealRank, - removeStar, - contest, - currentUserId, - concernedList, - externalCidList, - false, - null); - } - - - /** - * @param isOpenSealRank 是否是查询封榜后的数据 - * @param removeStar 是否需要移除打星队伍 - * @param contest 比赛实体信息 - * @param currentUserId 当前查看榜单的用户uuid,不为空则将该数据复制一份放置列表最前 - * @param concernedList 关注的用户(uuid)列表 - * @param externalCidList 榜单额外显示的比赛列表 - * @param useCache 是否对初始排序计算的结果进行缓存 - * @param cacheTime 缓存的时间 单位秒 - * @MethodName calcACMRank - * @Description TODO - * @Return - * @Since 2021/12/10 - */ - public List calcACMRank(boolean isOpenSealRank, - boolean removeStar, - Contest contest, - String currentUserId, - List concernedList, - List externalCidList, - boolean useCache, - Long cacheTime) { - List orderResultList; - if (useCache) { - String key = Constants.Contest.CONTEST_RANK_CAL_RESULT_CACHE.getName() + "_" + contest.getId(); - orderResultList = (List) redisUtils.get(key); - if (orderResultList == null) { - if (isOpenSealRank) { - long minSealRankTime = DateUtil.between(contest.getStartTime(), contest.getSealRankTime(), DateUnit.SECOND); - orderResultList = getACMOrderRank(contest, true, minSealRankTime, contest.getDuration(), externalCidList); - } else { - orderResultList = getACMOrderRank(contest, false, null, null, externalCidList); - } - redisUtils.set(key, orderResultList, cacheTime); - } - } else { - if (isOpenSealRank) { - long minSealRankTime = DateUtil.between(contest.getStartTime(), contest.getSealRankTime(), DateUnit.SECOND); - orderResultList = getACMOrderRank(contest, true, minSealRankTime, contest.getDuration(), externalCidList); - } else { - orderResultList = getACMOrderRank(contest, false, null, null, externalCidList); - } - } - - // 需要打星的用户名列表 - HashMap starAccountMap = starAccountToMap(contest.getStarAccount()); - - // 如果选择了移除打星队伍,同时该用户属于打星队伍,则将其移除 - if (removeStar) { - orderResultList.removeIf(acmContestRankVo -> starAccountMap.containsKey(acmContestRankVo.getUsername())); - } - // 记录当前用户排名数据和关注列表的用户排名数据 - List topACMRankVoList = new ArrayList<>(); - boolean needAddConcernedUser = false; - if (!CollectionUtils.isEmpty(concernedList)) { - needAddConcernedUser = true; - // 移除关注列表与当前用户重复 - concernedList.remove(currentUserId); - } - - int rankNum = 1; - int len = orderResultList.size(); - ACMContestRankVo lastACMRankVo = null; - for (int i = 0; i < len; i++) { - ACMContestRankVo currentACMRankVo = orderResultList.get(i); - if (starAccountMap.containsKey(currentACMRankVo.getUsername())) { - // 打星队伍排名为-1 - currentACMRankVo.setRank(-1); - } else { - if (rankNum == 1) { - currentACMRankVo.setRank(rankNum); - } else { - // 当前用户的总罚时和AC数跟前一个用户一样的话,同时前一个不应该为打星,排名则一样 - if (lastACMRankVo.getAc().equals(currentACMRankVo.getAc()) - && lastACMRankVo.getTotalTime().equals(currentACMRankVo.getTotalTime())) { - currentACMRankVo.setRank(lastACMRankVo.getRank()); - } else { - currentACMRankVo.setRank(rankNum); - } - } - lastACMRankVo = currentACMRankVo; - rankNum++; - } - - if (!StringUtils.isEmpty(currentUserId) && - currentACMRankVo.getUid().equals(currentUserId)) { - topACMRankVoList.add(currentACMRankVo); - } - - // 需要添加关注用户 - if (needAddConcernedUser) { - if (concernedList.contains(currentACMRankVo.getUid())) { - topACMRankVoList.add(currentACMRankVo); - } - } - } - topACMRankVoList.addAll(orderResultList); - return topACMRankVoList; - } - - - private List getACMOrderRank(Contest contest, - Boolean isOpenSealRank, - Long minSealRankTime, - Long maxSealRankTime, - List externalCidList) { - - - List contestRecordList = contestRecordEntityService.getACMContestRecord(contest.getUid(), - contest.getId(), - externalCidList, - contest.getStartTime()); - - List superAdminUidList = getSuperAdminUidList(contest.getGid()); - - List result = new ArrayList<>(); - - HashMap uidMapIndex = new HashMap<>(); - - int index = 0; - - HashMap firstACMap = new HashMap<>(); - - for (ContestRecordVo contestRecord : contestRecordList) { - - if (superAdminUidList.contains(contestRecord.getUid())) { // 超级管理员的提交不入排行榜 - continue; - } - - ACMContestRankVo ACMContestRankVo; - if (!uidMapIndex.containsKey(contestRecord.getUid())) { // 如果该用户信息没还记录 - - // 初始化参数 - ACMContestRankVo = new ACMContestRankVo(); - ACMContestRankVo.setRealname(contestRecord.getRealname()) - .setAvatar(contestRecord.getAvatar()) - .setSchool(contestRecord.getSchool()) - .setGender(contestRecord.getGender()) - .setUid(contestRecord.getUid()) - .setUsername(contestRecord.getUsername()) - .setNickname(contestRecord.getNickname()) - .setAc(0) - .setTotalTime(0L) - .setTotal(0); - - HashMap> submissionInfo = new HashMap<>(); - ACMContestRankVo.setSubmissionInfo(submissionInfo); - - result.add(ACMContestRankVo); - uidMapIndex.put(contestRecord.getUid(), index); - index++; - } else { - ACMContestRankVo = result.get(uidMapIndex.get(contestRecord.getUid())); // 根据记录的index进行获取 - } - - HashMap problemSubmissionInfo = ACMContestRankVo.getSubmissionInfo().get(contestRecord.getDisplayId()); - - if (problemSubmissionInfo == null) { - problemSubmissionInfo = new HashMap<>(); - problemSubmissionInfo.put("errorNum", 0); - } - - ACMContestRankVo.setTotal(ACMContestRankVo.getTotal() + 1); - - // 如果是当前是开启封榜的时段和同时该提交是处于封榜时段 尝试次数+1 - if (isOpenSealRank && isInSealTimeSubmission(minSealRankTime, maxSealRankTime, contestRecord.getTime())) { - - int tryNum = (int) problemSubmissionInfo.getOrDefault("tryNum", 0); - problemSubmissionInfo.put("tryNum", tryNum + 1); - - } else { - - // 如果该题目已经AC过了,其它都不记录了 - if ((Boolean) problemSubmissionInfo.getOrDefault("isAC", false)) { - continue; - } - - // 记录已经按题目提交耗时time升序了 - - // 通过的话 - if (contestRecord.getStatus().intValue() == Constants.Contest.RECORD_AC.getCode()) { - // 总解决题目次数ac+1 - ACMContestRankVo.setAc(ACMContestRankVo.getAc() + 1); - - // 判断是不是first AC - boolean isFirstAC = false; - Long time = firstACMap.getOrDefault(contestRecord.getDisplayId(), null); - if (time == null) { - isFirstAC = true; - firstACMap.put(contestRecord.getDisplayId(), contestRecord.getTime()); - } else { - // 相同提交时间也是first AC - if (time.longValue() == contestRecord.getTime().longValue()) { - isFirstAC = true; - } - } - - int errorNumber = (int) problemSubmissionInfo.getOrDefault("errorNum", 0); - problemSubmissionInfo.put("isAC", true); - problemSubmissionInfo.put("isFirstAC", isFirstAC); - problemSubmissionInfo.put("ACTime", contestRecord.getTime()); - problemSubmissionInfo.put("errorNum", errorNumber); - - // 同时计算总耗时,总耗时加上 该题目未AC前的错误次数*20*60+题目AC耗时 - ACMContestRankVo.setTotalTime(ACMContestRankVo.getTotalTime() + errorNumber * 20 * 60 + contestRecord.getTime()); - - // 未通过同时需要记录罚时次数 - } else if (contestRecord.getStatus().intValue() == Constants.Contest.RECORD_NOT_AC_PENALTY.getCode()) { - - int errorNumber = (int) problemSubmissionInfo.getOrDefault("errorNum", 0); - problemSubmissionInfo.put("errorNum", errorNumber + 1); - } else { - - int errorNumber = (int) problemSubmissionInfo.getOrDefault("errorNum", 0); - problemSubmissionInfo.put("errorNum", errorNumber); - } - } - ACMContestRankVo.getSubmissionInfo().put(contestRecord.getDisplayId(), problemSubmissionInfo); - } - - List orderResultList = result.stream().sorted(Comparator.comparing(ACMContestRankVo::getAc, Comparator.reverseOrder()) // 先以总ac数降序 - .thenComparing(ACMContestRankVo::getTotalTime) //再以总耗时升序 - ).collect(Collectors.toList()); - - return orderResultList; - } - - - /** - * @param isOpenSealRank 是否是查询封榜后的数据 - * @param removeStar 是否需要移除打星队伍 - * @param contest 比赛实体信息 - * @param currentUserId 当前查看榜单的用户uuid,不为空则将该数据复制一份放置列表最前 - * @param concernedList 关注的用户(uuid)列表 - * @param externalCidList 榜单额外显示比赛列表 - * @param useCache 是否对初始排序计算的结果进行缓存 - * @param cacheTime 缓存的时间 单位秒 - * @MethodName calcOIRank - * @Description TODO - * @Return - * @Since 2021/12/10 - */ - public List calcOIRank(boolean isOpenSealRank, - boolean removeStar, - Contest contest, - String currentUserId, - List concernedList, - List externalCidList, - boolean useCache, - Long cacheTime) { - - List orderResultList; - if (useCache) { - String key = Constants.Contest.CONTEST_RANK_CAL_RESULT_CACHE.getName() + "_" + contest.getId(); - orderResultList = (List) redisUtils.get(key); - if (orderResultList == null) { - orderResultList = getOIOrderRank(contest,externalCidList, isOpenSealRank); - redisUtils.set(key, orderResultList, cacheTime); - } - } else { - orderResultList = getOIOrderRank(contest,externalCidList, isOpenSealRank); - } - - // 需要打星的用户名列表 - HashMap starAccountMap = starAccountToMap(contest.getStarAccount()); - - // 如果选择了移除打星队伍,同时该用户属于打星队伍,则将其移除 - if (removeStar) { - orderResultList.removeIf(acmContestRankVo -> starAccountMap.containsKey(acmContestRankVo.getUsername())); - } - - // 记录当前用户排名数据和关注列表的用户排名数据 - List topOIRankVoList = new ArrayList<>(); - boolean needAddConcernedUser = false; - if (!CollectionUtils.isEmpty(concernedList)) { - needAddConcernedUser = true; - // 移除关注列表与当前用户重复 - concernedList.remove(currentUserId); - } - - int rankNum = 1; - OIContestRankVo lastOIRankVo = null; - int len = orderResultList.size(); - for (int i = 0; i < len; i++) { - OIContestRankVo currentOIRankVo = orderResultList.get(i); - if (starAccountMap.containsKey(currentOIRankVo.getUsername())) { - // 打星队伍排名为-1 - currentOIRankVo.setRank(-1); - } else { - if (rankNum == 1) { - currentOIRankVo.setRank(rankNum); - } else { - // 当前用户的程序总运行时间和总得分跟前一个用户一样的话,同时前一个不应该为打星用户,排名则一样 - if (lastOIRankVo.getTotalScore().equals(currentOIRankVo.getTotalScore()) - && lastOIRankVo.getTotalTime().equals(currentOIRankVo.getTotalTime())) { - currentOIRankVo.setRank(lastOIRankVo.getRank()); - } else { - currentOIRankVo.setRank(rankNum); - } - } - lastOIRankVo = currentOIRankVo; - rankNum++; - } - - if (!StringUtils.isEmpty(currentUserId) && - currentOIRankVo.getUid().equals(currentUserId)) { - topOIRankVoList.add(currentOIRankVo); - } - - // 需要添加关注用户 - if (needAddConcernedUser) { - if (concernedList.contains(currentOIRankVo.getUid())) { - topOIRankVoList.add(currentOIRankVo); - } - } - } - topOIRankVoList.addAll(orderResultList); - return topOIRankVoList; - } - - private List getOIOrderRank(Contest contest,List externalCidList, Boolean isOpenSealRank) { - - List oiContestRecord = contestRecordEntityService.getOIContestRecord(contest, externalCidList, isOpenSealRank); - - List superAdminUidList = getSuperAdminUidList(contest.getGid()); - - List result = new ArrayList<>(); - - HashMap uidMapIndex = new HashMap<>(); - - HashMap> uidMapTime = new HashMap<>(); - - boolean isHighestRankScore = Constants.Contest.OI_RANK_HIGHEST_SCORE.getName().equals(contest.getOiRankScoreType()); - - int index = 0; - - for (ContestRecordVo contestRecord : oiContestRecord) { - - if (superAdminUidList.contains(contestRecord.getUid())) { // 超级管理员的提交不入排行榜 - continue; - } - - if (contestRecord.getStatus().equals(Constants.Contest.RECORD_AC.getCode())) { // AC - HashMap pidMapTime = uidMapTime.get(contestRecord.getUid()); - if (pidMapTime != null) { - Integer useTime = pidMapTime.get(contestRecord.getDisplayId()); - if (useTime != null) { - if (useTime > contestRecord.getUseTime()) { // 如果时间消耗比原来的少 - pidMapTime.put(contestRecord.getDisplayId(), contestRecord.getUseTime()); - } - } else { - pidMapTime.put(contestRecord.getDisplayId(), contestRecord.getUseTime()); - } - } else { - HashMap tmp = new HashMap<>(); - tmp.put(contestRecord.getDisplayId(), contestRecord.getUseTime()); - uidMapTime.put(contestRecord.getUid(), tmp); - } - } - - OIContestRankVo oiContestRankVo; - if (!uidMapIndex.containsKey(contestRecord.getUid())) { // 如果该用户信息没还记录 - // 初始化参数 - oiContestRankVo = new OIContestRankVo(); - oiContestRankVo.setRealname(contestRecord.getRealname()) - .setUid(contestRecord.getUid()) - .setUsername(contestRecord.getUsername()) - .setSchool(contestRecord.getSchool()) - .setAvatar(contestRecord.getAvatar()) - .setGender(contestRecord.getGender()) - .setNickname(contestRecord.getNickname()) - .setTotalScore(0); - - - HashMap submissionInfo = new HashMap<>(); - oiContestRankVo.setSubmissionInfo(submissionInfo); - - result.add(oiContestRankVo); - uidMapIndex.put(contestRecord.getUid(), index); - index++; - } else { - oiContestRankVo = result.get(uidMapIndex.get(contestRecord.getUid())); // 根据记录的index进行获取 - } - - // 记录总分 - HashMap submissionInfo = oiContestRankVo.getSubmissionInfo(); - Integer score = submissionInfo.get(contestRecord.getDisplayId()); - if (isHighestRankScore) { - if (score == null) { - oiContestRankVo.setTotalScore(oiContestRankVo.getTotalScore() + contestRecord.getScore()); - submissionInfo.put(contestRecord.getDisplayId(), contestRecord.getScore()); - } - } else { - if (contestRecord.getScore() != null) { - if (score != null) { // 为了避免同个提交时间的重复计算 - oiContestRankVo.setTotalScore(oiContestRankVo.getTotalScore() - score + contestRecord.getScore()); - } else { - oiContestRankVo.setTotalScore(oiContestRankVo.getTotalScore() + contestRecord.getScore()); - } - } - submissionInfo.put(contestRecord.getDisplayId(), contestRecord.getScore()); - } - - } - - - for (OIContestRankVo oiContestRankVo : result) { - HashMap pidMapTime = uidMapTime.get(oiContestRankVo.getUid()); - int sumTime = 0; - if (pidMapTime != null) { - for (String key : pidMapTime.keySet()) { - Integer time = pidMapTime.get(key); - sumTime += time == null ? 0 : time; - } - } - oiContestRankVo.setTotalTime(sumTime); - oiContestRankVo.setTimeInfo(pidMapTime); - } - - // 根据总得分进行降序,再根据总时耗升序排序 - List orderResultList = result.stream() - .sorted(Comparator.comparing(OIContestRankVo::getTotalScore, Comparator.reverseOrder()) - .thenComparing(OIContestRankVo::getTotalTime, Comparator.naturalOrder())) - .collect(Collectors.toList()); - return orderResultList; - } - - - private List getSuperAdminUidList(Long gid) { - - List superAdminUidList = userInfoEntityService.getSuperAdminUidList(); - - if (gid != null) { - QueryWrapper groupMemberQueryWrapper = new QueryWrapper<>(); - groupMemberQueryWrapper.eq("gid", gid).eq("auth", 5); - - List groupRootList = groupMemberEntityService.list(groupMemberQueryWrapper); - - for (GroupMember groupMember : groupRootList) { - superAdminUidList.add(groupMember.getUid()); - } - } - return superAdminUidList; - } - - private boolean isInSealTimeSubmission(Long minSealRankTime, Long maxSealRankTime, Long time) { - return time >= minSealRankTime && time <= maxSealRankTime; - } - - private HashMap starAccountToMap(String starAccountStr) { - if (StringUtils.isEmpty(starAccountStr)) { - return new HashMap<>(); - } - JSONObject jsonObject = JSONUtil.parseObj(starAccountStr); - List list = jsonObject.get("star_account", List.class); - HashMap res = new HashMap<>(); - for (String str : list) { - if (!StringUtils.isEmpty(str)) { - res.put(str, true); - } - } - return res; - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestManager.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestManager.java deleted file mode 100644 index 6abb77e..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestManager.java +++ /dev/null @@ -1,585 +0,0 @@ -package top.hcode.hoj.manager.oj; - -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.apache.shiro.SecurityUtils; -import org.apache.shiro.session.Session; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; -import org.springframework.util.StringUtils; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.exception.StatusForbiddenException; -import top.hcode.hoj.common.exception.StatusNotFoundException; -import top.hcode.hoj.dao.common.AnnouncementEntityService; -import top.hcode.hoj.dao.contest.*; -import top.hcode.hoj.dao.group.GroupMemberEntityService; -import top.hcode.hoj.dao.judge.JudgeEntityService; -import top.hcode.hoj.dao.problem.*; -import top.hcode.hoj.dao.user.UserInfoEntityService; -import top.hcode.hoj.pojo.dto.ContestPrintDto; -import top.hcode.hoj.pojo.dto.ContestRankDto; -import top.hcode.hoj.pojo.dto.RegisterContestDto; -import top.hcode.hoj.pojo.dto.UserReadContestAnnouncementDto; -import top.hcode.hoj.pojo.entity.common.Announcement; -import top.hcode.hoj.pojo.entity.contest.*; -import top.hcode.hoj.pojo.entity.problem.*; -import top.hcode.hoj.pojo.vo.*; -import top.hcode.hoj.utils.Constants; -import top.hcode.hoj.utils.RedisUtils; -import top.hcode.hoj.validator.ContestValidator; -import top.hcode.hoj.validator.GroupValidator; - -import java.util.*; -import java.util.stream.Collectors; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/11 22:26 - * @Description: - */ -@Component -public class ContestManager { - - @Autowired - private ContestEntityService contestEntityService; - - @Autowired - private ContestRecordEntityService contestRecordEntityService; - - @Autowired - private ContestProblemEntityService contestProblemEntityService; - - @Autowired - private ContestAnnouncementEntityService contestAnnouncementEntityService; - - @Autowired - private AnnouncementEntityService announcementEntityService; - - @Autowired - private ContestRegisterEntityService contestRegisterEntityService; - - @Autowired - private ProblemEntityService problemEntityService; - - @Autowired - private ProblemTagEntityService problemTagEntityService; - - @Autowired - private TagEntityService tagEntityService; - - @Autowired - private LanguageEntityService languageEntityService; - - @Autowired - private ProblemLanguageEntityService problemLanguageEntityService; - - @Autowired - private JudgeEntityService judgeEntityService; - - @Autowired - private CodeTemplateEntityService codeTemplateEntityService; - - @Autowired - private ContestPrintEntityService contestPrintEntityService; - - @Autowired - private UserInfoEntityService userInfoEntityService; - - @Autowired - private RedisUtils redisUtils; - - @Autowired - private ContestValidator contestValidator; - - @Autowired - private ContestRankManager contestRankManager; - - @Autowired - private GroupMemberEntityService groupMemberEntityService; - - @Autowired - private GroupValidator groupValidator; - - public IPage getContestList(Integer limit, Integer currentPage, Integer status, Integer type, String keyword) { - // 页数,每页题数若为空,设置默认值 - if (currentPage == null || currentPage < 1) currentPage = 1; - if (limit == null || limit < 1) limit = 10; - return contestEntityService.getContestList(limit, currentPage, type, status, keyword); - } - - - public ContestVo getContestInfo(Long cid) throws StatusFailException, StatusForbiddenException { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - ContestVo contestInfo = contestEntityService.getContestInfoById(cid); - if (contestInfo == null) { - throw new StatusFailException("对不起,该比赛不存在!"); - } - - Contest contest = contestEntityService.getById(cid); - - if (contest.getIsGroup()) { - if (!groupValidator.isGroupMember(userRolesVo.getUid(), contest.getGid()) && !isRoot) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - } - - // 设置当前服务器系统时间 - contestInfo.setNow(new Date()); - - return contestInfo; - } - - - public void toRegisterContest(RegisterContestDto registerContestDto) throws StatusFailException, StatusForbiddenException { - - Long cid = registerContestDto.getCid(); - String password = registerContestDto.getPassword(); - if (cid == null || StringUtils.isEmpty(password)) { - throw new StatusFailException("cid或者password不能为空!"); - } - - // 获取当前登录的用户 - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - Contest contest = contestEntityService.getById(cid); - - if (contest == null || !contest.getVisible()) { - throw new StatusFailException("对不起,该比赛不存在!"); - } - - if (contest.getIsGroup()) { - if (!groupValidator.isGroupMember(userRolesVo.getUid(), contest.getGid()) && !isRoot) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - } - - if (!contest.getPwd().equals(password)) { // 密码不对 - throw new StatusFailException("比赛密码错误,请重新输入!"); - } - - // 需要校验当前比赛是否开启账号规则限制,如果有,需要对当前用户的用户名进行验证 - if (contest.getOpenAccountLimit() - && !contestValidator.validateAccountRule(contest.getAccountLimitRule(), userRolesVo.getUsername())) { - throw new StatusFailException("对不起!本次比赛只允许特定账号规则的用户参赛!"); - } - - - QueryWrapper wrapper = new QueryWrapper().eq("cid", cid) - .eq("uid", userRolesVo.getUid()); - if (contestRegisterEntityService.getOne(wrapper, false) != null) { - throw new StatusFailException("您已注册过该比赛,请勿重复注册!"); - } - - boolean isOk = contestRegisterEntityService.saveOrUpdate(new ContestRegister() - .setCid(cid) - .setUid(userRolesVo.getUid())); - - if (!isOk) { - throw new StatusFailException("校验比赛密码失败,请稍后再试"); - } - } - - public AccessVo getContestAccess(Long cid) throws StatusFailException { - // 获取当前登录的用户 - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - QueryWrapper queryWrapper = new QueryWrapper<>(); - queryWrapper.eq("cid", cid).eq("uid", userRolesVo.getUid()); - ContestRegister contestRegister = contestRegisterEntityService.getOne(queryWrapper, false); - - boolean access = false; - if (contestRegister != null) { - access = true; - Contest contest = contestEntityService.getById(cid); - if (contest == null || !contest.getVisible()) { - throw new StatusFailException("对不起,该比赛不存在!"); - } - if (contest.getOpenAccountLimit() - && !contestValidator.validateAccountRule(contest.getAccountLimitRule(), userRolesVo.getUsername())) { - access = false; - contestRecordEntityService.removeById(contestRegister.getId()); - } - } - - AccessVo accessVo = new AccessVo(); - accessVo.setAccess(access); - return accessVo; - } - - - public List getContestProblem(Long cid) throws StatusFailException, StatusForbiddenException { - - // 获取当前登录的用户 - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - // 获取本场比赛的状态 - Contest contest = contestEntityService.getById(cid); - - // 超级管理员或者该比赛的创建者,则为比赛管理者 - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - // 需要对该比赛做判断,是否处于开始或结束状态才可以获取题目列表,同时若是私有赛需要判断是否已注册(比赛管理员包括超级管理员可以直接获取) - contestValidator.validateContestAuth(contest, userRolesVo, isRoot); - - List contestProblemList; - boolean isAdmin = isRoot - || contest.getAuthor().equals(userRolesVo.getUsername()) - || (contest.getIsGroup() && groupValidator.isGroupRoot(userRolesVo.getUid(), contest.getGid())); - - List groupRootUidList = null; - if (contest.getIsGroup() && contest.getGid() != null) { - groupRootUidList = groupMemberEntityService.getGroupRootUidList(contest.getGid()); - } - - // 如果比赛开启封榜 - if (contestValidator.isSealRank(userRolesVo.getUid(), contest, true, isRoot)) { - contestProblemList = contestProblemEntityService.getContestProblemList(cid, - contest.getStartTime(), - contest.getEndTime(), - contest.getSealRankTime(), - isAdmin, - contest.getAuthor(), - groupRootUidList); - } else { - contestProblemList = contestProblemEntityService.getContestProblemList(cid, - contest.getStartTime(), - contest.getEndTime(), - null, - isAdmin, - contest.getAuthor(), - groupRootUidList); - } - - return contestProblemList; - } - - public ProblemInfoVo getContestProblemDetails(Long cid, String displayId) throws StatusFailException, StatusForbiddenException, StatusNotFoundException { - - // 获取当前登录的用户 - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - // 获取本场比赛的状态 - Contest contest = contestEntityService.getById(cid); - - // 是否为超级管理员或者该比赛的创建者,则为比赛管理者 - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - // 需要对该比赛做判断,是否处于开始或结束状态才可以获取题目,同时若是私有赛需要判断是否已注册(比赛管理员包括超级管理员可以直接获取) - contestValidator.validateContestAuth(contest, userRolesVo, isRoot); - - // 根据cid和displayId获取pid - QueryWrapper contestProblemQueryWrapper = new QueryWrapper<>(); - contestProblemQueryWrapper.eq("cid", cid).eq("display_id", displayId); - ContestProblem contestProblem = contestProblemEntityService.getOne(contestProblemQueryWrapper); - - if (contestProblem == null) { - throw new StatusNotFoundException("该比赛题目不存在"); - } - - //查询题目详情,题目标签,题目语言,题目做题情况 - Problem problem = problemEntityService.getById(contestProblem.getPid()); - - if (problem.getAuth() == 2) { - throw new StatusForbiddenException("该比赛题目当前不可访问!"); - } - - // 设置比赛题目的标题为设置展示标题 - problem.setTitle(contestProblem.getDisplayTitle()); - - List tags = new LinkedList<>(); - - // 比赛结束后才开放标签和source、出题人、难度 - if (contest.getStatus().intValue() != Constants.Contest.STATUS_ENDED.getCode()) { - problem.setSource(null); - problem.setAuthor(null); - problem.setDifficulty(null); - QueryWrapper problemTagQueryWrapper = new QueryWrapper<>(); - problemTagQueryWrapper.eq("pid", contestProblem.getPid()); - // 获取该题号对应的标签id - List tidList = new LinkedList<>(); - problemTagEntityService.list(problemTagQueryWrapper).forEach(problemTag -> { - tidList.add(problemTag.getTid()); - }); - if (tidList.size() != 0) { - tags = (List) tagEntityService.listByIds(tidList); - } - } - // 记录 languageId对应的name - HashMap tmpMap = new HashMap<>(); - - // 获取题目提交的代码支持的语言 - List languagesStr = new LinkedList<>(); - QueryWrapper problemLanguageQueryWrapper = new QueryWrapper<>(); - problemLanguageQueryWrapper.eq("pid", contestProblem.getPid()).select("lid"); - List lidList = problemLanguageEntityService.list(problemLanguageQueryWrapper) - .stream().map(ProblemLanguage::getLid).collect(Collectors.toList()); - languageEntityService.listByIds(lidList).forEach(language -> { - languagesStr.add(language.getName()); - tmpMap.put(language.getId(), language.getName()); - }); - - Date sealRankTime = null; - //封榜时间除超级管理员和比赛管理员外 其它人不可看到最新数据 - if (contestValidator.isSealRank(userRolesVo.getUid(), contest, true, isRoot)) { - sealRankTime = contest.getSealRankTime(); - } - - // 筛去 比赛管理员和超级管理员的提交 - List superAdminUidList = userInfoEntityService.getSuperAdminUidList(); - superAdminUidList.add(contest.getUid()); - - // 获取题目的提交记录 - ProblemCountVo problemCount = judgeEntityService.getContestProblemCount(contestProblem.getPid(), contestProblem.getId(), - contestProblem.getCid(), contest.getStartTime(), sealRankTime, superAdminUidList); - - // 获取题目的代码模板 - QueryWrapper codeTemplateQueryWrapper = new QueryWrapper<>(); - codeTemplateQueryWrapper.eq("pid", problem.getId()).eq("status", true); - List codeTemplates = codeTemplateEntityService.list(codeTemplateQueryWrapper); - HashMap LangNameAndCode = new HashMap<>(); - if (codeTemplates.size() > 0) { - for (CodeTemplate codeTemplate : codeTemplates) { - LangNameAndCode.put(tmpMap.get(codeTemplate.getLid()), codeTemplate.getCode()); - } - } - // 将数据统一写入到一个Vo返回数据实体类中 - return new ProblemInfoVo(problem, tags, languagesStr, problemCount, LangNameAndCode); - } - - - public IPage getContestSubmissionList(Integer limit, - Integer currentPage, - boolean onlyMine, - String displayId, - Integer searchStatus, - String searchUsername, - Long searchCid, - boolean beforeContestSubmit, - boolean completeProblemID) throws StatusFailException, StatusForbiddenException { - - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - // 获取本场比赛的状态 - Contest contest = contestEntityService.getById(searchCid); - - // 是否为超级管理员或者该比赛的创建者,则为比赛管理者 - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - // 需要对该比赛做判断,是否处于开始或结束状态才可以获取题目,同时若是私有赛需要判断是否已注册(比赛管理员包括超级管理员可以直接获取) - contestValidator.validateContestAuth(contest, userRolesVo, isRoot); - - // 页数,每页题数若为空,设置默认值 - if (currentPage == null || currentPage < 1) currentPage = 1; - if (limit == null || limit < 1) limit = 30; - - String uid = null; - // 只查看当前用户的提交 - if (onlyMine) { - // 需要获取一下该token对应用户的数据(有token便能获取到) - uid = userRolesVo.getUid(); - } - - String rule; - if (contest.getType().intValue() == Constants.Contest.TYPE_ACM.getCode()) { - rule = Constants.Contest.TYPE_ACM.getName(); - } else { - rule = Constants.Contest.TYPE_OI.getName(); - } - Date sealRankTime = null; - - // 需要判断是否需要封榜 - if (contestValidator.isSealRank(userRolesVo.getUid(), contest, true, isRoot)) { - sealRankTime = contest.getSealRankTime(); - } - // OI比赛封榜期间不更新,ACM比赛封榜期间可看到自己的提交,但是其它人的不可见 - IPage contestJudgeList = judgeEntityService.getContestJudgeList(limit, - currentPage, - displayId, - searchCid, - searchStatus, - searchUsername, - uid, - beforeContestSubmit, - rule, - contest.getStartTime(), - sealRankTime, - userRolesVo.getUid(), - completeProblemID); - - if (contestJudgeList.getTotal() == 0) { // 未查询到一条数据 - return contestJudgeList; - } else { - // 比赛还是进行阶段,同时不是超级管理员与比赛管理员,需要将除自己之外的提交的时间、空间、长度隐藏 - if (contest.getStatus().intValue() == Constants.Contest.STATUS_RUNNING.getCode() - && !isRoot && !userRolesVo.getUid().equals(contest.getUid())) { - contestJudgeList.getRecords().forEach(judgeVo -> { - if (!judgeVo.getUid().equals(userRolesVo.getUid())) { - judgeVo.setTime(null); - judgeVo.setMemory(null); - judgeVo.setLength(null); - } - }); - } - return contestJudgeList; - } - } - - - public IPage getContestRank(ContestRankDto contestRankDto) throws StatusFailException, StatusForbiddenException { - - Long cid = contestRankDto.getCid(); - List concernedList = contestRankDto.getConcernedList(); - Integer currentPage = contestRankDto.getCurrentPage(); - Integer limit = contestRankDto.getLimit(); - Boolean removeStar = contestRankDto.getRemoveStar(); - Boolean forceRefresh = contestRankDto.getForceRefresh(); - - if (cid == null) { - throw new StatusFailException("错误:cid不能为空"); - } - if (removeStar == null) { - removeStar = false; - } - if (forceRefresh == null) { - forceRefresh = false; - } - // 页数,每页题数若为空,设置默认值 - if (currentPage == null || currentPage < 1) currentPage = 1; - if (limit == null || limit < 1) limit = 30; - - // 获取当前登录的用户 - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - // 获取本场比赛的状态 - Contest contest = contestEntityService.getById(contestRankDto.getCid()); - - // 超级管理员或者该比赛的创建者,则为比赛管理者 - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - // 需要对该比赛做判断,是否处于开始或结束状态才可以获取题目,同时若是私有赛需要判断是否已注册(比赛管理员包括超级管理员可以直接获取) - contestValidator.validateContestAuth(contest, userRolesVo, isRoot); - - // 校验该比赛是否开启了封榜模式,超级管理员和比赛创建者可以直接看到实际榜单 - boolean isOpenSealRank = contestValidator.isSealRank(userRolesVo.getUid(), contest, forceRefresh, isRoot); - - IPage resultList; - if (contest.getType().intValue() == Constants.Contest.TYPE_ACM.getCode()) { - // ACM比赛 - // 进行排行榜计算以及排名分页 - resultList = contestRankManager.getContestACMRankPage(isOpenSealRank, - removeStar, - userRolesVo.getUid(), - concernedList, - contestRankDto.getExternalCidList(), - contest, - currentPage, - limit); - - } else { - // OI比赛 - resultList = contestRankManager.getContestOIRankPage(isOpenSealRank, - removeStar, - userRolesVo.getUid(), - concernedList, - contestRankDto.getExternalCidList(), - contest, - currentPage, - limit); - } - return resultList; - } - - - public IPage getContestAnnouncement(Long cid, Integer limit, Integer currentPage) throws StatusFailException, StatusForbiddenException { - - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - // 获取本场比赛的状态 - Contest contest = contestEntityService.getById(cid); - - // 超级管理员或者该比赛的创建者,则为比赛管理者 - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - // 需要对该比赛做判断,是否处于开始或结束状态才可以获取题目,同时若是私有赛需要判断是否已注册(比赛管理员包括超级管理员可以直接获取) - contestValidator.validateContestAuth(contest, userRolesVo, isRoot); - - if (currentPage == null || currentPage < 1) currentPage = 1; - if (limit == null || limit < 1) limit = 10; - - return announcementEntityService.getContestAnnouncement(cid, true, limit, currentPage); - } - - - public List getContestUserNotReadAnnouncement(UserReadContestAnnouncementDto userReadContestAnnouncementDto) { - - Long cid = userReadContestAnnouncementDto.getCid(); - List readAnnouncementList = userReadContestAnnouncementDto.getReadAnnouncementList(); - - QueryWrapper contestAnnouncementQueryWrapper = new QueryWrapper<>(); - contestAnnouncementQueryWrapper.eq("cid", cid); - if (readAnnouncementList != null && readAnnouncementList.size() > 0) { - contestAnnouncementQueryWrapper.notIn("aid", readAnnouncementList); - } - List announcementList = contestAnnouncementEntityService.list(contestAnnouncementQueryWrapper); - - List aidList = announcementList - .stream() - .map(ContestAnnouncement::getAid) - .collect(Collectors.toList()); - - if (aidList.size() > 0) { - QueryWrapper announcementQueryWrapper = new QueryWrapper<>(); - announcementQueryWrapper.in("id", aidList).orderByDesc("gmt_create"); - return announcementEntityService.list(announcementQueryWrapper); - } else { - return new ArrayList<>(); - } - - } - - - public void submitPrintText(ContestPrintDto contestPrintDto) throws StatusFailException, StatusForbiddenException { - - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - // 获取本场比赛的状态 - Contest contest = contestEntityService.getById(contestPrintDto.getCid()); - - // 超级管理员或者该比赛的创建者,则为比赛管理者 - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - // 需要对该比赛做判断,是否处于开始或结束状态才可以获取题目,同时若是私有赛需要判断是否已注册(比赛管理员包括超级管理员可以直接获取) - contestValidator.validateContestAuth(contest, userRolesVo, isRoot); - - String lockKey = Constants.Account.CONTEST_ADD_PRINT_LOCK.getCode() + userRolesVo.getUid(); - if (redisUtils.hasKey(lockKey)) { - long expire = redisUtils.getExpire(lockKey); - throw new StatusForbiddenException("提交打印功能限制,请在" + expire + "秒后再进行提交!"); - } else { - redisUtils.set(lockKey, 1, 30); - } - - boolean isOk = contestPrintEntityService.saveOrUpdate(new ContestPrint().setCid(contestPrintDto.getCid()) - .setContent(contestPrintDto.getContent()) - .setUsername(userRolesVo.getUsername()) - .setRealname(userRolesVo.getRealname())); - - if (!isOk) { - throw new StatusFailException("提交失败"); - } - - } - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestRankManager.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestRankManager.java deleted file mode 100644 index 9b31366..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestRankManager.java +++ /dev/null @@ -1,180 +0,0 @@ -package top.hcode.hoj.manager.oj; - -import cn.hutool.core.collection.CollectionUtil; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import org.springframework.stereotype.Component; -import top.hcode.hoj.pojo.entity.contest.Contest; -import top.hcode.hoj.pojo.vo.ACMContestRankVo; -import top.hcode.hoj.pojo.vo.OIContestRankVo; - -import javax.annotation.Resource; -import java.util.ArrayList; -import java.util.List; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/11 20:30 - * @Description: - */ -@Component -public class ContestRankManager { - - - @Resource - private ContestCalculateRankManager contestCalculateRankManager; - - /** - * @param isOpenSealRank - * @param removeStar - * @param currentUserId - * @param concernedList - * @param contest - * @param currentPage - * @param limit - * @desc 获取ACM比赛排行榜,有分页 - */ - public IPage getContestACMRankPage(Boolean isOpenSealRank, - Boolean removeStar, - String currentUserId, - List concernedList, - List externalCidList, - Contest contest, - int currentPage, - int limit){ - - // 进行排序计算 - List orderResultList = contestCalculateRankManager.calcACMRank(isOpenSealRank, - removeStar, - contest, - currentUserId, - concernedList, - externalCidList); - - // 计算好排行榜,然后进行分页 - Page page = new Page<>(currentPage, limit); - int count = orderResultList.size(); - List pageList = new ArrayList<>(); - //计算当前页第一条数据的下标 - int currId = currentPage > 1 ? (currentPage - 1) * limit : 0; - for (int i = 0; i < limit && i < count - currId; i++) { - pageList.add(orderResultList.get(currId + i)); - } - page.setSize(limit); - page.setCurrent(currentPage); - page.setTotal(count); - page.setRecords(pageList); - - return page; - } - - - /** - * @param isOpenSealRank - * @param removeStar - * @param currentUserId - * @param concernedList - * @param contest - * @param currentPage - * @param limit - * @desc 获取OI比赛排行榜,有分页 - */ - public IPage getContestOIRankPage(Boolean isOpenSealRank, - Boolean removeStar, - String currentUserId, - List concernedList, - List externalCidList, - Contest contest, - int currentPage, - int limit) { - - List orderResultList = contestCalculateRankManager.calcOIRank(isOpenSealRank, - removeStar, - contest, - currentUserId, - concernedList, - externalCidList); - - // 计算好排行榜,然后进行分页 - Page page = new Page<>(currentPage, limit); - int count = orderResultList.size(); - List pageList = new ArrayList<>(); - //计算当前页第一条数据的下标 - int currId = currentPage > 1 ? (currentPage - 1) * limit : 0; - for (int i = 0; i < limit && i < count - currId; i++) { - pageList.add(orderResultList.get(currId + i)); - } - page.setSize(limit); - page.setCurrent(currentPage); - page.setTotal(count); - page.setRecords(pageList); - return page; - } - - /** - * - * @param isOpenSealRank - * @param removeStar - * @param contest - * @param currentUserId - * @param concernedList - * @param externalCidList - * @param useCache - * @param cacheTime - * @desc 获取ACM比赛排行榜外榜 - */ - public List getACMContestScoreboard(Boolean isOpenSealRank, - Boolean removeStar, - Contest contest, - String currentUserId, - List concernedList, - List externalCidList, - Boolean useCache, - Long cacheTime) { - if (CollectionUtil.isNotEmpty(externalCidList)){ - useCache = false; - } - return contestCalculateRankManager.calcACMRank(isOpenSealRank, - removeStar, - contest, - currentUserId, - concernedList, - externalCidList, - useCache, - cacheTime); - } - - /** - * - * @param isOpenSealRank - * @param removeStar - * @param contest - * @param currentUserId - * @param concernedList - * @param useCache - * @param cacheTime - * @desc 获取OI比赛排行榜外榜 - */ - public List getOIContestScoreboard(Boolean isOpenSealRank, - Boolean removeStar, - Contest contest, - String currentUserId, - List concernedList, - List externalCidList, - Boolean useCache, - Long cacheTime) { - - if (CollectionUtil.isNotEmpty(externalCidList)){ - useCache = false; - } - return contestCalculateRankManager.calcOIRank(isOpenSealRank, - removeStar, - contest, - currentUserId, - concernedList, - externalCidList, - useCache, - cacheTime); - } - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestScoreboardManager.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestScoreboardManager.java deleted file mode 100644 index ac3bac9..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ContestScoreboardManager.java +++ /dev/null @@ -1,150 +0,0 @@ -package top.hcode.hoj.manager.oj; - -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import org.apache.shiro.SecurityUtils; -import org.apache.shiro.session.Session; -import org.springframework.stereotype.Component; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.exception.StatusForbiddenException; -import top.hcode.hoj.common.exception.StatusNotFoundException; -import top.hcode.hoj.pojo.dto.ContestRankDto; -import top.hcode.hoj.pojo.entity.contest.Contest; -import top.hcode.hoj.pojo.entity.contest.ContestProblem; -import top.hcode.hoj.pojo.vo.*; -import top.hcode.hoj.dao.contest.ContestEntityService; -import top.hcode.hoj.dao.contest.ContestProblemEntityService; -import top.hcode.hoj.utils.Constants; -import top.hcode.hoj.validator.ContestValidator; - -import javax.annotation.Resource; -import java.util.Date; -import java.util.List; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/11 20:02 - * @Description: - */ -@Component -public class ContestScoreboardManager { - - @Resource - private ContestEntityService contestEntityService; - - @Resource - private ContestProblemEntityService contestProblemEntityService; - - @Resource - private ContestValidator contestValidator; - - @Resource - private ContestRankManager contestRankManager; - - public ContestOutsideInfo getContestOutsideInfo(Long cid) throws StatusNotFoundException, StatusForbiddenException { - - ContestVo contestInfo = contestEntityService.getContestInfoById(cid); - - if (contestInfo == null) { - throw new StatusNotFoundException("访问错误:该比赛不存在!"); - } - - if (!contestInfo.getOpenRank()) { - throw new StatusForbiddenException("本场比赛未开启外榜,禁止访问外榜!"); - } - - // 获取本场比赛的状态 - if (contestInfo.getStatus().equals(Constants.Contest.STATUS_SCHEDULED.getCode())) { - throw new StatusForbiddenException("本场比赛正在筹备中,禁止访问外榜!"); - } - - contestInfo.setNow(new Date()); - ContestOutsideInfo contestOutsideInfo = new ContestOutsideInfo(); - contestOutsideInfo.setContest(contestInfo); - - QueryWrapper contestProblemQueryWrapper = new QueryWrapper<>(); - contestProblemQueryWrapper.eq("cid", cid).orderByAsc("display_id"); - List contestProblemList = contestProblemEntityService.list(contestProblemQueryWrapper); - contestOutsideInfo.setProblemList(contestProblemList); - - return contestOutsideInfo; - } - - - public List getContestOutsideScoreboard(ContestRankDto contestRankDto) throws StatusFailException, StatusForbiddenException { - - Long cid = contestRankDto.getCid(); - List concernedList = contestRankDto.getConcernedList(); - Boolean removeStar = contestRankDto.getRemoveStar(); - Boolean forceRefresh = contestRankDto.getForceRefresh(); - - if (cid == null) { - throw new StatusFailException("错误:比赛id不能为空"); - } - if (removeStar == null) { - removeStar = false; - } - if (forceRefresh == null) { - forceRefresh = false; - } - - // 获取本场比赛的状态 - Contest contest = contestEntityService.getById(cid); - - if (contest == null) { - throw new StatusFailException("访问错误:该比赛不存在!"); - } - - if (!contest.getOpenRank()) { - throw new StatusForbiddenException("本场比赛未开启外榜,禁止访问外榜!"); - } - - if (contest.getStatus().equals(Constants.Contest.STATUS_SCHEDULED.getCode())) { - throw new StatusForbiddenException("本场比赛正在筹备中,禁止访问外榜!"); - } - - // 获取当前登录的用户 - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - // 超级管理员或者该比赛的创建者,则为比赛管理者 - boolean isRoot = false; - String currentUid = null; - - if (userRolesVo != null) { - currentUid = userRolesVo.getUid(); - isRoot = SecurityUtils.getSubject().hasRole("root"); - // 不是比赛创建者或者超管无权限开启强制实时榜单 - if (!isRoot && !contest.getUid().equals(currentUid)) { - forceRefresh = false; - } - } - - // 校验该比赛是否开启了封榜模式,超级管理员和比赛创建者可以直接看到实际榜单 - boolean isOpenSealRank = contestValidator.isSealRank(currentUid, contest, forceRefresh, isRoot); - - if (contest.getType().intValue() == Constants.Contest.TYPE_ACM.getCode()) { - - - // 获取ACM比赛排行榜外榜 - return contestRankManager.getACMContestScoreboard(isOpenSealRank, - removeStar, - contest, - null, - concernedList, - contestRankDto.getExternalCidList(), - !forceRefresh, - 15L); // 默认15s缓存 - - } else { - // 获取OI比赛排行榜外榜 - return contestRankManager.getOIContestScoreboard(isOpenSealRank, - removeStar, - contest, - null, - concernedList, - contestRankDto.getExternalCidList(), - !forceRefresh, - 15L); // 默认15s缓存 - } - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/DiscussionManager.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/DiscussionManager.java deleted file mode 100644 index 86c6f44..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/DiscussionManager.java +++ /dev/null @@ -1,363 +0,0 @@ -package top.hcode.hoj.manager.oj; - -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import org.apache.shiro.SecurityUtils; -import org.apache.shiro.session.Session; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; -import org.springframework.transaction.annotation.Transactional; -import org.springframework.util.CollectionUtils; -import org.springframework.util.StringUtils; -import top.hcode.hoj.annotation.HOJAccessEnum; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.exception.StatusForbiddenException; -import top.hcode.hoj.common.exception.StatusNotFoundException; -import top.hcode.hoj.dao.discussion.DiscussionEntityService; -import top.hcode.hoj.dao.discussion.DiscussionLikeEntityService; -import top.hcode.hoj.dao.discussion.DiscussionReportEntityService; -import top.hcode.hoj.dao.problem.CategoryEntityService; -import top.hcode.hoj.dao.problem.ProblemEntityService; -import top.hcode.hoj.dao.user.UserAcproblemEntityService; -import top.hcode.hoj.exception.AccessException; -import top.hcode.hoj.pojo.entity.discussion.Discussion; -import top.hcode.hoj.pojo.entity.discussion.DiscussionLike; -import top.hcode.hoj.pojo.entity.discussion.DiscussionReport; -import top.hcode.hoj.pojo.entity.problem.Category; -import top.hcode.hoj.pojo.entity.problem.Problem; -import top.hcode.hoj.pojo.entity.user.UserAcproblem; -import top.hcode.hoj.pojo.vo.ConfigVo; -import top.hcode.hoj.pojo.vo.DiscussionVo; -import top.hcode.hoj.pojo.vo.UserRolesVo; -import top.hcode.hoj.utils.Constants; -import top.hcode.hoj.utils.RedisUtils; -import top.hcode.hoj.validator.AccessValidator; -import top.hcode.hoj.validator.GroupValidator; - -import java.util.List; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/11 15:21 - * @Description: - */ -@Component -public class DiscussionManager { - @Autowired - private DiscussionEntityService discussionEntityService; - - @Autowired - private DiscussionLikeEntityService discussionLikeEntityService; - - @Autowired - private CategoryEntityService categoryEntityService; - - @Autowired - private DiscussionReportEntityService discussionReportEntityService; - - @Autowired - private RedisUtils redisUtils; - - @Autowired - private UserAcproblemEntityService userAcproblemEntityService; - - @Autowired - private ProblemEntityService problemEntityService; - - @Autowired - private GroupValidator groupValidator; - - @Autowired - private AccessValidator accessValidator; - - @Autowired - private ConfigVo configVo; - - public IPage getDiscussionList(Integer limit, - Integer currentPage, - Integer categoryId, - String pid, - boolean onlyMine, - String keyword, - boolean admin) { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - QueryWrapper discussionQueryWrapper = new QueryWrapper<>(); - - IPage iPage = new Page<>(currentPage, limit); - - if (categoryId != null) { - discussionQueryWrapper.eq("category_id", categoryId); - } - - if (!StringUtils.isEmpty(keyword)) { - - final String key = keyword.trim(); - - discussionQueryWrapper.and(wrapper -> wrapper.like("title", key).or() - .like("author", key).or() - .like("id", key).or() - .like("description", key)); - } - - boolean isAdmin = SecurityUtils.getSubject().hasRole("root") - || SecurityUtils.getSubject().hasRole("problem_admin") - || SecurityUtils.getSubject().hasRole("admin"); - - if (!StringUtils.isEmpty(pid)) { - discussionQueryWrapper.eq("pid", pid); - } - - if (!(admin && isAdmin)) { - discussionQueryWrapper.isNull("gid"); - } - - discussionQueryWrapper - .eq(!(admin && isAdmin), "status", 0) - .orderByDesc("top_priority") - .orderByDesc("gmt_create") - .orderByDesc("like_num") - .orderByDesc("view_num"); - - if (onlyMine && userRolesVo != null) { - discussionQueryWrapper.eq("uid", userRolesVo.getUid()); - } - IPage discussionIPage = discussionEntityService.page(iPage, discussionQueryWrapper); - List records = discussionIPage.getRecords(); - if (!CollectionUtils.isEmpty(records)) { - for (Discussion discussion : records) { - if (userRolesVo == null) { - discussion.setContent(null); - } else if (!userRolesVo.getUid().equals(discussion.getUid())) { - discussion.setContent(null); - } - } - } - return discussionIPage; - } - - public DiscussionVo getDiscussion(Integer did) throws StatusNotFoundException, StatusForbiddenException, AccessException { - - // 获取当前登录的用户 - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - Discussion discussion = discussionEntityService.getById(did); - - if (discussion.getGid() != null) { - accessValidator.validateAccess(HOJAccessEnum.GROUP_DISCUSSION); - if (!isRoot && !discussion.getUid().equals(userRolesVo.getUid()) && !groupValidator.isGroupMember(userRolesVo.getUid(), discussion.getGid())) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - } else { - accessValidator.validateAccess(HOJAccessEnum.PUBLIC_DISCUSSION); - } - - String uid = null; - - if (userRolesVo != null) { - uid = userRolesVo.getUid(); - } - - DiscussionVo discussionVo = discussionEntityService.getDiscussion(did, uid); - - if (discussionVo == null) { - throw new StatusNotFoundException("对不起,该讨论不存在!"); - } - - if (discussionVo.getStatus() == 1) { - throw new StatusForbiddenException("对不起,该讨论已被封禁!"); - } - - // 浏览量+1 - UpdateWrapper discussionUpdateWrapper = new UpdateWrapper<>(); - discussionUpdateWrapper.setSql("view_num=view_num+1").eq("id", discussionVo.getId()); - discussionEntityService.update(discussionUpdateWrapper); - discussionVo.setViewNum(discussionVo.getViewNum() + 1); - - return discussionVo; - } - - public void addDiscussion(Discussion discussion) throws StatusFailException, StatusForbiddenException, StatusNotFoundException { - - // 获取当前登录的用户 - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - boolean isProblemAdmin = SecurityUtils.getSubject().hasRole("problem_admin"); - boolean isAdmin = SecurityUtils.getSubject().hasRole("admin"); - - String problemId = discussion.getPid(); - if (problemId != null) { - QueryWrapper problemQueryWrapper = new QueryWrapper<>(); - problemQueryWrapper.eq("problem_id", problemId); - int problemCount = problemEntityService.count(problemQueryWrapper); - if (problemCount == 0) { - throw new StatusNotFoundException("对不起,该题目不存在,无法发布题解!"); - } - } - - if (discussion.getGid() != null) { - if (!isRoot && !discussion.getUid().equals(userRolesVo.getUid()) && !groupValidator.isGroupMember(userRolesVo.getUid(), discussion.getGid())) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - } - - // 除管理员外 其它用户需要AC20道题目以上才可发帖,同时限制一天只能发帖5次 - if (!isRoot && !isProblemAdmin && !isAdmin) { - QueryWrapper queryWrapper = new QueryWrapper<>(); - queryWrapper.eq("uid", userRolesVo.getUid()).select("distinct pid"); - int userAcProblemCount = userAcproblemEntityService.count(queryWrapper); - - if (userAcProblemCount < configVo.getDefaultCreateDiscussionACInitValue()) { - throw new StatusForbiddenException("对不起,您暂时不能评论!请先去提交题目通过" + configVo.getDefaultCreateDiscussionACInitValue() + "道以上!"); - } - - String lockKey = Constants.Account.DISCUSSION_ADD_NUM_LOCK.getCode() + userRolesVo.getUid(); - Integer num = (Integer) redisUtils.get(lockKey); - if (num == null) { - redisUtils.set(lockKey, 1, 3600 * 24); - } else if (num >= configVo.getDefaultCreateDiscussionDailyLimit()) { - throw new StatusForbiddenException("对不起,您今天发帖次数已超过" + configVo.getDefaultCreateDiscussionDailyLimit() + "次,已被限制!"); - } else { - redisUtils.incr(lockKey, 1); - } - } - - discussion.setAuthor(userRolesVo.getUsername()) - .setAvatar(userRolesVo.getAvatar()) - .setUid(userRolesVo.getUid()); - - if (SecurityUtils.getSubject().hasRole("root")) { - discussion.setRole("root"); - } else if (SecurityUtils.getSubject().hasRole("admin") - || SecurityUtils.getSubject().hasRole("problem_admin")) { - discussion.setRole("admin"); - } else { - // 如果不是管理员角色,一律重置为不置顶 - discussion.setTopPriority(false); - } - - boolean isOk = discussionEntityService.saveOrUpdate(discussion); - if (!isOk) { - throw new StatusFailException("发布失败,请重新尝试!"); - } - } - - - public void updateDiscussion(Discussion discussion) throws StatusFailException, StatusForbiddenException { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - if (!isRoot && !discussion.getUid().equals(userRolesVo.getUid()) - && !(discussion.getGid() != null && groupValidator.isGroupAdmin(userRolesVo.getUid(), discussion.getGid()))) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - - boolean isOk = discussionEntityService.updateById(discussion); - if (!isOk) { - throw new StatusFailException("修改失败"); - } - } - - public void removeDiscussion(Integer did) throws StatusFailException, StatusForbiddenException { - // 获取当前登录的用户 - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - Discussion discussion = discussionEntityService.getById(did); - - if (!isRoot && !discussion.getUid().equals(userRolesVo.getUid()) - && !(discussion.getGid() != null && groupValidator.isGroupAdmin(userRolesVo.getUid(), discussion.getGid()))) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - - UpdateWrapper discussionUpdateWrapper = new UpdateWrapper().eq("id", did); - // 如果不是是管理员,则需要附加当前用户的uid条件 - if (!SecurityUtils.getSubject().hasRole("root") - && !SecurityUtils.getSubject().hasRole("admin") - && !SecurityUtils.getSubject().hasRole("problem_admin")) { - discussionUpdateWrapper.eq("uid", userRolesVo.getUid()); - } - boolean isOk = discussionEntityService.remove(discussionUpdateWrapper); - if (!isOk) { - throw new StatusFailException("删除失败,无权限或者该讨论不存在"); - } - - } - - @Transactional(rollbackFor = Exception.class) - public void addDiscussionLike(Integer did, boolean toLike) throws StatusFailException, StatusForbiddenException { - // 获取当前登录的用户 - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - Discussion discussion = discussionEntityService.getById(did); - if (discussion.getGid() != null) { - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - if (!isRoot && !discussion.getUid().equals(userRolesVo.getUid()) - && !groupValidator.isGroupMember(userRolesVo.getUid(), discussion.getGid())) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - } - - QueryWrapper discussionLikeQueryWrapper = new QueryWrapper<>(); - discussionLikeQueryWrapper.eq("did", did).eq("uid", userRolesVo.getUid()); - - DiscussionLike discussionLike = discussionLikeEntityService.getOne(discussionLikeQueryWrapper, false); - - if (toLike) { // 添加点赞 - if (discussionLike == null) { // 如果不存在就添加 - boolean isSave = discussionLikeEntityService.saveOrUpdate(new DiscussionLike().setUid(userRolesVo.getUid()).setDid(did)); - if (!isSave) { - throw new StatusFailException("点赞失败,请重试尝试!"); - } - } - // 点赞+1 - UpdateWrapper discussionUpdateWrapper = new UpdateWrapper<>(); - discussionUpdateWrapper.eq("id", discussion.getId()) - .setSql("like_num=like_num+1"); - discussionEntityService.update(discussionUpdateWrapper); - // 当前帖子要不是点赞者的 才发送点赞消息 - if (!userRolesVo.getUsername().equals(discussion.getAuthor())) { - discussionEntityService.updatePostLikeMsg(discussion.getUid(), - userRolesVo.getUid(), - did, - discussion.getGid()); - } - } else { // 取消点赞 - if (discussionLike != null) { // 如果存在就删除 - boolean isDelete = discussionLikeEntityService.removeById(discussionLike.getId()); - if (!isDelete) { - throw new StatusFailException("取消点赞失败,请重试尝试!"); - } - } - // 点赞-1 - UpdateWrapper discussionUpdateWrapper = new UpdateWrapper<>(); - discussionUpdateWrapper.setSql("like_num=like_num-1").eq("id", did); - discussionEntityService.update(discussionUpdateWrapper); - } - - } - - public List getDiscussionCategory() { - return categoryEntityService.list(); - } - - public void addDiscussionReport(DiscussionReport discussionReport) throws StatusFailException { - boolean isOk = discussionReportEntityService.saveOrUpdate(discussionReport); - if (!isOk) { - throw new StatusFailException("举报失败,请重新尝试"); - } - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/HomeManager.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/HomeManager.java deleted file mode 100644 index d04220c..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/HomeManager.java +++ /dev/null @@ -1,147 +0,0 @@ -package top.hcode.hoj.manager.oj; - -import cn.hutool.core.map.MapUtil; -import cn.hutool.core.text.UnicodeUtil; -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; -import top.hcode.hoj.pojo.entity.common.File; -import top.hcode.hoj.pojo.vo.ACMRankVo; -import top.hcode.hoj.pojo.vo.AnnouncementVo; -import top.hcode.hoj.pojo.vo.ConfigVo; -import top.hcode.hoj.pojo.vo.ContestVo; -import top.hcode.hoj.dao.common.AnnouncementEntityService; -import top.hcode.hoj.dao.common.FileEntityService; -import top.hcode.hoj.dao.contest.ContestEntityService; -import top.hcode.hoj.dao.user.UserRecordEntityService; -import top.hcode.hoj.utils.Constants; -import top.hcode.hoj.utils.RedisUtils; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.stream.Collectors; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/10 21:00 - * @Description: - */ -@Component -public class HomeManager { - - @Autowired - private ContestEntityService contestEntityService; - - @Autowired - private ConfigVo configVo; - - @Autowired - private AnnouncementEntityService announcementEntityService; - - @Autowired - - private UserRecordEntityService userRecordEntityService; - - @Autowired - private RedisUtils redisUtils; - - @Autowired - private FileEntityService fileEntityService; - - /** - * @MethodName getRecentContest - * @Params * @param null - * @Description 获取最近14天的比赛信息列表 - * @Return CommonResult - * @Since 2020/12/29 - */ - public List getRecentContest() { - return contestEntityService.getWithinNext14DaysContests(); - } - - - /** - * @MethodName getHomeCarousel - * @Params - * @Description 获取主页轮播图 - * @Return - * @Since 2021/9/4 - */ - public List> getHomeCarousel() { - List fileList = fileEntityService.queryCarouselFileList(); - List> apiList = fileList.stream().map(f -> { - HashMap param = new HashMap<>(2); - param.put("id", f.getId()); - param.put("url", Constants.File.IMG_API.getPath() + f.getName()); - return param; - }).collect(Collectors.toList()); - return apiList; - } - - - /** - * @MethodName getRecentSevenACRank - * @Params * @param null - * @Description 获取最近7天用户做题榜单 - * @Return - * @Since 2021/1/15 - */ - public List getRecentSevenACRank() { - return userRecordEntityService.getRecent7ACRank(); - } - - - /** - * @MethodName getRecentOtherContest - * @Params * @param null - * @Description 获取最近其他OJ的比赛信息列表 - * @Return CommonResult - * @Since 2020/1/15 - */ - public List> getRecentOtherContest() { - String redisKey = Constants.Schedule.RECENT_OTHER_CONTEST.getCode(); - // 从redis获取比赛列表 - return (ArrayList>) redisUtils.get(redisKey); - } - - - /** - * @MethodName getCommonAnnouncement - * @Params * @param null - * @Description 获取主页公告列表 - * @Return CommonResult - * @Since 2020/12/29 - */ - public IPage getCommonAnnouncement(Integer limit, Integer currentPage) { - if (currentPage == null || currentPage < 1) currentPage = 1; - if (limit == null || limit < 1) limit = 10; - return announcementEntityService.getAnnouncementList(limit, currentPage, true); - } - - /** - * @MethodName getWebConfig - * @Params * @param null - * @Description 获取网站的基础配置。例如名字,缩写名字等等。 - * @Return CommonResult - * @Since 2020/12/29 - */ - public Map getWebConfig() { - - return MapUtil.builder().put("baseUrl", UnicodeUtil.toString(configVo.getBaseUrl())) - .put("name", UnicodeUtil.toString(configVo.getName())) - .put("shortName", UnicodeUtil.toString(configVo.getShortName())) - .put("register", configVo.getRegister()) - .put("recordName", UnicodeUtil.toString(configVo.getRecordName())) - .put("recordUrl", UnicodeUtil.toString(configVo.getRecordUrl())) - .put("description", UnicodeUtil.toString(configVo.getDescription())) - .put("email", UnicodeUtil.toString(configVo.getEmailUsername())) - .put("projectName", UnicodeUtil.toString(configVo.getProjectName())) - .put("projectUrl", UnicodeUtil.toString(configVo.getProjectUrl())) - .put("openPublicDiscussion", configVo.getOpenPublicDiscussion()) - .put("openGroupDiscussion", configVo.getOpenGroupDiscussion()) - .put("openContestComment", configVo.getOpenContestComment()) - .map(); - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/JudgeManager.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/JudgeManager.java deleted file mode 100644 index 5c4f650..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/JudgeManager.java +++ /dev/null @@ -1,641 +0,0 @@ -package top.hcode.hoj.manager.oj; - -import cn.hutool.core.util.IdUtil; -import cn.hutool.json.JSONUtil; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.apache.shiro.SecurityUtils; -import org.apache.shiro.session.Session; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; -import org.springframework.transaction.annotation.Transactional; -import org.springframework.util.CollectionUtils; -import org.springframework.util.StringUtils; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.context.request.RequestContextHolder; -import org.springframework.web.context.request.ServletRequestAttributes; -import top.hcode.hoj.annotation.HOJAccessEnum; -import top.hcode.hoj.common.exception.*; -import top.hcode.hoj.dao.contest.ContestEntityService; -import top.hcode.hoj.dao.contest.ContestRecordEntityService; -import top.hcode.hoj.dao.judge.JudgeCaseEntityService; -import top.hcode.hoj.dao.judge.JudgeEntityService; -import top.hcode.hoj.dao.problem.ProblemEntityService; -import top.hcode.hoj.dao.user.UserAcproblemEntityService; -import top.hcode.hoj.exception.AccessException; -import top.hcode.hoj.judge.remote.RemoteJudgeDispatcher; -import top.hcode.hoj.judge.self.JudgeDispatcher; -import top.hcode.hoj.pojo.dto.*; -import top.hcode.hoj.pojo.entity.contest.Contest; -import top.hcode.hoj.pojo.entity.contest.ContestRecord; -import top.hcode.hoj.pojo.entity.judge.Judge; -import top.hcode.hoj.pojo.entity.judge.JudgeCase; -import top.hcode.hoj.pojo.entity.problem.Problem; -import top.hcode.hoj.pojo.entity.user.UserAcproblem; -import top.hcode.hoj.pojo.vo.*; -import top.hcode.hoj.utils.Constants; -import top.hcode.hoj.utils.IpUtils; -import top.hcode.hoj.utils.RedisUtils; -import top.hcode.hoj.validator.AccessValidator; -import top.hcode.hoj.validator.ContestValidator; -import top.hcode.hoj.validator.GroupValidator; -import top.hcode.hoj.validator.JudgeValidator; - -import javax.servlet.http.HttpServletRequest; -import java.util.*; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/11 11:12 - * @Description: - */ -@Component -public class JudgeManager { - @Autowired - private JudgeEntityService judgeEntityService; - - @Autowired - private JudgeCaseEntityService judgeCaseEntityService; - - @Autowired - private ProblemEntityService problemEntityService; - - @Autowired - private ContestEntityService contestEntityService; - - @Autowired - private ContestRecordEntityService contestRecordEntityService; - - @Autowired - private UserAcproblemEntityService userAcproblemEntityService; - - @Autowired - private JudgeDispatcher judgeDispatcher; - - @Autowired - private RemoteJudgeDispatcher remoteJudgeDispatcher; - - @Autowired - private RedisUtils redisUtils; - - @Autowired - private JudgeValidator judgeValidator; - - @Autowired - private ContestValidator contestValidator; - - @Autowired - private BeforeDispatchInitManager beforeDispatchInitManager; - - @Autowired - private GroupValidator groupValidator; - - @Autowired - private AccessValidator accessValidator; - - @Autowired - private ConfigVo configVo; - - /** - * @MethodName submitProblemJudge - * @Description 核心方法 判题通过openfeign调用判题系统服务 - * @Since 2020/10/30 - */ - public Judge submitProblemJudge(SubmitJudgeDto judgeDto) throws StatusForbiddenException, StatusFailException, StatusNotFoundException, StatusAccessDeniedException, AccessException { - - judgeValidator.validateSubmissionInfo(judgeDto); - - // 需要获取一下该token对应用户的数据 - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isContestSubmission = judgeDto.getCid() != 0; - boolean isTrainingSubmission = judgeDto.getTid() != null && judgeDto.getTid() != 0; - - if (!isContestSubmission && configVo.getDefaultSubmitInterval() > 0) { // 非比赛提交有限制限制 - String lockKey = Constants.Account.SUBMIT_NON_CONTEST_LOCK.getCode() + userRolesVo.getUid(); - long count = redisUtils.incr(lockKey, 1); - if (count > 1) { - throw new StatusForbiddenException("对不起,您的提交频率过快,请稍后再尝试!"); - } - redisUtils.expire(lockKey, configVo.getDefaultSubmitInterval()); - } - - HttpServletRequest request = ((ServletRequestAttributes) (RequestContextHolder.currentRequestAttributes())).getRequest(); - // 将提交先写入数据库,准备调用判题服务器 - Judge judge = new Judge(); - judge.setShare(false) // 默认设置代码为单独自己可见 - .setCode(judgeDto.getCode()) - .setCid(judgeDto.getCid()) - .setGid(judgeDto.getGid()) - .setLanguage(judgeDto.getLanguage()) - .setLength(judgeDto.getCode().length()) - .setUid(userRolesVo.getUid()) - .setUsername(userRolesVo.getUsername()) - .setStatus(Constants.Judge.STATUS_PENDING.getStatus()) // 开始进入判题队列 - .setSubmitTime(new Date()) - .setVersion(0) - .setIp(IpUtils.getUserIpAddr(request)); - - // 如果比赛id不等于0,则说明为比赛提交 - if (isContestSubmission) { - beforeDispatchInitManager.initContestSubmission(judgeDto.getCid(), judgeDto.getPid(), userRolesVo, judge); - } else if (isTrainingSubmission) { - beforeDispatchInitManager.initTrainingSubmission(judgeDto.getTid(), judgeDto.getPid(), userRolesVo, judge); - } else { // 如果不是比赛提交和训练提交 - beforeDispatchInitManager.initCommonSubmission(judgeDto.getPid(), judge); - } - - // 将提交加入任务队列 - if (judgeDto.getIsRemote()) { // 如果是远程oj判题 - remoteJudgeDispatcher.sendTask(judge.getSubmitId(), - judge.getPid(), - judge.getDisplayPid(), - isContestSubmission, - false); - } else { - judgeDispatcher.sendTask(judge.getSubmitId(), - judge.getPid(), - isContestSubmission); - } - - return judge; - } - - public String submitProblemTestJudge(TestJudgeDto testJudgeDto) throws AccessException, - StatusFailException, StatusForbiddenException, StatusSystemErrorException { - judgeValidator.validateTestJudgeInfo(testJudgeDto); - // 需要获取一下该token对应用户的数据 - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - String lockKey = Constants.Account.TEST_JUDGE_LOCK.getCode() + userRolesVo.getUid(); - long count = redisUtils.incr(lockKey, 1); - if (count > 1) { - throw new StatusForbiddenException("对不起,您使用在线调试过于频繁,请稍后再尝试!"); - } - redisUtils.expire(lockKey, 3); - - Problem problem = problemEntityService.getById(testJudgeDto.getPid()); - if (problem == null) { - throw new StatusFailException("当前题目不存在!不支持在线调试!"); - } - - String uniqueKey = "TEST_JUDGE_" + IdUtil.simpleUUID(); - TestJudgeReq testJudgeReq = new TestJudgeReq(); - testJudgeReq.setMemoryLimit(problem.getMemoryLimit()) - .setTimeLimit(problem.getTimeLimit()) - .setStackLimit(problem.getStackLimit()) - .setCode(testJudgeDto.getCode()) - .setLanguage(testJudgeDto.getLanguage()) - .setUniqueKey(uniqueKey) - .setExpectedOutput(testJudgeDto.getExpectedOutput()) - .setTestCaseInput(testJudgeDto.getUserInput()) - .setProblemJudgeMode(problem.getJudgeMode()) - .setIsRemoveEndBlank(problem.getIsRemoveEndBlank() || problem.getIsRemote()); - String userExtraFile = problem.getUserExtraFile(); - if (!StringUtils.isEmpty(userExtraFile)) { - testJudgeReq.setExtraFile((HashMap) JSONUtil.toBean(userExtraFile, Map.class)); - } - judgeDispatcher.sendTestJudgeTask(testJudgeReq); - redisUtils.set(uniqueKey, TestJudgeRes.builder() - .status(Constants.Judge.STATUS_PENDING.getStatus()) - .build(), 10 * 60); - return uniqueKey; - } - - - public TestJudgeVo getTestJudgeResult(String testJudgeKey) throws StatusFailException { - TestJudgeRes testJudgeRes = (TestJudgeRes) redisUtils.get(testJudgeKey); - if (testJudgeRes == null) { - throw new StatusFailException("查询错误!当前在线调试任务不存在!"); - } - TestJudgeVo testJudgeVo = new TestJudgeVo(); - testJudgeVo.setStatus(testJudgeRes.getStatus()); - if (Constants.Judge.STATUS_PENDING.getStatus().equals(testJudgeRes.getStatus())) { - return testJudgeVo; - } - testJudgeVo.setUserInput(testJudgeRes.getInput()); - testJudgeVo.setUserOutput(testJudgeRes.getStdout()); - testJudgeVo.setExpectedOutput(testJudgeRes.getExpectedOutput()); - testJudgeVo.setMemory(testJudgeRes.getMemory()); - testJudgeVo.setTime(testJudgeRes.getTime()); - testJudgeVo.setStderr(testJudgeRes.getStderr()); - testJudgeVo.setProblemJudgeMode(testJudgeRes.getProblemJudgeMode()); - redisUtils.del(testJudgeKey); - return testJudgeVo; - } - - - /** - * @MethodName resubmit - * @Description 调用判题服务器提交失败超过60s后,用户点击按钮重新提交判题进入的方法 - * @Since 2021/2/12 - */ - @Transactional(rollbackFor = Exception.class) - public Judge resubmit(Long submitId) throws StatusNotFoundException { - - Judge judge = judgeEntityService.getById(submitId); - if (judge == null) { - throw new StatusNotFoundException("此提交数据不存在!"); - } - - QueryWrapper problemQueryWrapper = new QueryWrapper<>(); - problemQueryWrapper.select("id", "is_remote", "problem_id") - .eq("id", judge.getPid()); - Problem problem = problemEntityService.getOne(problemQueryWrapper); - - // 如果是非比赛题目 - if (judge.getCid() == 0) { - // 重判前,需要将该题目对应记录表一并更新 - // 如果该题已经是AC通过状态,更新该题目的用户ac做题表 user_acproblem - if (judge.getStatus().intValue() == Constants.Judge.STATUS_ACCEPTED.getStatus().intValue()) { - QueryWrapper userAcproblemQueryWrapper = new QueryWrapper<>(); - userAcproblemQueryWrapper.eq("submit_id", judge.getSubmitId()); - userAcproblemEntityService.remove(userAcproblemQueryWrapper); - } - } else { - if (problem.getIsRemote()) { - // 将对应比赛记录设置成默认值 - UpdateWrapper updateWrapper = new UpdateWrapper<>(); - updateWrapper.eq("submit_id", submitId).setSql("status=null,score=null"); - contestRecordEntityService.update(updateWrapper); - } else { - throw new StatusNotFoundException("错误!非vJudge题目在比赛过程无权限重新提交"); - } - } - - boolean isHasSubmitIdRemoteRejudge = false; - if (Objects.nonNull(judge.getVjudgeSubmitId()) && - (judge.getStatus().intValue() == Constants.Judge.STATUS_SUBMITTED_FAILED.getStatus() - || judge.getStatus().intValue() == Constants.Judge.STATUS_PENDING.getStatus() - || judge.getStatus().intValue() == Constants.Judge.STATUS_JUDGING.getStatus() - || judge.getStatus().intValue() == Constants.Judge.STATUS_COMPILING.getStatus() - || judge.getStatus().intValue() == Constants.Judge.STATUS_SYSTEM_ERROR.getStatus())) { - isHasSubmitIdRemoteRejudge = true; - } - - // 重新进入等待队列 - judge.setStatus(Constants.Judge.STATUS_PENDING.getStatus()); - judge.setVersion(judge.getVersion() + 1); - judge.setErrorMessage(null) - .setOiRankScore(null) - .setScore(null) - .setTime(null) - .setJudger("") - .setMemory(null); - judgeEntityService.updateById(judge); - - // 将提交加入任务队列 - if (problem.getIsRemote()) { // 如果是远程oj判题 - remoteJudgeDispatcher.sendTask(judge.getSubmitId(), - judge.getPid(), - problem.getProblemId(), - judge.getCid() != 0, - isHasSubmitIdRemoteRejudge); - } else { - judgeDispatcher.sendTask(judge.getSubmitId(), - judge.getPid(), - judge.getCid() != 0); - } - return judge; - } - - - /** - * @MethodName getSubmission - * @Description 获取单个提交记录的详情 - * @Since 2021/1/2 - */ - public SubmissionInfoVo getSubmission(Long submitId) throws StatusNotFoundException, StatusAccessDeniedException { - - Judge judge = judgeEntityService.getById(submitId); - if (judge == null) { - throw new StatusNotFoundException("此提交数据不存在!"); - } - - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); // 是否为超级管理员 - - // 清空vj信息 - judge.setVjudgeUsername(null); - judge.setVjudgeSubmitId(null); - judge.setVjudgePassword(null); - - // 超级管理员与题目管理员有权限查看代码 - // 如果不是本人或者并未分享代码,则不可查看 - // 当此次提交代码不共享 - // 比赛提交只有比赛创建者和root账号可看代码 - - SubmissionInfoVo submissionInfoVo = new SubmissionInfoVo(); - - if (judge.getCid() != 0) { - if (userRolesVo == null) { - throw new StatusAccessDeniedException("请先登录!"); - } - Contest contest = contestEntityService.getById(judge.getCid()); - if (!isRoot && !userRolesVo.getUid().equals(contest.getUid()) - && !(judge.getGid() != null && groupValidator.isGroupRoot(userRolesVo.getUid(), judge.getGid()))) { - // 如果是比赛,那么还需要判断是否为封榜,比赛管理员和超级管理员可以有权限查看(ACM题目除外) - if (contest.getType().intValue() == Constants.Contest.TYPE_OI.getCode() - && contestValidator.isSealRank(userRolesVo.getUid(), contest, true, false)) { - submissionInfoVo.setSubmission(new Judge().setStatus(Constants.Judge.STATUS_SUBMITTED_UNKNOWN_RESULT.getStatus())); - return submissionInfoVo; - } - // 不是本人的话不能查看代码、时间,空间,长度 - if (!userRolesVo.getUid().equals(judge.getUid())) { - judge.setCode(null); - // 如果还在比赛时间,不是本人不能查看时间,空间,长度,错误提示信息 - if (contest.getStatus().intValue() == Constants.Contest.STATUS_RUNNING.getCode()) { - judge.setTime(null); - judge.setMemory(null); - judge.setLength(null); - judge.setErrorMessage("The contest is in progress. You are not allowed to view other people's error information."); - } - } - } - - // 团队比赛的提交代码 如果不是超管,需要检查网站是否开启隐藏代码功能 - if (!isRoot && contest.getIsGroup() && judge.getCode() != null) { - try { - accessValidator.validateAccess(HOJAccessEnum.HIDE_NON_CONTEST_SUBMISSION_CODE); - } catch (AccessException e) { - judge.setCode("Because the super administrator has enabled " + - "the function of not viewing the submitted code outside the contest of master station, \n" + - "the code of this submission details has been hidden."); - } - } - - } else { - boolean isProblemAdmin = SecurityUtils.getSubject().hasRole("problem_admin");// 是否为题目管理员 - if (!judge.getShare() - && !isRoot - && !isProblemAdmin - && !(judge.getGid() != null - && groupValidator.isGroupRoot(userRolesVo.getUid(), judge.getGid()))) { - if (userRolesVo != null) { // 当前是登陆状态 - // 需要判断是否为当前登陆用户自己的提交代码 - if (!judge.getUid().equals(userRolesVo.getUid())) { - judge.setCode(null); - } - } else { // 不是登陆状态,就直接无权限查看代码 - judge.setCode(null); - } - } - // 比赛外的提交代码 如果不是超管或题目管理员,需要检查网站是否开启隐藏代码功能 - if (!isRoot && !isProblemAdmin && judge.getCode() != null) { - try { - accessValidator.validateAccess(HOJAccessEnum.HIDE_NON_CONTEST_SUBMISSION_CODE); - } catch (AccessException e) { - judge.setCode("Because the super administrator has enabled " + - "the function of not viewing the submitted code outside the contest of master station, \n" + - "the code of this submission details has been hidden."); - } - } - } - - Problem problem = problemEntityService.getById(judge.getPid()); - - // 只允许用户查看ce错误,sf错误,se错误信息提示 - if (judge.getStatus().intValue() != Constants.Judge.STATUS_COMPILE_ERROR.getStatus() && - judge.getStatus().intValue() != Constants.Judge.STATUS_SYSTEM_ERROR.getStatus() && - judge.getStatus().intValue() != Constants.Judge.STATUS_SUBMITTED_FAILED.getStatus()) { - judge.setErrorMessage("The error message does not support viewing."); - } - submissionInfoVo.setSubmission(judge); - submissionInfoVo.setCodeShare(problem.getCodeShare()); - - return submissionInfoVo; - - } - - /** - * @MethodName updateSubmission - * @Description 修改单个提交详情的分享权限 - * @Since 2021/1/2 - */ - public void updateSubmission(Judge judge) throws StatusForbiddenException, StatusFailException { - - // 需要获取一下该token对应用户的数据 - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - if (!userRolesVo.getUid().equals(judge.getUid())) { // 判断该提交是否为当前用户的 - throw new StatusForbiddenException("对不起,您不能修改他人的代码分享权限!"); - } - - Judge judgeInfo = judgeEntityService.getById(judge.getSubmitId()); - if (judgeInfo.getCid() != 0) { // 如果是比赛提交,不可分享! - throw new StatusForbiddenException("对不起,您不能分享比赛题目的提交代码!"); - } - judgeInfo.setShare(judge.getShare()); - boolean isOk = judgeEntityService.updateById(judgeInfo); - if (!isOk) { - throw new StatusFailException("修改代码权限失败!"); - } - } - - /** - * @MethodName getJudgeList - * @Description 通用查询判题记录列表 - * @Since 2020/10/29 - */ - public IPage getJudgeList(Integer limit, - Integer currentPage, - Boolean onlyMine, - String searchPid, - Integer searchStatus, - String searchUsername, - Boolean completeProblemID, - Long gid) throws StatusAccessDeniedException { - // 页数,每页题数若为空,设置默认值 - if (currentPage == null || currentPage < 1) currentPage = 1; - if (limit == null || limit < 1) limit = 30; - - String uid = null; - // 只查看当前用户的提交 - if (onlyMine) { - // 需要获取一下该token对应用户的数据(有token便能获取到) - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - if (userRolesVo == null) { - throw new StatusAccessDeniedException("当前用户数据为空,请您重新登陆!"); - } - uid = userRolesVo.getUid(); - } - if (searchPid != null) { - searchPid = searchPid.trim(); - } - if (searchUsername != null) { - searchUsername = searchUsername.trim(); - } - - return judgeEntityService.getCommonJudgeList(limit, - currentPage, - searchPid, - searchStatus, - searchUsername, - uid, - completeProblemID, - gid); - } - - - /** - * @MethodName checkJudgeResult - * @Description 对提交列表状态为Pending和Judging的提交进行更新检查 - * @Since 2021/1/3 - */ - public HashMap checkCommonJudgeResult(SubmitIdListDto submitIdListDto) { - - List submitIds = submitIdListDto.getSubmitIds(); - - if (CollectionUtils.isEmpty(submitIds)) { - return new HashMap<>(); - } - - QueryWrapper queryWrapper = new QueryWrapper<>(); - // lambada表达式过滤掉code - queryWrapper.select(Judge.class, info -> !info.getColumn().equals("code")).in("submit_id", submitIds); - List judgeList = judgeEntityService.list(queryWrapper); - HashMap result = new HashMap<>(); - for (Judge judge : judgeList) { - judge.setCode(null); - judge.setErrorMessage(null); - judge.setVjudgeUsername(null); - judge.setVjudgeSubmitId(null); - judge.setVjudgePassword(null); - result.put(judge.getSubmitId(), judge); - } - return result; - } - - /** - * @MethodName checkContestJudgeResult - * @Description 需要检查是否为封榜,是否可以查询结果,避免有人恶意查询 - * @Since 2021/6/11 - */ - public HashMap checkContestJudgeResult(SubmitIdListDto submitIdListDto) throws StatusNotFoundException { - - if (submitIdListDto.getCid() == null) { - throw new StatusNotFoundException("查询比赛id不能为空"); - } - - if (CollectionUtils.isEmpty(submitIdListDto.getSubmitIds())) { - return new HashMap<>(); - } - - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); // 是否为超级管理员 - - Contest contest = contestEntityService.getById(submitIdListDto.getCid()); - - boolean isContestAdmin = isRoot - || userRolesVo.getUid().equals(contest.getUid()) - || (contest.getIsGroup() && groupValidator.isGroupRoot(userRolesVo.getUid(), contest.getGid())); - // 如果是封榜时间且不是比赛管理员和超级管理员 - boolean isSealRank = contestValidator.isSealRank(userRolesVo.getUid(), contest, true, isRoot); - - QueryWrapper queryWrapper = new QueryWrapper<>(); - // lambada表达式过滤掉code - queryWrapper.select(Judge.class, info -> !info.getColumn().equals("code")) - .in("submit_id", submitIdListDto.getSubmitIds()) - .eq("cid", submitIdListDto.getCid()) - .between(isSealRank, "submit_time", contest.getStartTime(), contest.getSealRankTime()); - List judgeList = judgeEntityService.list(queryWrapper); - HashMap result = new HashMap<>(); - for (Judge judge : judgeList) { - judge.setCode(null); - judge.setDisplayPid(null); - judge.setErrorMessage(null); - judge.setVjudgeUsername(null); - judge.setVjudgeSubmitId(null); - judge.setVjudgePassword(null); - if (!judge.getUid().equals(userRolesVo.getUid()) && !isContestAdmin) { - judge.setTime(null); - judge.setMemory(null); - judge.setLength(null); - } - result.put(judge.getSubmitId(), judge); - } - return result; - } - - - /** - * @MethodName getJudgeCase - * @Description 获得指定提交id的测试样例结果,暂不支持查看测试数据,只可看测试点结果,时间,空间,或者IO得分 - * @Since 2020/10/29 - */ - @GetMapping("/get-all-case-result") - public List getALLCaseResult(Long submitId) throws StatusNotFoundException, StatusForbiddenException { - - Judge judge = judgeEntityService.getById(submitId); - - if (judge == null) { - throw new StatusNotFoundException("此提交数据不存在!"); - } - - Problem problem = problemEntityService.getById(judge.getPid()); - - // 如果该题不支持开放测试点结果查看 - if (!problem.getOpenCaseResult()) { - return null; - } - - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - QueryWrapper wrapper = new QueryWrapper<>(); - if (judge.getCid() == 0) { // 非比赛提交 - if (userRolesVo == null) { // 没有登录 - wrapper.select("time", "memory", "score", "status", "user_output"); - } else { - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); // 是否为超级管理员 - if (!isRoot - && !SecurityUtils.getSubject().hasRole("admin") - && !SecurityUtils.getSubject().hasRole("problem_admin")) { // 不是管理员 - wrapper.select("time", "memory", "score", "status", "user_output"); - } - } - } else { // 比赛提交 - if (userRolesVo == null) { - throw new StatusForbiddenException("您还未登录!不可查看比赛提交的测试点详情!"); - } - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); // 是否为超级管理员 - if (!isRoot) { - Contest contest = contestEntityService.getById(judge.getCid()); - // 如果不是比赛管理员 需要受到规则限制 - if (!contest.getUid().equals(userRolesVo.getUid()) || - (contest.getIsGroup() && !groupValidator.isGroupRoot(userRolesVo.getUid(), contest.getGid()))) { - // ACM比赛期间强制禁止查看,比赛管理员除外(赛后恢复正常) - if (contest.getType().intValue() == Constants.Contest.TYPE_ACM.getCode()) { - if (contest.getStatus().intValue() == Constants.Contest.STATUS_RUNNING.getCode()) { - return null; - } - } else { - // 当前是oi比赛期间 同时处于封榜时间 - if (contest.getSealRank() && contest.getStatus().intValue() == Constants.Contest.STATUS_RUNNING.getCode() - && contest.getSealRankTime().before(new Date())) { - return null; - } - } - wrapper.select("time", "memory", "score", "status", "user_output"); - } - } - } - - wrapper.eq("submit_id", submitId); - if (!problem.getIsRemote()) { - wrapper.last("order by length(input_data) asc,input_data asc"); - } - - // 当前所有测试点只支持 空间 时间 状态码 IO得分 和错误信息提示查看而已 - return judgeCaseEntityService.list(wrapper); - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/PassportManager.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/PassportManager.java deleted file mode 100644 index 7fac1a0..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/PassportManager.java +++ /dev/null @@ -1,325 +0,0 @@ -package top.hcode.hoj.manager.oj; - -import cn.hutool.core.bean.BeanUtil; -import cn.hutool.core.lang.Validator; -import cn.hutool.core.util.IdUtil; -import cn.hutool.core.util.RandomUtil; -import cn.hutool.crypto.SecureUtil; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; -import org.springframework.stereotype.Component; -import org.springframework.transaction.annotation.Transactional; -import org.springframework.util.StringUtils; -import top.hcode.hoj.common.exception.StatusAccessDeniedException; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.exception.StatusForbiddenException; -import top.hcode.hoj.manager.email.EmailManager; -import top.hcode.hoj.manager.msg.NoticeManager; -import top.hcode.hoj.pojo.bo.EmailRuleBo; -import top.hcode.hoj.pojo.dto.LoginDto; -import top.hcode.hoj.pojo.dto.RegisterDto; -import top.hcode.hoj.pojo.dto.ApplyResetPasswordDto; -import top.hcode.hoj.pojo.dto.ResetPasswordDto; -import top.hcode.hoj.pojo.entity.user.*; -import top.hcode.hoj.pojo.vo.ConfigVo; -import top.hcode.hoj.pojo.vo.RegisterCodeVo; -import top.hcode.hoj.pojo.vo.UserInfoVo; -import top.hcode.hoj.pojo.vo.UserRolesVo; -import top.hcode.hoj.dao.user.SessionEntityService; -import top.hcode.hoj.dao.user.UserInfoEntityService; -import top.hcode.hoj.dao.user.UserRecordEntityService; -import top.hcode.hoj.dao.user.UserRoleEntityService; -import top.hcode.hoj.utils.Constants; -import top.hcode.hoj.utils.IpUtils; -import top.hcode.hoj.utils.JwtUtils; -import top.hcode.hoj.utils.RedisUtils; - -import javax.annotation.Resource; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.util.stream.Collectors; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/11 16:46 - * @Description: - */ -@Component -public class PassportManager { - - @Resource - private RedisUtils redisUtils; - - @Resource - private JwtUtils jwtUtils; - - @Resource - private ConfigVo configVo; - - @Resource - private EmailRuleBo emailRuleBo; - - @Resource - private UserInfoEntityService userInfoEntityService; - - @Resource - private UserRoleEntityService userRoleEntityService; - - @Resource - private UserRecordEntityService userRecordEntityService; - - @Resource - private SessionEntityService sessionEntityService; - - - @Resource - private EmailManager emailManager; - - @Resource - private NoticeManager noticeManager; - - public UserInfoVo login(LoginDto loginDto, HttpServletResponse response, HttpServletRequest request) throws StatusFailException { - // 去掉账号密码首尾的空格 - loginDto.setPassword(loginDto.getPassword().trim()); - loginDto.setUsername(loginDto.getUsername().trim()); - - if (StringUtils.isEmpty(loginDto.getUsername()) || StringUtils.isEmpty(loginDto.getPassword())) { - throw new StatusFailException("用户名或密码不能为空!"); - } - - if (loginDto.getPassword().length() < 6 || loginDto.getPassword().length() > 20) { - throw new StatusFailException("密码长度应该为6~20位!"); - } - if (loginDto.getUsername().length() > 20) { - throw new StatusFailException("用户名长度不能超过20位!"); - } - - String userIpAddr = IpUtils.getUserIpAddr(request); - String key = Constants.Account.TRY_LOGIN_NUM.getCode() + loginDto.getUsername() + "_" + userIpAddr; - Integer tryLoginCount = (Integer) redisUtils.get(key); - - if (tryLoginCount != null && tryLoginCount >= 20) { - throw new StatusFailException("对不起!登录失败次数过多!您的账号有风险,半个小时内暂时无法登录!"); - } - - UserRolesVo userRolesVo = userRoleEntityService.getUserRoles(null, loginDto.getUsername()); - - if (userRolesVo == null) { - throw new StatusFailException("用户名或密码错误!请注意大小写!"); - } - - if (!userRolesVo.getPassword().equals(SecureUtil.md5(loginDto.getPassword()))) { - if (tryLoginCount == null) { - redisUtils.set(key, 1, 60 * 30); // 三十分钟不尝试,该限制会自动清空消失 - } else { - redisUtils.set(key, tryLoginCount + 1, 60 * 30); - } - throw new StatusFailException("用户名或密码错误!请注意大小写!"); - } - - if (userRolesVo.getStatus() != 0) { - throw new StatusFailException("该账户已被封禁,请联系管理员进行处理!"); - } - - String jwt = jwtUtils.generateToken(userRolesVo.getUid()); - response.setHeader("Authorization", jwt); //放到信息头部 - response.setHeader("Access-Control-Expose-Headers", "Authorization"); - - // 会话记录 - sessionEntityService.save(new Session() - .setUid(userRolesVo.getUid()) - .setIp(IpUtils.getUserIpAddr(request)) - .setUserAgent(request.getHeader("User-Agent"))); - - // 登录成功,清除锁定限制 - if (tryLoginCount != null) { - redisUtils.del(key); - } - - // 异步检查是否异地登录 - sessionEntityService.checkRemoteLogin(userRolesVo.getUid()); - - UserInfoVo userInfoVo = new UserInfoVo(); - BeanUtil.copyProperties(userRolesVo, userInfoVo, "roles"); - userInfoVo.setRoleList(userRolesVo.getRoles() - .stream() - .map(Role::getRole) - .collect(Collectors.toList())); - return userInfoVo; - } - - - public RegisterCodeVo getRegisterCode(String email) throws StatusAccessDeniedException, StatusFailException, StatusForbiddenException { - - if (!configVo.getRegister()) { // 需要判断一下网站是否开启注册 - throw new StatusAccessDeniedException("对不起!本站暂未开启注册功能!"); - } - if (!emailManager.isOk()) { - throw new StatusAccessDeniedException("对不起!本站邮箱系统未配置,暂不支持注册!"); - } - - email = email.trim(); - - boolean isEmail = Validator.isEmail(email); - if (!isEmail) { - throw new StatusFailException("对不起!您的邮箱格式不正确!"); - } - - boolean isBlackEmail = emailRuleBo.getBlackList().stream().anyMatch(email::endsWith); - if (isBlackEmail) { - throw new StatusForbiddenException("对不起!您的邮箱无法注册本网站!"); - } - - String lockKey = Constants.Email.REGISTER_EMAIL_LOCK + email; - if (redisUtils.hasKey(lockKey)) { - throw new StatusFailException("对不起,您的操作频率过快,请在" + redisUtils.getExpire(lockKey) + "秒后再次发送注册邮件!"); - } - - QueryWrapper queryWrapper = new QueryWrapper<>(); - queryWrapper.eq("email", email); - UserInfo userInfo = userInfoEntityService.getOne(queryWrapper, false); - if (userInfo != null) { - throw new StatusFailException("对不起!该邮箱已被注册,请更换新的邮箱!"); - } - - String numbers = RandomUtil.randomNumbers(6); // 随机生成6位数字的组合 - redisUtils.set(Constants.Email.REGISTER_KEY_PREFIX.getValue() + email, numbers, 5 * 60);//默认验证码有效5分钟 - emailManager.sendCode(email, numbers); - redisUtils.set(lockKey, 0, 60); - - RegisterCodeVo registerCodeVo = new RegisterCodeVo(); - registerCodeVo.setEmail(email); - registerCodeVo.setExpire(5 * 60); - - return registerCodeVo; - } - - - @Transactional(rollbackFor = Exception.class) - public void register(RegisterDto registerDto) throws StatusAccessDeniedException, StatusFailException { - - if (!configVo.getRegister()) { // 需要判断一下网站是否开启注册 - throw new StatusAccessDeniedException("对不起!本站暂未开启注册功能!"); - } - - String codeKey = Constants.Email.REGISTER_KEY_PREFIX.getValue() + registerDto.getEmail(); - if (!redisUtils.hasKey(codeKey)) { - throw new StatusFailException("验证码不存在或已过期"); - } - - if (!redisUtils.get(codeKey).equals(registerDto.getCode())) { //验证码判断 - throw new StatusFailException("验证码不正确"); - } - - if (StringUtils.isEmpty(registerDto.getPassword())) { - throw new StatusFailException("密码不能为空"); - } - - if (registerDto.getPassword().length() < 6 || registerDto.getPassword().length() > 20) { - throw new StatusFailException("密码长度应该为6~20位!"); - } - - if (StringUtils.isEmpty(registerDto.getUsername())) { - throw new StatusFailException("用户名不能为空"); - } - - if (registerDto.getUsername().length() > 20) { - throw new StatusFailException("用户名长度不能超过20位!"); - } - - String uuid = IdUtil.simpleUUID(); - //为新用户设置uuid - registerDto.setUuid(uuid); - registerDto.setPassword(SecureUtil.md5(registerDto.getPassword().trim())); // 将密码MD5加密写入数据库 - registerDto.setUsername(registerDto.getUsername().trim()); - registerDto.setEmail(registerDto.getEmail().trim()); - - //往user_info表插入数据 - boolean addUser = userInfoEntityService.addUser(registerDto); - - //往user_role表插入数据 - boolean addUserRole = userRoleEntityService.save(new UserRole().setRoleId(1002L).setUid(uuid)); - - //往user_record表插入数据 - boolean addUserRecord = userRecordEntityService.save(new UserRecord().setUid(uuid)); - - if (addUser && addUserRole && addUserRecord) { - redisUtils.del(registerDto.getEmail()); - noticeManager.syncNoticeToNewRegisterUser(uuid); - } else { - throw new StatusFailException("注册失败,请稍后重新尝试!"); - } - } - - - public void applyResetPassword(ApplyResetPasswordDto applyResetPasswordDto) throws StatusFailException { - - String captcha = applyResetPasswordDto.getCaptcha(); - String captchaKey = applyResetPasswordDto.getCaptchaKey(); - String email = applyResetPasswordDto.getEmail(); - - if (StringUtils.isEmpty(captcha) || StringUtils.isEmpty(email) || StringUtils.isEmpty(captchaKey)) { - throw new StatusFailException("邮箱或验证码不能为空"); - } - - if (!emailManager.isOk()) { - throw new StatusFailException("对不起!本站邮箱系统未配置,暂不支持重置密码!"); - } - - String lockKey = Constants.Email.RESET_EMAIL_LOCK + email; - if (redisUtils.hasKey(lockKey)) { - throw new StatusFailException("对不起,您的操作频率过快,请在" + redisUtils.getExpire(lockKey) + "秒后再次发送重置邮件!"); - } - - // 获取redis中的验证码 - String redisCode = (String) redisUtils.get(captchaKey); - if (!redisCode.equals(captcha.trim().toLowerCase())) { - throw new StatusFailException("验证码不正确"); - } - - QueryWrapper userInfoQueryWrapper = new QueryWrapper<>(); - userInfoQueryWrapper.eq("email", email.trim()); - UserInfo userInfo = userInfoEntityService.getOne(userInfoQueryWrapper, false); - if (userInfo == null) { - throw new StatusFailException("对不起,该邮箱无该用户,请重新检查!"); - } - - String code = IdUtil.simpleUUID().substring(0, 21); // 随机生成20位数字与字母的组合 - redisUtils.set(Constants.Email.RESET_PASSWORD_KEY_PREFIX.getValue() + userInfo.getUsername(), code, 10 * 60);//默认链接有效10分钟 - // 发送邮件 - emailManager.sendResetPassword(userInfo.getUsername(), code, email.trim()); - redisUtils.set(lockKey, 0, 90); - } - - - public void resetPassword(ResetPasswordDto resetPasswordDto) throws StatusFailException { - String username = resetPasswordDto.getUsername(); - String password = resetPasswordDto.getPassword(); - String code = resetPasswordDto.getCode(); - - if (StringUtils.isEmpty(password) || StringUtils.isEmpty(username) || StringUtils.isEmpty(code)) { - throw new StatusFailException("用户名、新密码或验证码不能为空"); - } - - if (password.length() < 6 || password.length() > 20) { - throw new StatusFailException("新密码长度应该为6~20位!"); - } - - String codeKey = Constants.Email.RESET_PASSWORD_KEY_PREFIX.getValue() + username; - if (!redisUtils.hasKey(codeKey)) { - throw new StatusFailException("重置密码链接不存在或已过期,请重新发送重置邮件"); - } - - if (!redisUtils.get(codeKey).equals(code)) { //验证码判断 - throw new StatusFailException("重置密码的验证码不正确,请重新输入"); - } - - UpdateWrapper userInfoUpdateWrapper = new UpdateWrapper<>(); - userInfoUpdateWrapper.eq("username", username).set("password", SecureUtil.md5(password)); - boolean isOk = userInfoEntityService.update(userInfoUpdateWrapper); - if (!isOk) { - throw new StatusFailException("重置密码失败"); - } - redisUtils.del(codeKey); - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ProblemManager.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ProblemManager.java deleted file mode 100644 index c25a8e0..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/ProblemManager.java +++ /dev/null @@ -1,292 +0,0 @@ -package top.hcode.hoj.manager.oj; - -import cn.hutool.core.collection.CollectionUtil; -import top.hcode.hoj.validator.GroupValidator; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import org.apache.shiro.SecurityUtils; -import org.apache.shiro.session.Session; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; -import org.springframework.util.StringUtils; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.exception.StatusForbiddenException; -import top.hcode.hoj.common.exception.StatusNotFoundException; -import top.hcode.hoj.pojo.dto.PidListDto; -import top.hcode.hoj.pojo.entity.contest.Contest; -import top.hcode.hoj.pojo.entity.judge.Judge; -import top.hcode.hoj.pojo.entity.problem.*; -import top.hcode.hoj.pojo.vo.*; -import top.hcode.hoj.dao.contest.ContestEntityService; -import top.hcode.hoj.dao.judge.JudgeEntityService; -import top.hcode.hoj.dao.problem.*; -import top.hcode.hoj.utils.Constants; -import top.hcode.hoj.validator.ContestValidator; - -import java.util.*; -import java.util.stream.Collectors; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/11 10:37 - * @Description: - */ -@Component -public class ProblemManager { - @Autowired - private ProblemEntityService problemEntityService; - - @Autowired - private ProblemTagEntityService problemTagEntityService; - - @Autowired - private JudgeEntityService judgeEntityService; - - @Autowired - private TagEntityService tagEntityService; - - @Autowired - private LanguageEntityService languageEntityService; - - @Autowired - private ContestEntityService contestEntityService; - - @Autowired - private ProblemLanguageEntityService problemLanguageEntityService; - - @Autowired - private CodeTemplateEntityService codeTemplateEntityService; - - @Autowired - private ContestValidator contestValidator; - - @Autowired - private GroupValidator groupValidator; - - /** - * @MethodName getProblemList - * @Params * @param null - * @Description 获取题目列表分页 - * @Since 2020/10/27 - */ - public Page getProblemList(Integer limit, Integer currentPage, - String keyword, List tagId, Integer difficulty, String oj) { - // 页数,每页题数若为空,设置默认值 - if (currentPage == null || currentPage < 1) currentPage = 1; - if (limit == null || limit < 1) limit = 10; - - // 关键词查询不为空 - if (!StringUtils.isEmpty(keyword)) { - keyword = keyword.trim(); - } - if (oj != null && !Constants.RemoteOJ.isRemoteOJ(oj)) { - oj = "Mine"; - } - return problemEntityService.getProblemList(limit, currentPage, null, keyword, - difficulty, tagId, oj); - } - - /** - * @MethodName getRandomProblem - * @Description 随机选取一道题目 - * @Since 2020/10/27 - */ - public RandomProblemVo getRandomProblem() throws StatusFailException { - QueryWrapper queryWrapper = new QueryWrapper<>(); - // 必须是公开题目 - queryWrapper.select("problem_id").eq("auth", 1) - .eq("is_group", false); - List list = problemEntityService.list(queryWrapper); - if (list.size() == 0) { - throw new StatusFailException("获取随机题目失败,题库暂无公开题目!"); - } - Random random = new Random(); - int index = random.nextInt(list.size()); - RandomProblemVo randomProblemVo = new RandomProblemVo(); - randomProblemVo.setProblemId(list.get(index).getProblemId()); - return randomProblemVo; - } - - /** - * @MethodName getUserProblemStatus - * @Description 获取用户对应该题目列表中各个题目的做题情况 - * @Since 2020/12/29 - */ - public HashMap getUserProblemStatus(PidListDto pidListDto) throws StatusNotFoundException { - - // 需要获取一下该token对应用户的数据 - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - HashMap result = new HashMap<>(); - // 先查询判断该用户对于这些题是否已经通过,若已通过,则无论后续再提交结果如何,该题都标记为通过 - QueryWrapper queryWrapper = new QueryWrapper<>(); - queryWrapper.select("distinct pid,status,submit_time,score") - .in("pid", pidListDto.getPidList()) - .eq("uid", userRolesVo.getUid()) - .orderByDesc("submit_time"); - - if (pidListDto.getIsContestProblemList()) { - // 如果是比赛的提交记录需要判断cid - queryWrapper.eq("cid", pidListDto.getCid()); - } else { - queryWrapper.eq("cid", 0); - } - if (pidListDto.getGid() != null) { - queryWrapper.eq("gid", pidListDto.getGid()); - } else { - queryWrapper.isNull("gid"); - } - List judges = judgeEntityService.list(queryWrapper); - - boolean isACMContest = true; - Contest contest = null; - if (pidListDto.getIsContestProblemList()) { - contest = contestEntityService.getById(pidListDto.getCid()); - if (contest == null) { - throw new StatusNotFoundException("错误:该比赛不存在!"); - } - isACMContest = contest.getType().intValue() == Constants.Contest.TYPE_ACM.getCode(); - } - - for (Judge judge : judges) { - // 如果是比赛的题目列表状态 - HashMap temp = new HashMap<>(); - if (pidListDto.getIsContestProblemList()) { - if (!isACMContest) { - if (!result.containsKey(judge.getPid())) { // IO比赛的,如果还未写入,则使用最新一次提交的结果 - // 判断该提交是否为封榜之后的提交,OI赛制封榜后的提交看不到提交结果, - // 只有比赛结束可以看到,比赛管理员与超级管理员的提交除外 - if (contestValidator.isSealRank(userRolesVo.getUid(), contest, true, - SecurityUtils.getSubject().hasRole("root"))) { - temp.put("status", Constants.Judge.STATUS_SUBMITTED_UNKNOWN_RESULT.getStatus()); - temp.put("score", null); - } else { - temp.put("status", judge.getStatus()); - temp.put("score", judge.getScore()); - } - result.put(judge.getPid(), temp); - } - } else { - // 如果该题目已通过,且同时是为不封榜前提交的,则强制写为通过(0) - if (judge.getStatus().intValue() == Constants.Judge.STATUS_ACCEPTED.getStatus()) { - temp.put("status", Constants.Judge.STATUS_ACCEPTED.getStatus()); - temp.put("score", null); - result.put(judge.getPid(), temp); - } else if (!result.containsKey(judge.getPid())) { // 还未写入,则使用最新一次提交的结果 - temp.put("status", judge.getStatus()); - temp.put("score", null); - result.put(judge.getPid(), temp); - } - } - - } else { // 不是比赛题目 - if (judge.getStatus().intValue() == Constants.Judge.STATUS_ACCEPTED.getStatus()) { // 如果该题目已通过,则强制写为通过(0) - temp.put("status", Constants.Judge.STATUS_ACCEPTED.getStatus()); - result.put(judge.getPid(), temp); - } else if (!result.containsKey(judge.getPid())) { // 还未写入,则使用最新一次提交的结果 - temp.put("status", judge.getStatus()); - result.put(judge.getPid(), temp); - } - } - } - - // 再次检查,应该可能从未提交过该题,则状态写为-10 - for (Long pid : pidListDto.getPidList()) { - - // 如果是比赛的题目列表状态 - if (pidListDto.getIsContestProblemList()) { - if (!result.containsKey(pid)) { - HashMap temp = new HashMap<>(); - temp.put("score", null); - temp.put("status", Constants.Judge.STATUS_NOT_SUBMITTED.getStatus()); - result.put(pid, temp); - } - } else { - if (!result.containsKey(pid)) { - HashMap temp = new HashMap<>(); - temp.put("status", Constants.Judge.STATUS_NOT_SUBMITTED.getStatus()); - result.put(pid, temp); - } - } - } - return result; - - } - - /** - * @MethodName getProblemInfo - * @Description 获取指定题目的详情信息,标签,所支持语言,做题情况(只能查询公开题目 也就是auth为1) - * @Since 2020/10/27 - */ - public ProblemInfoVo getProblemInfo(String problemId, Long gid) throws StatusNotFoundException, StatusForbiddenException { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - QueryWrapper wrapper = new QueryWrapper().eq("problem_id", problemId); - //查询题目详情,题目标签,题目语言,题目做题情况 - Problem problem = problemEntityService.getOne(wrapper, false); - if (problem == null) { - throw new StatusNotFoundException("该题号对应的题目不存在"); - } - if (problem.getAuth() != 1) { - throw new StatusForbiddenException("该题号对应题目并非公开题目,不支持访问!"); - } - - if (problem.getIsGroup()) { - if (!isRoot && !groupValidator.isGroupMember(userRolesVo.getUid(), problem.getGid())) { - throw new StatusForbiddenException("该题号对应题目并非公开题目,不支持访问!"); - } - } - - QueryWrapper problemTagQueryWrapper = new QueryWrapper<>(); - problemTagQueryWrapper.eq("pid", problem.getId()); - - // 获取该题号对应的标签id - List tidList = new LinkedList<>(); - problemTagEntityService.list(problemTagQueryWrapper).forEach(problemTag -> { - tidList.add(problemTag.getTid()); - }); - List tags = new ArrayList<>(); - if (tidList.size() > 0) { - tags = (List) tagEntityService.listByIds(tidList); - } - - // 记录 languageId对应的name - HashMap tmpMap = new HashMap<>(); - // 获取题目提交的代码支持的语言 - List languagesStr = new LinkedList<>(); - QueryWrapper problemLanguageQueryWrapper = new QueryWrapper<>(); - problemLanguageQueryWrapper.eq("pid", problem.getId()).select("lid"); - List lidList = problemLanguageEntityService.list(problemLanguageQueryWrapper) - .stream().map(ProblemLanguage::getLid).collect(Collectors.toList()); - if (CollectionUtil.isNotEmpty(lidList)) { - languageEntityService.listByIds(lidList).forEach(language -> { - languagesStr.add(language.getName()); - tmpMap.put(language.getId(), language.getName()); - }); - } - // 获取题目的提交记录 - ProblemCountVo problemCount = judgeEntityService.getProblemCount(problem.getId(), gid); - - // 获取题目的代码模板 - QueryWrapper codeTemplateQueryWrapper = new QueryWrapper<>(); - codeTemplateQueryWrapper.eq("pid", problem.getId()).eq("status", true); - List codeTemplates = codeTemplateEntityService.list(codeTemplateQueryWrapper); - HashMap LangNameAndCode = new HashMap<>(); - if (CollectionUtil.isNotEmpty(codeTemplates)) { - for (CodeTemplate codeTemplate : codeTemplates) { - LangNameAndCode.put(tmpMap.get(codeTemplate.getLid()), codeTemplate.getCode()); - } - } - // 屏蔽一些题目参数 - problem.setJudgeExtraFile(null) - .setSpjCode(null) - .setSpjLanguage(null); - - // 将数据统一写入到一个Vo返回数据实体类中 - return new ProblemInfoVo(problem, tags, languagesStr, problemCount, LangNameAndCode); - } - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/RankManager.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/RankManager.java deleted file mode 100644 index b8447cd..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/RankManager.java +++ /dev/null @@ -1,134 +0,0 @@ -package top.hcode.hoj.manager.oj; - -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; -import org.springframework.util.StringUtils; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.pojo.entity.user.UserInfo; -import top.hcode.hoj.pojo.vo.ACMRankVo; -import top.hcode.hoj.pojo.vo.OIRankVo; -import top.hcode.hoj.dao.user.UserInfoEntityService; -import top.hcode.hoj.dao.user.UserRecordEntityService; -import top.hcode.hoj.utils.Constants; -import top.hcode.hoj.utils.RedisUtils; - -import java.util.List; -import java.util.stream.Collectors; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/10 20:47 - * @Description: - */ -@Component -public class RankManager { - - @Autowired - private UserRecordEntityService userRecordEntityService; - - @Autowired - private UserInfoEntityService userInfoEntityService; - - @Autowired - private RedisUtils redisUtils; - - // 排行榜缓存时间 60s - private static final long cacheRankSecond = 60; - - /** - * @MethodName get-rank-list - * @Params * @param null - * @Description 获取排行榜数据 - * @Return CommonResult - * @Since 2020/10/27 - */ - public IPage getRankList(Integer limit, Integer currentPage, String searchUser, Integer type) throws StatusFailException { - - // 页数,每页题数若为空,设置默认值 - if (currentPage == null || currentPage < 1) currentPage = 1; - if (limit == null || limit < 1) limit = 30; - - List uidList = null; - if (!StringUtils.isEmpty(searchUser)) { - QueryWrapper userInfoQueryWrapper = new QueryWrapper<>(); - - userInfoQueryWrapper.select("uuid"); - - userInfoQueryWrapper.and(wrapper -> wrapper - .like("username", searchUser) - .or() - .like("nickname", searchUser) - .or() - .like("realname", searchUser)); - - userInfoQueryWrapper.eq("status", 0); - - uidList = userInfoEntityService.list(userInfoQueryWrapper) - .stream() - .map(UserInfo::getUuid) - .collect(Collectors.toList()); - } - - IPage rankList = null; - // 根据type查询不同类型的排行榜 - if (type.intValue() == Constants.Contest.TYPE_ACM.getCode()) { - rankList = getACMRankList(limit, currentPage, uidList); - } else if (type.intValue() == Constants.Contest.TYPE_OI.getCode()) { - rankList = getOIRankList(limit, currentPage, uidList); - } else { - throw new StatusFailException("排行榜类型代码不正确,请使用0(ACM),1(OI)!"); - } - return rankList; - } - - - private IPage getACMRankList(int limit, int currentPage, List uidList) { - - IPage data = null; - if (uidList != null) { - Page page = new Page<>(currentPage, limit); - if (uidList.size() > 0) { - data = userRecordEntityService.getACMRankList(page, uidList); - } else { - data = page; - } - } else { - String key = Constants.Account.ACM_RANK_CACHE.getCode() + "_" + limit + "_" + currentPage; - data = (IPage) redisUtils.get(key); - if (data == null) { - Page page = new Page<>(currentPage, limit); - data = userRecordEntityService.getACMRankList(page, null); - redisUtils.set(key, data, cacheRankSecond); - } - } - - return data; - } - - - private IPage getOIRankList(int limit, int currentPage, List uidList) { - - IPage data = null; - if (uidList != null) { - Page page = new Page<>(currentPage, limit); - if (uidList.size() > 0) { - data = userRecordEntityService.getOIRankList(page, uidList); - } else { - data = page; - } - } else { - String key = Constants.Account.OI_RANK_CACHE.getCode() + "_" + limit + "_" + currentPage; - data = (IPage) redisUtils.get(key); - if (data == null) { - Page page = new Page<>(currentPage, limit); - data = userRecordEntityService.getOIRankList(page, null); - redisUtils.set(key, data, cacheRankSecond); - } - } - - return data; - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/TrainingManager.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/TrainingManager.java deleted file mode 100644 index 36be0ab..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/manager/oj/TrainingManager.java +++ /dev/null @@ -1,383 +0,0 @@ -package top.hcode.hoj.manager.oj; - -import cn.hutool.core.bean.BeanUtil; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import org.apache.shiro.SecurityUtils; -import org.apache.shiro.session.Session; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.scheduling.annotation.Async; -import org.springframework.stereotype.Component; -import org.springframework.util.StringUtils; -import top.hcode.hoj.common.exception.StatusAccessDeniedException; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.exception.StatusForbiddenException; -import top.hcode.hoj.dao.group.GroupMemberEntityService; -import top.hcode.hoj.dao.training.*; -import top.hcode.hoj.dao.user.UserInfoEntityService; -import top.hcode.hoj.manager.admin.training.AdminTrainingRecordManager; -import top.hcode.hoj.pojo.dto.RegisterTrainingDto; -import top.hcode.hoj.pojo.entity.training.*; -import top.hcode.hoj.pojo.vo.*; -import top.hcode.hoj.utils.Constants; -import top.hcode.hoj.validator.GroupValidator; -import top.hcode.hoj.validator.TrainingValidator; - -import javax.annotation.Resource; -import java.util.*; -import java.util.stream.Collectors; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/10 17:12 - * @Description: - */ -@Component -public class TrainingManager { - - @Resource - private TrainingEntityService trainingEntityService; - - @Resource - private TrainingRegisterEntityService trainingRegisterEntityService; - - @Resource - private TrainingCategoryEntityService trainingCategoryEntityService; - - @Resource - private TrainingProblemEntityService trainingProblemEntityService; - - @Resource - private TrainingRecordEntityService trainingRecordEntityService; - - @Resource - private UserInfoEntityService userInfoEntityService; - - @Resource - private AdminTrainingRecordManager adminTrainingRecordManager; - - @Resource - private GroupMemberEntityService groupMemberEntityService; - - @Autowired - private GroupValidator groupValidator; - - @Resource - private TrainingValidator trainingValidator; - - /** - * @param limit - * @param currentPage - * @param keyword - * @param categoryId - * @param auth - * @MethodName getTrainingList - * @Description 获取训练题单列表,可根据关键词、类别、权限、类型过滤 - * @Return - * @Since 2021/11/20 - */ - public IPage getTrainingList(Integer limit, Integer currentPage, String keyword, Long categoryId, String auth) { - - // 页数,每页题数若为空,设置默认值 - if (currentPage == null || currentPage < 1) currentPage = 1; - if (limit == null || limit < 1) limit = 30; - return trainingEntityService.getTrainingList(limit, currentPage, categoryId, auth, keyword); - } - - - /** - * @param tid - * @MethodName getTraining - * @Description 根据tid获取指定训练详情 - * @Return - * @Since 2021/11/20 - */ - public TrainingVo getTraining(Long tid) throws StatusFailException, StatusAccessDeniedException, StatusForbiddenException { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); - - Training training = trainingEntityService.getById(tid); - if (training == null || !training.getStatus()) { - throw new StatusFailException("该训练不存在或不允许显示!"); - } - - if (training.getIsGroup()) { - if (!isRoot && !groupValidator.isGroupMember(userRolesVo.getUid(), training.getGid())) { - throw new StatusForbiddenException("对不起,您无权限操作!"); - } - } - - TrainingVo trainingVo = BeanUtil.copyProperties(training, TrainingVo.class); - TrainingCategory trainingCategory = trainingCategoryEntityService.getTrainingCategoryByTrainingId(training.getId()); - trainingVo.setCategoryName(trainingCategory.getName()); - trainingVo.setCategoryColor(trainingCategory.getColor()); - List trainingProblemIdList = trainingProblemEntityService.getTrainingProblemIdList(training.getId()); - trainingVo.setProblemCount(trainingProblemIdList.size()); - - if (userRolesVo != null && trainingValidator.isInTrainingOrAdmin(training, userRolesVo)) { - Integer userTrainingACProblemCount = trainingProblemEntityService.getUserTrainingACProblemCount(userRolesVo.getUid(), trainingProblemIdList); - trainingVo.setAcCount(userTrainingACProblemCount); - } else { - trainingVo.setAcCount(0); - } - - return trainingVo; - } - - /** - * @param tid - * @MethodName getTrainingProblemList - * @Description 根据tid获取指定训练的题单题目列表 - * @Return - * @Since 2021/11/20 - */ - public List getTrainingProblemList(Long tid) throws StatusAccessDeniedException, - StatusForbiddenException, StatusFailException { - Training training = trainingEntityService.getById(tid); - if (training == null || !training.getStatus()) { - throw new StatusFailException("该训练不存在或不允许显示!"); - } - trainingValidator.validateTrainingAuth(training); - - return trainingProblemEntityService.getTrainingProblemList(tid); - - } - - /** - * @param registerTrainingDto - * @MethodName toRegisterTraining - * @Description 注册校验私有权限的训练 - * @Return - * @Since 2021/11/20 - */ - public void toRegisterTraining(RegisterTrainingDto registerTrainingDto) throws StatusFailException, StatusForbiddenException { - - Long tid = registerTrainingDto.getTid(); - String password = registerTrainingDto.getPassword(); - - if (tid == null || StringUtils.isEmpty(password)) { - throw new StatusFailException("请求参数不能为空!"); - } - - Training training = trainingEntityService.getById(tid); - - if (training == null || !training.getStatus()) { - throw new StatusFailException("对不起,该训练不存在或不允许显示!"); - } - - if (!training.getPrivatePwd().equals(password)) { // 密码不对 - throw new StatusFailException("训练密码错误,请重新输入!"); - } - - // 获取当前登录的用户 - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - QueryWrapper registerQueryWrapper = new QueryWrapper<>(); - registerQueryWrapper.eq("tid", tid).eq("uid", userRolesVo.getUid()); - if (trainingRegisterEntityService.count(registerQueryWrapper) > 0) { - throw new StatusFailException("您已注册过该训练,请勿重复注册!"); - } - - boolean isOk = trainingRegisterEntityService.save(new TrainingRegister() - .setTid(tid) - .setUid(userRolesVo.getUid())); - - if (!isOk) { - throw new StatusFailException("校验训练密码失败,请稍后再试"); - } else { - adminTrainingRecordManager.syncUserSubmissionToRecordByTid(tid, userRolesVo.getUid()); - } - } - - - /** - * @param tid - * @MethodName getTrainingAccess - * @Description 私有权限的训练需要获取当前用户是否有进入训练的权限 - * @Return - * @Since 2021/11/20 - */ - public AccessVo getTrainingAccess(Long tid) throws StatusFailException { - - // 获取当前登录的用户 - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - - QueryWrapper queryWrapper = new QueryWrapper<>(); - queryWrapper.eq("tid", tid).eq("uid", userRolesVo.getUid()); - TrainingRegister trainingRegister = trainingRegisterEntityService.getOne(queryWrapper, false); - boolean access = false; - if (trainingRegister != null) { - access = true; - Training training = trainingEntityService.getById(tid); - if (training == null || !training.getStatus()) { - throw new StatusFailException("对不起,该训练不存在!"); - } - } - - AccessVo accessVo = new AccessVo(); - accessVo.setAccess(access); - - return accessVo; - } - - - /** - * @param tid - * @param limit - * @param currentPage - * @MethodName getTrainingRnk - * @Description 获取训练的排行榜分页 - * @Return - * @Since 2021/11/22 - */ - public IPage getTrainingRank(Long tid, Integer limit, Integer currentPage) throws - StatusAccessDeniedException, StatusForbiddenException, StatusFailException { - - Training training = trainingEntityService.getById(tid); - if (training == null || !training.getStatus()) { - throw new StatusFailException("该训练不存在或不允许显示!"); - } - - trainingValidator.validateTrainingAuth(training); - - // 页数,每页数若为空,设置默认值 - if (currentPage == null || currentPage < 1) currentPage = 1; - if (limit == null || limit < 1) limit = 30; - - return getTrainingRank(tid, training.getIsGroup() ? training.getGid() : null, training.getAuthor(), currentPage, limit); - } - - private IPage getTrainingRank(Long tid, Long gid, String username, int currentPage, int limit) { - - Map tpIdMapDisplayId = getTPIdMapDisplayId(tid); - List trainingRecordVoList = trainingRecordEntityService.getTrainingRecord(tid); - - List superAdminUidList = userInfoEntityService.getSuperAdminUidList(); - if (gid != null) { - List groupRootUidList = groupMemberEntityService.getGroupRootUidList(gid); - superAdminUidList.addAll(groupRootUidList); - } - - List result = new ArrayList<>(); - - HashMap uidMapIndex = new HashMap<>(); - int pos = 0; - for (TrainingRecordVo trainingRecordVo : trainingRecordVoList) { - // 超级管理员和训练创建者的提交不入排行榜 - if (username.equals(trainingRecordVo.getUsername()) - || superAdminUidList.contains(trainingRecordVo.getUid())) { - continue; - } - - TrainingRankVo trainingRankVo; - Integer index = uidMapIndex.get(trainingRecordVo.getUid()); - if (index == null) { - trainingRankVo = new TrainingRankVo(); - trainingRankVo.setRealname(trainingRecordVo.getRealname()) - .setAvatar(trainingRecordVo.getAvatar()) - .setSchool(trainingRecordVo.getSchool()) - .setGender(trainingRecordVo.getGender()) - .setUid(trainingRecordVo.getUid()) - .setUsername(trainingRecordVo.getUsername()) - .setNickname(trainingRecordVo.getNickname()) - .setAc(0) - .setTotalRunTime(0); - HashMap> submissionInfo = new HashMap<>(); - trainingRankVo.setSubmissionInfo(submissionInfo); - - result.add(trainingRankVo); - uidMapIndex.put(trainingRecordVo.getUid(), pos); - pos++; - } else { - trainingRankVo = result.get(index); - } - String displayId = tpIdMapDisplayId.get(trainingRecordVo.getTpid()); - HashMap problemSubmissionInfo = trainingRankVo - .getSubmissionInfo() - .getOrDefault(displayId, new HashMap<>()); - - // 如果该题目已经AC过了,只比较运行时间取最小 - if ((Boolean) problemSubmissionInfo.getOrDefault("isAC", false)) { - if (trainingRecordVo.getStatus().intValue() == Constants.Judge.STATUS_ACCEPTED.getStatus()) { - int runTime = (int) problemSubmissionInfo.getOrDefault("runTime", 0); - if (runTime > trainingRecordVo.getUseTime()) { - trainingRankVo.setTotalRunTime(trainingRankVo.getTotalRunTime() - runTime + trainingRecordVo.getUseTime()); - problemSubmissionInfo.put("runTime", trainingRecordVo.getUseTime()); - } - } - continue; - } - - problemSubmissionInfo.put("status", trainingRecordVo.getStatus()); - problemSubmissionInfo.put("score", trainingRecordVo.getScore()); - - // 通过的话 - if (trainingRecordVo.getStatus().intValue() == Constants.Judge.STATUS_ACCEPTED.getStatus()) { - // 总解决题目次数ac+1 - trainingRankVo.setAc(trainingRankVo.getAc() + 1); - problemSubmissionInfo.put("isAC", true); - problemSubmissionInfo.put("runTime", trainingRecordVo.getUseTime()); - trainingRankVo.setTotalRunTime(trainingRankVo.getTotalRunTime() + trainingRecordVo.getUseTime()); - } - - trainingRankVo.getSubmissionInfo().put(displayId, problemSubmissionInfo); - } - - List orderResultList = result.stream().sorted(Comparator.comparing(TrainingRankVo::getAc, Comparator.reverseOrder()) // 先以总ac数降序 - .thenComparing(TrainingRankVo::getTotalRunTime) //再以总耗时升序 - ).collect(Collectors.toList()); - - // 计算好排行榜,然后进行分页 - Page page = new Page<>(currentPage, limit); - int count = orderResultList.size(); - List pageList = new ArrayList<>(); - //计算当前页第一条数据的下标 - int currId = currentPage > 1 ? (currentPage - 1) * limit : 0; - for (int i = 0; i < limit && i < count - currId; i++) { - pageList.add(orderResultList.get(currId + i)); - } - page.setSize(limit); - page.setCurrent(currentPage); - page.setTotal(count); - page.setRecords(pageList); - return page; - } - - private Map getTPIdMapDisplayId(Long tid) { - QueryWrapper queryWrapper = new QueryWrapper<>(); - queryWrapper.eq("tid", tid); - List trainingProblemList = trainingProblemEntityService.list(queryWrapper); - return trainingProblemList.stream().collect(Collectors.toMap(TrainingProblem::getId, TrainingProblem::getDisplayId)); - } - - /** - * 未启用,该操作会导致公开训练也记录,但其实并不需要,会造成数据量无效增加 - */ - @Async - public void checkAndSyncTrainingRecord(Long pid, Long submitId, String uid) { - - QueryWrapper trainingProblemQueryWrapper = new QueryWrapper<>(); - trainingProblemQueryWrapper.eq("pid", pid); - - List trainingProblemList = trainingProblemEntityService.list(trainingProblemQueryWrapper); - List trainingRecordList = new ArrayList<>(); - for (TrainingProblem trainingProblem : trainingProblemList) { - TrainingRecord trainingRecord = new TrainingRecord(); - trainingRecord.setPid(pid) - .setTid(trainingProblem.getTid()) - .setTpid(trainingProblem.getId()) - .setSubmitId(submitId) - .setUid(uid); - trainingRecordList.add(trainingRecord); - } - if (trainingRecordList.size() > 0) { - trainingRecordEntityService.saveBatch(trainingRecordList); - } - } - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/AdminSysNoticeMapper.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/AdminSysNoticeMapper.java deleted file mode 100644 index 72db7ff..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/AdminSysNoticeMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package top.hcode.hoj.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; -import org.springframework.stereotype.Repository; -import top.hcode.hoj.pojo.entity.msg.AdminSysNotice; -import top.hcode.hoj.pojo.vo.AdminSysNoticeVo; - -@Mapper -@Repository -public interface AdminSysNoticeMapper extends BaseMapper { - IPage getAdminSysNotice(Page page, @Param("type") String type); -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/AnnouncementMapper.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/AnnouncementMapper.java deleted file mode 100644 index 0132d3d..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/AnnouncementMapper.java +++ /dev/null @@ -1,25 +0,0 @@ -package top.hcode.hoj.mapper; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; -import org.springframework.stereotype.Repository; -import top.hcode.hoj.pojo.entity.common.Announcement; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import top.hcode.hoj.pojo.vo.AnnouncementVo; - -/** - *

- * Mapper 接口 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -@Mapper -@Repository -public interface AnnouncementMapper extends BaseMapper { - IPage getAnnouncementList(Page page,@Param("notAdmin") Boolean notAdmin); - IPage getContestAnnouncement(Page page,@Param("cid")Long cid,@Param("notAdmin") Boolean notAdmin); -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/AuthMapper.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/AuthMapper.java deleted file mode 100644 index 84336b2..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/AuthMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package top.hcode.hoj.mapper; - -import top.hcode.hoj.pojo.entity.user.Auth; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; - -/** - *

- * Mapper 接口 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -public interface AuthMapper extends BaseMapper { - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/CategoryMapper.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/CategoryMapper.java deleted file mode 100644 index c765af3..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/CategoryMapper.java +++ /dev/null @@ -1,11 +0,0 @@ -package top.hcode.hoj.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import org.apache.ibatis.annotations.Mapper; -import org.springframework.stereotype.Repository; -import top.hcode.hoj.pojo.entity.problem.Category; - -@Mapper -@Repository -public interface CategoryMapper extends BaseMapper { -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/CodeTemplateMapper.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/CodeTemplateMapper.java deleted file mode 100644 index 6c5db15..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/CodeTemplateMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package top.hcode.hoj.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import org.apache.ibatis.annotations.Mapper; -import org.springframework.stereotype.Repository; -import top.hcode.hoj.pojo.entity.problem.CodeTemplate; - - -@Mapper -@Repository -public interface CodeTemplateMapper extends BaseMapper { -} - diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/CommentLikeMapper.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/CommentLikeMapper.java deleted file mode 100644 index 3bf66b4..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/CommentLikeMapper.java +++ /dev/null @@ -1,12 +0,0 @@ -package top.hcode.hoj.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import org.apache.ibatis.annotations.Mapper; -import org.springframework.stereotype.Repository; -import top.hcode.hoj.pojo.entity.discussion.CommentLike; - - -@Mapper -@Repository -public interface CommentLikeMapper extends BaseMapper { -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/CommentMapper.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/CommentMapper.java deleted file mode 100644 index 12c7570..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/CommentMapper.java +++ /dev/null @@ -1,32 +0,0 @@ -package top.hcode.hoj.mapper; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; -import org.springframework.stereotype.Repository; -import top.hcode.hoj.pojo.entity.discussion.Comment; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import top.hcode.hoj.pojo.vo.CommentVo; - -import java.util.List; - - -/** - *

- * Mapper 接口 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -@Mapper -@Repository -public interface CommentMapper extends BaseMapper { - - IPage getCommentList(Page page, - @Param("cid") Long cid, - @Param("did") Integer did, - @Param("onlyMineAndAdmin") Boolean onlyMineAndAdmin, - @Param("myAndAdminUidList") List myAndAdminUidList); -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/ContestAnnouncementMapper.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/ContestAnnouncementMapper.java deleted file mode 100644 index 902a9af..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/ContestAnnouncementMapper.java +++ /dev/null @@ -1,11 +0,0 @@ -package top.hcode.hoj.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import org.apache.ibatis.annotations.Mapper; -import org.springframework.stereotype.Repository; -import top.hcode.hoj.pojo.entity.contest.ContestAnnouncement; - -@Mapper -@Repository -public interface ContestAnnouncementMapper extends BaseMapper { -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/ContestExplanationMapper.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/ContestExplanationMapper.java deleted file mode 100644 index 44d119c..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/ContestExplanationMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package top.hcode.hoj.mapper; - -import top.hcode.hoj.pojo.entity.contest.ContestExplanation; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; - -/** - *

- * Mapper 接口 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -public interface ContestExplanationMapper extends BaseMapper { - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/ContestMapper.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/ContestMapper.java deleted file mode 100644 index a90f913..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/ContestMapper.java +++ /dev/null @@ -1,33 +0,0 @@ -package top.hcode.hoj.mapper; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; -import org.springframework.stereotype.Repository; -import top.hcode.hoj.pojo.vo.ContestRegisterCountVo; -import top.hcode.hoj.pojo.vo.ContestVo; -import top.hcode.hoj.pojo.entity.contest.Contest; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; - -import java.util.List; - -/** - *

- * Mapper 接口 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -@Mapper -@Repository -public interface ContestMapper extends BaseMapper { - List getContestList(IPage page,@Param("type") Integer type, - @Param("status")Integer status,@Param("keyword")String keyword); - - List getContestRegisterCount(@Param("cidList")List cidList); - - ContestVo getContestInfoById(@Param("cid")long cid); - - List getWithinNext14DaysContests(); -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/ContestPrintMapper.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/ContestPrintMapper.java deleted file mode 100644 index 9700d96..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/ContestPrintMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package top.hcode.hoj.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import org.apache.ibatis.annotations.Mapper; -import org.springframework.stereotype.Repository; -import top.hcode.hoj.pojo.entity.contest.ContestPrint; - -/** - * @Author: Himit_ZH - * @Date: 2021/9/19 21:04 - * @Description: - */ -@Mapper -@Repository -public interface ContestPrintMapper extends BaseMapper { -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/ContestProblemMapper.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/ContestProblemMapper.java deleted file mode 100644 index 55aa99f..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/ContestProblemMapper.java +++ /dev/null @@ -1,27 +0,0 @@ -package top.hcode.hoj.mapper; - -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; -import org.springframework.stereotype.Repository; -import top.hcode.hoj.pojo.entity.contest.ContestProblem; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import top.hcode.hoj.pojo.vo.ContestProblemVo; - -import java.util.Date; -import java.util.List; - -/** - *

- * Mapper 接口 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -@Mapper -@Repository -public interface ContestProblemMapper extends BaseMapper { - List getContestProblemList(@Param("cid") Long cid, @Param("startTime") Date startTime, - @Param("endTime") Date endTime, @Param("sealTime") Date sealTime, - @Param("isAdmin") Boolean isAdmin, @Param("adminList") List adminList); -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/ContestRecordMapper.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/ContestRecordMapper.java deleted file mode 100644 index 3721fd2..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/ContestRecordMapper.java +++ /dev/null @@ -1,43 +0,0 @@ -package top.hcode.hoj.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; -import org.springframework.stereotype.Repository; -import top.hcode.hoj.pojo.entity.contest.ContestRecord; -import top.hcode.hoj.pojo.vo.ContestRecordVo; - -import java.util.List; - -/** - *

- * Mapper 接口 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -@Mapper -@Repository -public interface ContestRecordMapper extends BaseMapper { - List getACInfo(@Param("status") Integer status, @Param("cid") Long cid); - - List getOIContestRecordByRecentSubmission(@Param("cid") Long cid, - @Param("externalCidList") List externalCidList, - @Param("contestCreatorUid") String contestCreatorUid, - @Param("isOpenSealRank") Boolean isOpenSealRank, - @Param("sealTime") Long sealTime, - @Param("endTime") Long endTime); - - List getOIContestRecordByHighestSubmission(@Param("cid") Long cid, - @Param("externalCidList") List externalCidList, - @Param("contestCreatorUid") String contestCreatorUid, - @Param("isOpenSealRank") Boolean isOpenSealRank, - @Param("sealTime") Long sealTime, - @Param("endTime") Long endTime); - - List getACMContestRecord(@Param("contestCreatorUid") String contestCreatorUid, - @Param("cid") Long cid, - @Param("externalCidList") List externalCidList, - @Param("time") Long time); -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/ContestRegisterMapper.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/ContestRegisterMapper.java deleted file mode 100644 index d07c8bc..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/ContestRegisterMapper.java +++ /dev/null @@ -1,20 +0,0 @@ -package top.hcode.hoj.mapper; - -import org.apache.ibatis.annotations.Mapper; -import org.springframework.stereotype.Repository; -import top.hcode.hoj.pojo.entity.contest.ContestRegister; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; - -/** - *

- * Mapper 接口 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -@Mapper -@Repository -public interface ContestRegisterMapper extends BaseMapper { - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/ContestScoreMapper.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/ContestScoreMapper.java deleted file mode 100644 index b20735e..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/ContestScoreMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package top.hcode.hoj.mapper; - -import top.hcode.hoj.pojo.entity.contest.ContestScore; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; - -/** - *

- * Mapper 接口 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -public interface ContestScoreMapper extends BaseMapper { - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/DiscussionLikeMapper.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/DiscussionLikeMapper.java deleted file mode 100644 index 3237d75..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/DiscussionLikeMapper.java +++ /dev/null @@ -1,12 +0,0 @@ -package top.hcode.hoj.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import org.apache.ibatis.annotations.Mapper; -import org.springframework.stereotype.Repository; -import top.hcode.hoj.pojo.entity.discussion.DiscussionLike; - - -@Mapper -@Repository -public interface DiscussionLikeMapper extends BaseMapper { -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/DiscussionMapper.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/DiscussionMapper.java deleted file mode 100644 index 28ffb3e..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/DiscussionMapper.java +++ /dev/null @@ -1,15 +0,0 @@ -package top.hcode.hoj.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; -import org.springframework.stereotype.Repository; -import top.hcode.hoj.pojo.entity.discussion.Discussion; -import top.hcode.hoj.pojo.vo.DiscussionVo; - - -@Mapper -@Repository -public interface DiscussionMapper extends BaseMapper { - DiscussionVo getDiscussion(@Param("did") Integer did, @Param("uid") String uid); -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/DiscussionReportMapper.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/DiscussionReportMapper.java deleted file mode 100644 index 51492b2..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/DiscussionReportMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package top.hcode.hoj.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import org.apache.ibatis.annotations.Mapper; -import org.springframework.stereotype.Repository; -import top.hcode.hoj.pojo.entity.discussion.DiscussionReport; -import top.hcode.hoj.pojo.vo.DiscussionReportVo; - -@Mapper -@Repository -public interface DiscussionReportMapper extends BaseMapper { - - IPage getDiscussionReportList(Page page); -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/FileMapper.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/FileMapper.java deleted file mode 100644 index fffe4df..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/FileMapper.java +++ /dev/null @@ -1,31 +0,0 @@ -package top.hcode.hoj.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; -import org.apache.ibatis.annotations.Select; -import org.apache.ibatis.annotations.Update; -import org.springframework.stereotype.Repository; -import top.hcode.hoj.pojo.entity.common.File; - -import java.util.List; - -@Mapper -@Repository -public interface FileMapper extends BaseMapper { - - @Update("UPDATE `file` SET `delete` = 1 WHERE `uid` = #{uid} AND `type` = #{type}") - int updateFileToDeleteByUidAndType(@Param("uid") String uid, @Param("type") String type); - - @Update("UPDATE `file` SET `delete` = 1 WHERE `gid` = #{gid} AND `type` = #{type}") - int updateFileToDeleteByGidAndType(@Param("gid") Long gid, @Param("type") String type); - - @Select("select * from file where (type = 'avatar' AND `delete` = true)") - List queryDeleteAvatarList(); - - - @Select("select * from file where (type = 'carousel')") - List queryCarouselFileList(); - - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/GroupAnnouncementMapper.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/GroupAnnouncementMapper.java deleted file mode 100644 index beecd73..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/GroupAnnouncementMapper.java +++ /dev/null @@ -1,26 +0,0 @@ -package top.hcode.hoj.mapper; - -import top.hcode.hoj.pojo.entity.common.Announcement; -import top.hcode.hoj.pojo.vo.AnnouncementVo; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; -import org.springframework.stereotype.Repository; - -import java.util.List; - -/** - * @Author: LengYun - * @Date: 2022/3/11 13:36 - * @Description: - */ -@Mapper -@Repository -public interface GroupAnnouncementMapper extends BaseMapper { - - List getAnnouncementList(IPage iPage, @Param("gid") Long gid); - - List getAdminAnnouncementList(IPage iPage, @Param("gid") Long gid); - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/GroupContestMapper.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/GroupContestMapper.java deleted file mode 100644 index a18b8e4..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/GroupContestMapper.java +++ /dev/null @@ -1,26 +0,0 @@ -package top.hcode.hoj.mapper; - -import top.hcode.hoj.pojo.entity.contest.Contest; -import top.hcode.hoj.pojo.vo.ContestVo; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; -import org.springframework.stereotype.Repository; - -import java.util.List; - -/** - * @Author: LengYun - * @Date: 2022/3/11 13:36 - * @Description: - */ -@Mapper -@Repository -public interface GroupContestMapper extends BaseMapper { - - List getContestList(IPage iPage, @Param("gid") Long gid); - - List getAdminContestList(IPage iPage, @Param("gid") Long gid); - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/GroupDiscussionMapper.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/GroupDiscussionMapper.java deleted file mode 100644 index 4f823ca..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/GroupDiscussionMapper.java +++ /dev/null @@ -1,17 +0,0 @@ -package top.hcode.hoj.mapper; - -import top.hcode.hoj.pojo.entity.discussion.Discussion; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import org.apache.ibatis.annotations.Mapper; -import org.springframework.stereotype.Repository; - -/** - * @Author: LengYun - * @Date: 2022/3/11 13:36 - * @Description: - */ -@Mapper -@Repository -public interface GroupDiscussionMapper extends BaseMapper { - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/GroupMapper.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/GroupMapper.java deleted file mode 100644 index 1386755..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/GroupMapper.java +++ /dev/null @@ -1,27 +0,0 @@ -package top.hcode.hoj.mapper; - -import top.hcode.hoj.pojo.entity.group.Group; -import top.hcode.hoj.pojo.vo.GroupVo; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; -import org.springframework.stereotype.Repository; - -import java.util.List; - -/** - * @Author: LengYun - * @Date: 2022/3/11 13:36 - * @Description: - */ -@Mapper -@Repository -public interface GroupMapper extends BaseMapper { - List getGroupList(IPage iPage, - @Param("keyword") String keyword, - @Param("auth") Integer auth, - @Param("uid") String uid, - @Param("onlyMine") Boolean onlyMine, - @Param("isRoot") Boolean isRoot); -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/GroupMemberMapper.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/GroupMemberMapper.java deleted file mode 100644 index b3816dd..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/GroupMemberMapper.java +++ /dev/null @@ -1,23 +0,0 @@ -package top.hcode.hoj.mapper; - -import top.hcode.hoj.pojo.entity.group.GroupMember; -import top.hcode.hoj.pojo.vo.GroupMemberVo; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; -import org.springframework.stereotype.Repository; - -import java.util.List; - -/** - * @Author: LengYun - * @Date: 2022/3/11 13:36 - * @Description: - */ -@Mapper -@Repository -public interface GroupMemberMapper extends BaseMapper { - List getMemberList(IPage iPage, @Param("keyword") String keyword, @Param("auth") Integer auth, @Param("gid") Long gid); - List getApplyList(IPage iPage, @Param("keyword") String keyword, @Param("auth") Integer auth, @Param("gid") Long gid); -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/GroupProblemMapper.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/GroupProblemMapper.java deleted file mode 100644 index 54d1167..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/GroupProblemMapper.java +++ /dev/null @@ -1,25 +0,0 @@ -package top.hcode.hoj.mapper; - -import top.hcode.hoj.pojo.entity.problem.Problem; -import top.hcode.hoj.pojo.vo.ProblemVo; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; -import org.springframework.stereotype.Repository; - -import java.util.List; - -/** - * @Author: LengYun - * @Date: 2022/3/11 13:36 - * @Description: - */ -@Mapper -@Repository -public interface GroupProblemMapper extends BaseMapper { - - List getProblemList(IPage iPage, @Param("gid") Long gid); - - List getAdminProblemList(IPage iPage, @Param("gid") Long gid); -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/GroupTrainingMapper.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/GroupTrainingMapper.java deleted file mode 100644 index 69f6727..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/GroupTrainingMapper.java +++ /dev/null @@ -1,26 +0,0 @@ -package top.hcode.hoj.mapper; - -import top.hcode.hoj.pojo.entity.training.Training; -import top.hcode.hoj.pojo.vo.TrainingVo; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; -import org.springframework.stereotype.Repository; - -import java.util.List; - -/** - * @Author: LengYun - * @Date: 2022/3/11 13:36 - * @Description: - */ -@Mapper -@Repository -public interface GroupTrainingMapper extends BaseMapper { - - List getTrainingList(IPage iPage, @Param("gid") Long gid); - - List getAdminTrainingList(IPage iPage, @Param("gid") Long gid); - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/JudgeCaseMapper.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/JudgeCaseMapper.java deleted file mode 100644 index 6c73888..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/JudgeCaseMapper.java +++ /dev/null @@ -1,20 +0,0 @@ -package top.hcode.hoj.mapper; - -import org.apache.ibatis.annotations.Mapper; -import org.springframework.stereotype.Repository; -import top.hcode.hoj.pojo.entity.judge.JudgeCase; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; - -/** - *

- * Mapper 接口 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -@Mapper -@Repository -public interface JudgeCaseMapper extends BaseMapper { - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/JudgeMapper.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/JudgeMapper.java deleted file mode 100644 index 4c7e762..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/JudgeMapper.java +++ /dev/null @@ -1,63 +0,0 @@ -package top.hcode.hoj.mapper; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; -import org.springframework.stereotype.Repository; -import top.hcode.hoj.pojo.entity.judge.Judge; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import top.hcode.hoj.pojo.vo.JudgeVo; -import top.hcode.hoj.pojo.vo.ProblemCountVo; - -import java.util.Date; -import java.util.List; - - -/** - *

- * Mapper 接口 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -@Mapper -@Repository -public interface JudgeMapper extends BaseMapper { - IPage getCommonJudgeList(Page page, - @Param("searchPid") String searchPid, - @Param("status") Integer status, - @Param("username") String username, - @Param("uid") String uid, - @Param("completeProblemID") Boolean completeProblemID, - @Param("gid") Long gid); - - IPage getContestJudgeList(Page page, - @Param("displayId") String displayId, - @Param("cid") Long cid, - @Param("status") Integer status, - @Param("username") String username, - @Param("uid") String uid, - @Param("beforeContestSubmit") Boolean beforeContestSubmit, - @Param("rule") String rule, - @Param("startTime") Date startTime, - @Param("sealRankTime") Date sealRankTime, - @Param("sealTimeUid") String sealTimeUid, - @Param("completeProblemID") Boolean completeProblemID); - - int getTodayJudgeNum(); - - ProblemCountVo getContestProblemCount(@Param("pid") Long pid, - @Param("cpid") Long cpid, - @Param("cid") Long cid, - @Param("startTime") Date startTime, - @Param("sealRankTime") Date sealRankTime, - @Param("adminList") List adminList); - - ProblemCountVo getProblemCount(@Param("pid") Long pid, @Param("gid") Long gid); - - List getProblemListCount(@Param("pidList") List pidList); - - List getLastYearUserJudgeList(@Param("uid")String uid, @Param("username")String username); -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/JudgeServerMapper.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/JudgeServerMapper.java deleted file mode 100644 index 4e5fb7d..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/JudgeServerMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package top.hcode.hoj.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import org.apache.ibatis.annotations.Mapper; -import org.springframework.stereotype.Repository; -import top.hcode.hoj.pojo.entity.judge.JudgeServer; - - -@Mapper -@Repository -public interface JudgeServerMapper extends BaseMapper { - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/LanguageMapper.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/LanguageMapper.java deleted file mode 100644 index 3703001..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/LanguageMapper.java +++ /dev/null @@ -1,11 +0,0 @@ -package top.hcode.hoj.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import org.apache.ibatis.annotations.Mapper; -import org.springframework.stereotype.Repository; -import top.hcode.hoj.pojo.entity.problem.Language; - -@Mapper -@Repository -public interface LanguageMapper extends BaseMapper { -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/MappingTrainingCategoryMapper.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/MappingTrainingCategoryMapper.java deleted file mode 100644 index dcfa7d6..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/MappingTrainingCategoryMapper.java +++ /dev/null @@ -1,11 +0,0 @@ -package top.hcode.hoj.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import org.apache.ibatis.annotations.Mapper; -import org.springframework.stereotype.Repository; -import top.hcode.hoj.pojo.entity.training.MappingTrainingCategory; - -@Mapper -@Repository -public interface MappingTrainingCategoryMapper extends BaseMapper { -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/MsgRemindMapper.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/MsgRemindMapper.java deleted file mode 100644 index 41886cd..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/MsgRemindMapper.java +++ /dev/null @@ -1,20 +0,0 @@ -package top.hcode.hoj.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; -import org.springframework.stereotype.Repository; -import top.hcode.hoj.pojo.entity.msg.MsgRemind; -import top.hcode.hoj.pojo.vo.UserMsgVo; -import top.hcode.hoj.pojo.vo.UserUnreadMsgCountVo; - -@Mapper -@Repository -public interface MsgRemindMapper extends BaseMapper { - UserUnreadMsgCountVo getUserUnreadMsgCount(@Param("uid") String uid); - - IPage getUserMsg(Page page, @Param("uid") String uid, - @Param("action") String action); -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/ProblemCaseMapper.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/ProblemCaseMapper.java deleted file mode 100644 index 1cb38b6..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/ProblemCaseMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package top.hcode.hoj.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import org.apache.ibatis.annotations.Mapper; -import org.springframework.stereotype.Repository; -import top.hcode.hoj.pojo.entity.problem.ProblemCase; - -/** - * @Author: Himit_ZH - * @Date: 2020/12/14 19:57 - * @Description: - */ -@Mapper -@Repository -public interface ProblemCaseMapper extends BaseMapper { -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/ProblemCountMapper.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/ProblemCountMapper.java deleted file mode 100644 index b3c016c..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/ProblemCountMapper.java +++ /dev/null @@ -1,21 +0,0 @@ -package top.hcode.hoj.mapper; - -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; -import org.springframework.stereotype.Repository; -import top.hcode.hoj.pojo.entity.problem.ProblemCount; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; - -/** - *

- * Mapper 接口 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -@Mapper -@Repository -public interface ProblemCountMapper extends BaseMapper { - ProblemCount getContestProblemCount(@Param("pid") Long pid, @Param("cpid") Long cpid, @Param("cid") Long cid); -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/ProblemLanguageMapper.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/ProblemLanguageMapper.java deleted file mode 100644 index 705d6f2..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/ProblemLanguageMapper.java +++ /dev/null @@ -1,11 +0,0 @@ -package top.hcode.hoj.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import org.apache.ibatis.annotations.Mapper; -import org.springframework.stereotype.Repository; -import top.hcode.hoj.pojo.entity.problem.ProblemLanguage; - -@Mapper -@Repository -public interface ProblemLanguageMapper extends BaseMapper { -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/ProblemMapper.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/ProblemMapper.java deleted file mode 100644 index bf43e06..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/ProblemMapper.java +++ /dev/null @@ -1,31 +0,0 @@ -package top.hcode.hoj.mapper; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; -import org.springframework.stereotype.Repository; -import top.hcode.hoj.pojo.vo.ProblemVo; -import top.hcode.hoj.pojo.entity.problem.Problem; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; - -import java.util.List; - -/** - *

- * Mapper 接口 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -@Mapper -@Repository -public interface ProblemMapper extends BaseMapper { - List getProblemList(IPage page, - @Param("pid") Long pid, - @Param("keyword") String keyword, - @Param("difficulty") Integer difficulty, - @Param("tid") List tid, - @Param("tagListSize") Integer tagListSize, - @Param("oj") String oj); -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/ProblemTagMapper.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/ProblemTagMapper.java deleted file mode 100644 index a517173..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/ProblemTagMapper.java +++ /dev/null @@ -1,11 +0,0 @@ -package top.hcode.hoj.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import org.apache.ibatis.annotations.Mapper; -import org.springframework.stereotype.Repository; -import top.hcode.hoj.pojo.entity.problem.ProblemTag; - -@Mapper -@Repository -public interface ProblemTagMapper extends BaseMapper { -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/RemoteJudgeAccountMapper.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/RemoteJudgeAccountMapper.java deleted file mode 100644 index a34c212..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/RemoteJudgeAccountMapper.java +++ /dev/null @@ -1,24 +0,0 @@ -package top.hcode.hoj.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; -import org.apache.ibatis.annotations.Select; -import org.apache.ibatis.annotations.Update; -import org.springframework.stereotype.Repository; -import top.hcode.hoj.pojo.entity.judge.RemoteJudgeAccount; - -import java.util.List; - -@Mapper -@Repository -public interface RemoteJudgeAccountMapper extends BaseMapper { - - - @Select("select * from `remote_judge_account` where `oj` = #{oj} and `status` = 1 for update") - public List getAvailableAccount(@Param("oj") String oj); - - - @Update("update `remote_judge_account` set `status` = 0 where `id` = #{id} and `status` = 1") - public int updateAccountStatusById(@Param("id") Integer id); -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/ReplyMapper.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/ReplyMapper.java deleted file mode 100644 index 8d1809d..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/ReplyMapper.java +++ /dev/null @@ -1,24 +0,0 @@ -package top.hcode.hoj.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; -import org.springframework.stereotype.Repository; -import top.hcode.hoj.pojo.entity.discussion.Reply; -import top.hcode.hoj.pojo.vo.ReplyVo; - -import java.util.List; - -/** - * @Author: Himit_ZH - * @Date: 2021/5/5 22:07 - * @Description: - */ - -@Mapper -@Repository -public interface ReplyMapper extends BaseMapper { - - public List getAllReplyByCommentId(@Param("commentId") Integer commentId, - @Param("myAndAdminUidList") List myAndAdminUidList); -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/RoleAuthMapper.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/RoleAuthMapper.java deleted file mode 100644 index f8f39f8..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/RoleAuthMapper.java +++ /dev/null @@ -1,23 +0,0 @@ -package top.hcode.hoj.mapper; - -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; -import org.springframework.stereotype.Repository; -import top.hcode.hoj.pojo.entity.user.RoleAuth; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import top.hcode.hoj.pojo.vo.RoleAuthsVo; - - -/** - *

- * Mapper 接口 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -@Mapper -@Repository -public interface RoleAuthMapper extends BaseMapper { - RoleAuthsVo getRoleAuths(@Param("rid") long rid); -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/RoleMapper.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/RoleMapper.java deleted file mode 100644 index 0ec7707..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/RoleMapper.java +++ /dev/null @@ -1,20 +0,0 @@ -package top.hcode.hoj.mapper; - -import org.apache.ibatis.annotations.Mapper; -import org.springframework.stereotype.Repository; -import top.hcode.hoj.pojo.entity.user.Role; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; - -/** - *

- * Mapper 接口 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -@Mapper -@Repository -public interface RoleMapper extends BaseMapper { - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/SessionMapper.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/SessionMapper.java deleted file mode 100644 index 1e24a74..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/SessionMapper.java +++ /dev/null @@ -1,12 +0,0 @@ -package top.hcode.hoj.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import org.apache.ibatis.annotations.Mapper; -import org.springframework.stereotype.Repository; -import top.hcode.hoj.pojo.entity.user.Session; - -@Mapper -@Repository -public interface SessionMapper extends BaseMapper { - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/TagClassificationMapper.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/TagClassificationMapper.java deleted file mode 100644 index ddb9e3c..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/TagClassificationMapper.java +++ /dev/null @@ -1,15 +0,0 @@ -package top.hcode.hoj.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import org.apache.ibatis.annotations.Mapper; -import org.springframework.stereotype.Repository; -import top.hcode.hoj.pojo.entity.problem.TagClassification; - -/** - * @Author Himit_ZH - * @Date 2022/8/3 - */ -@Mapper -@Repository -public interface TagClassificationMapper extends BaseMapper { -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/TagMapper.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/TagMapper.java deleted file mode 100644 index e0ac339..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/TagMapper.java +++ /dev/null @@ -1,20 +0,0 @@ -package top.hcode.hoj.mapper; - -import org.apache.ibatis.annotations.Mapper; -import org.springframework.stereotype.Repository; -import top.hcode.hoj.pojo.entity.problem.Tag; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; - -/** - *

- * Mapper 接口 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -@Mapper -@Repository -public interface TagMapper extends BaseMapper { - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/TrainingCategoryMapper.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/TrainingCategoryMapper.java deleted file mode 100644 index 0fef289..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/TrainingCategoryMapper.java +++ /dev/null @@ -1,14 +0,0 @@ -package top.hcode.hoj.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; -import org.springframework.stereotype.Repository; -import top.hcode.hoj.pojo.entity.training.TrainingCategory; - -@Mapper -@Repository -public interface TrainingCategoryMapper extends BaseMapper { - - public TrainingCategory getTrainingCategoryByTrainingId(@Param("tid") Long tid); -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/TrainingMapper.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/TrainingMapper.java deleted file mode 100644 index 0764674..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/TrainingMapper.java +++ /dev/null @@ -1,24 +0,0 @@ -package top.hcode.hoj.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; -import org.springframework.stereotype.Repository; -import top.hcode.hoj.pojo.entity.training.Training; -import top.hcode.hoj.pojo.vo.TrainingVo; - -import java.util.List; - -/** - * @Author: Himit_ZH - * @Date: 2021/11/19 22:03 - * @Description: - */ -@Mapper -@Repository -public interface TrainingMapper extends BaseMapper { - - List getTrainingList(@Param("categoryId") Long categoryId, - @Param("auth") String auth, - @Param("keyword") String keyword); -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/TrainingProblemMapper.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/TrainingProblemMapper.java deleted file mode 100644 index 0baf67c..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/TrainingProblemMapper.java +++ /dev/null @@ -1,20 +0,0 @@ -package top.hcode.hoj.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; -import org.springframework.stereotype.Repository; -import top.hcode.hoj.pojo.entity.training.TrainingProblem; -import top.hcode.hoj.pojo.vo.ProblemVo; - -import java.util.List; - -@Mapper -@Repository -public interface TrainingProblemMapper extends BaseMapper { - - public List getTrainingProblemCount(@Param("tid") Long tid); - - public List getTrainingProblemList(@Param("tid") Long tid); - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/TrainingRecordMapper.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/TrainingRecordMapper.java deleted file mode 100644 index ea05830..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/TrainingRecordMapper.java +++ /dev/null @@ -1,23 +0,0 @@ -package top.hcode.hoj.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; -import org.springframework.stereotype.Repository; -import top.hcode.hoj.pojo.entity.training.TrainingRecord; -import top.hcode.hoj.pojo.vo.TrainingRecordVo; - -import java.util.List; - -/** - * @Author: Himit_ZH - * @Date: 2021/11/21 14:27 - * @Description: - */ - -@Mapper -@Repository -public interface TrainingRecordMapper extends BaseMapper { - - public List getTrainingRecord(@Param("tid") Long tid); -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/TrainingRegisterMapper.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/TrainingRegisterMapper.java deleted file mode 100644 index 6e90a33..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/TrainingRegisterMapper.java +++ /dev/null @@ -1,12 +0,0 @@ -package top.hcode.hoj.mapper; - - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import org.apache.ibatis.annotations.Mapper; -import org.springframework.stereotype.Repository; -import top.hcode.hoj.pojo.entity.training.TrainingRegister; - -@Mapper -@Repository -public interface TrainingRegisterMapper extends BaseMapper { -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/UserAcproblemMapper.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/UserAcproblemMapper.java deleted file mode 100644 index c60fac6..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/UserAcproblemMapper.java +++ /dev/null @@ -1,21 +0,0 @@ -package top.hcode.hoj.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import org.apache.ibatis.annotations.Mapper; -import org.springframework.stereotype.Repository; -import top.hcode.hoj.pojo.entity.user.UserAcproblem; - - -/** - *

- * Mapper 接口 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -@Mapper -@Repository -public interface UserAcproblemMapper extends BaseMapper { - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/UserInfoMapper.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/UserInfoMapper.java deleted file mode 100644 index e0aad34..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/UserInfoMapper.java +++ /dev/null @@ -1,28 +0,0 @@ -package top.hcode.hoj.mapper; - -import org.apache.ibatis.annotations.Mapper; -import org.springframework.stereotype.Repository; -import top.hcode.hoj.pojo.dto.RegisterDto; -import top.hcode.hoj.pojo.entity.user.UserInfo; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; - -import java.util.List; - - -/** - *

- * Mapper 接口 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -@Mapper -@Repository -public interface UserInfoMapper extends BaseMapper { - int addUser(RegisterDto registerDto); - - List getSuperAdminUidList(); - - List getProblemAdminUidList(); -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/UserRecordMapper.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/UserRecordMapper.java deleted file mode 100644 index dea5edd..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/UserRecordMapper.java +++ /dev/null @@ -1,40 +0,0 @@ -package top.hcode.hoj.mapper; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; -import org.springframework.stereotype.Repository; -import top.hcode.hoj.pojo.vo.ACMRankVo; -import top.hcode.hoj.pojo.entity.user.UserRecord; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import top.hcode.hoj.pojo.vo.OIRankVo; -import top.hcode.hoj.pojo.vo.UserHomeVo; - -import java.util.List; - -/** - *

- * Mapper 接口 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -@Mapper -@Repository -public interface UserRecordMapper extends BaseMapper { - IPage getACMRankList(Page page, @Param("uidList") List uidList); - - List getRecent7ACRank(); - - IPage getOIRankList(Page page, @Param("uidList") List uidList); - - UserHomeVo getUserHomeInfo(@Param("uid") String uid, @Param("username") String username); - - IPage getGroupRankList(Page page, - @Param("gid") Long gid, - @Param("uidList") List uidList, - @Param("rankType") String rankType); - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/UserRoleMapper.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/UserRoleMapper.java deleted file mode 100644 index 0365cc0..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/UserRoleMapper.java +++ /dev/null @@ -1,38 +0,0 @@ -package top.hcode.hoj.mapper; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; -import org.springframework.stereotype.Repository; -import top.hcode.hoj.pojo.entity.user.Role; -import top.hcode.hoj.pojo.entity.user.UserRole; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import top.hcode.hoj.pojo.vo.UserRolesVo; - -import java.util.List; - -/** - *

- * Mapper 接口 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -@Mapper -@Repository -public interface UserRoleMapper extends BaseMapper { - - UserRolesVo getUserRoles(@Param("uid") String uid, @Param("username") String username); - - List getRolesByUid(@Param("uid") String uid); - - IPage getUserList(Page page, @Param("limit") int limit, - @Param("currentPage") int currentPage, - @Param("keyword") String keyword); - - IPage getAdminUserList(Page page, @Param("limit") int limit, - @Param("currentPage") int currentPage, - @Param("keyword") String keyword); -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/UserSysNoticeMapper.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/UserSysNoticeMapper.java deleted file mode 100644 index 507a0e6..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/UserSysNoticeMapper.java +++ /dev/null @@ -1,18 +0,0 @@ -package top.hcode.hoj.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; -import org.springframework.stereotype.Repository; -import top.hcode.hoj.pojo.entity.msg.UserSysNotice; -import top.hcode.hoj.pojo.vo.SysMsgVo; - - -@Mapper -@Repository -public interface UserSysNoticeMapper extends BaseMapper { - - IPage getSysOrMineNotice(Page page, @Param("uid") String uid, @Param("type") String type); -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/AdminSysNoticeMapper.xml b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/AdminSysNoticeMapper.xml deleted file mode 100644 index 6baaf07..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/AdminSysNoticeMapper.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/AnnouncementMapper.xml b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/AnnouncementMapper.xml deleted file mode 100644 index bdb1c0d..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/AnnouncementMapper.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/CommentMapper.xml b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/CommentMapper.xml deleted file mode 100644 index 7e795b4..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/CommentMapper.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/ContestExplanationMapper.xml b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/ContestExplanationMapper.xml deleted file mode 100644 index 26935a1..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/ContestExplanationMapper.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/ContestMapper.xml b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/ContestMapper.xml deleted file mode 100644 index 069f6b2..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/ContestMapper.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/ContestProblemMapper.xml b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/ContestProblemMapper.xml deleted file mode 100644 index d718486..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/ContestProblemMapper.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/ContestRecordMapper.xml b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/ContestRecordMapper.xml deleted file mode 100644 index 6173168..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/ContestRecordMapper.xml +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - - - - - - - - diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/ContestRegisterMapper.xml b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/ContestRegisterMapper.xml deleted file mode 100644 index 8cd7da7..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/ContestRegisterMapper.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/ContestScoreMapper.xml b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/ContestScoreMapper.xml deleted file mode 100644 index 14ca87b..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/ContestScoreMapper.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/DiscussionMapper.xml b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/DiscussionMapper.xml deleted file mode 100644 index eab557a..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/DiscussionMapper.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/DiscussionReportMapper.xml b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/DiscussionReportMapper.xml deleted file mode 100644 index 349cfa4..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/DiscussionReportMapper.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/GroupAnnouncementMapper.xml b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/GroupAnnouncementMapper.xml deleted file mode 100644 index 019704b..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/GroupAnnouncementMapper.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/GroupContestMapper.xml b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/GroupContestMapper.xml deleted file mode 100644 index ccc10a5..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/GroupContestMapper.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/GroupDiscussionMapper.xml b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/GroupDiscussionMapper.xml deleted file mode 100644 index bf5a5fb..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/GroupDiscussionMapper.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/GroupMapper.xml b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/GroupMapper.xml deleted file mode 100644 index 27e4798..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/GroupMapper.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/GroupMemberMapper.xml b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/GroupMemberMapper.xml deleted file mode 100644 index c5177b6..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/GroupMemberMapper.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/GroupProblemMapper.xml b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/GroupProblemMapper.xml deleted file mode 100644 index 70c2180..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/GroupProblemMapper.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/GroupTrainingMapper.xml b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/GroupTrainingMapper.xml deleted file mode 100644 index eeb40ce..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/GroupTrainingMapper.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/JudgeMapper.xml b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/JudgeMapper.xml deleted file mode 100644 index c73ba45..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/JudgeMapper.xml +++ /dev/null @@ -1,180 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/MsgRemindMapper.xml b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/MsgRemindMapper.xml deleted file mode 100644 index 325ba13..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/MsgRemindMapper.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/ProblemCountMapper.xml b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/ProblemCountMapper.xml deleted file mode 100644 index c4df5c2..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/ProblemCountMapper.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/ProblemMapper.xml b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/ProblemMapper.xml deleted file mode 100644 index 2caa552..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/ProblemMapper.xml +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/ReplyMapper.xml b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/ReplyMapper.xml deleted file mode 100644 index 1025eae..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/ReplyMapper.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/RoleAuthMapper.xml b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/RoleAuthMapper.xml deleted file mode 100644 index bbe78d2..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/RoleAuthMapper.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/RoleMapper.xml b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/RoleMapper.xml deleted file mode 100644 index 0715277..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/RoleMapper.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/SessionMapper.xml b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/SessionMapper.xml deleted file mode 100644 index 4e0a953..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/SessionMapper.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/TagMapper.xml b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/TagMapper.xml deleted file mode 100644 index 4af7314..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/TagMapper.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/TrainingCategoryMapper.xml b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/TrainingCategoryMapper.xml deleted file mode 100644 index 575ed0e..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/TrainingCategoryMapper.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/TrainingMapper.xml b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/TrainingMapper.xml deleted file mode 100644 index 92e9d69..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/TrainingMapper.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/TrainingProblemMapper.xml b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/TrainingProblemMapper.xml deleted file mode 100644 index d123d9f..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/TrainingProblemMapper.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/TrainingRecordMapper.xml b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/TrainingRecordMapper.xml deleted file mode 100644 index ba4150c..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/TrainingRecordMapper.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/UserAcproblemMapper.xml b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/UserAcproblemMapper.xml deleted file mode 100644 index f453162..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/UserAcproblemMapper.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/UserInfoMapper.xml b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/UserInfoMapper.xml deleted file mode 100644 index 37bc99c..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/UserInfoMapper.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - insert into user_info(uuid,username,password,email) values ( - #{uuid}, #{username},#{password},#{email} - ) - - - - - diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/UserRecordMapper.xml b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/UserRecordMapper.xml deleted file mode 100644 index d9eaae1..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/UserRecordMapper.xml +++ /dev/null @@ -1,151 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/UserRoleMapper.xml b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/UserRoleMapper.xml deleted file mode 100644 index a021c59..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/UserRoleMapper.xml +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/UserSysNoticeMapper.xml b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/UserSysNoticeMapper.xml deleted file mode 100644 index 58fcf3c..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/mapper/xml/UserSysNoticeMapper.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/bo/EmailRuleBo.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/bo/EmailRuleBo.java deleted file mode 100644 index 3936fea..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/bo/EmailRuleBo.java +++ /dev/null @@ -1,60 +0,0 @@ -package top.hcode.hoj.pojo.bo; - -import lombok.Data; -import org.springframework.beans.factory.config.YamlPropertiesFactoryBean; -import org.springframework.boot.context.properties.ConfigurationProperties; -import org.springframework.context.annotation.PropertySource; -import org.springframework.core.env.PropertiesPropertySource; -import org.springframework.core.io.support.DefaultPropertySourceFactory; -import org.springframework.core.io.support.EncodedResource; -import org.springframework.lang.Nullable; -import org.springframework.stereotype.Component; - -import java.io.IOException; -import java.util.List; -import java.util.Optional; -import java.util.Properties; - -/** - * @Author: Himit_ZH - * @Date: 2021/10/17 12:10 - * @Description: 邮箱规则类,读取email-rule.yml文件 - */ - -@Component -@PropertySource(value = "classpath:email-rule.yml",factory = CompositePropertySourceFactory.class) -@ConfigurationProperties(prefix = "hoj") -@Data -public class EmailRuleBo { - - private List blackList; -} - -class CompositePropertySourceFactory extends DefaultPropertySourceFactory { - @Override - public org.springframework.core.env.PropertySource createPropertySource(@Nullable String name, EncodedResource resource) throws IOException { - String sourceName = Optional.ofNullable(name).orElse(resource.getResource().getFilename()); - if (!resource.getResource().exists()) { - // return an empty Properties - return new PropertiesPropertySource(sourceName, new Properties()); - } else if (sourceName.endsWith(".yml") || sourceName.endsWith(".yaml")) { - Properties propertiesFromYaml = loadYaml(resource); - return new PropertiesPropertySource(sourceName, propertiesFromYaml); - } else { - return super.createPropertySource(name, resource); - } - } - /** - * load yaml file to properties - * - * @param resource - * @return - * @throws IOException - */ - private Properties loadYaml(EncodedResource resource) throws IOException { - YamlPropertiesFactoryBean factory = new YamlPropertiesFactoryBean(); - factory.setResources(resource.getResource()); - factory.afterPropertiesSet(); - return factory.getObject(); - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/AdminEditUserDto.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/AdminEditUserDto.java deleted file mode 100644 index 1883d63..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/AdminEditUserDto.java +++ /dev/null @@ -1,36 +0,0 @@ -package top.hcode.hoj.pojo.dto; - -import lombok.Data; - -import javax.validation.constraints.NotBlank; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/9 21:09 - * @Description: - */ -@Data -public class AdminEditUserDto { - - @NotBlank(message = "username不能为空") - private String username; - - @NotBlank(message = "uid不能为空") - private String uid; - - private String realname; - - private String email; - - private String password; - - private Integer type; - - private Integer status; - - private Boolean setNewPwd; - - private String titleName; - - private String titleColor; -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/AnnouncementDto.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/AnnouncementDto.java deleted file mode 100644 index d7ec50a..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/AnnouncementDto.java +++ /dev/null @@ -1,19 +0,0 @@ -package top.hcode.hoj.pojo.dto; - -import lombok.Data; -import top.hcode.hoj.pojo.entity.common.Announcement; - -import javax.validation.constraints.NotBlank; - -/** - * @Author: Himit_ZH - * @Date: 2020/12/21 22:55 - * @Description: - */ -@Data -public class AnnouncementDto { - @NotBlank(message = "比赛id不能为空") - private Long cid; - - private Announcement announcement; -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/ApplyResetPasswordDto.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/ApplyResetPasswordDto.java deleted file mode 100644 index 0249552..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/ApplyResetPasswordDto.java +++ /dev/null @@ -1,18 +0,0 @@ -package top.hcode.hoj.pojo.dto; - -import lombok.Data; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/11 17:26 - * @Description: - */ -@Data -public class ApplyResetPasswordDto { - - private String captcha; - - private String captchaKey; - - private String email; -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/ChangeEmailDto.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/ChangeEmailDto.java deleted file mode 100644 index a71c407..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/ChangeEmailDto.java +++ /dev/null @@ -1,16 +0,0 @@ -package top.hcode.hoj.pojo.dto; - -import lombok.Data; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/11 18:05 - * @Description: - */ -@Data -public class ChangeEmailDto { - - private String password; - - private String newEmail; -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/ChangeGroupProblemProgressDto.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/ChangeGroupProblemProgressDto.java deleted file mode 100644 index 770c4cd..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/ChangeGroupProblemProgressDto.java +++ /dev/null @@ -1,21 +0,0 @@ -package top.hcode.hoj.pojo.dto; - -import lombok.Data; - -/** - * @Author Himit_ZH - * @Date 2022/4/13 - */ -@Data -public class ChangeGroupProblemProgressDto { - - /** - * 题目id - */ - private Long pid; - - /** - * 1为申请中,2为申请通过,3为申请拒绝 - */ - private Integer progress; -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/ChangePasswordDto.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/ChangePasswordDto.java deleted file mode 100644 index 04f1c2a..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/ChangePasswordDto.java +++ /dev/null @@ -1,16 +0,0 @@ -package top.hcode.hoj.pojo.dto; - -import lombok.Data; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/11 18:06 - * @Description: - */ -@Data -public class ChangePasswordDto { - - private String oldPassword; - - private String newPassword; -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/CheckACDto.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/CheckACDto.java deleted file mode 100644 index 201c013..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/CheckACDto.java +++ /dev/null @@ -1,23 +0,0 @@ -package top.hcode.hoj.pojo.dto; - -import lombok.Data; - -import javax.validation.constraints.NotBlank; - -/** - * @Author: Himit_ZH - * @Date: 2021/1/17 19:13 - * @Description: - */ -@Data -public class CheckACDto { - - @NotBlank(message = "比赛记录id不能为空") - private Long id; - - @NotBlank(message = "比赛id不能为空") - private Long cid; - - @NotBlank(message = "是否确认不能为空") - private Boolean checked; -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/CheckUsernameOrEmailDto.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/CheckUsernameOrEmailDto.java deleted file mode 100644 index a64085f..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/CheckUsernameOrEmailDto.java +++ /dev/null @@ -1,16 +0,0 @@ -package top.hcode.hoj.pojo.dto; - -import lombok.Data; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/11 18:15 - * @Description: - */ -@Data -public class CheckUsernameOrEmailDto { - - private String email; - - private String username; -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/ContestPrintDto.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/ContestPrintDto.java deleted file mode 100644 index 968822d..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/ContestPrintDto.java +++ /dev/null @@ -1,20 +0,0 @@ -package top.hcode.hoj.pojo.dto; - -import lombok.Data; - -import javax.validation.constraints.NotBlank; - -/** - * @Author: Himit_ZH - * @Date: 2021/9/20 13:00 - * @Description: - */ -@Data -public class ContestPrintDto { - - @NotBlank(message = "比赛id不能为空") - private Long cid; - - @NotBlank(message = "打印内容不能为空") - private String content; -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/ContestProblemDto.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/ContestProblemDto.java deleted file mode 100644 index 5a88e9e..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/ContestProblemDto.java +++ /dev/null @@ -1,23 +0,0 @@ -package top.hcode.hoj.pojo.dto; - -import lombok.Data; - -import javax.validation.constraints.NotBlank; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/9 11:10 - * @Description: - */ -@Data -public class ContestProblemDto { - - @NotBlank(message = "题目id不能为空") - private Long pid; - - @NotBlank(message = "比赛id不能为空") - private Long cid; - - @NotBlank(message = "题目在比赛中的展示id不能为空") - private String displayId; -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/ContestRankDto.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/ContestRankDto.java deleted file mode 100644 index b3d13ac..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/ContestRankDto.java +++ /dev/null @@ -1,33 +0,0 @@ -package top.hcode.hoj.pojo.dto; - -import lombok.Data; - -import java.util.List; - -/** - * @Author: Himit_ZH - * @Date: 2021/12/10 17:07 - * @Description: - */ -@Data -public class ContestRankDto { - /*** - * @param cid 比赛id - * @param removeStar 是否移除打星队伍 - * @param forceRefresh 是否强制实时榜单 - * @param concernedList 关注的用户(uuid)列表 - */ - private Long cid; - - private Integer limit; - - private Integer currentPage; - - private Boolean forceRefresh; - - private Boolean removeStar; - - private List concernedList; - - private List externalCidList; -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/DBAndRedisConfigDto.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/DBAndRedisConfigDto.java deleted file mode 100644 index 940e900..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/DBAndRedisConfigDto.java +++ /dev/null @@ -1,58 +0,0 @@ -package top.hcode.hoj.pojo.dto; - -import io.swagger.annotations.ApiModel; -import lombok.*; -import lombok.experimental.Accessors; - -/** - * @Author sgpublic - * @Date 2022/4/2 19:49 - * @Description - */ -@Data -@Accessors(chain = true) -@Builder -@AllArgsConstructor -@NoArgsConstructor -public class DBAndRedisConfigDto { - - /** - * 数据库名称 - */ - private String dbName; - - /** - * MySQL 主机 - */ - private String dbHost; - - /** - * MySQL 端口 - */ - private Integer dbPort; - - /** - * MySQL 用户名 - */ - private String dbUsername; - - /** - * MySQL 密码 - */ - private String dbPassword ; - - /** - * Redis 主机 - */ - private String redisHost; - - /** - * Redis 端口 - */ - private Integer redisPort; - - /** - * Redis 密码 - */ - private String redisPassword ; -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/EmailConfigDto.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/EmailConfigDto.java deleted file mode 100644 index 9be8be4..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/EmailConfigDto.java +++ /dev/null @@ -1,48 +0,0 @@ -package top.hcode.hoj.pojo.dto; - -import io.swagger.annotations.ApiModel; -import lombok.*; -import lombok.experimental.Accessors; - -/** - * @Author sgpublic - * @Date 2022/4/2 19:40 - * @Description - */ -@Data -@Accessors(chain = true) -@Builder -@AllArgsConstructor -@NoArgsConstructor -public class EmailConfigDto { - - /** - * SMTP 主机 - */ - private String emailHost; - - /** - * SMTP 密码/授权码 - */ - private String emailPassword; - - /** - * SMTP 端口 - */ - private Integer emailPort; - - /** - * SMTP 邮箱 - */ - private String emailUsername; - - /** - * 邮件背景图片 - */ - private String emailBGImg; - - /** - * SMTP 使用 SSL - */ - private Boolean emailSsl; -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/LoginDto.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/LoginDto.java deleted file mode 100644 index d29df94..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/LoginDto.java +++ /dev/null @@ -1,20 +0,0 @@ -package top.hcode.hoj.pojo.dto; - -import lombok.Data; - -import javax.validation.constraints.NotBlank; -import java.io.Serializable; - -/** - * @Author: Himit_ZH - * @Date: 2020/7/20 00:23 - * @Description: 登录数据实体类 - */ -@Data -public class LoginDto implements Serializable { - @NotBlank(message = "用户名不能为空") - private String username; - - @NotBlank(message = "密码不能为空") - private String password; -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/PidListDto.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/PidListDto.java deleted file mode 100644 index 061505b..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/PidListDto.java +++ /dev/null @@ -1,27 +0,0 @@ -package top.hcode.hoj.pojo.dto; - -import lombok.Data; -import lombok.experimental.Accessors; - -import javax.validation.constraints.NotEmpty; -import javax.validation.constraints.NotNull; -import java.util.List; - -/** - * @Author: Himit_ZH - * @Date: 2020/12/28 22:33 - * @Description: 主要是获取前端题目列表页查询用户对应题目提交详情 - */ -@Data -@Accessors(chain = true) -public class PidListDto { - @NotEmpty(message = "查询的题目id列表不能为空") - private List pidList; - - @NotNull(message = "是否为比赛题目提交判断不能为空") - private Boolean isContestProblemList; - - private Long cid; - - private Long gid; -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/ProblemDto.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/ProblemDto.java deleted file mode 100644 index 435b9a7..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/ProblemDto.java +++ /dev/null @@ -1,38 +0,0 @@ -package top.hcode.hoj.pojo.dto; - -import lombok.Data; -import lombok.experimental.Accessors; -import top.hcode.hoj.pojo.entity.problem.*; - -import java.util.HashMap; -import java.util.List; - - -/** - * @Author: Himit_ZH - * @Date: 2020/12/14 22:30 - * @Description: - */ -@Data -@Accessors(chain = true) -public class ProblemDto { - - private Problem problem; - - private List samples; - - private Boolean isUploadTestCase; - - private String uploadTestcaseDir; - - private String judgeMode; - - private Boolean changeModeCode; - - private List languages; - - private List tags; - - private List codeTemplates; - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/QDOJProblemDto.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/QDOJProblemDto.java deleted file mode 100644 index 0589c34..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/QDOJProblemDto.java +++ /dev/null @@ -1,79 +0,0 @@ -package top.hcode.hoj.pojo.dto; - -import lombok.ToString; -import lombok.experimental.Accessors; -import top.hcode.hoj.pojo.entity.problem.CodeTemplate; -import top.hcode.hoj.pojo.entity.problem.Problem; -import top.hcode.hoj.pojo.entity.problem.ProblemCase; - -import java.io.Serializable; -import java.util.List; - -/** - * @Author: Himit_ZH - * @Date: 2021/5/30 15:09 - * @Description: - */ -@ToString -@Accessors(chain = true) -public class QDOJProblemDto implements Serializable { - private Problem problem; - - private List languages; - - private List samples; - - private List tags; - - private List codeTemplates; - - private Boolean isSpj; - - public Problem getProblem() { - return problem; - } - - public void setProblem(Problem problem) { - this.problem = problem; - } - - public List getLanguages() { - return languages; - } - - public void setLanguages(List languages) { - this.languages = languages; - } - - public List getSamples() { - return samples; - } - - public void setSamples(List samples) { - this.samples = samples; - } - - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - - public List getCodeTemplates() { - return codeTemplates; - } - - public void setCodeTemplates(List codeTemplates) { - this.codeTemplates = codeTemplates; - } - - public Boolean getIsSpj() { - return isSpj; - } - - public void setIsSpj(Boolean spj) { - isSpj = spj; - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/RegisterContestDto.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/RegisterContestDto.java deleted file mode 100644 index 179dd83..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/RegisterContestDto.java +++ /dev/null @@ -1,20 +0,0 @@ -package top.hcode.hoj.pojo.dto; - -import lombok.Data; - -import javax.validation.constraints.NotBlank; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/12 14:37 - * @Description: - */ -@Data -public class RegisterContestDto { - - @NotBlank(message = "cid不能为空") - private Long cid; - - @NotBlank(message = "password不能为空") - private String password; -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/RegisterDto.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/RegisterDto.java deleted file mode 100644 index 91ceb8a..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/RegisterDto.java +++ /dev/null @@ -1,35 +0,0 @@ -package top.hcode.hoj.pojo.dto; - -import lombok.Data; -import lombok.experimental.Accessors; -import org.springframework.lang.Nullable; - -import javax.validation.constraints.Email; -import javax.validation.constraints.NotBlank; -import java.io.Serializable; - -/** - * @Author: Himit_ZH - * @Date: 2020/10/24 11:15 - * @Description: 注册数据实体类 - */ -@Data -@Accessors(chain = true) -public class RegisterDto implements Serializable { - - @Nullable - private String uuid; - - @NotBlank(message = "用户名不能为空") - private String username; - - @NotBlank(message = "密码不能为空") - private String password; - - @NotBlank(message = "邮箱不能为空") - @Email(message = "邮箱格式错误") - private String email; - - @NotBlank(message = "验证码不能为空") - private String code; -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/RegisterTrainingDto.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/RegisterTrainingDto.java deleted file mode 100644 index 3da88d5..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/RegisterTrainingDto.java +++ /dev/null @@ -1,20 +0,0 @@ -package top.hcode.hoj.pojo.dto; - -import lombok.Data; - -import javax.validation.constraints.NotBlank; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/10 17:55 - * @Description: - */ -@Data -public class RegisterTrainingDto { - - @NotBlank(message = "tid不能为空") - private Long tid; - - @NotBlank(message = "password不能为空") - private String password; -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/ReplyDto.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/ReplyDto.java deleted file mode 100644 index 98c4bf1..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/ReplyDto.java +++ /dev/null @@ -1,23 +0,0 @@ -package top.hcode.hoj.pojo.dto; - -import lombok.Data; -import lombok.experimental.Accessors; -import top.hcode.hoj.pojo.entity.discussion.Reply; - -/** - * @Author: Himit_ZH - * @Date: 2021/6/24 17:00 - * @Description: - */ -@Data -@Accessors(chain = true) -public class ReplyDto { - - private Reply reply; - - private Integer did; - - private Integer quoteId; - - private String quoteType; -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/ResetPasswordDto.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/ResetPasswordDto.java deleted file mode 100644 index e5724ba..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/ResetPasswordDto.java +++ /dev/null @@ -1,19 +0,0 @@ -package top.hcode.hoj.pojo.dto; - -import lombok.Data; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/11 17:32 - * @Description: - */ - -@Data -public class ResetPasswordDto { - - private String username; - - private String password; - - private String code; -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/SubmitIdListDto.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/SubmitIdListDto.java deleted file mode 100644 index a57bbaa..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/SubmitIdListDto.java +++ /dev/null @@ -1,19 +0,0 @@ -package top.hcode.hoj.pojo.dto; - -import lombok.Data; - -import javax.validation.constraints.NotEmpty; -import java.util.List; - -/** - * @Author: Himit_ZH - * @Date: 2021/1/3 16:50 - * @Description: - */ -@Data -public class SubmitIdListDto { - @NotEmpty(message = "查询的提交id列表不能为空") - private List submitIds; - - private Long cid; -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/SubmitJudgeDto.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/SubmitJudgeDto.java deleted file mode 100644 index 158e38c..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/SubmitJudgeDto.java +++ /dev/null @@ -1,34 +0,0 @@ -package top.hcode.hoj.pojo.dto; -; -import lombok.Data; -import lombok.experimental.Accessors; - -import javax.validation.constraints.NotBlank; - -/** - * @Author: Himit_ZH - * @Date: 2020/10/30 11:03 - * @Description: 用户代码提交类 - */ -@Data -@Accessors(chain = true) -public class SubmitJudgeDto { - @NotBlank(message = "题目id不能为空") - private String pid; - - @NotBlank(message = "代码语言选择不能为空") - private String language; - - @NotBlank(message = "提交的代码不能为空") - private String code; - - @NotBlank(message = "提交的比赛id所属不能为空,若并非比赛提交,请设置为0") - private Long cid; - - private Long tid; - - private Long gid; - - private Boolean isRemote; - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/SwitchConfigDto.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/SwitchConfigDto.java deleted file mode 100644 index 0dbbfb3..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/SwitchConfigDto.java +++ /dev/null @@ -1,115 +0,0 @@ -package top.hcode.hoj.pojo.dto; - -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; -import lombok.experimental.Accessors; - -import java.util.List; - -/** - * @Author Himit_ZH - * @Date 2022/5/9 - */ -@Data -@Accessors(chain = true) -@Builder -@AllArgsConstructor -@NoArgsConstructor -public class SwitchConfigDto { - - /** - * 是否开启公开评论区 - */ - private Boolean openPublicDiscussion; - - /** - * 是否开启团队评论区 - */ - private Boolean openGroupDiscussion; - - /** - * 是否开启比赛讨论区 - */ - private Boolean openContestComment; - - /** - * 是否开启公开评测 - */ - private Boolean openPublicJudge; - - /** - * 是否开启团队评测 - */ - private Boolean openGroupJudge; - - /** - * 是否开启比赛评测 - */ - private Boolean openContestJudge; - - /** - * 是否隐藏非比赛提交详情的代码(超管不受限制) - */ - private Boolean hideNonContestSubmissionCode; - - /** - * 非比赛的提交间隔秒数 - */ - private Integer defaultSubmitInterval; - - /** - * 每天可以创建的团队数量 - */ - private Integer defaultCreateGroupDailyLimit; - - /** - * 总共可以拥有的团队数量 - */ - private Integer defaultCreateGroupLimit; - - /** - * 创建团队的前提 - */ - private Integer defaultCreateGroupACInitValue; - - /** - * 每天可以创建的帖子数量 - */ - private Integer defaultCreateDiscussionDailyLimit; - - /** - * 创建讨论帖子的前提 - */ - private Integer defaultCreateDiscussionACInitValue; - - /** - * 评论和回复的前提 - */ - private Integer defaultCreateCommentACInitValue; - - - /** - * 各个remote judge 的账号与密码列表 - */ - private List hduUsernameList; - - private List hduPasswordList; - - private List cfUsernameList; - - private List cfPasswordList; - - private List pojUsernameList; - - private List pojPasswordList; - - private List atcoderUsernameList; - - private List atcoderPasswordList; - - private List spojUsernameList; - - private List spojPasswordList; -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/TestEmailDto.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/TestEmailDto.java deleted file mode 100644 index 1efddfe..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/TestEmailDto.java +++ /dev/null @@ -1,16 +0,0 @@ -package top.hcode.hoj.pojo.dto; - -import lombok.Data; - -/** - * @Author: Himit_ZH - * @Date: 2022/4/7 11:02 - * @Description: - */ -@Data -public class TestEmailDto { - /** - * 发送的测试邮箱 - */ - private String email; -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/TestJudgeDto.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/TestJudgeDto.java deleted file mode 100644 index 9551bda..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/TestJudgeDto.java +++ /dev/null @@ -1,45 +0,0 @@ -package top.hcode.hoj.pojo.dto; - -import lombok.Data; -import lombok.experimental.Accessors; - -import javax.validation.constraints.NotBlank; - -/** - * @Author Himit_ZH - * @Date 2022/5/27 - */ -@Data -@Accessors(chain = true) -public class TestJudgeDto { - - @NotBlank(message = "题目id") - private Long pid; - - @NotBlank(message = "评测类型:public、contest、group") - private String type; - - @NotBlank(message = "代码") - private String code; - - @NotBlank(message = "编程语言") - private String language; - - @NotBlank(message = "输入") - private String userInput; - - /** - * 预期输出 - */ - private String expectedOutput; - - /** - * 是否为原创OJ的题目 - */ - private Boolean isRemoteJudge; - - /** - * text/x-csrc 用于鉴别语言 - */ - private String mode; -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/TrainingDto.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/TrainingDto.java deleted file mode 100644 index 172767c..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/TrainingDto.java +++ /dev/null @@ -1,20 +0,0 @@ -package top.hcode.hoj.pojo.dto; - -import lombok.Data; -import lombok.experimental.Accessors; -import top.hcode.hoj.pojo.entity.training.Training; -import top.hcode.hoj.pojo.entity.training.TrainingCategory; - -/** - * @Author: Himit_ZH - * @Date: 2021/11/22 21:49 - * @Description: 后台管理训练的传输类 - */ -@Data -@Accessors(chain = true) -public class TrainingDto { - - private Training training; - - private TrainingCategory trainingCategory; -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/TrainingProblemDto.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/TrainingProblemDto.java deleted file mode 100644 index d764269..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/TrainingProblemDto.java +++ /dev/null @@ -1,23 +0,0 @@ -package top.hcode.hoj.pojo.dto; - -import lombok.Data; - -import javax.validation.constraints.NotBlank; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/9 11:10 - * @Description: - */ -@Data -public class TrainingProblemDto { - - @NotBlank(message = "题目id不能为空") - private Long pid; - - @NotBlank(message = "训练id不能为空") - private Long tid; - - @NotBlank(message = "题目在训练中的展示id不能为空") - private String displayId; -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/UserReadContestAnnouncementDto.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/UserReadContestAnnouncementDto.java deleted file mode 100644 index 826d00f..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/UserReadContestAnnouncementDto.java +++ /dev/null @@ -1,19 +0,0 @@ -package top.hcode.hoj.pojo.dto; - -import lombok.Data; - -import java.util.List; - -/** - * @Author: Himit_ZH - * @Date: 2021/7/17 15:31 - * @Description: - */ - -@Data -public class UserReadContestAnnouncementDto { - - private Long cid; - - private List readAnnouncementList; -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/WebConfigDto.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/WebConfigDto.java deleted file mode 100644 index d2a10c1..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/dto/WebConfigDto.java +++ /dev/null @@ -1,63 +0,0 @@ -package top.hcode.hoj.pojo.dto; - -import io.swagger.annotations.ApiModel; -import lombok.*; -import lombok.experimental.Accessors; - -/** - * @Author sgpublic - * @Date 2022/4/2 19:44 - * @Description - */ -@Data -@Accessors(chain = true) -@Builder -@AllArgsConstructor -@NoArgsConstructor -public class WebConfigDto { - - /** - * 基础 URL - */ - private String baseUrl; - - /** - * 网站名称 - */ - private String name; - - /** - * 网站简称 - */ - private String shortName; - - /** - * 网站简介 - */ - private String description; - - /** - * 是否允许注册 - */ - private Boolean register; - - /** - * 备案名 - */ - private String recordName; - - /** - * 备案地址 - */ - private String recordUrl; - - /** - * 项目名 - */ - private String projectName; - - /** - * 项目地址 - */ - private String projectUrl; -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/ACMContestRankVo.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/ACMContestRankVo.java deleted file mode 100644 index a178ed7..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/ACMContestRankVo.java +++ /dev/null @@ -1,53 +0,0 @@ -package top.hcode.hoj.pojo.vo; - -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.experimental.Accessors; - -import java.util.HashMap; - -/** - * @Author: Himit_ZH - * @Date: 2021/1/18 14:55 - * @Description: - */ -@Data -@Accessors(chain = true) -public class ACMContestRankVo { - - @ApiModelProperty(value = "排名,排名为-1则为打星队伍") - private Integer rank; - - @ApiModelProperty(value = "用户id") - private String uid; - - @ApiModelProperty(value = "用户名") - private String username; - - @ApiModelProperty(value = "用户真实姓名") - private String realname; - - @ApiModelProperty(value = "昵称") - private String nickname; - - @ApiModelProperty(value = "学校") - private String school; - - @ApiModelProperty(value = "性别") - private String gender; - - @ApiModelProperty(value = "头像") - private String avatar; - - @ApiModelProperty(value = "提交总罚时") - private Long totalTime; - - @ApiModelProperty(value = "总提交数") - private Integer total; - - @ApiModelProperty(value = "ac题目数") - private Integer ac; - - @ApiModelProperty(value = "有提交的题的提交详情") - private HashMap> submissionInfo; -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/ACMRankVo.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/ACMRankVo.java deleted file mode 100644 index 2516924..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/ACMRankVo.java +++ /dev/null @@ -1,50 +0,0 @@ -package top.hcode.hoj.pojo.vo; - -import com.baomidou.mybatisplus.annotation.TableField; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import org.checkerframework.checker.index.qual.LengthOf; -import org.checkerframework.checker.index.qual.SubstringIndexFor; - -import java.io.Serializable; - -/** - * @Author: Himit_ZH - * @Date: 2020/10/27 21:09 - * @Description: - */ -@ApiModel(value="ACM排行榜数据类ACMRankVo", description="") -@Data -public class ACMRankVo implements Serializable { - - @ApiModelProperty(value = "用户id") - private String uid; - - @ApiModelProperty(value = "用户名") - private String username; - - @ApiModelProperty(value = "昵称") - private String nickname; - - @ApiModelProperty(value = "个性签名") - private String signature; - - @ApiModelProperty(value = "头像地址") - private String avatar; - - @ApiModelProperty(value = "头衔、称号") - private String titleName; - - @ApiModelProperty(value = "头衔、称号的颜色") - private String titleColor; - - @ApiModelProperty(value = "总提交数") - private Integer total; - - @ApiModelProperty(value = "总通过数") - private Integer ac; - - @ApiModelProperty(value = "cf得分") - private Integer rating; -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/AccessVo.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/AccessVo.java deleted file mode 100644 index 25533a1..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/AccessVo.java +++ /dev/null @@ -1,16 +0,0 @@ -package top.hcode.hoj.pojo.vo; - -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/10 17:51 - * @Description: - */ -@Data -public class AccessVo { - - @ApiModelProperty(value = "是否有进入比赛或训练的权限") - private Boolean access; -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/AdminContestVo.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/AdminContestVo.java deleted file mode 100644 index b9dedf2..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/AdminContestVo.java +++ /dev/null @@ -1,98 +0,0 @@ -package top.hcode.hoj.pojo.vo; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.util.Date; -import java.util.List; - -/** - * @Author: Himit_ZH - * @Date: 2021/12/7 19:45 - * @Description: - */ -@ApiModel(value="管理比赛的回传实体", description="") -@Data -public class AdminContestVo { - - @ApiModelProperty(value = "比赛id") - private Long id; - - @ApiModelProperty(value = "比赛创建者id") - private String uid; - - @ApiModelProperty(value = "比赛创建者的用户名") - private String author; - - @ApiModelProperty(value = "比赛标题") - private String title; - - @ApiModelProperty(value = "0为acm赛制,1为比分赛制") - private Integer type; - - @ApiModelProperty(value = "比赛说明") - private String description; - - @ApiModelProperty(value = "比赛来源,原创为0,克隆赛为比赛id") - private Integer source; - - @ApiModelProperty(value = "0为公开赛,1为私有赛(访问有密码),2为保护赛(提交有密码)") - private Integer auth; - - @ApiModelProperty(value = "比赛密码") - private String pwd; - - @ApiModelProperty(value = "开始时间") - private Date startTime; - - @ApiModelProperty(value = "结束时间") - private Date endTime; - - @ApiModelProperty(value = "比赛时长(s)") - private Long duration; - - @ApiModelProperty(value = "是否开启封榜") - private Boolean sealRank; - - @ApiModelProperty(value = "封榜起始时间,一直到比赛结束,不刷新榜单") - private Date sealRankTime; - - @ApiModelProperty(value = "比赛结束是否自动解除封榜,自动转换成真实榜单") - private Boolean autoRealRank; - - @ApiModelProperty(value = "-1为未开始,0为进行中,1为已结束") - private Integer status; - - @ApiModelProperty(value = "是否可见") - private Boolean visible; - - @ApiModelProperty(value = "是否打开打印功能") - private Boolean openPrint; - - @ApiModelProperty(value = "是否打开账号限制") - private Boolean openAccountLimit; - - @ApiModelProperty(value = "账号限制规则 **********") - private String accountLimitRule; - - @ApiModelProperty(value = "排行榜显示(username、nickname、realname)") - private String rankShowName; - - @ApiModelProperty(value = "打星用户列表") - private List starAccount; - - @ApiModelProperty(value = "是否开放比赛榜单") - private Boolean openRank; - - @ApiModelProperty(value = "oi排行榜得分方式,Recent、Highest(最近一次提交、最高得分提交)") - private String oiRankScoreType; - - @ApiModelProperty(value = "团队id") - private Long gid; - - private Date gmtCreate; - - private Date gmtModified; - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/AdminSysNoticeVo.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/AdminSysNoticeVo.java deleted file mode 100644 index 015c73b..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/AdminSysNoticeVo.java +++ /dev/null @@ -1,40 +0,0 @@ -package top.hcode.hoj.pojo.vo; - -import com.baomidou.mybatisplus.annotation.FieldFill; -import com.baomidou.mybatisplus.annotation.TableField; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.util.Date; - -/** - * @Author: Himit_ZH - * @Date: 2021/10/4 14:03 - * @Description: - */ -@Data -@ApiModel(value="系统通知消息", description="") -public class AdminSysNoticeVo { - - private Long id; - - @ApiModelProperty(value = "通知标题") - private String title; - - @ApiModelProperty(value = "通知内容") - private String content; - - @ApiModelProperty(value = "发给哪些用户类型,例如全部用户All,指定单个用户Single,管理员Admin") - private String type; - - @ApiModelProperty(value = "是否已被拉取过,如果已经拉取过,就无需再次拉取") - private Boolean state; - - @ApiModelProperty(value = "发布通知的管理员用户名") - private String adminUsername; - - private Date gmtCreate; - - private Date gmtModified; -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/AnnouncementVo.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/AnnouncementVo.java deleted file mode 100644 index 08c7a79..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/AnnouncementVo.java +++ /dev/null @@ -1,44 +0,0 @@ -package top.hcode.hoj.pojo.vo; - -import com.baomidou.mybatisplus.annotation.FieldFill; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableId; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.util.Date; - -/** - * @Author: Himit_ZH - * @Date: 2020/12/10 20:31 - * @Description: - */ -@ApiModel(value="公告数据", description="") -@Data -public class AnnouncementVo { - @TableId(value = "id", type = IdType.AUTO) - private Long id; - - @ApiModelProperty(value = "通知标题") - private String title; - - @ApiModelProperty(value = "通知内容") - private String content; - - @ApiModelProperty(value = "发布者(必须为比赛创建者或者超级管理员才能)") - private String uid; - - @ApiModelProperty(value = "发布者的用户名") - private String username; - - @ApiModelProperty(value = "0可见,1不可见") - private int status; - - @TableField(fill = FieldFill.INSERT) - private Date gmtCreate; - - @TableField(fill = FieldFill.INSERT_UPDATE) - private Date gmtModified; -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/CaptchaVo.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/CaptchaVo.java deleted file mode 100644 index 19588d9..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/CaptchaVo.java +++ /dev/null @@ -1,19 +0,0 @@ -package top.hcode.hoj.pojo.vo; - -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/11 16:37 - * @Description: - */ -@Data -public class CaptchaVo { - - @ApiModelProperty(value = "验证码图片的base64") - private String img; - - @ApiModelProperty(value = "验证码key") - private String captchaKey; -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/ChangeAccountVo.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/ChangeAccountVo.java deleted file mode 100644 index 3ae5ab3..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/ChangeAccountVo.java +++ /dev/null @@ -1,18 +0,0 @@ -package top.hcode.hoj.pojo.vo; - -import lombok.Data; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/11 17:58 - * @Description: - */ -@Data -public class ChangeAccountVo { - - private Integer code; - - private String msg; - - private UserInfoVo userInfo; -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/CheckUsernameOrEmailVo.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/CheckUsernameOrEmailVo.java deleted file mode 100644 index 03f8ca0..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/CheckUsernameOrEmailVo.java +++ /dev/null @@ -1,16 +0,0 @@ -package top.hcode.hoj.pojo.vo; - -import lombok.Data; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/11 18:15 - * @Description: - */ -@Data -public class CheckUsernameOrEmailVo { - - private Boolean email; - - private Boolean username; -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/CommentListVo.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/CommentListVo.java deleted file mode 100644 index 4a2a070..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/CommentListVo.java +++ /dev/null @@ -1,19 +0,0 @@ -package top.hcode.hoj.pojo.vo; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import lombok.Data; - -import java.util.HashMap; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/11 16:12 - * @Description: - */ -@Data -public class CommentListVo { - - private IPage commentList; - - private HashMap commentLikeMap; -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/CommentVo.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/CommentVo.java deleted file mode 100644 index e36020f..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/CommentVo.java +++ /dev/null @@ -1,53 +0,0 @@ -package top.hcode.hoj.pojo.vo; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.util.Date; -import java.util.List; - -/** - * @Author: Himit_ZH - * @Date: 2021/5/5 22:30 - * @Description: - */ -@ApiModel(value = "评论数据列表VO", description = "") -@Data -public class CommentVo { - - @ApiModelProperty(value = "评论id") - private Integer id; - - @ApiModelProperty(value = "评论内容") - private String content; - - @ApiModelProperty(value = "评论者id") - private String fromUid; - - @ApiModelProperty(value = "评论者用户名") - private String fromName; - - @ApiModelProperty(value = "评论组头像地址") - private String fromAvatar; - - @ApiModelProperty(value = "评论者角色") - private String fromRole; - - @ApiModelProperty(value = "评论者头衔名称") - private String fromTitleName; - - @ApiModelProperty(value = "评论者头衔背景颜色") - private String fromTitleColor; - - @ApiModelProperty(value = "点赞数量") - private Integer likeNum; - - @ApiModelProperty(value = "该评论的总回复数") - private Integer totalReplyNum; - - private Date gmtCreate; - - @ApiModelProperty(value = "该评论回复列表") - private List replyList; -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/ConfigVo.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/ConfigVo.java deleted file mode 100644 index 07f5170..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/ConfigVo.java +++ /dev/null @@ -1,226 +0,0 @@ -package top.hcode.hoj.pojo.vo; - -import lombok.Data; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.cloud.context.config.annotation.RefreshScope; -import org.springframework.stereotype.Component; - -import java.util.List; - - -/** - * @Author: Himit_ZH - * @Date: 2020/12/2 21:30 - * @Description: - */ -@RefreshScope -@Data -@Component -public class ConfigVo { - // 数据库配置 - @Value("${hoj.db.username}") - private String mysqlUsername; - - @Value("${hoj.db.password}") - private String mysqlPassword; - - @Value("${hoj.db.name}") - private String mysqlDBName; - - @Value("${hoj.db.host}") - private String mysqlHost; - - @Value("${hoj.db.public-host:172.20.0.3}") - private String mysqlPublicHost; - - @Value("${hoj.db.port}") - private Integer mysqlPort; - - @Value("${hoj.db.public-port:3306}") - private Integer mysqlPublicPort; - - // 判题服务token - @Value("${hoj.judge.token}") - private String judgeToken; - - // 缓存配置 - @Value("${hoj.redis.host}") - private String redisHost; - - @Value("${hoj.redis.port}") - private Integer redisPort; - - @Value("${hoj.redis.password}") - private String redisPassword; - - // jwt配置 - @Value("${hoj.jwt.secret}") - private String tokenSecret; - - @Value("${hoj.jwt.expire}") - private String tokenExpire; - - @Value("${hoj.jwt.checkRefreshExpire}") - private String checkRefreshExpire; - - // 邮箱配置 - @Value("${hoj.mail.username}") - private String emailUsername; - - @Value("${hoj.mail.password}") - private String emailPassword; - - @Value("${hoj.mail.host}") - private String emailHost; - - @Value("${hoj.mail.port}") - private Integer emailPort; - - @Value("${hoj.mail.ssl}") - private Boolean emailSsl; - - @Value("${hoj.mail.background-img}") - private String emailBGImg; - - // 网站前端显示配置 - @Value("${hoj.web-config.base-url}") - private String baseUrl; - - @Value("${hoj.web-config.name}") - private String name; - - @Value("${hoj.web-config.short-name}") - private String shortName; - - @Value("${hoj.web-config.description}") - private String description; - - @Value("${hoj.web-config.register}") - private Boolean register; - - @Value("${hoj.web-config.footer.record.name}") - private String recordName; - - @Value("${hoj.web-config.footer.record.url}") - private String recordUrl; - - @Value("${hoj.web-config.footer.project.name}") - private String projectName; - - @Value("${hoj.web-config.footer.project.url}") - private String projectUrl; - - @Value("${hoj.hdu.account.username:}") - private List hduUsernameList; - - @Value("${hoj.hdu.account.password:}") - private List hduPasswordList; - - @Value("${hoj.cf.account.username:}") - private List cfUsernameList; - - @Value("${hoj.cf.account.password:}") - private List cfPasswordList; - - @Value("${hoj.poj.account.username:}") - private List pojUsernameList; - - @Value("${hoj.poj.account.password:}") - private List pojPasswordList; - - @Value("${hoj.atcoder.account.username:}") - private List atcoderUsernameList; - - @Value("${hoj.atcoder.account.password:}") - private List atcoderPasswordList; - - @Value("${hoj.spoj.account.username:}") - private List spojUsernameList; - - @Value("${hoj.spoj.account.password:}") - private List spojPasswordList; - - /** - * 是否开启公开评论区 - */ - @Value("${hoj.switch.discussion.public:true}") - private Boolean openPublicDiscussion; - - /** - * 是否开启团队评论区 - */ - @Value("${hoj.switch.discussion.group:true}") - private Boolean openGroupDiscussion; - - /** - * 是否开启比赛讨论区 - */ - @Value("${hoj.switch.comment.contest:true}") - private Boolean openContestComment; - - /** - * 是否开启公开评测 - */ - @Value("${hoj.switch.judge.public:true}") - private Boolean openPublicJudge; - - /** - * 是否开启团队评测 - */ - @Value("${hoj.switch.judge.group:true}") - private Boolean openGroupJudge; - - /** - * 是否开启比赛评测 - */ - @Value("${hoj.switch.judge.contest:true}") - private Boolean openContestJudge; - - /** - * 是否隐藏非比赛提交详情的代码(超管不受限制) - */ - @Value("${hoj.switch.judge.hide-non-contest-code:false}") - private Boolean hideNonContestSubmissionCode; - - /** - * 非比赛的提交间隔秒数 - */ - @Value("${hoj.switch.judge.submit-interval:8}") - private Integer defaultSubmitInterval; - - /** - * 每天可以创建的团队数量 - */ - @Value("${hoj.switch.group.create-daily:2}") - private Integer defaultCreateGroupDailyLimit; - - /** - * 总共可以拥有的团队数量 - */ - @Value("${hoj.switch.group.create-total:5}") - private Integer defaultCreateGroupLimit; - - /** - * 创建团队的前提:20道题目通过 - */ - @Value("${hoj.switch.group.ac-initial-value:20}") - private Integer defaultCreateGroupACInitValue; - - /** - * 每天可以创建的帖子数量 - */ - @Value("${hoj.switch.discussion.create-daily:5}") - private Integer defaultCreateDiscussionDailyLimit; - - /** - * 创建讨论帖子的前提:10道题目通过 - */ - @Value("${hoj.switch.discussion.ac-initial-value:10}") - private Integer defaultCreateDiscussionACInitValue; - - /** - * 评论和回复的前提:10道题目通过 - */ - @Value("${hoj.switch.comment.ac-initial-value:10}") - private Integer defaultCreateCommentACInitValue; -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/ContestOutsideInfo.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/ContestOutsideInfo.java deleted file mode 100644 index 67029ac..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/ContestOutsideInfo.java +++ /dev/null @@ -1,24 +0,0 @@ -package top.hcode.hoj.pojo.vo; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import top.hcode.hoj.pojo.entity.contest.ContestProblem; - -import java.util.List; - -/** - * @Author: Himit_ZH - * @Date: 2021/12/8 12:32 - * @Description: - */ -@ApiModel(value = "赛外排行榜所需的比赛信息,同时包括题目题号、气球颜色", description = "") -@Data -public class ContestOutsideInfo { - - @ApiModelProperty(value = "比赛信息") - private ContestVo contest; - - @ApiModelProperty(value = "比赛题目信息列表") - private List problemList; -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/ContestProblemVo.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/ContestProblemVo.java deleted file mode 100644 index 05cc243..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/ContestProblemVo.java +++ /dev/null @@ -1,43 +0,0 @@ -package top.hcode.hoj.pojo.vo; - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.io.Serializable; - -/** - * @Author: Himit_ZH - * @Date: 2021/1/16 16:07 - * @Description: - */ -@ApiModel(value = "比赛题目列表格式数据ContestProblemVo", description = "") -@Data -public class ContestProblemVo implements Serializable { - - @TableId(value = "id", type = IdType.AUTO) - private Long id; - - @ApiModelProperty(value = "该题目在比赛中的顺序id") - private String displayId; - - @ApiModelProperty(value = "比赛id") - private Long cid; - - @ApiModelProperty(value = "题目id") - private Long pid; - - @ApiModelProperty(value = "该题目在比赛中的标题,默认为原名字") - private String displayTitle; - - @ApiModelProperty(value = "该题目在比赛中的气球颜色") - private String color; - - @ApiModelProperty(value = "该题目的ac通过数") - private Integer ac; - - @ApiModelProperty(value = "该题目的总提交数") - private Integer total; -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/ContestRecordVo.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/ContestRecordVo.java deleted file mode 100644 index a6f1f1b..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/ContestRecordVo.java +++ /dev/null @@ -1,79 +0,0 @@ -package top.hcode.hoj.pojo.vo; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.io.Serializable; -import java.util.Date; - -/** - * @Author: Himit_ZH - * @Date: 2020/10/28 12:05 - * @Description: - */ -@ApiModel(value="用户在比赛的记录", description="") -@Data -public class ContestRecordVo implements Serializable { - - private Long id; - - @ApiModelProperty(value = "比赛id") - private Long cid; - - @ApiModelProperty(value = "用户id") - private String uid; - - @ApiModelProperty(value = "题目id") - private Long pid; - - @ApiModelProperty(value = "比赛中的题目id") - private Long cpid; - - @ApiModelProperty(value = "比赛中展示的id") - private String displayId; - - @ApiModelProperty(value = "提交id,用于可重判") - private Long submitId; - - @ApiModelProperty(value = "用户名") - private String username; - - @ApiModelProperty(value = "学校") - private String school; - - @ApiModelProperty(value = "性别") - private String gender; - - @ApiModelProperty(value = "头像") - private String avatar; - - @ApiModelProperty(value = "真实姓名") - private String realname; - - @ApiModelProperty(value = "昵称") - private String nickname; - - @ApiModelProperty(value = "提交结果,0表示未AC通过不罚时,1表示AC通过,-1为未AC通过算罚时") - private Integer status; - - @ApiModelProperty(value = "具体提交时间") - private Date submitTime; - - @ApiModelProperty(value = "提交时间,为提交时间减去比赛时间") - private Long time; - - @ApiModelProperty(value = "OI比赛的得分") - private Integer score; - - @ApiModelProperty(value = "提交耗时") - private Integer useTime; - - @ApiModelProperty(value = "AC是否已校验") - private Boolean checked; - - private Date gmtCreate; - - private Date gmtModified; - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/ContestRegisterCountVo.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/ContestRegisterCountVo.java deleted file mode 100644 index de04c04..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/ContestRegisterCountVo.java +++ /dev/null @@ -1,23 +0,0 @@ -package top.hcode.hoj.pojo.vo; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.io.Serializable; - -/** - * @Author: Himit_ZH - * @Date: 2022/2/7 20:28 - * @Description: - */ -@Data -@ApiModel(value="比赛报名统计", description="") -public class ContestRegisterCountVo implements Serializable { - - @ApiModelProperty(value = "比赛id") - private Long cid; - - @ApiModelProperty(value = "比赛报名人数") - private Integer count; -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/ContestVo.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/ContestVo.java deleted file mode 100644 index 14e8a43..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/ContestVo.java +++ /dev/null @@ -1,80 +0,0 @@ -package top.hcode.hoj.pojo.vo; - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.io.Serializable; -import java.util.Date; - -/** - * @Author: Himit_ZH - * @Date: 2020/10/27 21:53 - * @Description: - */ -@ApiModel(value="比赛信息", description="") -@Data -public class ContestVo implements Serializable { - - @TableId(value = "比赛id", type = IdType.AUTO) - private Long id; - - @ApiModelProperty(value = "创建者用户名") - private String author; - - @ApiModelProperty(value = "比赛标题") - private String title; - - @ApiModelProperty(value = "0为acm赛制,1为比分赛制") - private Integer type; - - @ApiModelProperty(value = "比赛说明") - private String description; - - @ApiModelProperty(value = "-1为未开始,0为进行中,1为已结束") - private Integer status; - - @ApiModelProperty(value = "比赛来源,原创为0,克隆赛为比赛id") - private Integer source; - - @ApiModelProperty(value = "0为公开赛,1为私有赛(有密码),2为保护赛") - private Integer auth; - - @ApiModelProperty("当前服务器系统时间,为了前端统一时间") - private Date now; - - @ApiModelProperty(value = "开始时间") - private Date startTime; - - @ApiModelProperty(value = "结束时间") - private Date endTime; - - @ApiModelProperty(value = "比赛时长(秒)") - private Integer duration; - - @ApiModelProperty(value = "是否开启封榜") - private Boolean sealRank; - - @ApiModelProperty(value = "是否打开打印功能") - private Boolean openPrint; - - @ApiModelProperty(value = "封榜起始时间,一直到比赛结束,不刷新榜单") - private Date sealRankTime; - - @ApiModelProperty(value = "排行榜显示(username、nickname、realname)") - private String rankShowName; - - @ApiModelProperty(value = "是否开放比赛榜单") - private Boolean openRank; - - @ApiModelProperty(value = "oi排行榜得分方式,Recent、Highest(最近一次提交、最高得分提交)") - private String oiRankScoreType; - - @ApiModelProperty(value = "比赛的报名人数") - private Integer count; - - @ApiModelProperty(value = "团队ID") - private Long gid; -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/DiscussionReportVo.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/DiscussionReportVo.java deleted file mode 100644 index 1a2efef..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/DiscussionReportVo.java +++ /dev/null @@ -1,51 +0,0 @@ -package top.hcode.hoj.pojo.vo; - -import com.baomidou.mybatisplus.annotation.FieldFill; -import com.baomidou.mybatisplus.annotation.TableField; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -import java.util.Date; - -/** - * @Author Himit_ZH - * @Date 2022/5/13 - */ - -@Data -@EqualsAndHashCode(callSuper = false) -@Accessors(chain = true) -public class DiscussionReportVo { - - private Long id; - - @ApiModelProperty(value = "讨论id") - private Integer did; - - @ApiModelProperty(value = "讨论所属团队id") - private Long gid; - - @ApiModelProperty(value = "讨论标题") - private String discussionTitle; - - @ApiModelProperty(value = "讨论作者") - private String discussionAuthor; - - @ApiModelProperty(value = "举报者的用户名") - private String reporter; - - @ApiModelProperty(value = "举报内容") - private String content; - - @ApiModelProperty(value = "是否已读") - private Boolean status; - - @TableField(fill = FieldFill.INSERT) - private Date gmtCreate; - - @TableField(fill = FieldFill.INSERT_UPDATE) - private Date gmtModified; - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/DiscussionVo.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/DiscussionVo.java deleted file mode 100644 index 1b2d61d..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/DiscussionVo.java +++ /dev/null @@ -1,78 +0,0 @@ -package top.hcode.hoj.pojo.vo; - -import com.baomidou.mybatisplus.annotation.*; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.util.Date; - -/** - * @Author: Himit_ZH - * @Date: 2021/5/7 10:06 - * @Description: - */ -@Data -@ApiModel(value = "讨论数据VO", description = "") -public class DiscussionVo { - - private Integer id; - - @ApiModelProperty(value = "分类id") - private Integer categoryId; - - @ApiModelProperty(value = "分类名字") - private String categoryName; - - @ApiModelProperty(value = "讨论标题") - private String title; - - @ApiModelProperty(value = "讨论简介") - private String description; - - @ApiModelProperty(value = "讨论内容") - private String content; - - @ApiModelProperty(value = "题目关联 默认为null则不关联题目") - private String pid; - - @ApiModelProperty(value = "发表者id") - private String uid; - - @ApiModelProperty(value = "发表者用户名") - private String author; - - @ApiModelProperty(value = "发表者头像地址") - private String avatar; - - @ApiModelProperty(value = "发表者头衔名称") - private String titleName; - - @ApiModelProperty(value = "发表者头衔背景颜色") - private String titleColor; - - @ApiModelProperty(value = "发表者角色") - private String role; - - @ApiModelProperty(value = "浏览数量") - private Integer viewNum; - - @ApiModelProperty(value = "点赞数量") - private Integer likeNum; - - @ApiModelProperty(value = "如果有登录的话,是否点赞了") - private Boolean hasLike; - - @ApiModelProperty(value = "优先级,是否置顶") - private Boolean topPriority; - - @ApiModelProperty(value = "是否封禁 0正常,1封禁") - @TableLogic - private Integer status; - - @TableField(fill = FieldFill.INSERT) - private Date gmtCreate; - - @TableField(fill = FieldFill.INSERT_UPDATE) - private Date gmtModified; -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/ExcelUserVo.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/ExcelUserVo.java deleted file mode 100644 index f5dc378..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/ExcelUserVo.java +++ /dev/null @@ -1,22 +0,0 @@ -package top.hcode.hoj.pojo.vo; - -import com.alibaba.excel.annotation.ExcelProperty; -import com.alibaba.excel.annotation.write.style.ColumnWidth; -import lombok.Data; -import lombok.experimental.Accessors; - -/** - * @Author: Himit_ZH - * @Date: 2020/12/10 16:33 - * @Description: - */ -@Data -@Accessors(chain = true) -@ColumnWidth(25) -public class ExcelUserVo{ - @ExcelProperty(value = "用户名",index = 0) - private String username; - - @ExcelProperty(value = "密码",index = 1) - private String password; -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/GroupMemberVo.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/GroupMemberVo.java deleted file mode 100644 index af370ac..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/GroupMemberVo.java +++ /dev/null @@ -1,41 +0,0 @@ -package top.hcode.hoj.pojo.vo; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.util.Date; - -/** - * @Author: LengYun - * @Date: 2022/3/11 13:36 - * @Description: - */ -@ApiModel(value="GroupMemberVo", description="") -@Data -public class GroupMemberVo { - - @ApiModelProperty(value = "id") - private Long id; - - @ApiModelProperty(value = "团队id") - private Long gid; - - @ApiModelProperty(value = "用户id") - private String uid; - - @ApiModelProperty(value = "用户名") - private String username; - - @ApiModelProperty(value = "当前状态") - private Integer auth; - - @ApiModelProperty(value = "申请理由") - private String reason; - - @ApiModelProperty(value = "创建时间") - private Date gmtCreate; - - @ApiModelProperty(value = "修改时间") - private Date gmtModify; -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/GroupVo.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/GroupVo.java deleted file mode 100644 index 480f114..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/GroupVo.java +++ /dev/null @@ -1,50 +0,0 @@ -package top.hcode.hoj.pojo.vo; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.util.Date; - -/** - * @Author: LengYun - * @Date: 2022/3/11 13:36 - * @Description: - */ - -@ApiModel(value="团队查询对象GroupVo", description="") -@Data -public class GroupVo { - @ApiModelProperty(value = "团队id") - private Long id; - - @ApiModelProperty(value = "头像地址") - private String avatar; - - @ApiModelProperty(value = "团队拥有者的用户名") - private String owner; - - @ApiModelProperty(value = "团队名称") - private String name; - - @ApiModelProperty(value = "团队简称") - private String shortName; - - @ApiModelProperty(value = "团队简介") - private String brief; - - @ApiModelProperty(value = "团队介绍") - private String description; - - @ApiModelProperty(value = "0为直接加入,1为输入密码加入,2为申请加入") - private Integer auth; - - @ApiModelProperty(value = "是否隐藏") - private Boolean visible; - - @ApiModelProperty(value = "该团队的总人数") - private Integer memberCount; - - @ApiModelProperty(value = "团队创建时间") - private Date gmtCreate; -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/ImportProblemVo.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/ImportProblemVo.java deleted file mode 100644 index 8ac4a58..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/ImportProblemVo.java +++ /dev/null @@ -1,99 +0,0 @@ -package top.hcode.hoj.pojo.vo; - -import lombok.ToString; -import lombok.experimental.Accessors; - -import java.io.Serializable; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * @Author: Himit_ZH - * @Date: 2021/5/27 15:21 - * @Description: - */ -@ToString -@Accessors(chain = true) -public class ImportProblemVo implements Serializable { - - private HashMap problem; - - private List languages; - - private List> samples; - - private List tags; - - private List> codeTemplates; - - private HashMap userExtraFile; - - private HashMap judgeExtraFile; - - private String judgeMode; - - public Map getProblem() { - return problem; - } - - public void setProblem(HashMap problem) { - this.problem = problem; - } - - public List getLanguages() { - return languages; - } - - public void setLanguages(List languages) { - this.languages = languages; - } - - public List> getSamples() { - return samples; - } - - public void setSamples(List> samples) { - this.samples = samples; - } - - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - - public List> getCodeTemplates() { - return codeTemplates; - } - - public void setCodeTemplates(List> codeTemplates) { - this.codeTemplates = codeTemplates; - } - - public String getJudgeMode() { - return judgeMode; - } - - public void setJudgeMode(String judgeMode) { - this.judgeMode = judgeMode; - } - - public HashMap getUserExtraFile() { - return userExtraFile; - } - - public void setUserExtraFile(HashMap userExtraFile) { - this.userExtraFile = userExtraFile; - } - - public HashMap getJudgeExtraFile() { - return judgeExtraFile; - } - - public void setJudgeExtraFile(HashMap judgeExtraFile) { - this.judgeExtraFile = judgeExtraFile; - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/JudgeVo.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/JudgeVo.java deleted file mode 100644 index c5a910a..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/JudgeVo.java +++ /dev/null @@ -1,86 +0,0 @@ -package top.hcode.hoj.pojo.vo; - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.util.Date; - -/** - * @Author: Himit_ZH - * @Date: 2020/10/29 13:08 - * @Description: - */ -@Data -@ApiModel(value="返回的判题信息", description="") -public class JudgeVo { - - @ApiModelProperty(value = "用户id") - private String uid; - - @ApiModelProperty(value = "提交id") - @TableId(value = "submit_id", type = IdType.AUTO) - private Long submitId; - - @ApiModelProperty(value = "用户名") - private String username; - - @ApiModelProperty(value = "题目id") - private Long pid; - - @ApiModelProperty(value = "题目展示id") - private String displayPid; - - @ApiModelProperty(value = "题目标题") - private String title; - - @ApiModelProperty(value = "比赛display_id") - private String displayId; - - @ApiModelProperty(value = "结果码具体参考文档") - private Date submitTime; - - @ApiModelProperty(value = "结果码具体参考文档") - private Integer status; - - @ApiModelProperty(value = "0为代码全部人可见,1为仅自己可见。") - private Boolean share; - - @ApiModelProperty(value = "运行时间(ms)") - private Integer time; - - @ApiModelProperty(value = "运行内存(b)") - private Integer memory; - - @ApiModelProperty(value = "题目得分,ACM题目默认为null") - private Integer score; - - @ApiModelProperty(value = "该题在OI排行榜的分数") - private Integer oiRankScore; - - @ApiModelProperty(value = "代码长度") - private Integer length; - - @ApiModelProperty(value = "代码语言") - private String language; - - @ApiModelProperty(value = "比赛id,非比赛题目默认为0") - private Long cid; - - @ApiModelProperty(value = "比赛中题目排序id,非比赛题目默认为0") - private Long cpid; - - @ApiModelProperty(value = "题目来源") - private String source; - - @ApiModelProperty(value = "判题机ip") - private String judger; - - @ApiModelProperty(value = "提交者所在ip") - private String ip; - - @ApiModelProperty(value = "是否人工评测") - private Boolean isManual; -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/OIContestRankVo.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/OIContestRankVo.java deleted file mode 100644 index 4fd1fca..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/OIContestRankVo.java +++ /dev/null @@ -1,54 +0,0 @@ -package top.hcode.hoj.pojo.vo; - -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.experimental.Accessors; - -import java.util.HashMap; - -/** - * @Author: Himit_ZH - * @Date: 2021/1/18 18:16 - * @Description: - */ - -@Data -@Accessors(chain = true) -public class OIContestRankVo { - - @ApiModelProperty(value = "排名,排名为-1则为打星队伍") - private Integer rank; - - @ApiModelProperty(value = "用户id") - private String uid; - - @ApiModelProperty(value = "用户名") - private String username; - - @ApiModelProperty(value = "用户真实姓名") - private String realname; - - @ApiModelProperty(value = "昵称") - private String nickname; - - @ApiModelProperty(value = "性别") - private String gender; - - @ApiModelProperty(value = "头像") - private String avatar; - - @ApiModelProperty(value = "学校") - private String school; - - @ApiModelProperty(value = "提交总得分") - private Integer totalScore; - - @ApiModelProperty(value = "提交总耗时,只有满分的提交才会统计") - private Integer totalTime; - - @ApiModelProperty(value = "OI的题对应提交得分") - private HashMap submissionInfo; - - @ApiModelProperty(value = "OI的题得满分后对应提交最优耗时") - private HashMap timeInfo; -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/OIRankVo.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/OIRankVo.java deleted file mode 100644 index 4571da2..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/OIRankVo.java +++ /dev/null @@ -1,48 +0,0 @@ -package top.hcode.hoj.pojo.vo; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.io.Serializable; -import java.util.List; - -/** - * @Author: Himit_ZH - * @Date: 2021/1/7 14:56 - * @Description: - */ -@ApiModel(value="OI排行榜数据类OIRankVo", description="") -@Data -public class OIRankVo implements Serializable { - @ApiModelProperty(value = "用户id") - private String uid; - - @ApiModelProperty(value = "用户名") - private String username; - - @ApiModelProperty(value = "昵称") - private String nickname; - - @ApiModelProperty(value = "个性签名") - private String signature; - - @ApiModelProperty(value = "头像地址") - private String avatar; - - @ApiModelProperty(value = "头衔、称号") - private String titleName; - - @ApiModelProperty(value = "头衔、称号的颜色") - private String titleColor; - - @ApiModelProperty(value = "OI得分列表") - private Integer score; - - @ApiModelProperty(value = "总提交数") - private Integer total; - - @ApiModelProperty(value = "总通过数") - private Integer ac; - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/ProblemCountVo.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/ProblemCountVo.java deleted file mode 100644 index 4d49e74..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/ProblemCountVo.java +++ /dev/null @@ -1,57 +0,0 @@ -package top.hcode.hoj.pojo.vo; - -import com.baomidou.mybatisplus.annotation.*; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -import java.io.Serializable; -import java.util.Date; - -/** - *

- * - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -@Data -@Accessors(chain = true) -public class ProblemCountVo implements Serializable { - - private static final long serialVersionUID = 1L; - - private Long pid; - - private Integer total; - - private Integer ac; - - @ApiModelProperty(value = "空间超限") - private Integer mle; - - @ApiModelProperty(value = "时间超限") - private Integer tle; - - @ApiModelProperty(value = "运行错误") - private Integer re; - - @ApiModelProperty(value = "格式错误") - private Integer pe; - - @ApiModelProperty(value = "编译错误") - private Integer ce; - - @ApiModelProperty(value = "答案错误") - private Integer wa; - - @ApiModelProperty(value = "系统错误") - private Integer se; - - @ApiModelProperty(value = "部分通过,OI题目") - private Integer pa; - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/ProblemInfoVo.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/ProblemInfoVo.java deleted file mode 100644 index 9d77297..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/ProblemInfoVo.java +++ /dev/null @@ -1,23 +0,0 @@ -package top.hcode.hoj.pojo.vo; - -import lombok.AllArgsConstructor; -import lombok.Data; -import top.hcode.hoj.pojo.entity.problem.Problem; -import top.hcode.hoj.pojo.entity.problem.Tag; -import java.util.HashMap; -import java.util.List; - -/** - * @Author: Himit_ZH - * @Date: 2020/12/30 21:37 - * @Description: - */ -@Data -@AllArgsConstructor -public class ProblemInfoVo { - private Problem problem; - private List tags; - private List languages; - private ProblemCountVo problemCount; - private HashMap codeTemplate; -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/ProblemTagVo.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/ProblemTagVo.java deleted file mode 100644 index a4d6d67..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/ProblemTagVo.java +++ /dev/null @@ -1,26 +0,0 @@ -package top.hcode.hoj.pojo.vo; - -import lombok.Data; -import top.hcode.hoj.pojo.entity.problem.Tag; -import top.hcode.hoj.pojo.entity.problem.TagClassification; - -import java.io.Serializable; -import java.util.List; - -/** - * @Author Himit_ZH - * @Date 2022/8/3 - */ -@Data -public class ProblemTagVo implements Serializable { - /** - * 标签分类 - */ - private TagClassification classification; - - /** - * 标签列表 - */ - private List tagList; - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/ProblemVo.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/ProblemVo.java deleted file mode 100644 index dfad4db..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/ProblemVo.java +++ /dev/null @@ -1,86 +0,0 @@ -package top.hcode.hoj.pojo.vo; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import top.hcode.hoj.pojo.entity.problem.Tag; - -import java.io.Serializable; -import java.util.List; - -/** - * @Author: Himit_ZH - * @Date: 2020/10/27 14:14 - * @Description: - */ -@ApiModel(value = "题目列表查询对象ProblemVo", description = "") -@Data -public class ProblemVo implements Serializable { - - @ApiModelProperty(value = "题目id") - private Long pid; - - @ApiModelProperty(value = "题目展示id") - private String problemId; - - @ApiModelProperty(value = "题目标题") - private String title; - - @ApiModelProperty(value = "题目难度") - private Integer difficulty; - - @ApiModelProperty(value = "题目类型") - private Integer type; - - @ApiModelProperty(value = "题目标签") - private List tags; - - // 以下为题目做题情况 - - @ApiModelProperty(value = "该题总提交数") - private Integer total = 0; - - @ApiModelProperty(value = "通过提交数") - private Integer ac = 0; - - @ApiModelProperty(value = "空间超限提交数") - private Integer mle = 0; - - @ApiModelProperty(value = "时间超限提交数") - private Integer tle = 0; - - @ApiModelProperty(value = "运行错误提交数") - private Integer re = 0; - - @ApiModelProperty(value = "格式错误提交数") - private Integer pe = 0; - - @ApiModelProperty(value = "编译错误提交数") - private Integer ce = 0; - - @ApiModelProperty(value = "答案错误提交数") - private Integer wa = 0; - - @ApiModelProperty(value = "系统错误提交数") - private Integer se = 0; - - @ApiModelProperty(value = "该IO题目分数总和") - private Integer pa = 0; - - @ApiModelProperty(value = "IO题目总分数") - private Integer score; - - public void setProblemCountVo(ProblemCountVo problemCountVo) { - this.total = problemCountVo.getTotal() == null ? 0 : problemCountVo.getTotal(); - this.ac = problemCountVo.getAc() == null ? 0 : problemCountVo.getAc(); - this.mle = problemCountVo.getMle() == null ? 0 : problemCountVo.getMle(); - this.tle = problemCountVo.getTle() == null ? 0 : problemCountVo.getTle(); - this.re = problemCountVo.getRe() == null ? 0 : problemCountVo.getRe(); - this.pe = problemCountVo.getPe() == null ? 0 : problemCountVo.getPe(); - this.ce = problemCountVo.getCe() == null ? 0 : problemCountVo.getCe(); - this.wa = problemCountVo.getWa() == null ? 0 : problemCountVo.getWa(); - this.se = problemCountVo.getSe() == null ? 0 : problemCountVo.getSe(); - this.pa = problemCountVo.getPa() == null ? 0 : problemCountVo.getPa(); - } - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/RandomProblemVo.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/RandomProblemVo.java deleted file mode 100644 index dc60e79..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/RandomProblemVo.java +++ /dev/null @@ -1,16 +0,0 @@ -package top.hcode.hoj.pojo.vo; - -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/11 10:55 - * @Description: - */ -@Data -public class RandomProblemVo { - - @ApiModelProperty(value = "题目id") - private String problemId; -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/RegisterCodeVo.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/RegisterCodeVo.java deleted file mode 100644 index 09d885b..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/RegisterCodeVo.java +++ /dev/null @@ -1,19 +0,0 @@ -package top.hcode.hoj.pojo.vo; - -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/11 17:08 - * @Description: - */ -@Data -public class RegisterCodeVo { - - @ApiModelProperty(value = "邮箱") - private String email; - - @ApiModelProperty(value = "注册邮件有效时间,单位秒") - private Integer expire; -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/ReplyVo.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/ReplyVo.java deleted file mode 100644 index e1535ed..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/ReplyVo.java +++ /dev/null @@ -1,57 +0,0 @@ -package top.hcode.hoj.pojo.vo; - -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.util.Date; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/16 15:24 - * @Description: - */ -@Data -public class ReplyVo { - - private Integer id; - - @ApiModelProperty(value = "评论id") - private Integer commentId; - - @ApiModelProperty(value = "回复评论者id") - private String fromUid; - - @ApiModelProperty(value = "回复评论者用户名") - private String fromName; - - @ApiModelProperty(value = "回复评论者头像地址") - private String fromAvatar; - - @ApiModelProperty(value = "回复评论者角色") - private String fromRole; - - @ApiModelProperty(value = "回复评论者头衔名称") - private String fromTitleName; - - @ApiModelProperty(value = "回复评论者头衔背景颜色") - private String fromTitleColor; - - @ApiModelProperty(value = "被回复的用户id") - private String toUid; - - @ApiModelProperty(value = "被回复的用户名") - private String toName; - - @ApiModelProperty(value = "被回复的用户头像地址") - private String toAvatar; - - @ApiModelProperty(value = "回复的内容") - private String content; - - @ApiModelProperty(value = "是否封禁或删除 0正常,1封禁") - private Integer status; - - private Date gmtCreate; - - private Date gmtModified; -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/RoleAuthsVo.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/RoleAuthsVo.java deleted file mode 100644 index d6ecc3f..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/RoleAuthsVo.java +++ /dev/null @@ -1,40 +0,0 @@ -package top.hcode.hoj.pojo.vo; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import top.hcode.hoj.pojo.entity.user.Auth; - -import java.util.Date; -import java.util.List; - -/** - * @Author: Himit_ZH - * @Date: 2020/12/5 14:05 - * @Description: - */ -@ApiModel(value="角色以及其对应的权限列表", description="") -@Data -public class RoleAuthsVo { - - @ApiModelProperty(value = "角色id") - private Long id; - - @ApiModelProperty(value = "角色") - private String role; - - @ApiModelProperty(value = "描述") - private String description; - - @ApiModelProperty(value = "默认0可用,1不可用") - private Integer status; - - @ApiModelProperty(value = "创建时间") - private Date gmtCreate; - - @ApiModelProperty(value = "修改时间") - private Date gmtModified; - - @ApiModelProperty(value = "权限列表") - private List auths; -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/SubmissionInfoVo.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/SubmissionInfoVo.java deleted file mode 100644 index 70c40cb..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/SubmissionInfoVo.java +++ /dev/null @@ -1,20 +0,0 @@ -package top.hcode.hoj.pojo.vo; - -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import top.hcode.hoj.pojo.entity.judge.Judge; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/11 11:38 - * @Description: - */ -@Data -public class SubmissionInfoVo { - - @ApiModelProperty(value = "提交详情") - private Judge submission; - - @ApiModelProperty(value = "提交者是否可以分享该代码") - private Boolean codeShare; -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/SysMsgVo.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/SysMsgVo.java deleted file mode 100644 index df52377..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/SysMsgVo.java +++ /dev/null @@ -1,38 +0,0 @@ -package top.hcode.hoj.pojo.vo; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.util.Date; - -/** - * @Author: Himit_ZH - * @Date: 2021/10/3 16:36 - * @Description: - */ -@ApiModel(value="用户的系统消息", description="") -@Data -public class SysMsgVo { - - private Long id; - - @ApiModelProperty(value = "通知标题") - private String title; - - @ApiModelProperty(value = "通知内容") - private String content; - - @ApiModelProperty(value = "发布通知的管理员id") - private String adminId; - - @ApiModelProperty(value = "消息类型,系统通知Sys、我的信息Mine") - private String type; - - @ApiModelProperty(value = "是否已读") - private Boolean state; - - private Date gmtCreate; - - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/TestJudgeVo.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/TestJudgeVo.java deleted file mode 100644 index 4d03fad..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/TestJudgeVo.java +++ /dev/null @@ -1,51 +0,0 @@ -package top.hcode.hoj.pojo.vo; - -import lombok.Data; - -/** - * @Author Himit_ZH - * @Date 2022/5/27 - */ -@Data -public class TestJudgeVo { - - /** - * 评测状态码 - */ - private Integer status; - - /** - * 运行时间 ms - */ - private Long time; - - /** - * 运行空间 kb - */ - private Long memory; - - /** - * 用户输入 - */ - private String userInput; - - /** - * 用户输出 - */ - private String userOutput; - - /** - * 预期输出 - */ - private String expectedOutput; - - /** - * 错误信息 - */ - private String stderr; - - /** - * 原题的评测模式:default、spj、interactive - */ - private String problemJudgeMode; -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/TrainingRankVo.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/TrainingRankVo.java deleted file mode 100644 index 1ffaa75..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/TrainingRankVo.java +++ /dev/null @@ -1,47 +0,0 @@ -package top.hcode.hoj.pojo.vo; - -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.experimental.Accessors; - -import java.util.HashMap; - -/** - * @Author: Himit_ZH - * @Date: 2021/11/22 19:58 - * @Description: - */ -@Data -@Accessors(chain = true) -public class TrainingRankVo { - - @ApiModelProperty(value = "用户id") - private String uid; - - @ApiModelProperty(value = "用户名") - private String username; - - @ApiModelProperty(value = "用户真实姓名") - private String realname; - - @ApiModelProperty(value = "昵称") - private String nickname; - - @ApiModelProperty(value = "学校") - private String school; - - @ApiModelProperty(value = "性别") - private String gender; - - @ApiModelProperty(value = "头像") - private String avatar; - - @ApiModelProperty(value = "ac题目数") - private Integer ac; - - @ApiModelProperty(value = "总运行时间ms") - private Integer totalRunTime; - - @ApiModelProperty(value = "有提交的题的提交详情") - private HashMap> submissionInfo; -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/TrainingRecordVo.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/TrainingRecordVo.java deleted file mode 100644 index 86f7ac6..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/TrainingRecordVo.java +++ /dev/null @@ -1,61 +0,0 @@ -package top.hcode.hoj.pojo.vo; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.util.Date; - -/** - * @Author: Himit_ZH - * @Date: 2021/11/21 14:31 - * @Description: - */ -@Data -@ApiModel(value="用户在训练的记录", description="") -public class TrainingRecordVo { - - private Long id; - - @ApiModelProperty(value = "训练id") - private Long tid; - - @ApiModelProperty(value = "训练题目id") - private Long tpid; - - @ApiModelProperty(value = "用户id") - private String uid; - - @ApiModelProperty(value = "题目id") - private Long pid; - - @ApiModelProperty(value = "提交id") - private Long submitId; - - @ApiModelProperty(value = "用户名") - private String username; - - @ApiModelProperty(value = "学校") - private String school; - - @ApiModelProperty(value = "性别") - private String gender; - - @ApiModelProperty(value = "头像") - private String avatar; - - @ApiModelProperty(value = "真实姓名") - private String realname; - - @ApiModelProperty(value = "昵称") - private String nickname; - - @ApiModelProperty(value = "提交结果状态码") - private Integer status; - - @ApiModelProperty(value = "OI得分") - private Integer score; - - @ApiModelProperty(value = "提交耗时") - private Integer useTime; -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/TrainingVo.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/TrainingVo.java deleted file mode 100644 index 51b109a..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/TrainingVo.java +++ /dev/null @@ -1,56 +0,0 @@ -package top.hcode.hoj.pojo.vo; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.io.Serializable; -import java.util.Date; - -/** - * @Author: Himit_ZH - * @Date: 2021/11/20 10:51 - * @Description: - */ -@ApiModel(value="训练题单查询对象TrainingVo", description="") -@Data -public class TrainingVo implements Serializable { - - @ApiModelProperty(value = "训练id") - private Long id; - - @ApiModelProperty(value = "题目标题") - private String title; - - @ApiModelProperty(value = "训练描述") - private String description; - - @ApiModelProperty(value = "训练创建者用户名") - private String author; - - @ApiModelProperty(value = "训练题单权限类型:Public、Private") - private String auth; - - @ApiModelProperty(value = "训练题单的分类名称") - private String categoryName; - - @ApiModelProperty(value = "训练题单的分类背景颜色") - private String categoryColor; - - @ApiModelProperty(value = "训练题单的编号,升序排序") - private Integer rank; - - @ApiModelProperty(value = "该训练的总题数") - private Integer problemCount; - - @ApiModelProperty(value = "当前用户已完成训练的题数") - private Integer acCount; - - @ApiModelProperty(value = "团队ID") - private Long gid; - - @ApiModelProperty(value = "训练更新时间") - private Date gmtModified; - - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/UserCalendarHeatmapVo.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/UserCalendarHeatmapVo.java deleted file mode 100644 index 47212e9..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/UserCalendarHeatmapVo.java +++ /dev/null @@ -1,24 +0,0 @@ -package top.hcode.hoj.pojo.vo; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.io.Serializable; -import java.util.HashMap; -import java.util.List; - -/** - * @Author Himit_ZH - * @Date 2022/5/26 - */ -@Data -@ApiModel(value="用户主页的提交热力图数据类UserCalendarHeatmapVo", description="") -public class UserCalendarHeatmapVo implements Serializable { - - @ApiModelProperty(value = "结尾日期 例如 2022-02-02") - private String endDate; - - @ApiModelProperty(value = "日期对应的提交次数数据列表") - private List> dataList; -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/UserHomeVo.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/UserHomeVo.java deleted file mode 100644 index c356e1b..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/UserHomeVo.java +++ /dev/null @@ -1,67 +0,0 @@ -package top.hcode.hoj.pojo.vo; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.util.Date; -import java.util.List; - -/** - * @Author: Himit_ZH - * @Date: 2021/1/7 22:27 - * @Description:用户主页的数据格式 - */ -@ApiModel(value="用户主页的数据格式类UserHomeVo", description="") -@Data -public class UserHomeVo { - - @ApiModelProperty(value = "用户id") - private String uid; - - @ApiModelProperty(value = "用户名") - private String username; - - @ApiModelProperty(value = "学校") - private String school; - - @ApiModelProperty(value = "个性签名") - private String signature; - - @ApiModelProperty(value = "昵称") - private String nickname; - - @ApiModelProperty(value = "gender") - private String gender; - - @ApiModelProperty(value = "github地址") - private String github; - - @ApiModelProperty(value = "博客地址") - private String blog; - - @ApiModelProperty(value = "头像地址") - private String avatar; - - @ApiModelProperty(value = "头衔、称号") - private String titleName; - - @ApiModelProperty(value = "头衔、称号的颜色") - private String titleColor; - - @ApiModelProperty(value = "总提交数") - private Integer total; - - @ApiModelProperty(value = "cf得分") - private Integer rating; - - @ApiModelProperty(value = "OI得分列表") - private List scoreList; - - @ApiModelProperty(value = "已解决题目列表") - private List solvedList; - - @ApiModelProperty(value = "最近上线时间") - private Date recentLoginTime; - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/UserInfoVo.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/UserInfoVo.java deleted file mode 100644 index 27b8874..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/UserInfoVo.java +++ /dev/null @@ -1,67 +0,0 @@ -package top.hcode.hoj.pojo.vo; - -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.util.List; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/11 16:48 - * @Description: - */ -@Data -public class UserInfoVo { - - @ApiModelProperty(value = "用户id") - private String uid; - - @ApiModelProperty(value = "用户名") - private String username; - - @ApiModelProperty(value = "昵称") - private String nickname; - - @ApiModelProperty(value = "头像") - private String avatar; - - @ApiModelProperty(value = "头衔名称") - private String titleName; - - @ApiModelProperty(value = "头衔背景颜色") - private String titleColor; - - @ApiModelProperty(value = "邮箱") - private String email; - - @ApiModelProperty(value = "学号") - private String number; - - @ApiModelProperty(value = "性别") - private String gender; - - @ApiModelProperty(value = "学校") - private String school; - - @ApiModelProperty(value = "专业") - private String course; - - @ApiModelProperty(value = "个性签名") - private String signature; - - @ApiModelProperty(value = "真实姓名") - private String realname; - - @ApiModelProperty(value = "github地址") - private String github; - - @ApiModelProperty(value = "博客地址") - private String blog; - - @ApiModelProperty(value = "cf的username") - private String cfUsername; - - @ApiModelProperty(value = "角色列表") - private List roleList; - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/UserMsgVo.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/UserMsgVo.java deleted file mode 100644 index 79efa8d..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/UserMsgVo.java +++ /dev/null @@ -1,63 +0,0 @@ -package top.hcode.hoj.pojo.vo; - -import com.baomidou.mybatisplus.annotation.FieldFill; -import com.baomidou.mybatisplus.annotation.TableField; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.util.Date; - -/** - * @Author: Himit_ZH - * @Date: 2021/10/2 20:50 - * @Description: - */ -@ApiModel(value="用户的讨论贴被评论的、被点赞、评论被回复的消息Vo", description="") -@Data -public class UserMsgVo { - - private Long id; - - @ApiModelProperty(value = "动作类型,如点赞讨论帖Like_Post、点赞评论Like_Discuss、评论Discuss、回复Reply等") - private String action; - - @ApiModelProperty(value = "消息来源id,讨论id或比赛id") - private Integer sourceId; - - @ApiModelProperty(value = "事件源类型:'Discussion'、'Contest'等") - private String sourceType; - - @ApiModelProperty(value = "事件源的标题,讨论帖子的标题或者比赛的标题") - private String sourceTitle; - - @ApiModelProperty(value = "事件源的内容,比如回复的内容,回复的评论等等,不超过250字符,超过使用...") - private String sourceContent; - - @ApiModelProperty(value = "事件引用上一级评论或回复id") - private Integer quoteId; - - @ApiModelProperty(value = "事件引用上一级的类型:Comment、Reply") - private String quoteType; - - @ApiModelProperty(value = "事件引用上一级的内容,例如回复你的源评论内容") - private String quoteContent; - - @ApiModelProperty(value = "事件所发生的地点链接 url") - private String url; - - @ApiModelProperty(value = "是否已读") - private Boolean state; - - @ApiModelProperty(value = "动作发出者的uid") - private String senderId; - - @ApiModelProperty(value = "动作发出者的用户名") - private String senderUsername; - - @ApiModelProperty(value = "动作发出者的头像") - private String senderAvatar; - - @TableField(fill = FieldFill.INSERT) - private Date gmtCreate; -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/UserRolesVo.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/UserRolesVo.java deleted file mode 100644 index 0b932b2..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/UserRolesVo.java +++ /dev/null @@ -1,85 +0,0 @@ -package top.hcode.hoj.pojo.vo; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import top.hcode.hoj.pojo.entity.user.Role; - -import java.io.Serializable; -import java.util.Date; -import java.util.List; - -/** - * @Author: Himit_ZH - * @Date: 2020/12/5 13:30 - * @Description: - */ -@ApiModel(value="用户信息以及其对应的角色", description="") -@Data -public class UserRolesVo implements Serializable { - - private static final long serialVersionUID = 10000L; - - @ApiModelProperty(value = "用户id") - private String uid; - - @ApiModelProperty(value = "用户名") - private String username; - - @ApiModelProperty(value = "密码") - private String password; - - @ApiModelProperty(value = "昵称") - private String nickname; - - @ApiModelProperty(value = "学校") - private String school; - - @ApiModelProperty(value = "专业") - private String course; - - @ApiModelProperty(value = "学号") - private String number; - - @ApiModelProperty(value = "性别") - private String gender; - - @ApiModelProperty(value = "真实姓名") - private String realname; - - @ApiModelProperty(value = "cf的username") - private String cfUsername; - - @ApiModelProperty(value = "github地址") - private String github; - - @ApiModelProperty(value = "博客地址") - private String blog; - - @ApiModelProperty(value = "邮箱") - private String email; - - @ApiModelProperty(value = "头像地址") - private String avatar; - - @ApiModelProperty(value = "头衔名称") - private String titleName; - - @ApiModelProperty(value = "头衔背景颜色") - private String titleColor; - - @ApiModelProperty(value = "个性签名") - private String signature; - - @ApiModelProperty(value = "0可用,1不可用") - private int status; - - @ApiModelProperty(value = "创建时间") - private Date gmtCreate; - - @ApiModelProperty(value = "修改时间") - private Date gmtModified; - - @ApiModelProperty(value = "角色列表") - private List roles; -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/UserUnreadMsgCountVo.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/UserUnreadMsgCountVo.java deleted file mode 100644 index e98fe50..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/pojo/vo/UserUnreadMsgCountVo.java +++ /dev/null @@ -1,34 +0,0 @@ -package top.hcode.hoj.pojo.vo; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; - -/** - * @Author: Himit_ZH - * @Date: 2021/10/1 20:59 - * @Description: - */ -@ApiModel(value="用户未读消息统计", description="") -@Data -@AllArgsConstructor -@NoArgsConstructor -public class UserUnreadMsgCountVo { - - @ApiModelProperty(value = "未读评论") - private Integer comment; - - @ApiModelProperty(value = "未读回复") - private Integer reply; - - @ApiModelProperty(value = "未读点赞") - private Integer like; - - @ApiModelProperty(value = "未读系统通知") - private Integer sys; - - @ApiModelProperty(value = "未读我的消息") - private Integer mine; -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/schedule/ScheduleService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/schedule/ScheduleService.java deleted file mode 100644 index db6f0f8..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/schedule/ScheduleService.java +++ /dev/null @@ -1,21 +0,0 @@ -package top.hcode.hoj.schedule; - -public interface ScheduleService { - void deleteAvatar(); - - void deleteTestCase(); - - void deleteContestPrintText(); - - void getOjContestsList(); - - void getCodeforcesRating(); - - void deleteUserSession(); - - void syncNoticeToRecentHalfYearUser(); - - void check20MPendingSubmission(); - - void checkUnHandleGroupProblemApplyProgress(); -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/schedule/ScheduleServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/schedule/ScheduleServiceImpl.java deleted file mode 100644 index 18d0fe0..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/schedule/ScheduleServiceImpl.java +++ /dev/null @@ -1,442 +0,0 @@ -package top.hcode.hoj.schedule; - -import cn.hutool.core.date.DateTime; -import cn.hutool.core.date.DateUtil; -import cn.hutool.core.io.FileUtil; -import cn.hutool.core.map.MapUtil; -import cn.hutool.json.JSONArray; -import cn.hutool.json.JSONObject; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; -import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang.time.DateFormatUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.retry.annotation.Backoff; -import org.springframework.retry.annotation.Retryable; -import org.springframework.scheduling.annotation.Scheduled; -import org.springframework.stereotype.Service; -import org.springframework.util.CollectionUtils; -import top.hcode.hoj.dao.common.FileEntityService; -import top.hcode.hoj.dao.judge.JudgeEntityService; -import top.hcode.hoj.dao.msg.AdminSysNoticeEntityService; -import top.hcode.hoj.dao.msg.UserSysNoticeEntityService; -import top.hcode.hoj.dao.problem.ProblemEntityService; -import top.hcode.hoj.dao.user.SessionEntityService; -import top.hcode.hoj.dao.user.UserInfoEntityService; -import top.hcode.hoj.dao.user.UserRecordEntityService; -import top.hcode.hoj.manager.msg.AdminNoticeManager; -import top.hcode.hoj.pojo.entity.common.File; -import top.hcode.hoj.pojo.entity.judge.Judge; -import top.hcode.hoj.pojo.entity.msg.AdminSysNotice; -import top.hcode.hoj.pojo.entity.msg.UserSysNotice; -import top.hcode.hoj.pojo.entity.problem.Problem; -import top.hcode.hoj.pojo.entity.user.Session; -import top.hcode.hoj.pojo.entity.user.UserInfo; -import top.hcode.hoj.pojo.entity.user.UserRecord; -import top.hcode.hoj.service.admin.rejudge.RejudgeService; -import top.hcode.hoj.utils.Constants; -import top.hcode.hoj.utils.JsoupUtils; -import top.hcode.hoj.utils.RedisUtils; - -import javax.annotation.Resource; -import java.util.*; -import java.util.concurrent.TimeUnit; -import java.util.stream.Collectors; - - -/** - * 一个cron表达式有至少6个(也可能7个)有空格分隔的时间元素。按顺序依次为: - *

- * 字段 允许值 允许的特殊字符 - * 秒 0~59 , - * / - * 分 0~59 , - * / - * 小时 0~23 , - * / - * 日期 1-31 , - * ? / L W C - * 月份 1~12或者JAN~DEC , - * / - * 星期 1~7或者SUN~SAT , - * ? / L C # - * 年(可选) 留空,1970~2099 , - * / - *

- * “*” 字符代表所有可能的值 - * “-” 字符代表数字范围 例如1-5 - * “/” 字符用来指定数值的增量 - * “?” 字符仅被用于天(月)和天(星期)两个子表达式,表示不指定值。 - * 当2个子表达式其中之一被指定了值以后,为了避免冲突,需要将另一个子表达式的值设为“?” - * “L” 字符仅被用于天(月)和天(星期)两个子表达式,它是单词“last”的缩写 - * 如果在“L”前有具体的内容,它就具有其他的含义了。 - * “W” 字符代表着平日(Mon-Fri),并且仅能用于日域中。它用来指定离指定日的最近的一个平日。 - * 大部分的商业处理都是基于工作周的,所以 W 字符可能是非常重要的。 - * "C" 代表“Calendar”的意思。它的意思是计划所关联的日期,如果日期没有被关联,则相当于日历中所有日期。 - */ -@Service -@Slf4j(topic = "hoj") -public class ScheduleServiceImpl implements ScheduleService { - - @Autowired - private FileEntityService fileEntityService; - - @Autowired - private RedisUtils redisUtils; - - @Autowired - private UserInfoEntityService userInfoEntityService; - - @Autowired - private UserRecordEntityService userRecordEntityService; - - @Resource - private SessionEntityService sessionEntityService; - - @Resource - private AdminSysNoticeEntityService adminSysNoticeEntityService; - - @Resource - private UserSysNoticeEntityService userSysNoticeEntityService; - - @Resource - private JudgeEntityService judgeEntityService; - - @Resource - private RejudgeService rejudgeService; - - @Resource - private ProblemEntityService problemEntityService; - - @Resource - private AdminNoticeManager adminNoticeManager; - - /** - * @MethodName deleteAvatar - * @Params * @param null - * @Description 每天3点定时查询数据库字段并删除未引用的头像 - * @Return - * @Since 2021/1/13 - */ - @Scheduled(cron = "0 0 3 * * *") - @Override - public void deleteAvatar() { - List files = fileEntityService.queryDeleteAvatarList(); - // 如果查不到,直接结束 - if (files.isEmpty()) { - return; - } - List idLists = new LinkedList<>(); - for (File file : files) { - if (file.getDelete()) { - boolean delSuccess = FileUtil.del(file.getFilePath()); - if (delSuccess) { - idLists.add(file.getId()); - } - } - } - - boolean isSuccess = fileEntityService.removeByIds(idLists); - if (!isSuccess) { - log.error("数据库file表删除头像数据失败----------------->sql语句执行失败"); - } - } - - - /** - * @MethodName deleteTestCase - * @Params * @param null - * @Description 每天3点定时删除指定文件夹的上传测试数据 - * @Return - * @Since 2021/2/7 - */ - @Scheduled(cron = "0 0 3 * * *") -// @Scheduled(cron = "0/5 * * * * *") - @Override - public void deleteTestCase() { - boolean result = FileUtil.del(Constants.File.TESTCASE_TMP_FOLDER.getPath()); - if (!result) { - log.error("每日定时任务异常------------------------>{}", "清除本地的题目测试数据失败!"); - } - } - - /** - * @MethodName deleteContestPrintText - * @Params * @param null - * @Description 每天4点定时删除本地的比赛打印数据 - * @Return - * @Since 2021/9/19 - */ - @Scheduled(cron = "0 0 4 * * *") - @Override - public void deleteContestPrintText() { - boolean result = FileUtil.del(Constants.File.CONTEST_TEXT_PRINT_FOLDER.getPath()); - if (!result) { - log.error("每日定时任务异常------------------------>{}", "清除本地的比赛打印数据失败!"); - } - } - - /** - * 每两小时获取其他OJ的比赛列表,并保存在redis里 - * 保存格式: - * oj: "Codeforces", - * title: "Codeforces Round #680 (Div. 1, based on VK Cup 2020-2021 - Final)", - * beginTime: "2020-11-08T05:00:00Z", - * endTime: "2020-11-08T08:00:00Z", - */ - @Scheduled(cron = "0 0 0/2 * * *") -// @Scheduled(cron = "0/5 * * * * *") - @Override - public void getOjContestsList() { - // 待格式化的API,需要填充年月查询 - String nowcoderContestAPI = "https://ac.nowcoder.com/acm/calendar/contest?token=&month=%d-%d"; - // 将获取的比赛列表添加进这里 - List> contestsList = new ArrayList<>(); - // 获取当前年月 - DateTime dateTime = DateUtil.date(); - // offsetMonth 增加的月份,只枚举最近3个月的比赛 - for (int offsetMonth = 0; offsetMonth <= 2; offsetMonth++) { - // 月份增加i个月 - DateTime newDate = DateUtil.offsetMonth(dateTime, offsetMonth); - // 格式化API 月份从0-11,所以要加一 - String contestAPI = String.format(nowcoderContestAPI, newDate.year(), newDate.month() + 1); - try { - // 连接api,获取json格式对象 - JSONObject resultObject = JsoupUtils.getJsonFromConnection(JsoupUtils.getConnectionFromUrl(contestAPI, null, null)); - // 比赛列表存放在data字段中 - JSONArray contestsArray = resultObject.getJSONArray("data"); - // 牛客比赛列表按时间顺序排序,所以从后向前取可以减少不必要的遍历 - for (int i = contestsArray.size() - 1; i >= 0; i--) { - JSONObject contest = contestsArray.getJSONObject(i); - // 如果比赛已经结束了,则直接结束 - if (contest.getLong("endTime", 0L) < dateTime.getTime()) { - break; - } - // 把比赛列表信息添加在List里 - contestsList.add(MapUtil.builder(new HashMap()) - .put("oj", contest.getStr("ojName")) - .put("url", contest.getStr("link")) - .put("title", contest.getStr("contestName")) - .put("beginTime", new Date(contest.getLong("startTime"))) - .put("endTime", new Date(contest.getLong("endTime"))).map()); - } - } catch (Exception e) { - log.error("爬虫爬取Nowcoder比赛异常----------------------->{}", e.getMessage()); - } - } - // 把比赛列表按照开始时间排序,方便查看 - contestsList.sort((o1, o2) -> { - - long beginTime1 = ((Date) o1.get("beginTime")).getTime(); - long beginTime2 = ((Date) o2.get("beginTime")).getTime(); - - return Long.compare(beginTime1, beginTime2); - }); - - // 获取对应的redis key - String redisKey = Constants.Schedule.RECENT_OTHER_CONTEST.getCode(); - // 缓存时间一天 - redisUtils.set(redisKey, contestsList, 60 * 60 * 24); - // 增加log提示 - log.info("获取牛客API的比赛列表成功!共获取数据" + contestsList.size() + "条"); - } - - - /** - * 每天3点获取codeforces的rating分数 - */ - @Scheduled(cron = "0 0 3 * * *") -// @Scheduled(cron = "0/5 * * * * *") - @Override - public void getCodeforcesRating() { - String codeforcesUserInfoAPI = "https://codeforces.com/api/user.info?handles=%s"; - QueryWrapper userInfoQueryWrapper = new QueryWrapper<>(); - // 查询cf_username不为空的数据 - userInfoQueryWrapper.isNotNull("cf_username"); - List userInfoList = userInfoEntityService.list(userInfoQueryWrapper); - for (UserInfo userInfo : userInfoList) { - // 获取cf名字 - String cfUsername = userInfo.getCfUsername(); - // 获取uuid - String uuid = userInfo.getUuid(); - // 格式化api - String ratingAPI = String.format(codeforcesUserInfoAPI, cfUsername); - try { - // 连接api,获取json格式对象 - JSONObject resultObject = getCFUserInfo(ratingAPI); - // 获取状态码 - String status = resultObject.getStr("status"); - // 如果查无此用户,则跳过 - if ("FAILED".equals(status)) { - continue; - } - // 用户信息存放在result列表中的第0个 - JSONObject cfUserInfo = resultObject.getJSONArray("result").getJSONObject(0); - // 获取cf的分数 - Integer cfRating = cfUserInfo.getInt("rating", null); - UpdateWrapper userRecordUpdateWrapper = new UpdateWrapper<>(); - // 将对应的cf分数修改 - userRecordUpdateWrapper.eq("uid", uuid).set("rating", cfRating); - boolean result = userRecordEntityService.update(userRecordUpdateWrapper); - if (!result) { - log.error("插入UserRecord表失败------------------------------->"); - } - - } catch (Exception e) { - log.error("爬虫爬取Codeforces Rating分数异常----------------------->{}", e.getMessage()); - } - try { - TimeUnit.SECONDS.sleep(2); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - log.info("获取Codeforces Rating成功!"); - } - - @Retryable(value = Exception.class, - maxAttempts = 5, - backoff = @Backoff(delay = 1000, multiplier = 1.4)) - public JSONObject getCFUserInfo(String url) throws Exception { - return JsoupUtils.getJsonFromConnection(JsoupUtils.getConnectionFromUrl(url, null, null)); - } - - - /** - * @MethodName deleteUserSession - * @Params * @param null - * @Description 每天3点定时删除用户半年的session表记录 - * @Return - * @Since 2021/9/6 - */ - @Scheduled(cron = "0 0 3 * * *") -// @Scheduled(cron = "0/5 * * * * *") - @Override - public void deleteUserSession() { - QueryWrapper sessionQueryWrapper = new QueryWrapper<>(); - DateTime dateTime = DateUtil.offsetMonth(new Date(), -6); - String strTime = DateFormatUtils.format(dateTime, "yyyy-MM-dd HH:mm:ss"); - sessionQueryWrapper.select("distinct uid"); - sessionQueryWrapper.apply("UNIX_TIMESTAMP(gmt_create) >= UNIX_TIMESTAMP('" + strTime + "')"); - List sessionList = sessionEntityService.list(sessionQueryWrapper); - if (sessionList.size() > 0) { - List uidList = sessionList.stream().map(Session::getUid).collect(Collectors.toList()); - QueryWrapper queryWrapper = new QueryWrapper<>(); - queryWrapper.in("uid", uidList) - .apply("UNIX_TIMESTAMP('" + strTime + "') > UNIX_TIMESTAMP(gmt_create)"); - List needDeletedSessionList = sessionEntityService.list(queryWrapper); - if (needDeletedSessionList.size() > 0) { - List needDeletedIdList = needDeletedSessionList.stream().map(Session::getId).collect(Collectors.toList()); - boolean isOk = sessionEntityService.removeByIds(needDeletedIdList); - if (!isOk) { - log.error("=============数据库session表定时删除用户6个月前的记录失败==============="); - } - } - } - } - - - /** - * @MethodName syncNoticeToUser - * @Description 每一小时拉取系统通知表admin_sys_notice到表user_sys_notice(只推送给半年内有登录过的用户) - * @Return - * @Since 2021/10/3 - */ - @Override - @Scheduled(cron = "0 0 0/1 * * *") - public void syncNoticeToRecentHalfYearUser() { - QueryWrapper adminSysNoticeQueryWrapper = new QueryWrapper<>(); - adminSysNoticeQueryWrapper.eq("state", false); - List adminSysNotices = adminSysNoticeEntityService.list(adminSysNoticeQueryWrapper); - if (adminSysNotices.size() == 0) { - return; - } - - QueryWrapper sessionQueryWrapper = new QueryWrapper<>(); - sessionQueryWrapper.select("DISTINCT uid"); - List sessionList = sessionEntityService.list(sessionQueryWrapper); - List userIds = sessionList.stream().map(Session::getUid).collect(Collectors.toList()); - - for (AdminSysNotice adminSysNotice : adminSysNotices) { - switch (adminSysNotice.getType()) { - case "All": - List userSysNoticeList = new ArrayList<>(); - for (String uid : userIds) { - UserSysNotice userSysNotice = new UserSysNotice(); - userSysNotice.setRecipientId(uid) - .setType("Sys") - .setSysNoticeId(adminSysNotice.getId()); - userSysNoticeList.add(userSysNotice); - } - boolean isOk1 = userSysNoticeEntityService.saveOrUpdateBatch(userSysNoticeList); - if (isOk1) { - adminSysNotice.setState(true); - } - break; - case "Single": - UserSysNotice userSysNotice = new UserSysNotice(); - userSysNotice.setRecipientId(adminSysNotice.getRecipientId()) - .setType("Mine") - .setSysNoticeId(adminSysNotice.getId()); - boolean isOk2 = userSysNoticeEntityService.saveOrUpdate(userSysNotice); - if (isOk2) { - adminSysNotice.setState(true); - } - break; - case "Admin": - break; - } - - } - - boolean isUpdateNoticeOk = adminSysNoticeEntityService.saveOrUpdateBatch(adminSysNotices); - if (!isUpdateNoticeOk) { - log.error("=============推送系统通知更新状态失败==============="); - } - - } - - @Override - @Scheduled(cron = "0 0/20 * * * ?") - public void check20MPendingSubmission() { - DateTime dateTime = DateUtil.offsetMinute(new Date(), -15); - String strTime = DateFormatUtils.format(dateTime, "yyyy-MM-dd HH:mm:ss"); - - QueryWrapper judgeQueryWrapper = new QueryWrapper<>(); - judgeQueryWrapper.select("distinct submit_id"); - judgeQueryWrapper.eq("status", Constants.Judge.STATUS_PENDING.getStatus()); - judgeQueryWrapper.apply("UNIX_TIMESTAMP('" + strTime + "') > UNIX_TIMESTAMP(gmt_modified)"); - List judgeList = judgeEntityService.list(judgeQueryWrapper); - if (!CollectionUtils.isEmpty(judgeList)) { - log.info("Half An Hour Check Pending Submission to Rejudge:" + Arrays.toString(judgeList.toArray())); - for (Judge judge : judgeList) { - rejudgeService.rejudge(judge.getSubmitId()); - } - } - } - - /** - * 每天6点检查一次有没有处于正在申请中的团队题目申请公开的进度单子,发消息给超级管理和题目管理员 - */ - @Override - @Scheduled(cron = "0 0 6 * * *") -// @Scheduled(cron = "0/5 * * * * *") - public void checkUnHandleGroupProblemApplyProgress() { - QueryWrapper problemQueryWrapper = new QueryWrapper<>(); - problemQueryWrapper.eq("apply_public_progress", 1).isNotNull("gid"); - int count = problemEntityService.count(problemQueryWrapper); - if (count > 0) { - String title = "团队题目审批通知(Group Problem Approval Notice)"; - String content = getDissolutionGroupContent(count); - List superAdminUidList = userInfoEntityService.getSuperAdminUidList(); - List problemAdminUidList = userInfoEntityService.getProblemAdminUidList(); - if (!CollectionUtils.isEmpty(problemAdminUidList)) { - superAdminUidList.addAll(problemAdminUidList); - } - adminNoticeManager.addSingleNoticeToBatchUser(null, superAdminUidList, title, content, "Sys"); - } - } - - private String getDissolutionGroupContent(int count) { - return "您好,尊敬的管理员,目前有**" + count + - "**条团队题目正在申请公开的单子,请您尽快前往后台 [团队题目审批](/admin/group-problem/apply) 进行审批!" - + "\n\n" + - "Hello, dear administrator, there are currently **" + count - + "** problem problems applying for public list. " + - "Please go to the backstage [Group Problem Examine](/admin/group-problem/apply) for approval as soon as possible!"; - } - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/account/AdminAccountService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/account/AdminAccountService.java deleted file mode 100644 index d7a3ff0..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/account/AdminAccountService.java +++ /dev/null @@ -1,18 +0,0 @@ -package top.hcode.hoj.service.admin.account; - - -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.dto.LoginDto; -import top.hcode.hoj.pojo.vo.UserInfoVo; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/9 10:10 - * @Description: - */ -public interface AdminAccountService { - - public CommonResult login(LoginDto loginDto); - - public CommonResult logout(); -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/account/impl/AdminAccountServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/account/impl/AdminAccountServiceImpl.java deleted file mode 100644 index 99bdb08..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/account/impl/AdminAccountServiceImpl.java +++ /dev/null @@ -1,43 +0,0 @@ -package top.hcode.hoj.service.admin.account.impl; - -import org.springframework.stereotype.Service; -import top.hcode.hoj.common.exception.StatusAccessDeniedException; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.common.result.ResultStatus; -import top.hcode.hoj.manager.admin.account.AdminAccountManager; -import top.hcode.hoj.pojo.vo.UserInfoVo; -import top.hcode.hoj.service.admin.account.AdminAccountService; -import top.hcode.hoj.pojo.dto.LoginDto; - -import javax.annotation.Resource; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/9 10:22 - * @Description: - */ - -@Service -public class AdminAccountServiceImpl implements AdminAccountService { - - @Resource - private AdminAccountManager adminAccountManager; - - @Override - public CommonResult login(LoginDto loginDto) { - try { - return CommonResult.successResponse(adminAccountManager.login(loginDto)); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } catch (StatusAccessDeniedException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.ACCESS_DENIED); - } - } - - @Override - public CommonResult logout() { - adminAccountManager.logout(); - return CommonResult.successResponse("退出登录成功!"); - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/announcement/AdminAnnouncementService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/announcement/AdminAnnouncementService.java deleted file mode 100644 index 6f4654f..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/announcement/AdminAnnouncementService.java +++ /dev/null @@ -1,22 +0,0 @@ -package top.hcode.hoj.service.admin.announcement; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.entity.common.Announcement; -import top.hcode.hoj.pojo.vo.AnnouncementVo; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/9 22:11 - * @Description: - */ -public interface AdminAnnouncementService { - - public CommonResult> getAnnouncementList(Integer limit, Integer currentPage); - - public CommonResult deleteAnnouncement(Long aid); - - public CommonResult addAnnouncement(Announcement announcement); - - public CommonResult updateAnnouncement(Announcement announcement); -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/announcement/impl/AdminAnnouncementServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/announcement/impl/AdminAnnouncementServiceImpl.java deleted file mode 100644 index b539b27..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/announcement/impl/AdminAnnouncementServiceImpl.java +++ /dev/null @@ -1,59 +0,0 @@ -package top.hcode.hoj.service.admin.announcement.impl; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.springframework.stereotype.Service; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.manager.admin.announcement.AdminAnnouncementManager; -import top.hcode.hoj.pojo.entity.common.Announcement; -import top.hcode.hoj.pojo.vo.AnnouncementVo; -import top.hcode.hoj.service.admin.announcement.AdminAnnouncementService; - -import javax.annotation.Resource; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/9 22:15 - * @Description: - */ -@Service -public class AdminAnnouncementServiceImpl implements AdminAnnouncementService { - - @Resource - private AdminAnnouncementManager adminAnnouncementManager; - - @Override - public CommonResult> getAnnouncementList(Integer limit, Integer currentPage) { - return CommonResult.successResponse(adminAnnouncementManager.getAnnouncementList(limit, currentPage)); - } - - @Override - public CommonResult deleteAnnouncement(Long aid) { - try { - adminAnnouncementManager.deleteAnnouncement(aid); - return CommonResult.successResponse(); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } - } - - @Override - public CommonResult addAnnouncement(Announcement announcement) { - try { - adminAnnouncementManager.addAnnouncement(announcement); - return CommonResult.successResponse(); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } - } - - @Override - public CommonResult updateAnnouncement(Announcement announcement) { - try { - adminAnnouncementManager.updateAnnouncement(announcement); - return CommonResult.successResponse(); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/contest/AdminContestAnnouncementService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/contest/AdminContestAnnouncementService.java deleted file mode 100644 index f4e56c4..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/contest/AdminContestAnnouncementService.java +++ /dev/null @@ -1,19 +0,0 @@ -package top.hcode.hoj.service.admin.contest; - - -import com.baomidou.mybatisplus.core.metadata.IPage; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.dto.AnnouncementDto; -import top.hcode.hoj.pojo.vo.AnnouncementVo; - - -public interface AdminContestAnnouncementService { - - public CommonResult> getAnnouncementList(Integer limit, Integer currentPage, Long cid); - - public CommonResult deleteAnnouncement(Long aid); - - public CommonResult addAnnouncement(AnnouncementDto announcementDto); - - public CommonResult updateAnnouncement(AnnouncementDto announcementDto); -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/contest/AdminContestProblemService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/contest/AdminContestProblemService.java deleted file mode 100644 index 1ceb7f9..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/contest/AdminContestProblemService.java +++ /dev/null @@ -1,34 +0,0 @@ -package top.hcode.hoj.service.admin.contest; - -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.dto.ContestProblemDto; -import top.hcode.hoj.pojo.dto.ProblemDto; -import top.hcode.hoj.pojo.entity.contest.ContestProblem; -import top.hcode.hoj.pojo.entity.problem.Problem; - -import java.util.HashMap; -import java.util.Map; - - -public interface AdminContestProblemService { - - public CommonResult> getProblemList(Integer limit, Integer currentPage, String keyword, - Long cid, Integer problemType, String oj); - - public CommonResult getProblem(Long pid); - - public CommonResult deleteProblem(Long pid, Long cid); - - public CommonResult> addProblem(ProblemDto problemDto); - - public CommonResult updateProblem(ProblemDto problemDto); - - public CommonResult getContestProblem(Long cid, Long pid); - - public CommonResult setContestProblem(ContestProblem contestProblem); - - public CommonResult addProblemFromPublic(ContestProblemDto contestProblemDto); - - public CommonResult importContestRemoteOJProblem(String name, String problemId, Long cid, String displayId); - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/contest/AdminContestService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/contest/AdminContestService.java deleted file mode 100644 index 63f50e1..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/contest/AdminContestService.java +++ /dev/null @@ -1,26 +0,0 @@ -package top.hcode.hoj.service.admin.contest; - -; -import com.baomidou.mybatisplus.core.metadata.IPage; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.entity.contest.Contest; -import top.hcode.hoj.pojo.vo.AdminContestVo; - - -public interface AdminContestService { - - public CommonResult> getContestList(Integer limit, Integer currentPage, String keyword); - - public CommonResult getContest(Long cid); - - public CommonResult deleteContest(Long cid); - - public CommonResult addContest(AdminContestVo adminContestVo); - - public CommonResult cloneContest(Long cid); - - public CommonResult updateContest(AdminContestVo adminContestVo); - - public CommonResult changeContestVisible(Long cid, String uid, Boolean visible); - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/contest/impl/AdminContestAnnouncementServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/contest/impl/AdminContestAnnouncementServiceImpl.java deleted file mode 100644 index df89f0d..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/contest/impl/AdminContestAnnouncementServiceImpl.java +++ /dev/null @@ -1,60 +0,0 @@ -package top.hcode.hoj.service.admin.contest.impl; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.manager.admin.contest.AdminContestAnnouncementManager; -import top.hcode.hoj.pojo.dto.AnnouncementDto; -import top.hcode.hoj.pojo.vo.AnnouncementVo; -import top.hcode.hoj.service.admin.contest.AdminContestAnnouncementService; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/9 11:18 - * @Description: - */ - -@Service -public class AdminContestAnnouncementServiceImpl implements AdminContestAnnouncementService { - - @Autowired - private AdminContestAnnouncementManager adminContestAnnouncementManager; - - @Override - public CommonResult> getAnnouncementList(Integer limit, Integer currentPage, Long cid) { - IPage announcementList = adminContestAnnouncementManager.getAnnouncementList(limit, currentPage, cid); - return CommonResult.successResponse(announcementList); - } - - @Override - public CommonResult deleteAnnouncement(Long aid) { - try { - adminContestAnnouncementManager.deleteAnnouncement(aid); - return CommonResult.successResponse(); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } - } - - @Override - public CommonResult addAnnouncement(AnnouncementDto announcementDto) { - try { - adminContestAnnouncementManager.addAnnouncement(announcementDto); - return CommonResult.successResponse(); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } - } - - @Override - public CommonResult updateAnnouncement(AnnouncementDto announcementDto) { - try { - adminContestAnnouncementManager.updateAnnouncement(announcementDto); - return CommonResult.successResponse(); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/contest/impl/AdminContestProblemServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/contest/impl/AdminContestProblemServiceImpl.java deleted file mode 100644 index 90a1fb8..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/contest/impl/AdminContestProblemServiceImpl.java +++ /dev/null @@ -1,115 +0,0 @@ -package top.hcode.hoj.service.admin.contest.impl; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.exception.StatusForbiddenException; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.common.result.ResultStatus; -import top.hcode.hoj.manager.admin.contest.AdminContestProblemManager; -import top.hcode.hoj.pojo.dto.ContestProblemDto; -import top.hcode.hoj.pojo.dto.ProblemDto; -import top.hcode.hoj.pojo.entity.contest.ContestProblem; -import top.hcode.hoj.pojo.entity.problem.Problem; -import top.hcode.hoj.service.admin.contest.AdminContestProblemService; - -import java.util.HashMap; -import java.util.Map; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/9 11:17 - * @Description: - */ - -@Service -public class AdminContestProblemServiceImpl implements AdminContestProblemService { - - @Autowired - private AdminContestProblemManager adminContestProblemManager; - - @Override - public CommonResult> getProblemList(Integer limit, Integer currentPage, String keyword, Long cid, Integer problemType, String oj) { - HashMap problemList = adminContestProblemManager.getProblemList(limit, currentPage, keyword, cid, problemType, oj); - return CommonResult.successResponse(problemList); - } - - @Override - public CommonResult getProblem(Long pid) { - try { - Problem problem = adminContestProblemManager.getProblem(pid); - return CommonResult.successResponse(problem); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } - } - - @Override - public CommonResult deleteProblem(Long pid, Long cid) { - adminContestProblemManager.deleteProblem(pid, cid); - return CommonResult.successResponse(); - } - - @Override - public CommonResult> addProblem(ProblemDto problemDto) { - try { - Map problemMap = adminContestProblemManager.addProblem(problemDto); - return CommonResult.successResponse(problemMap); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } - } - - @Override - public CommonResult updateProblem(ProblemDto problemDto) { - try { - adminContestProblemManager.updateProblem(problemDto); - return CommonResult.successResponse(); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } - } - - @Override - public CommonResult getContestProblem(Long cid, Long pid) { - try { - ContestProblem contestProblem = adminContestProblemManager.getContestProblem(cid, pid); - return CommonResult.successResponse(contestProblem); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } - } - - @Override - public CommonResult setContestProblem(ContestProblem contestProblem) { - try { - return CommonResult.successResponse(adminContestProblemManager.setContestProblem(contestProblem)); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } - } - - @Override - public CommonResult addProblemFromPublic(ContestProblemDto contestProblemDto) { - try { - adminContestProblemManager.addProblemFromPublic(contestProblemDto); - return CommonResult.successResponse(); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } - } - - @Override - public CommonResult importContestRemoteOJProblem(String name, String problemId, Long cid, String displayId) { - try { - adminContestProblemManager.importContestRemoteOJProblem(name, problemId, cid, displayId); - return CommonResult.successResponse(); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/contest/impl/AdminContestServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/contest/impl/AdminContestServiceImpl.java deleted file mode 100644 index c6d0744..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/contest/impl/AdminContestServiceImpl.java +++ /dev/null @@ -1,99 +0,0 @@ -package top.hcode.hoj.service.admin.contest.impl; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.exception.StatusForbiddenException; -import top.hcode.hoj.common.exception.StatusSystemErrorException; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.common.result.ResultStatus; -import top.hcode.hoj.manager.admin.contest.AdminContestManager; -import top.hcode.hoj.pojo.entity.contest.Contest; -import top.hcode.hoj.pojo.vo.AdminContestVo; -import top.hcode.hoj.service.admin.contest.AdminContestService; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/9 11:17 - * @Description: - */ -@Service -public class AdminContestServiceImpl implements AdminContestService { - - @Autowired - private AdminContestManager adminContestManager; - - @Override - public CommonResult> getContestList(Integer limit, Integer currentPage, String keyword) { - IPage contestList = adminContestManager.getContestList(limit, currentPage, keyword); - return CommonResult.successResponse(contestList); - } - - @Override - public CommonResult getContest(Long cid) { - try { - AdminContestVo adminContestVo = adminContestManager.getContest(cid); - return CommonResult.successResponse(adminContestVo); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } - } - - @Override - public CommonResult deleteContest(Long cid) { - try { - adminContestManager.deleteContest(cid); - return CommonResult.successResponse(); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } - } - - @Override - public CommonResult addContest(AdminContestVo adminContestVo) { - try { - adminContestManager.addContest(adminContestVo); - return CommonResult.successResponse(); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } - } - - @Override - public CommonResult cloneContest(Long cid) { - try { - adminContestManager.cloneContest(cid); - return CommonResult.successResponse(); - }catch (StatusSystemErrorException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.SYSTEM_ERROR); - } - } - - @Override - public CommonResult updateContest(AdminContestVo adminContestVo) { - - try { - adminContestManager.updateContest(adminContestVo); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } - return CommonResult.successResponse(); - } - - @Override - public CommonResult changeContestVisible(Long cid, String uid, Boolean visible) { - try { - adminContestManager.changeContestVisible(cid, uid, visible); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } - return CommonResult.successResponse(); - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/discussion/AdminDiscussionService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/discussion/AdminDiscussionService.java deleted file mode 100644 index a9e98fc..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/discussion/AdminDiscussionService.java +++ /dev/null @@ -1,25 +0,0 @@ -package top.hcode.hoj.service.admin.discussion; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.entity.discussion.Discussion; -import top.hcode.hoj.pojo.entity.discussion.DiscussionReport; -import top.hcode.hoj.pojo.vo.DiscussionReportVo; - -import java.util.List; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/9 16:03 - * @Description: - */ -public interface AdminDiscussionService { - - public CommonResult updateDiscussion(Discussion discussion); - - public CommonResult removeDiscussion(List didList); - - public CommonResult> getDiscussionReport(Integer limit, Integer currentPage); - - public CommonResult updateDiscussionReport(DiscussionReport discussionReport); -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/discussion/impl/AdminDiscussionServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/discussion/impl/AdminDiscussionServiceImpl.java deleted file mode 100644 index 46215de..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/discussion/impl/AdminDiscussionServiceImpl.java +++ /dev/null @@ -1,64 +0,0 @@ -package top.hcode.hoj.service.admin.discussion.impl; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.manager.admin.discussion.AdminDiscussionManager; -import top.hcode.hoj.pojo.entity.discussion.Discussion; -import top.hcode.hoj.pojo.entity.discussion.DiscussionReport; -import top.hcode.hoj.pojo.vo.DiscussionReportVo; -import top.hcode.hoj.service.admin.discussion.AdminDiscussionService; - -import java.util.List; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/9 16:05 - * @Description: - */ - -@Service -public class AdminDiscussionServiceImpl implements AdminDiscussionService { - - @Autowired - private AdminDiscussionManager adminDiscussionManager; - - @Override - public CommonResult updateDiscussion(Discussion discussion) { - try { - adminDiscussionManager.updateDiscussion(discussion); - return CommonResult.successResponse(); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } - } - - @Override - public CommonResult removeDiscussion(List didList) { - try { - adminDiscussionManager.removeDiscussion(didList); - return CommonResult.successResponse(); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } - } - - @Override - public CommonResult> getDiscussionReport(Integer limit, Integer currentPage) { - IPage discussionReportIPage = adminDiscussionManager.getDiscussionReport(limit, currentPage); - return CommonResult.successResponse(discussionReportIPage); - } - - - @Override - public CommonResult updateDiscussionReport(DiscussionReport discussionReport) { - try { - adminDiscussionManager.updateDiscussionReport(discussionReport); - return CommonResult.successResponse(); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/problem/AdminGroupProblemService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/problem/AdminGroupProblemService.java deleted file mode 100644 index 89c783c..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/problem/AdminGroupProblemService.java +++ /dev/null @@ -1,17 +0,0 @@ -package top.hcode.hoj.service.admin.problem; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.dto.ChangeGroupProblemProgressDto; -import top.hcode.hoj.pojo.entity.problem.Problem; - -/** - * @Author Himit_ZH - * @Date 2022/4/13 - */ -public interface AdminGroupProblemService { - - public CommonResult> getProblemList(Integer currentPage, Integer limit, String keyword, Long gid); - - public CommonResult changeProgress(ChangeGroupProblemProgressDto changeGroupProblemProgressDto); -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/problem/AdminProblemService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/problem/AdminProblemService.java deleted file mode 100644 index 97086c0..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/problem/AdminProblemService.java +++ /dev/null @@ -1,34 +0,0 @@ -package top.hcode.hoj.service.admin.problem; - -import com.baomidou.mybatisplus.core.metadata.IPage; - -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.dto.ProblemDto; -import top.hcode.hoj.pojo.dto.CompileDTO; -import top.hcode.hoj.pojo.entity.problem.Problem; -import top.hcode.hoj.pojo.entity.problem.ProblemCase; -import java.util.List; - - -public interface AdminProblemService { - - public CommonResult> getProblemList(Integer limit, Integer currentPage, String keyword, Integer auth, String oj); - - public CommonResult getProblem(Long pid); - - public CommonResult deleteProblem(Long pid); - - public CommonResult addProblem(ProblemDto problemDto); - - public CommonResult updateProblem(ProblemDto problemDto); - - public CommonResult> getProblemCases(Long pid, Boolean isUpload); - - public CommonResult compileSpj(CompileDTO compileDTO); - - public CommonResult compileInteractive(CompileDTO compileDTO); - - public CommonResult importRemoteOJProblem(String name,String problemId); - - public CommonResult changeProblemAuth(Problem problem); -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/problem/impl/AdminGroupProblemServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/problem/impl/AdminGroupProblemServiceImpl.java deleted file mode 100644 index f32e645..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/problem/impl/AdminGroupProblemServiceImpl.java +++ /dev/null @@ -1,39 +0,0 @@ -package top.hcode.hoj.service.admin.problem.impl; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.springframework.stereotype.Service; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.common.result.ResultStatus; -import top.hcode.hoj.manager.admin.problem.AdminGroupProblemManager; -import top.hcode.hoj.pojo.dto.ChangeGroupProblemProgressDto; -import top.hcode.hoj.pojo.entity.problem.Problem; -import top.hcode.hoj.service.admin.problem.AdminGroupProblemService; - -import javax.annotation.Resource; - -/** - * @Author Himit_ZH - * @Date 2022/4/13 - */ -@Service -public class AdminGroupProblemServiceImpl implements AdminGroupProblemService { - - @Resource - private AdminGroupProblemManager adminGroupProblemManager; - - @Override - public CommonResult> getProblemList(Integer currentPage, Integer limit, String keyword, Long gid) { - return CommonResult.successResponse(adminGroupProblemManager.list(currentPage, limit, keyword, gid)); - } - - @Override - public CommonResult changeProgress(ChangeGroupProblemProgressDto changeGroupProblemProgressDto) { - try { - adminGroupProblemManager.changeProgress(changeGroupProblemProgressDto); - return CommonResult.successResponse(); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FAIL); - } - } -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/problem/impl/AdminProblemServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/problem/impl/AdminProblemServiceImpl.java deleted file mode 100644 index 69ada43..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/problem/impl/AdminProblemServiceImpl.java +++ /dev/null @@ -1,119 +0,0 @@ -package top.hcode.hoj.service.admin.problem.impl; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.exception.StatusForbiddenException; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.common.result.ResultStatus; -import top.hcode.hoj.manager.admin.problem.AdminProblemManager; -import top.hcode.hoj.pojo.dto.ProblemDto; -import top.hcode.hoj.pojo.dto.CompileDTO; -import top.hcode.hoj.pojo.entity.problem.Problem; -import top.hcode.hoj.pojo.entity.problem.ProblemCase; -import top.hcode.hoj.service.admin.problem.AdminProblemService; - -import java.util.List; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/9 16:33 - * @Description: - */ - -@Service -public class AdminProblemServiceImpl implements AdminProblemService { - - @Autowired - private AdminProblemManager adminProblemManager; - - @Override - public CommonResult> getProblemList(Integer limit, Integer currentPage, String keyword, Integer auth, String oj) { - IPage problemList = adminProblemManager.getProblemList(limit, currentPage, keyword, auth, oj); - return CommonResult.successResponse(problemList); - } - - @Override - public CommonResult getProblem(Long pid) { - try { - Problem problem = adminProblemManager.getProblem(pid); - return CommonResult.successResponse(problem); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } - } - - @Override - public CommonResult deleteProblem(Long pid) { - try { - adminProblemManager.deleteProblem(pid); - return CommonResult.successResponse(); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } - } - - @Override - public CommonResult addProblem(ProblemDto problemDto) { - try { - adminProblemManager.addProblem(problemDto); - return CommonResult.successResponse(); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } - } - - @Override - public CommonResult updateProblem(ProblemDto problemDto) { - try { - adminProblemManager.updateProblem(problemDto); - return CommonResult.successResponse(); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } - } - - @Override - public CommonResult> getProblemCases(Long pid, Boolean isUpload) { - - List problemCaseList = adminProblemManager.getProblemCases(pid, isUpload); - return CommonResult.successResponse(problemCaseList); - } - - @Override - public CommonResult compileSpj(CompileDTO compileDTO) { - return adminProblemManager.compileSpj(compileDTO); - } - - @Override - public CommonResult compileInteractive(CompileDTO compileDTO) { - return adminProblemManager.compileInteractive(compileDTO); - } - - @Override - public CommonResult importRemoteOJProblem(String name, String problemId) { - try { - adminProblemManager.importRemoteOJProblem(name, problemId); - return CommonResult.successResponse("导入新题目成功"); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } - } - - @Override - public CommonResult changeProblemAuth(Problem problem) { - try { - adminProblemManager.changeProblemAuth(problem); - return CommonResult.successResponse(); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/rejudge/RejudgeService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/rejudge/RejudgeService.java deleted file mode 100644 index a626ac1..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/rejudge/RejudgeService.java +++ /dev/null @@ -1,15 +0,0 @@ -package top.hcode.hoj.service.admin.rejudge; - -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.entity.judge.Judge; - -public interface RejudgeService { - - CommonResult rejudge(Long submitId); - - CommonResult rejudgeContestProblem(Long cid, Long pid); - - CommonResult manualJudge(Long submitId, Integer status, Integer score); - - CommonResult cancelJudge(Long submitId); -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/rejudge/impl/RejudgeServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/rejudge/impl/RejudgeServiceImpl.java deleted file mode 100644 index 7b3c57a..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/rejudge/impl/RejudgeServiceImpl.java +++ /dev/null @@ -1,61 +0,0 @@ -package top.hcode.hoj.service.admin.rejudge.impl; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.manager.admin.rejudge.RejudgeManager; -import top.hcode.hoj.pojo.entity.judge.Judge; - -import top.hcode.hoj.service.admin.rejudge.RejudgeService; - - -/** - * @Author: Himit_ZH - * @Date: 2022/1/7 18:12 - * @Description: - */ -@Service -public class RejudgeServiceImpl implements RejudgeService { - - @Autowired - private RejudgeManager rejudgeManager; - - @Override - public CommonResult rejudge(Long submitId) { - try { - Judge judge = rejudgeManager.rejudge(submitId); - return CommonResult.successResponse(judge, "重判成功!该提交已进入判题队列!"); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } - } - - @Override - public CommonResult rejudgeContestProblem(Long cid, Long pid) { - try { - rejudgeManager.rejudgeContestProblem(cid, pid); - return CommonResult.successResponse("重判成功!该题目对应的全部提交已进入判题队列!"); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } - } - - @Override - public CommonResult manualJudge(Long submitId, Integer status, Integer score) { - try { - return CommonResult.successResponse(rejudgeManager.manualJudge(submitId, status, score)); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } - } - - @Override - public CommonResult cancelJudge(Long submitId) { - try { - return CommonResult.successResponse(rejudgeManager.cancelJudge(submitId)); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/system/ConfigService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/system/ConfigService.java deleted file mode 100644 index 69a94ab..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/system/ConfigService.java +++ /dev/null @@ -1,35 +0,0 @@ -package top.hcode.hoj.service.admin.system; - -import cn.hutool.json.JSONObject; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.dto.*; - -import java.util.List; - -public interface ConfigService { - - public CommonResult getServiceInfo(); - - public CommonResult> getJudgeServiceInfo(); - - public CommonResult deleteHomeCarousel(Long id); - - public CommonResult getWebConfig(); - - public CommonResult setWebConfig(WebConfigDto config); - - public CommonResult getEmailConfig(); - - public CommonResult setEmailConfig(EmailConfigDto config); - - public CommonResult testEmail(TestEmailDto testEmailDto); - - public CommonResult getDBAndRedisConfig(); - - public CommonResult setDBAndRedisConfig(DBAndRedisConfigDto config); - - public CommonResult getSwitchConfig(); - - public CommonResult setSwitchConfig(SwitchConfigDto config); - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/system/DashboardService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/system/DashboardService.java deleted file mode 100644 index 015ad79..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/system/DashboardService.java +++ /dev/null @@ -1,18 +0,0 @@ -package top.hcode.hoj.service.admin.system; - -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.entity.user.Session; - -import java.util.Map; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/9 22:19 - * @Description: - */ -public interface DashboardService { - - public CommonResult getRecentSession(); - - public CommonResult> getDashboardInfo(); -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/system/impl/ConfigServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/system/impl/ConfigServiceImpl.java deleted file mode 100644 index 9b891fb..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/system/impl/ConfigServiceImpl.java +++ /dev/null @@ -1,114 +0,0 @@ -package top.hcode.hoj.service.admin.system.impl; - -import cn.hutool.json.JSONObject; -import org.springframework.stereotype.Service; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.manager.admin.system.ConfigManager; -import top.hcode.hoj.pojo.dto.*; -import top.hcode.hoj.service.admin.system.ConfigService; - -import javax.annotation.Resource; -import java.util.List; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/9 22:23 - * @Description: - */ -@Service -public class ConfigServiceImpl implements ConfigService { - - @Resource - private ConfigManager configManager; - - @Override - public CommonResult getServiceInfo() { - return CommonResult.successResponse(configManager.getServiceInfo()); - } - - @Override - public CommonResult> getJudgeServiceInfo() { - return CommonResult.successResponse(configManager.getJudgeServiceInfo()); - } - - @Override - public CommonResult deleteHomeCarousel(Long id) { - try { - configManager.deleteHomeCarousel(id); - return CommonResult.successResponse(); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } - } - - @Override - public CommonResult getWebConfig() { - return CommonResult.successResponse(configManager.getWebConfig()); - } - - @Override - public CommonResult setWebConfig(WebConfigDto config) { - try { - configManager.setWebConfig(config); - return CommonResult.successResponse(); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } - } - - @Override - public CommonResult getEmailConfig() { - return CommonResult.successResponse(configManager.getEmailConfig()); - } - - @Override - public CommonResult setEmailConfig(EmailConfigDto config) { - try { - configManager.setEmailConfig(config); - return CommonResult.successResponse(); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } - } - - @Override - public CommonResult testEmail(TestEmailDto testEmailDto) { - try { - configManager.testEmail(testEmailDto); - return CommonResult.successResponse(); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } - } - - @Override - public CommonResult getDBAndRedisConfig() { - return CommonResult.successResponse(configManager.getDBAndRedisConfig()); - } - - @Override - public CommonResult setDBAndRedisConfig(DBAndRedisConfigDto config) { - try { - configManager.setDBAndRedisConfig(config); - return CommonResult.successResponse(); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } - } - - @Override - public CommonResult getSwitchConfig() { - return CommonResult.successResponse(configManager.getSwitchConfig()); - } - - @Override - public CommonResult setSwitchConfig(SwitchConfigDto config) { - try { - configManager.setSwitchConfig(config); - return CommonResult.successResponse(); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/system/impl/DashboardServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/system/impl/DashboardServiceImpl.java deleted file mode 100644 index 79c8046..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/system/impl/DashboardServiceImpl.java +++ /dev/null @@ -1,32 +0,0 @@ -package top.hcode.hoj.service.admin.system.impl; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.manager.admin.system.DashboardManager; -import top.hcode.hoj.pojo.entity.user.Session; -import top.hcode.hoj.service.admin.system.DashboardService; - -import java.util.Map; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/9 22:20 - * @Description: - */ -@Service -public class DashboardServiceImpl implements DashboardService { - - @Autowired - private DashboardManager dashboardManager; - - @Override - public CommonResult getRecentSession() { - return CommonResult.successResponse(dashboardManager.getRecentSession()); - } - - @Override - public CommonResult> getDashboardInfo() { - return CommonResult.successResponse(dashboardManager.getDashboardInfo()); - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/tag/AdminTagService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/tag/AdminTagService.java deleted file mode 100644 index 1595dce..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/tag/AdminTagService.java +++ /dev/null @@ -1,24 +0,0 @@ -package top.hcode.hoj.service.admin.tag; - -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.entity.problem.Tag; -import top.hcode.hoj.pojo.entity.problem.TagClassification; - -import java.util.List; - -public interface AdminTagService { - - public CommonResult addTag(Tag tag); - - public CommonResult updateTag(Tag tag); - - public CommonResult deleteTag(Long tid); - - public CommonResult> getTagClassification(String oj); - - public CommonResult addTagClassification(TagClassification tagClassification); - - public CommonResult updateTagClassification(TagClassification tagClassification); - - public CommonResult deleteTagClassification(Long tcid); -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/tag/impl/AdminTagServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/tag/impl/AdminTagServiceImpl.java deleted file mode 100644 index 3273cb1..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/tag/impl/AdminTagServiceImpl.java +++ /dev/null @@ -1,88 +0,0 @@ -package top.hcode.hoj.service.admin.tag.impl; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.manager.admin.tag.AdminTagManager; -import top.hcode.hoj.pojo.entity.problem.Tag; -import top.hcode.hoj.pojo.entity.problem.TagClassification; -import top.hcode.hoj.service.admin.tag.AdminTagService; - -import java.util.List; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/9 17:46 - * @Description: - */ - -@Service -public class AdminTagServiceImpl implements AdminTagService { - - @Autowired - private AdminTagManager adminTagManager; - - @Override - public CommonResult addTag(Tag tag) { - try { - return CommonResult.successResponse(adminTagManager.addTag(tag)); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } - } - - @Override - public CommonResult updateTag(Tag tag) { - try { - adminTagManager.updateTag(tag); - return CommonResult.successResponse(); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } - } - - @Override - public CommonResult deleteTag(Long tid) { - try { - adminTagManager.deleteTag(tid); - return CommonResult.successResponse(); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } - } - - @Override - public CommonResult> getTagClassification(String oj) { - return CommonResult.successResponse(adminTagManager.getTagClassification(oj)); - } - - @Override - public CommonResult addTagClassification(TagClassification tagClassification) { - try { - return CommonResult.successResponse(adminTagManager.addTagClassification(tagClassification)); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } - } - - @Override - public CommonResult updateTagClassification(TagClassification tagClassification) { - try { - adminTagManager.updateTagClassification(tagClassification); - return CommonResult.successResponse(); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } - } - - @Override - public CommonResult deleteTagClassification(Long tcid) { - try { - adminTagManager.deleteTagClassification(tcid); - return CommonResult.successResponse(); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/training/AdminTrainingCategoryService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/training/AdminTrainingCategoryService.java deleted file mode 100644 index 52f9637..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/training/AdminTrainingCategoryService.java +++ /dev/null @@ -1,18 +0,0 @@ -package top.hcode.hoj.service.admin.training; - -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.entity.training.TrainingCategory; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/9 19:38 - * @Description: - */ -public interface AdminTrainingCategoryService { - - public CommonResult addTrainingCategory(TrainingCategory trainingCategory); - - public CommonResult updateTrainingCategory(TrainingCategory trainingCategory); - - public CommonResult deleteTrainingCategory(Long cid); -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/training/AdminTrainingProblemService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/training/AdminTrainingProblemService.java deleted file mode 100644 index 9b67a84..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/training/AdminTrainingProblemService.java +++ /dev/null @@ -1,20 +0,0 @@ -package top.hcode.hoj.service.admin.training; - -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.dto.TrainingProblemDto; -import top.hcode.hoj.pojo.entity.training.TrainingProblem; - -import java.util.HashMap; - -public interface AdminTrainingProblemService { - - public CommonResult> getProblemList(Integer limit, Integer currentPage, String keyword, Boolean queryExisted, Long tid); - - public CommonResult updateProblem(TrainingProblem trainingProblem); - - public CommonResult deleteProblem(Long pid,Long tid); - - public CommonResult addProblemFromPublic(TrainingProblemDto trainingProblemDto); - - public CommonResult importTrainingRemoteOJProblem(String name, String problemId, Long tid); -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/training/AdminTrainingService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/training/AdminTrainingService.java deleted file mode 100644 index 2b72cc0..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/training/AdminTrainingService.java +++ /dev/null @@ -1,21 +0,0 @@ -package top.hcode.hoj.service.admin.training; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.dto.TrainingDto; -import top.hcode.hoj.pojo.entity.training.Training; - -public interface AdminTrainingService { - - public CommonResult> getTrainingList(Integer limit, Integer currentPage, String keyword); - - public CommonResult getTraining( Long tid); - - public CommonResult deleteTraining(Long tid); - - public CommonResult addTraining(TrainingDto trainingDto); - - public CommonResult updateTraining(TrainingDto trainingDto); - - public CommonResult changeTrainingStatus(Long tid, String author, Boolean status); -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/training/impl/AdminTrainingCategoryServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/training/impl/AdminTrainingCategoryServiceImpl.java deleted file mode 100644 index 79f70f7..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/training/impl/AdminTrainingCategoryServiceImpl.java +++ /dev/null @@ -1,51 +0,0 @@ -package top.hcode.hoj.service.admin.training.impl; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.manager.admin.training.AdminTrainingCategoryManager; -import top.hcode.hoj.pojo.entity.training.TrainingCategory; -import top.hcode.hoj.service.admin.training.AdminTrainingCategoryService; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/9 19:38 - * @Description: - */ - -@Service -public class AdminTrainingCategoryServiceImpl implements AdminTrainingCategoryService { - - @Autowired - private AdminTrainingCategoryManager adminTrainingCategoryManager; - - @Override - public CommonResult addTrainingCategory(TrainingCategory trainingCategory) { - try { - return CommonResult.successResponse(adminTrainingCategoryManager.addTrainingCategory(trainingCategory)); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } - } - - @Override - public CommonResult updateTrainingCategory(TrainingCategory trainingCategory) { - try { - adminTrainingCategoryManager.updateTrainingCategory(trainingCategory); - return CommonResult.successResponse(); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } - } - - @Override - public CommonResult deleteTrainingCategory(Long cid) { - try { - adminTrainingCategoryManager.deleteTrainingCategory(cid); - return CommonResult.successResponse(); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/training/impl/AdminTrainingProblemServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/training/impl/AdminTrainingProblemServiceImpl.java deleted file mode 100644 index 464b9af..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/training/impl/AdminTrainingProblemServiceImpl.java +++ /dev/null @@ -1,70 +0,0 @@ -package top.hcode.hoj.service.admin.training.impl; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.manager.admin.training.AdminTrainingProblemManager; -import top.hcode.hoj.pojo.dto.TrainingProblemDto; -import top.hcode.hoj.pojo.entity.training.TrainingProblem; -import top.hcode.hoj.service.admin.training.AdminTrainingProblemService; - -import java.util.HashMap; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/9 20:53 - * @Description: - */ -@Service -public class AdminTrainingProblemServiceImpl implements AdminTrainingProblemService { - - @Autowired - private AdminTrainingProblemManager adminTrainingProblemManager; - - @Override - public CommonResult> getProblemList(Integer limit, Integer currentPage, String keyword, Boolean queryExisted, Long tid) { - HashMap problemMap = adminTrainingProblemManager.getProblemList(limit, currentPage, keyword, queryExisted, tid); - return CommonResult.successResponse(problemMap); - } - - @Override - public CommonResult updateProblem(TrainingProblem trainingProblem) { - try { - adminTrainingProblemManager.updateProblem(trainingProblem); - return CommonResult.successResponse(); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } - } - - @Override - public CommonResult deleteProblem(Long pid, Long tid) { - try { - adminTrainingProblemManager.deleteProblem(pid, tid); - return CommonResult.successResponse(); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } - } - - @Override - public CommonResult addProblemFromPublic(TrainingProblemDto trainingProblemDto) { - try { - adminTrainingProblemManager.addProblemFromPublic(trainingProblemDto); - return CommonResult.successResponse(); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } - } - - @Override - public CommonResult importTrainingRemoteOJProblem(String name, String problemId, Long tid) { - try { - adminTrainingProblemManager.importTrainingRemoteOJProblem(name, problemId, tid); - return CommonResult.successResponse(); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/training/impl/AdminTrainingServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/training/impl/AdminTrainingServiceImpl.java deleted file mode 100644 index a89aea3..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/training/impl/AdminTrainingServiceImpl.java +++ /dev/null @@ -1,86 +0,0 @@ -package top.hcode.hoj.service.admin.training.impl; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.exception.StatusForbiddenException; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.common.result.ResultStatus; -import top.hcode.hoj.manager.admin.training.AdminTrainingManager; -import top.hcode.hoj.pojo.dto.TrainingDto; -import top.hcode.hoj.pojo.entity.training.Training; -import top.hcode.hoj.service.admin.training.AdminTrainingService; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/9 20:44 - * @Description: - */ -@Service -public class AdminTrainingServiceImpl implements AdminTrainingService { - - @Autowired - private AdminTrainingManager adminTrainingManager; - - @Override - public CommonResult> getTrainingList(Integer limit, Integer currentPage, String keyword) { - return CommonResult.successResponse(adminTrainingManager.getTrainingList(limit, currentPage, keyword)); - } - - @Override - public CommonResult getTraining(Long tid) { - try { - TrainingDto training = adminTrainingManager.getTraining(tid); - return CommonResult.successResponse(training); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } - } - - @Override - public CommonResult deleteTraining(Long tid) { - try { - adminTrainingManager.deleteTraining(tid); - return CommonResult.successResponse(); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } - } - - @Override - public CommonResult addTraining(TrainingDto trainingDto) { - try { - adminTrainingManager.addTraining(trainingDto); - return CommonResult.successResponse(); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } - } - - @Override - public CommonResult updateTraining(TrainingDto trainingDto) { - try { - adminTrainingManager.updateTraining(trainingDto); - return CommonResult.successResponse(); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } - } - - @Override - public CommonResult changeTrainingStatus(Long tid, String author, Boolean status) { - try { - adminTrainingManager.changeTrainingStatus(tid, author, status); - return CommonResult.successResponse(); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/user/AdminUserService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/user/AdminUserService.java deleted file mode 100644 index 46b4add..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/user/AdminUserService.java +++ /dev/null @@ -1,28 +0,0 @@ -package top.hcode.hoj.service.admin.user; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.dto.AdminEditUserDto; -import top.hcode.hoj.pojo.vo.UserRolesVo; - -import java.util.List; -import java.util.Map; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/9 21:31 - * @Description: - */ -public interface AdminUserService { - - public CommonResult> getUserList(Integer limit, Integer currentPage,Boolean onlyAdmin, String keyword); - - public CommonResult editUser(AdminEditUserDto adminEditUserDto); - - public CommonResult deleteUser(List deleteUserIdList); - - public CommonResult insertBatchUser(List> users); - - public CommonResult> generateUser(Map params); - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/user/impl/AdminUserServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/user/impl/AdminUserServiceImpl.java deleted file mode 100644 index ea0291a..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/admin/user/impl/AdminUserServiceImpl.java +++ /dev/null @@ -1,70 +0,0 @@ -package top.hcode.hoj.service.admin.user.impl; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.springframework.stereotype.Service; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.manager.admin.user.AdminUserManager; -import top.hcode.hoj.pojo.dto.AdminEditUserDto; -import top.hcode.hoj.pojo.vo.UserRolesVo; -import top.hcode.hoj.service.admin.user.AdminUserService; - -import javax.annotation.Resource; -import java.util.List; -import java.util.Map; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/9 21:34 - * @Description: - */ -@Service -public class AdminUserServiceImpl implements AdminUserService { - - @Resource - private AdminUserManager adminUserManager; - - @Override - public CommonResult> getUserList(Integer limit, Integer currentPage, Boolean onlyAdmin, String keyword) { - return CommonResult.successResponse(adminUserManager.getUserList(limit, currentPage, onlyAdmin, keyword)); - } - - @Override - public CommonResult editUser(AdminEditUserDto adminEditUserDto) { - try { - adminUserManager.editUser(adminEditUserDto); - return CommonResult.successResponse(); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } - } - - @Override - public CommonResult deleteUser(List deleteUserIdList) { - try { - adminUserManager.deleteUser(deleteUserIdList); - return CommonResult.successResponse(); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } - } - - @Override - public CommonResult insertBatchUser(List> users) { - try { - adminUserManager.insertBatchUser(users); - return CommonResult.successResponse(); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } - } - - @Override - public CommonResult> generateUser(Map params) { - try { - return CommonResult.successResponse(adminUserManager.generateUser(params)); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/ContestFileService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/ContestFileService.java deleted file mode 100644 index 9e3873a..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/ContestFileService.java +++ /dev/null @@ -1,23 +0,0 @@ -package top.hcode.hoj.service.file; - - -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.exception.StatusForbiddenException; - -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/10 15:43 - * @Description: - */ - -public interface ContestFileService { - - public void downloadContestRank(Long cid, Boolean forceRefresh, Boolean removeStar, HttpServletResponse response) throws StatusFailException, IOException, StatusForbiddenException; - - public void downloadContestACSubmission(Long cid, Boolean excludeAdmin, String splitType, HttpServletResponse response) throws StatusFailException, StatusForbiddenException; - - public void downloadContestPrintText(Long id, HttpServletResponse response) throws StatusForbiddenException; -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/ImageService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/ImageService.java deleted file mode 100644 index 432cbb5..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/ImageService.java +++ /dev/null @@ -1,16 +0,0 @@ -package top.hcode.hoj.service.file; - -import org.springframework.web.multipart.MultipartFile; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.entity.group.Group; - -import java.util.Map; - -public interface ImageService { - - public CommonResult> uploadAvatar(MultipartFile image); - - public CommonResult uploadGroupAvatar(MultipartFile image, Long gid); - - public CommonResult> uploadCarouselImg(MultipartFile image); -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/ImportFpsProblemService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/ImportFpsProblemService.java deleted file mode 100644 index b000c96..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/ImportFpsProblemService.java +++ /dev/null @@ -1,14 +0,0 @@ -package top.hcode.hoj.service.file; - -import org.springframework.web.multipart.MultipartFile; -import top.hcode.hoj.common.result.CommonResult; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/10 15:32 - * @Description: - */ -public interface ImportFpsProblemService { - - public CommonResult importFPSProblem(MultipartFile file); -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/ImportQDUOJProblemService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/ImportQDUOJProblemService.java deleted file mode 100644 index dc7f752..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/ImportQDUOJProblemService.java +++ /dev/null @@ -1,9 +0,0 @@ -package top.hcode.hoj.service.file; - -import org.springframework.web.multipart.MultipartFile; -import top.hcode.hoj.common.result.CommonResult; - -public interface ImportQDUOJProblemService { - - public CommonResult importQDOJProblem(MultipartFile file); -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/MarkDownFileService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/MarkDownFileService.java deleted file mode 100644 index 63c4878..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/MarkDownFileService.java +++ /dev/null @@ -1,15 +0,0 @@ -package top.hcode.hoj.service.file; - -import org.springframework.web.multipart.MultipartFile; -import top.hcode.hoj.common.result.CommonResult; - -import java.util.Map; - -public interface MarkDownFileService { - - public CommonResult> uploadMDImg(MultipartFile image, Long gid); - - public CommonResult deleteMDImg(Long fileId); - - public CommonResult> uploadMd(MultipartFile file, Long gid); -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/ProblemFileService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/ProblemFileService.java deleted file mode 100644 index 607857f..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/ProblemFileService.java +++ /dev/null @@ -1,14 +0,0 @@ -package top.hcode.hoj.service.file; - -import org.springframework.web.multipart.MultipartFile; -import top.hcode.hoj.common.result.CommonResult; - -import javax.servlet.http.HttpServletResponse; -import java.util.List; - -public interface ProblemFileService { - - public CommonResult importProblem(MultipartFile file); - - public void exportProblem(List pidList, HttpServletResponse response); -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/TestCaseService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/TestCaseService.java deleted file mode 100644 index 925f13b..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/TestCaseService.java +++ /dev/null @@ -1,21 +0,0 @@ -package top.hcode.hoj.service.file; - -import top.hcode.hoj.common.exception.StatusForbiddenException; -import org.springframework.web.multipart.MultipartFile; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.result.CommonResult; - -import javax.servlet.http.HttpServletResponse; -import java.util.Map; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/10 15:08 - * @Description: - */ -public interface TestCaseService { - - public CommonResult> uploadTestcaseZip(MultipartFile file, Long gid); - - public void downloadTestcase(Long pid, HttpServletResponse response) throws StatusFailException, StatusForbiddenException; -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/UserFileService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/UserFileService.java deleted file mode 100644 index c8f07f0..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/UserFileService.java +++ /dev/null @@ -1,9 +0,0 @@ -package top.hcode.hoj.service.file; - -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; - -public interface UserFileService { - - public void generateUserExcel(String key, HttpServletResponse response) throws IOException; -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/impl/ContestFileServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/impl/ContestFileServiceImpl.java deleted file mode 100644 index 7f0c95f..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/impl/ContestFileServiceImpl.java +++ /dev/null @@ -1,38 +0,0 @@ -package top.hcode.hoj.service.file.impl; - -import org.springframework.stereotype.Service; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.exception.StatusForbiddenException; -import top.hcode.hoj.manager.file.ContestFileManager; -import top.hcode.hoj.service.file.ContestFileService; - -import javax.annotation.Resource; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/10 15:53 - * @Description: - */ -@Service -public class ContestFileServiceImpl implements ContestFileService { - - @Resource - private ContestFileManager contestFileManager; - - @Override - public void downloadContestRank(Long cid, Boolean forceRefresh, Boolean removeStar, HttpServletResponse response) throws StatusFailException, IOException, StatusForbiddenException { - contestFileManager.downloadContestRank(cid, forceRefresh, removeStar, response); - } - - @Override - public void downloadContestACSubmission(Long cid, Boolean excludeAdmin, String splitType, HttpServletResponse response) throws StatusFailException, StatusForbiddenException { - contestFileManager.downloadContestACSubmission(cid, excludeAdmin, splitType, response); - } - - @Override - public void downloadContestPrintText(Long id, HttpServletResponse response) throws StatusForbiddenException { - contestFileManager.downloadContestPrintText(id, response); - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/impl/ImageServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/impl/ImageServiceImpl.java deleted file mode 100644 index b557f6e..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/impl/ImageServiceImpl.java +++ /dev/null @@ -1,62 +0,0 @@ -package top.hcode.hoj.service.file.impl; - -import top.hcode.hoj.common.exception.StatusForbiddenException; -import org.springframework.stereotype.Service; -import org.springframework.web.multipart.MultipartFile; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.exception.StatusSystemErrorException; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.common.result.ResultStatus; -import top.hcode.hoj.manager.file.ImageManager; -import top.hcode.hoj.pojo.entity.group.Group; -import top.hcode.hoj.service.file.ImageService; - -import javax.annotation.Resource; -import java.util.Map; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/10 15:41 - * @Description: - */ -@Service -public class ImageServiceImpl implements ImageService { - - @Resource - private ImageManager imageManager; - - @Override - public CommonResult> uploadAvatar(MultipartFile image) { - try { - return CommonResult.successResponse(imageManager.uploadAvatar(image)); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } catch (StatusSystemErrorException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.SYSTEM_ERROR); - } - } - - @Override - public CommonResult uploadGroupAvatar(MultipartFile image, Long gid) { - try { - return CommonResult.successResponse(imageManager.uploadGroupAvatar(image, gid)); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } catch (StatusSystemErrorException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.SYSTEM_ERROR); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } - } - - @Override - public CommonResult> uploadCarouselImg(MultipartFile image) { - try { - return CommonResult.successResponse(imageManager.uploadCarouselImg(image)); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } catch (StatusSystemErrorException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.SYSTEM_ERROR); - } - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/impl/ImportFpsProblemServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/impl/ImportFpsProblemServiceImpl.java deleted file mode 100644 index 3d6f4de..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/impl/ImportFpsProblemServiceImpl.java +++ /dev/null @@ -1,33 +0,0 @@ -package top.hcode.hoj.service.file.impl; - -import org.springframework.stereotype.Service; -import org.springframework.web.multipart.MultipartFile; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.manager.file.ImportFpsProblemManager; -import top.hcode.hoj.service.file.ImportFpsProblemService; - -import javax.annotation.Resource; -import java.io.IOException; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/10 15:35 - * @Description: - */ -@Service -public class ImportFpsProblemServiceImpl implements ImportFpsProblemService { - - @Resource - private ImportFpsProblemManager importFpsProblemManager; - - @Override - public CommonResult importFPSProblem(MultipartFile file) { - try { - importFpsProblemManager.importFPSProblem(file); - return CommonResult.successResponse(); - } catch (IOException | StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/impl/ImportQDUOJProblemServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/impl/ImportQDUOJProblemServiceImpl.java deleted file mode 100644 index af0bd55..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/impl/ImportQDUOJProblemServiceImpl.java +++ /dev/null @@ -1,35 +0,0 @@ -package top.hcode.hoj.service.file.impl; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import org.springframework.web.multipart.MultipartFile; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.exception.StatusSystemErrorException; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.common.result.ResultStatus; -import top.hcode.hoj.manager.file.ImportQDUOJProblemManager; -import top.hcode.hoj.service.file.ImportQDUOJProblemService; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/10 15:24 - * @Description: - */ -@Service -public class ImportQDUOJProblemServiceImpl implements ImportQDUOJProblemService { - - @Autowired - private ImportQDUOJProblemManager importQDUOJProblemManager; - - @Override - public CommonResult importQDOJProblem(MultipartFile file) { - try { - importQDUOJProblemManager.importQDOJProblem(file); - return CommonResult.successResponse(); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } catch (StatusSystemErrorException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.SYSTEM_ERROR); - } - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/impl/MarkDownFileServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/impl/MarkDownFileServiceImpl.java deleted file mode 100644 index 2f82155..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/impl/MarkDownFileServiceImpl.java +++ /dev/null @@ -1,64 +0,0 @@ -package top.hcode.hoj.service.file.impl; - -import org.springframework.stereotype.Service; -import org.springframework.web.multipart.MultipartFile; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.exception.StatusForbiddenException; -import top.hcode.hoj.common.exception.StatusSystemErrorException; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.common.result.ResultStatus; -import top.hcode.hoj.manager.file.MarkDownFileManager; -import top.hcode.hoj.service.file.MarkDownFileService; - -import javax.annotation.Resource; -import java.util.Map; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/10 15:18 - * @Description: - */ -@Service -public class MarkDownFileServiceImpl implements MarkDownFileService { - - @Resource - private MarkDownFileManager markDownFileManager; - - @Override - public CommonResult> uploadMDImg(MultipartFile image, Long gid) { - try { - return CommonResult.successResponse(markDownFileManager.uploadMDImg(image, gid)); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } catch (StatusSystemErrorException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.SYSTEM_ERROR); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } - } - - @Override - public CommonResult deleteMDImg(Long fileId) { - try { - markDownFileManager.deleteMDImg(fileId); - return CommonResult.successResponse(); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } - } - - @Override - public CommonResult> uploadMd(MultipartFile file, Long gid) { - try { - return CommonResult.successResponse(markDownFileManager.uploadMd(file, gid)); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } catch (StatusSystemErrorException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.SYSTEM_ERROR); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/impl/ProblemFileServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/impl/ProblemFileServiceImpl.java deleted file mode 100644 index 68f7ded..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/impl/ProblemFileServiceImpl.java +++ /dev/null @@ -1,43 +0,0 @@ -package top.hcode.hoj.service.file.impl; - -import org.springframework.stereotype.Service; -import org.springframework.web.multipart.MultipartFile; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.exception.StatusSystemErrorException; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.common.result.ResultStatus; -import top.hcode.hoj.manager.file.ProblemFileManager; -import top.hcode.hoj.service.file.ProblemFileService; - -import javax.annotation.Resource; -import javax.servlet.http.HttpServletResponse; -import java.util.List; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/10 15:15 - * @Description: - */ -@Service -public class ProblemFileServiceImpl implements ProblemFileService { - - @Resource - private ProblemFileManager problemFileManager; - - @Override - public CommonResult importProblem(MultipartFile file) { - try { - problemFileManager.importProblem(file); - return CommonResult.successResponse(); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } catch (StatusSystemErrorException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.SYSTEM_ERROR); - } - } - - @Override - public void exportProblem(List pidList, HttpServletResponse response) { - problemFileManager.exportProblem(pidList, response); - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/impl/TestCaseServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/impl/TestCaseServiceImpl.java deleted file mode 100644 index 4412cd4..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/impl/TestCaseServiceImpl.java +++ /dev/null @@ -1,45 +0,0 @@ -package top.hcode.hoj.service.file.impl; - -import top.hcode.hoj.common.exception.StatusForbiddenException; -import org.springframework.stereotype.Service; -import org.springframework.web.multipart.MultipartFile; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.exception.StatusSystemErrorException; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.common.result.ResultStatus; -import top.hcode.hoj.manager.file.TestCaseManager; -import top.hcode.hoj.service.file.TestCaseService; - -import javax.annotation.Resource; -import javax.servlet.http.HttpServletResponse; -import java.util.Map; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/10 15:08 - * @Description: - */ -@Service -public class TestCaseServiceImpl implements TestCaseService { - - @Resource - private TestCaseManager testCaseManager; - - @Override - public CommonResult> uploadTestcaseZip(MultipartFile file, Long gid) { - try { - return CommonResult.successResponse(testCaseManager.uploadTestcaseZip(file, gid)); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } catch (StatusSystemErrorException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.SYSTEM_ERROR); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } - } - - @Override - public void downloadTestcase(Long pid, HttpServletResponse response) throws StatusFailException, StatusForbiddenException { - testCaseManager.downloadTestcase(pid, response); - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/impl/UserFileServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/impl/UserFileServiceImpl.java deleted file mode 100644 index f92dcb1..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/file/impl/UserFileServiceImpl.java +++ /dev/null @@ -1,27 +0,0 @@ -package top.hcode.hoj.service.file.impl; - -import org.springframework.stereotype.Service; -import top.hcode.hoj.manager.file.UserFileManager; -import top.hcode.hoj.service.file.UserFileService; - -import javax.annotation.Resource; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/10 15:04 - * @Description: - */ -@Service -public class UserFileServiceImpl implements UserFileService { - - @Resource - private UserFileManager userFileManager; - - - @Override - public void generateUserExcel(String key, HttpServletResponse response) throws IOException { - userFileManager.generateUserExcel(key, response); - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/GroupRankService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/GroupRankService.java deleted file mode 100644 index 6c42227..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/GroupRankService.java +++ /dev/null @@ -1,14 +0,0 @@ -package top.hcode.hoj.service.group; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.vo.OIRankVo; - -public interface GroupRankService { - - public CommonResult> getGroupRankList(Integer limit, - Integer currentPage, - String searchUser, - Integer type, - Long gid); -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/GroupService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/GroupService.java deleted file mode 100644 index 4bab412..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/GroupService.java +++ /dev/null @@ -1,29 +0,0 @@ -package top.hcode.hoj.service.group; - -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.entity.group.Group; -import top.hcode.hoj.pojo.vo.AccessVo; -import top.hcode.hoj.pojo.vo.GroupVo; -import com.baomidou.mybatisplus.core.metadata.IPage; - -/** - * @Author: LengYun - * @Date: 2022/3/11 13:36 - * @Description: - */ -public interface GroupService { - - public CommonResult> getGroupList(Integer limit, Integer currentPage, String keyword, Integer auth, Boolean onlyMine); - - public CommonResult getGroup(Long gid); - - public CommonResult getGroupAccess(Long gid); - - public CommonResult getGroupAuth(Long gid); - - public CommonResult addGroup(Group group); - - public CommonResult updateGroup(Group group); - - public CommonResult deleteGroup(Long gid); -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/announcement/GroupAnnouncementService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/announcement/GroupAnnouncementService.java deleted file mode 100644 index 9c8f45e..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/announcement/GroupAnnouncementService.java +++ /dev/null @@ -1,25 +0,0 @@ -package top.hcode.hoj.service.group.announcement; - -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.entity.common.Announcement; -import top.hcode.hoj.pojo.vo.AnnouncementVo; -import com.baomidou.mybatisplus.core.metadata.IPage; - -/** - * @Author: LengYun - * @Date: 2022/3/11 13:36 - * @Description: - */ -public interface GroupAnnouncementService { - - public CommonResult> getAnnouncementList(Integer limit, Integer currentPage, Long gid); - - public CommonResult> getAdminAnnouncementList(Integer limit, Integer currentPage, Long gid); - - public CommonResult addAnnouncement(Announcement announcement); - - public CommonResult updateAnnouncement(Announcement announcement); - - public CommonResult deleteAnnouncement(Long aid); - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/announcement/impl/GroupAnnouncementServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/announcement/impl/GroupAnnouncementServiceImpl.java deleted file mode 100644 index 9796cfb..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/announcement/impl/GroupAnnouncementServiceImpl.java +++ /dev/null @@ -1,91 +0,0 @@ -package top.hcode.hoj.service.group.announcement.impl; - -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.exception.StatusForbiddenException; -import top.hcode.hoj.common.exception.StatusNotFoundException; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.common.result.ResultStatus; -import top.hcode.hoj.manager.group.announcement.GroupAnnouncementManager; -import top.hcode.hoj.pojo.entity.common.Announcement; -import top.hcode.hoj.pojo.vo.AnnouncementVo; -import top.hcode.hoj.service.group.announcement.GroupAnnouncementService; -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -/** - * @Author: LengYun - * @Date: 2022/3/11 13:36 - * @Description: - */ -@Service -public class GroupAnnouncementServiceImpl implements GroupAnnouncementService { - - @Autowired - private GroupAnnouncementManager groupAnnouncementManager; - - @Override - public CommonResult> getAnnouncementList(Integer limit, Integer currentPage, Long gid) { - try { - return CommonResult.successResponse(groupAnnouncementManager.getAnnouncementList(limit, currentPage, gid)); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } catch (StatusNotFoundException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.NOT_FOUND); - } - } - - @Override - public CommonResult> getAdminAnnouncementList(Integer limit, Integer currentPage, Long gid) { - try { - return CommonResult.successResponse(groupAnnouncementManager.getAdminAnnouncementList(limit, currentPage, gid)); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } catch (StatusNotFoundException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.NOT_FOUND); - } - } - - @Override - public CommonResult addAnnouncement(Announcement announcement) { - try { - groupAnnouncementManager.addAnnouncement(announcement); - return CommonResult.successResponse(); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } catch (StatusNotFoundException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.NOT_FOUND); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FAIL); - } - } - - @Override - public CommonResult updateAnnouncement(Announcement announcement) { - try { - groupAnnouncementManager.updateAnnouncement(announcement); - return CommonResult.successResponse(); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } catch (StatusNotFoundException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.NOT_FOUND); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FAIL); - } - } - - @Override - public CommonResult deleteAnnouncement(Long aid) { - try { - groupAnnouncementManager.deleteAnnouncement(aid); - return CommonResult.successResponse(); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } catch (StatusNotFoundException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.NOT_FOUND); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FAIL); - } - } - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/contest/GroupContestAnnouncementService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/contest/GroupContestAnnouncementService.java deleted file mode 100644 index 43773ca..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/contest/GroupContestAnnouncementService.java +++ /dev/null @@ -1,23 +0,0 @@ -package top.hcode.hoj.service.group.contest; - -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.dto.AnnouncementDto; -import top.hcode.hoj.pojo.vo.AnnouncementVo; -import com.baomidou.mybatisplus.core.metadata.IPage; - -/** - * @Author: LengYun - * @Date: 2022/3/11 13:36 - * @Description: - */ -public interface GroupContestAnnouncementService { - - public CommonResult> getContestAnnouncementList(Integer limit, Integer currentPage, Long cid); - - public CommonResult addContestAnnouncement(AnnouncementDto announcementDto); - - public CommonResult updateContestAnnouncement(AnnouncementDto announcementDto); - - public CommonResult deleteContestAnnouncement(Long aid, Long cid); - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/contest/GroupContestProblemService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/contest/GroupContestProblemService.java deleted file mode 100644 index 0bd6a3c..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/contest/GroupContestProblemService.java +++ /dev/null @@ -1,32 +0,0 @@ -package top.hcode.hoj.service.group.contest; - -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.dto.ContestProblemDto; -import top.hcode.hoj.pojo.dto.ProblemDto; -import top.hcode.hoj.pojo.entity.contest.ContestProblem; - -import java.util.HashMap; -import java.util.Map; - -/** - * @Author: LengYun - * @Date: 2022/3/11 13:36 - * @Description: - */ -public interface GroupContestProblemService { - - public CommonResult> getContestProblemList(Integer limit, Integer currentPage, String keyword, Long cid, Integer problemType, String oj); - - public CommonResult> addProblem(ProblemDto problemDto); - - public CommonResult getContestProblem(Long pid, Long cid); - - public CommonResult updateContestProblem(ContestProblem contestProblem); - - public CommonResult deleteContestProblem(Long pid, Long cid); - - public CommonResult addProblemFromPublic(ContestProblemDto contestProblemDto); - - public CommonResult addProblemFromGroup(String problemId, Long cid, String displayId); - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/contest/GroupContestService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/contest/GroupContestService.java deleted file mode 100644 index 3940377..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/contest/GroupContestService.java +++ /dev/null @@ -1,30 +0,0 @@ -package top.hcode.hoj.service.group.contest; - -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.entity.contest.Contest; -import top.hcode.hoj.pojo.vo.AdminContestVo; -import top.hcode.hoj.pojo.vo.ContestVo; -import com.baomidou.mybatisplus.core.metadata.IPage; - -/** - * @Author: LengYun - * @Date: 2022/3/11 13:36 - * @Description: - */ -public interface GroupContestService { - - public CommonResult> getContestList(Integer limit, Integer currentPage, Long gid); - - public CommonResult> getAdminContestList(Integer limit, Integer currentPage, Long gid); - - public CommonResult getContest(Long cid); - - public CommonResult addContest(AdminContestVo adminContestVo); - - public CommonResult updateContest(AdminContestVo adminContestVo); - - public CommonResult deleteContest(Long cid); - - public CommonResult changeContestVisible(Long cid, Boolean visible); - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/contest/impl/GroupContestAnnouncementServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/contest/impl/GroupContestAnnouncementServiceImpl.java deleted file mode 100644 index 79671ea..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/contest/impl/GroupContestAnnouncementServiceImpl.java +++ /dev/null @@ -1,79 +0,0 @@ -package top.hcode.hoj.service.group.contest.impl; - -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.exception.StatusForbiddenException; -import top.hcode.hoj.common.exception.StatusNotFoundException; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.common.result.ResultStatus; -import top.hcode.hoj.manager.group.contest.GroupContestAnnouncementManager; -import top.hcode.hoj.pojo.dto.AnnouncementDto; -import top.hcode.hoj.pojo.vo.AnnouncementVo; -import top.hcode.hoj.service.group.contest.GroupContestAnnouncementService; -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -/** - * @Author: LengYun - * @Date: 2022/3/11 13:36 - * @Description: - */ -@Service -public class GroupContestAnnouncementServiceImpl implements GroupContestAnnouncementService { - - @Autowired - private GroupContestAnnouncementManager groupContestAnnouncementManager; - - @Override - public CommonResult> getContestAnnouncementList(Integer limit, Integer currentPage, Long cid) { - try { - return CommonResult.successResponse(groupContestAnnouncementManager.getContestAnnouncementList(limit, currentPage, cid)); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } catch (StatusNotFoundException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.NOT_FOUND); - } - } - - @Override - public CommonResult addContestAnnouncement(AnnouncementDto announcementDto) { - try { - groupContestAnnouncementManager.addContestAnnouncement(announcementDto); - return CommonResult.successResponse(); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } catch (StatusNotFoundException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.NOT_FOUND); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FAIL); - } - } - - @Override - public CommonResult updateContestAnnouncement(AnnouncementDto announcementDto) { - try { - groupContestAnnouncementManager.updateContestAnnouncement(announcementDto); - return CommonResult.successResponse(); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } catch (StatusNotFoundException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.NOT_FOUND); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FAIL); - } - } - - @Override - public CommonResult deleteContestAnnouncement(Long aid, Long cid) { - try { - groupContestAnnouncementManager.deleteContestAnnouncement(aid, cid); - return CommonResult.successResponse(); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } catch (StatusNotFoundException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.NOT_FOUND); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FAIL); - } - } -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/contest/impl/GroupContestProblemServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/contest/impl/GroupContestProblemServiceImpl.java deleted file mode 100644 index e829a59..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/contest/impl/GroupContestProblemServiceImpl.java +++ /dev/null @@ -1,122 +0,0 @@ -package top.hcode.hoj.service.group.contest.impl; - -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.exception.StatusForbiddenException; -import top.hcode.hoj.common.exception.StatusNotFoundException; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.common.result.ResultStatus; -import top.hcode.hoj.manager.group.contest.GroupContestProblemManager; -import top.hcode.hoj.pojo.dto.ContestProblemDto; -import top.hcode.hoj.pojo.dto.ProblemDto; -import top.hcode.hoj.pojo.entity.contest.ContestProblem; -import top.hcode.hoj.service.group.contest.GroupContestProblemService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.util.HashMap; -import java.util.Map; - -/** - * @Author: LengYun - * @Date: 2022/3/11 13:36 - * @Description: - */ -@Service -public class GroupContestProblemServiceImpl implements GroupContestProblemService { - - @Autowired - private GroupContestProblemManager groupContestProblemManager; - - @Override - public CommonResult> getContestProblemList(Integer limit, Integer currentPage, String keyword, Long cid, Integer problemType, String oj) { - try { - return CommonResult.successResponse(groupContestProblemManager.getContestProblemList(limit, currentPage, keyword, cid, problemType, oj)); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } catch (StatusNotFoundException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.NOT_FOUND); - } - } - - @Override - public CommonResult> addProblem(ProblemDto problemDto) { - try { - return CommonResult.successResponse(groupContestProblemManager.addProblem(problemDto)); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } catch (StatusNotFoundException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.NOT_FOUND); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FAIL); - } - } - - @Override - public CommonResult getContestProblem(Long pid, Long cid) { - try { - return CommonResult.successResponse(groupContestProblemManager.getContestProblem(pid, cid)); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } catch (StatusNotFoundException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.NOT_FOUND); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FAIL); - } - } - - @Override - public CommonResult updateContestProblem(ContestProblem contestProblem) { - try { - groupContestProblemManager.updateContestProblem(contestProblem); - return CommonResult.successResponse(); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } catch (StatusNotFoundException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.NOT_FOUND); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FAIL); - } - } - - @Override - public CommonResult deleteContestProblem(Long pid, Long cid) { - try { - groupContestProblemManager.deleteContestProblem(pid, cid); - return CommonResult.successResponse(); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } catch (StatusNotFoundException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.NOT_FOUND); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FAIL); - } - } - - @Override - public CommonResult addProblemFromPublic(ContestProblemDto contestProblemDto) { - try { - groupContestProblemManager.addProblemFromPublic(contestProblemDto); - return CommonResult.successResponse(); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } catch (StatusNotFoundException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.NOT_FOUND); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FAIL); - } - } - - @Override - public CommonResult addProblemFromGroup(String problemId, Long cid, String displayId) { - try { - groupContestProblemManager.addProblemFromGroup(problemId, cid, displayId); - return CommonResult.successResponse(); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } catch (StatusNotFoundException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.NOT_FOUND); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FAIL); - } - } -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/contest/impl/GroupContestServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/contest/impl/GroupContestServiceImpl.java deleted file mode 100644 index 2676d79..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/contest/impl/GroupContestServiceImpl.java +++ /dev/null @@ -1,118 +0,0 @@ -package top.hcode.hoj.service.group.contest.impl; - -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.exception.StatusForbiddenException; -import top.hcode.hoj.common.exception.StatusNotFoundException; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.common.result.ResultStatus; -import top.hcode.hoj.manager.group.contest.GroupContestManager; -import top.hcode.hoj.pojo.entity.contest.Contest; -import top.hcode.hoj.pojo.vo.AdminContestVo; -import top.hcode.hoj.pojo.vo.ContestVo; -import top.hcode.hoj.service.group.contest.GroupContestService; -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -/** - * @Author: LengYun - * @Date: 2022/3/11 13:36 - * @Description: - */ -@Service -public class GroupContestServiceImpl implements GroupContestService { - - @Autowired - private GroupContestManager groupContestManager; - - @Override - public CommonResult> getContestList(Integer limit, Integer currentPage, Long gid) { - try { - return CommonResult.successResponse(groupContestManager.getContestList(limit, currentPage, gid)); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } catch (StatusNotFoundException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.NOT_FOUND); - } - } - - @Override - public CommonResult> getAdminContestList(Integer limit, Integer currentPage, Long gid) { - try { - return CommonResult.successResponse(groupContestManager.getAdminContestList(limit, currentPage, gid)); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } catch (StatusNotFoundException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.NOT_FOUND); - } - } - - @Override - public CommonResult getContest(Long tid) { - try { - return CommonResult.successResponse(groupContestManager.getContest(tid)); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } catch (StatusNotFoundException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.NOT_FOUND); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FAIL); - } - } - - @Override - public CommonResult addContest(AdminContestVo adminContestVo) { - try { - groupContestManager.addContest(adminContestVo); - return CommonResult.successResponse(); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } catch (StatusNotFoundException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.NOT_FOUND); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FAIL); - } - } - - @Override - public CommonResult updateContest(AdminContestVo adminContestVo) { - try { - groupContestManager.updateContest(adminContestVo); - return CommonResult.successResponse(); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } catch (StatusNotFoundException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.NOT_FOUND); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FAIL); - } - } - - @Override - public CommonResult deleteContest(Long tid) { - try { - groupContestManager.deleteContest(tid); - return CommonResult.successResponse(); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } catch (StatusNotFoundException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.NOT_FOUND); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FAIL); - } - } - - @Override - public CommonResult changeContestVisible(Long tid, Boolean visible) { - try { - groupContestManager.changeContestVisible(tid, visible); - return CommonResult.successResponse(); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } catch (StatusNotFoundException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.NOT_FOUND); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FAIL); - } - } -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/discussion/GroupDiscussionService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/discussion/GroupDiscussionService.java deleted file mode 100644 index 41a5dde..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/discussion/GroupDiscussionService.java +++ /dev/null @@ -1,24 +0,0 @@ -package top.hcode.hoj.service.group.discussion; - -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.entity.discussion.Discussion; -import com.baomidou.mybatisplus.core.metadata.IPage; - -/** - * @Author: LengYun - * @Date: 2022/3/11 13:36 - * @Description: - */ -public interface GroupDiscussionService { - - public CommonResult> getDiscussionList(Integer limit, Integer currentPage, Long gid, String pid); - - public CommonResult> getAdminDiscussionList(Integer limit, Integer currentPage, Long gid); - - public CommonResult addDiscussion(Discussion discussion); - - public CommonResult updateDiscussion(Discussion discussion); - - public CommonResult deleteDiscussion(Long did); - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/discussion/impl/GroupDiscussionServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/discussion/impl/GroupDiscussionServiceImpl.java deleted file mode 100644 index dad3212..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/discussion/impl/GroupDiscussionServiceImpl.java +++ /dev/null @@ -1,91 +0,0 @@ -package top.hcode.hoj.service.group.discussion.impl; - -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.exception.StatusForbiddenException; -import top.hcode.hoj.common.exception.StatusNotFoundException; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.common.result.ResultStatus; - -import top.hcode.hoj.manager.group.discussion.GroupDiscussionManager; -import top.hcode.hoj.pojo.entity.discussion.Discussion; -import top.hcode.hoj.service.group.discussion.GroupDiscussionService; -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -/** - * @Author: LengYun - * @Date: 2022/3/11 13:36 - * @Description: - */ -@Service -public class GroupDiscussionServiceImpl implements GroupDiscussionService { - - @Autowired - private GroupDiscussionManager groupDiscussionManager; - - @Override - public CommonResult> getDiscussionList(Integer limit, Integer currentPage, Long gid, String pid) { - try { - return CommonResult.successResponse(groupDiscussionManager.getDiscussionList(limit, currentPage, gid, pid)); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } catch (StatusNotFoundException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.NOT_FOUND); - } - } - - @Override - public CommonResult> getAdminDiscussionList(Integer limit, Integer currentPage, Long gid) { - try { - return CommonResult.successResponse(groupDiscussionManager.getAdminDiscussionList(limit, currentPage, gid)); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } catch (StatusNotFoundException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.NOT_FOUND); - } - } - - @Override - public CommonResult addDiscussion(Discussion discussion) { - try { - groupDiscussionManager.addDiscussion(discussion); - return CommonResult.successResponse(); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } catch (StatusNotFoundException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.NOT_FOUND); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FAIL); - } - } - - @Override - public CommonResult updateDiscussion(Discussion discussion) { - try { - groupDiscussionManager.updateDiscussion(discussion); - return CommonResult.successResponse(); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } catch (StatusNotFoundException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.NOT_FOUND); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FAIL); - } - } - - @Override - public CommonResult deleteDiscussion(Long did) { - try { - groupDiscussionManager.deleteDiscussion(did); - return CommonResult.successResponse(); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } catch (StatusNotFoundException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.NOT_FOUND); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FAIL); - } - } - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/impl/GroupRankServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/impl/GroupRankServiceImpl.java deleted file mode 100644 index 8d19a5d..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/impl/GroupRankServiceImpl.java +++ /dev/null @@ -1,36 +0,0 @@ -package top.hcode.hoj.service.group.impl; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.springframework.stereotype.Service; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.manager.group.GroupRankManager; -import top.hcode.hoj.pojo.vo.OIRankVo; -import top.hcode.hoj.service.group.GroupRankService; - -import javax.annotation.Resource; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/10 20:56 - * @Description: - */ -@Service -public class GroupRankServiceImpl implements GroupRankService { - - @Resource - private GroupRankManager groupRankManager; - - @Override - public CommonResult> getGroupRankList(Integer limit, - Integer currentPage, - String searchUser, - Integer type, - Long gid) { - try { - return CommonResult.successResponse(groupRankManager.getGroupRankList(limit, currentPage, searchUser, type, gid)); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/impl/GroupServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/impl/GroupServiceImpl.java deleted file mode 100644 index 626ccb4..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/impl/GroupServiceImpl.java +++ /dev/null @@ -1,99 +0,0 @@ -package top.hcode.hoj.service.group.impl; - -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.exception.StatusForbiddenException; -import top.hcode.hoj.common.exception.StatusNotFoundException; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.common.result.ResultStatus; -import top.hcode.hoj.manager.group.GroupManager; -import top.hcode.hoj.pojo.entity.group.Group; -import top.hcode.hoj.pojo.vo.AccessVo; -import top.hcode.hoj.pojo.vo.GroupVo; -import top.hcode.hoj.service.group.GroupService; -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -/** - * @Author: LengYun - * @Date: 2022/3/11 13:36 - * @Description: - */ -@Service -public class GroupServiceImpl implements GroupService { - - @Autowired - private GroupManager groupManager; - - @Override - public CommonResult> getGroupList(Integer limit, Integer currentPage, String keyword, Integer auth, Boolean onlyMine) { - return CommonResult.successResponse(groupManager.getGroupList(limit, currentPage, keyword, auth, onlyMine)); - } - - @Override - public CommonResult getGroup(Long gid) { - try { - return CommonResult.successResponse(groupManager.getGroup(gid)); - } catch (StatusNotFoundException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.NOT_FOUND); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } - } - - @Override - public CommonResult getGroupAccess(Long gid) { - try { - return CommonResult.successResponse(groupManager.getGroupAccess(gid)); - } catch (StatusNotFoundException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.NOT_FOUND); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FAIL); - } - } - - @Override - public CommonResult getGroupAuth(Long gid) { - return CommonResult.successResponse(groupManager.getGroupAuth(gid)); - } - - @Override - public CommonResult addGroup(Group group) { - try { - groupManager.addGroup(group); - return CommonResult.successResponse(); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FAIL); - } - } - - @Override - public CommonResult updateGroup(Group group) { - try { - groupManager.updateGroup(group); - return CommonResult.successResponse(); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FAIL); - } - } - - @Override - public CommonResult deleteGroup(Long gid) { - try { - groupManager.deleteGroup(gid); - return CommonResult.successResponse(); - } catch (StatusNotFoundException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.NOT_FOUND); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FAIL); - } - } -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/member/GroupMemberService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/member/GroupMemberService.java deleted file mode 100644 index dad00bf..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/member/GroupMemberService.java +++ /dev/null @@ -1,26 +0,0 @@ -package top.hcode.hoj.service.group.member; - -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.entity.group.GroupMember; -import top.hcode.hoj.pojo.vo.GroupMemberVo; -import com.baomidou.mybatisplus.core.metadata.IPage; - -/** - * @Author: LengYun - * @Date: 2022/3/11 13:36 - * @Description: - */ -public interface GroupMemberService { - - public CommonResult> getMemberList(Integer limit, Integer currentPage, String keyword, Integer auth, Long gid); - - public CommonResult> getApplyList(Integer limit, Integer currentPage, String keyword, Integer auth, Long gid); - - public CommonResult addMember(Long gid, String code, String reason); - - public CommonResult updateMember(GroupMember groupMember); - - public CommonResult deleteMember(String uid, Long gid); - - public CommonResult exitGroup(Long gid); -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/member/impl/GroupMemberServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/member/impl/GroupMemberServiceImpl.java deleted file mode 100644 index d382376..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/member/impl/GroupMemberServiceImpl.java +++ /dev/null @@ -1,106 +0,0 @@ -package top.hcode.hoj.service.group.member.impl; - -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.exception.StatusForbiddenException; -import top.hcode.hoj.common.exception.StatusNotFoundException; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.common.result.ResultStatus; -import top.hcode.hoj.manager.group.member.GroupMemberManager; -import top.hcode.hoj.pojo.entity.group.GroupMember; -import top.hcode.hoj.pojo.vo.GroupMemberVo; -import top.hcode.hoj.service.group.member.GroupMemberService; -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -/** - * @Author: LengYun - * @Date: 2022/3/11 13:36 - * @Description: - */ -@Service -public class GroupMemberServiceImpl implements GroupMemberService { - - @Autowired - private GroupMemberManager groupMemberManager; - - @Override - public CommonResult> getMemberList(Integer limit, Integer currentPage, String keyword, Integer auth, Long gid) { - try { - return CommonResult.successResponse(groupMemberManager.getMemberList(limit, currentPage, keyword, auth, gid)); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } catch (StatusNotFoundException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.NOT_FOUND); - } - } - - @Override - public CommonResult> getApplyList(Integer limit, Integer currentPage, String keyword, Integer auth, Long gid) { - try { - return CommonResult.successResponse(groupMemberManager.getApplyList(limit, currentPage, keyword, auth, gid)); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } catch (StatusNotFoundException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.NOT_FOUND); - } - } - - @Override - public CommonResult addMember(Long gid, String code, String reason) { - try { - groupMemberManager.addMember(gid, code, reason); - return CommonResult.successResponse(); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FAIL); - } catch (StatusNotFoundException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.NOT_FOUND); - } - } - - @Override - public CommonResult updateMember(GroupMember groupMember) { - try { - groupMemberManager.updateMember(groupMember); - return CommonResult.successResponse(); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FAIL); - } catch (StatusNotFoundException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.NOT_FOUND); - } - } - - - @Override - public CommonResult deleteMember(String uid, Long gid) { - try { - groupMemberManager.deleteMember(uid, gid); - return CommonResult.successResponse(); - } catch (StatusNotFoundException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.NOT_FOUND); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FAIL); - } - } - - - @Override - public CommonResult exitGroup(Long gid) { - try { - groupMemberManager.exitGroup(gid); - return CommonResult.successResponse(); - } catch (StatusNotFoundException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.NOT_FOUND); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FAIL); - } - } -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/problem/GroupProblemService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/problem/GroupProblemService.java deleted file mode 100644 index 556b7aa..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/problem/GroupProblemService.java +++ /dev/null @@ -1,44 +0,0 @@ -package top.hcode.hoj.service.group.problem; - -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.dto.ProblemDto; -import top.hcode.hoj.pojo.dto.CompileDTO; -import top.hcode.hoj.pojo.entity.problem.Problem; -import top.hcode.hoj.pojo.entity.problem.ProblemCase; -import top.hcode.hoj.pojo.entity.problem.Tag; -import top.hcode.hoj.pojo.vo.ProblemVo; -import com.baomidou.mybatisplus.core.metadata.IPage; - -import java.util.List; - -/** - * @Author: LengYun - * @Date: 2022/3/11 13:36 - * @Description: - */ -public interface GroupProblemService { - - public CommonResult> getProblemList(Integer limit, Integer currentPage, Long gid); - - public CommonResult> getAdminProblemList(Integer limit, Integer currentPage, Long gid); - - public CommonResult getProblem(Long pid); - - public CommonResult addProblem(ProblemDto problemDto); - - public CommonResult updateProblem(ProblemDto problemDto); - - public CommonResult deleteProblem(Long pid); - - public CommonResult> getProblemCases(Long pid, Boolean isUpload); - - public CommonResult> getAllProblemTagsList(Long gid); - - public CommonResult compileSpj(CompileDTO compileDTO, Long gid); - - public CommonResult compileInteractive(CompileDTO compileDTO, Long gid); - - public CommonResult changeProblemAuth(Long pid, Integer auth); - - public CommonResult applyPublic(Long pid, Boolean isApplied); -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/problem/impl/GroupProblemServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/problem/impl/GroupProblemServiceImpl.java deleted file mode 100644 index fbbb625..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/problem/impl/GroupProblemServiceImpl.java +++ /dev/null @@ -1,189 +0,0 @@ -package top.hcode.hoj.service.group.problem.impl; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.exception.StatusForbiddenException; -import top.hcode.hoj.common.exception.StatusNotFoundException; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.common.result.ResultStatus; -import top.hcode.hoj.manager.group.problem.GroupProblemManager; -import top.hcode.hoj.pojo.dto.CompileDTO; -import top.hcode.hoj.pojo.dto.ProblemDto; -import top.hcode.hoj.pojo.entity.problem.Problem; -import top.hcode.hoj.pojo.entity.problem.ProblemCase; -import top.hcode.hoj.pojo.entity.problem.Tag; -import top.hcode.hoj.pojo.vo.ProblemVo; -import top.hcode.hoj.service.group.problem.GroupProblemService; - -import java.util.List; - -/** - * @Author: LengYun - * @Date: 2022/3/11 13:36 - * @Description: - */ -@Service -public class GroupProblemServiceImpl implements GroupProblemService { - - @Autowired - private GroupProblemManager groupProblemManager; - - @Override - public CommonResult> getProblemList(Integer limit, Integer currentPage, Long gid) { - try { - return CommonResult.successResponse(groupProblemManager.getProblemList(limit, currentPage, gid)); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } catch (StatusNotFoundException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.NOT_FOUND); - } - } - - @Override - public CommonResult> getAdminProblemList(Integer limit, Integer currentPage, Long gid) { - try { - return CommonResult.successResponse(groupProblemManager.getAdminProblemList(limit, currentPage, gid)); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } catch (StatusNotFoundException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.NOT_FOUND); - } - } - - @Override - public CommonResult getProblem(Long pid) { - try { - return CommonResult.successResponse(groupProblemManager.getProblem(pid)); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } catch (StatusNotFoundException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.NOT_FOUND); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FAIL); - } - } - - @Override - public CommonResult addProblem(ProblemDto problemDto) { - try { - groupProblemManager.addProblem(problemDto); - return CommonResult.successResponse(); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } catch (StatusNotFoundException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.NOT_FOUND); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FAIL); - } - } - - @Override - public CommonResult updateProblem(ProblemDto problemDto) { - try { - groupProblemManager.updateProblem(problemDto); - return CommonResult.successResponse(); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } catch (StatusNotFoundException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.NOT_FOUND); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FAIL); - } - } - - @Override - public CommonResult deleteProblem(Long pid) { - try { - groupProblemManager.deleteProblem(pid); - return CommonResult.successResponse(); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } catch (StatusNotFoundException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.NOT_FOUND); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FAIL); - } - } - - @Override - public CommonResult> getProblemCases(Long pid, Boolean isUpload) { - try { - return CommonResult.successResponse(groupProblemManager.getProblemCases(pid, isUpload)); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } catch (StatusNotFoundException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.NOT_FOUND); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FAIL); - } - } - - @Override - public CommonResult> getAllProblemTagsList(Long gid) { - try { - return CommonResult.successResponse(groupProblemManager.getAllProblemTagsList(gid)); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } catch (StatusNotFoundException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.NOT_FOUND); - } - } - - @Override - public CommonResult compileSpj(CompileDTO compileDTO, Long gid) { - try { - groupProblemManager.compileSpj(compileDTO, gid); - return CommonResult.successResponse(); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } catch (StatusNotFoundException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.NOT_FOUND); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FAIL); - } - } - - @Override - public CommonResult compileInteractive(CompileDTO compileDTO, Long gid) { - try { - groupProblemManager.compileInteractive(compileDTO, gid); - return CommonResult.successResponse(); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } catch (StatusNotFoundException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.NOT_FOUND); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FAIL); - } - } - - @Override - public CommonResult changeProblemAuth(Long pid, Integer auth) { - try { - groupProblemManager.changeProblemAuth(pid, auth); - return CommonResult.successResponse(); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } catch (StatusNotFoundException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.NOT_FOUND); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FAIL); - } - } - - @Override - public CommonResult applyPublic(Long pid, Boolean isApplied) { - try { - groupProblemManager.applyPublic(pid, isApplied); - return CommonResult.successResponse(); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } catch (StatusNotFoundException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.NOT_FOUND); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FAIL); - } - } -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/training/GroupTrainingProblemService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/training/GroupTrainingProblemService.java deleted file mode 100644 index f8382ee..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/training/GroupTrainingProblemService.java +++ /dev/null @@ -1,30 +0,0 @@ -package top.hcode.hoj.service.group.training; - -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.dto.TrainingDto; -import top.hcode.hoj.pojo.dto.TrainingProblemDto; -import top.hcode.hoj.pojo.entity.training.Training; -import top.hcode.hoj.pojo.entity.training.TrainingProblem; -import top.hcode.hoj.pojo.vo.TrainingVo; -import com.baomidou.mybatisplus.core.metadata.IPage; - -import java.util.HashMap; - -/** - * @Author: LengYun - * @Date: 2022/3/11 13:36 - * @Description: - */ -public interface GroupTrainingProblemService { - - public CommonResult> getTrainingProblemList(Integer limit, Integer currentPage, String keyword, Boolean queryExisted, Long tid); - - public CommonResult updateTrainingProblem(TrainingProblem trainingProblem); - - public CommonResult deleteTrainingProblem(Long pid, Long tid); - - public CommonResult addProblemFromPublic(TrainingProblemDto trainingProblemDto); - - public CommonResult addProblemFromGroup(String problemId, Long tid); - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/training/GroupTrainingService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/training/GroupTrainingService.java deleted file mode 100644 index fa7d97f..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/training/GroupTrainingService.java +++ /dev/null @@ -1,30 +0,0 @@ -package top.hcode.hoj.service.group.training; - -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.dto.TrainingDto; -import top.hcode.hoj.pojo.entity.training.Training; -import top.hcode.hoj.pojo.vo.TrainingVo; -import com.baomidou.mybatisplus.core.metadata.IPage; - -/** - * @Author: LengYun - * @Date: 2022/3/11 13:36 - * @Description: - */ -public interface GroupTrainingService { - - public CommonResult> getTrainingList(Integer limit, Integer currentPage, Long gid); - - public CommonResult> getAdminTrainingList(Integer limit, Integer currentPage, Long gid); - - public CommonResult getTraining(Long tid); - - public CommonResult addTraining(TrainingDto trainingDto); - - public CommonResult updateTraining(TrainingDto trainingDto); - - public CommonResult deleteTraining(Long tid); - - public CommonResult changeTrainingStatus(Long tid, Boolean status); - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/training/impl/GroupTrainingProblemServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/training/impl/GroupTrainingProblemServiceImpl.java deleted file mode 100644 index 312636f..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/training/impl/GroupTrainingProblemServiceImpl.java +++ /dev/null @@ -1,95 +0,0 @@ -package top.hcode.hoj.service.group.training.impl; - -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.exception.StatusForbiddenException; -import top.hcode.hoj.common.exception.StatusNotFoundException; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.common.result.ResultStatus; -import top.hcode.hoj.manager.group.training.GroupTrainingManager; -import top.hcode.hoj.manager.group.training.GroupTrainingProblemManager; -import top.hcode.hoj.pojo.dto.TrainingProblemDto; -import top.hcode.hoj.pojo.entity.training.TrainingProblem; -import top.hcode.hoj.service.group.training.GroupTrainingProblemService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.util.HashMap; - -/** - * @Author: LengYun - * @Date: 2022/3/11 13:36 - * @Description: - */ -@Service -public class GroupTrainingProblemServiceImpl implements GroupTrainingProblemService { - - @Autowired - private GroupTrainingProblemManager groupTrainingProblemManager; - - @Override - public CommonResult> getTrainingProblemList(Integer limit, Integer currentPage, String keyword, Boolean queryExisted, Long tid) { - try { - return CommonResult.successResponse(groupTrainingProblemManager.getTrainingProblemList(limit, currentPage, keyword, queryExisted, tid)); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } catch (StatusNotFoundException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.NOT_FOUND); - } - } - - @Override - public CommonResult updateTrainingProblem(TrainingProblem trainingProblem) { - try { - groupTrainingProblemManager.updateTrainingProblem(trainingProblem); - return CommonResult.successResponse(); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } catch (StatusNotFoundException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.NOT_FOUND); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FAIL); - } - } - - @Override - public CommonResult deleteTrainingProblem(Long pid, Long tid) { - try { - groupTrainingProblemManager.deleteTrainingProblem(pid, tid); - return CommonResult.successResponse(); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } catch (StatusNotFoundException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.NOT_FOUND); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FAIL); - } - } - - @Override - public CommonResult addProblemFromPublic(TrainingProblemDto trainingProblemDto) { - try { - groupTrainingProblemManager.addProblemFromPublic(trainingProblemDto); - return CommonResult.successResponse(); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } catch (StatusNotFoundException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.NOT_FOUND); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FAIL); - } - } - - @Override - public CommonResult addProblemFromGroup(String problemId, Long tid) { - try { - groupTrainingProblemManager.addProblemFromGroup(problemId, tid); - return CommonResult.successResponse(); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } catch (StatusNotFoundException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.NOT_FOUND); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FAIL); - } - } -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/training/impl/GroupTrainingServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/training/impl/GroupTrainingServiceImpl.java deleted file mode 100644 index 179f8e2..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/group/training/impl/GroupTrainingServiceImpl.java +++ /dev/null @@ -1,118 +0,0 @@ -package top.hcode.hoj.service.group.training.impl; - -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.exception.StatusForbiddenException; -import top.hcode.hoj.common.exception.StatusNotFoundException; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.common.result.ResultStatus; -import top.hcode.hoj.manager.group.training.GroupTrainingManager; -import top.hcode.hoj.pojo.dto.TrainingDto; -import top.hcode.hoj.pojo.entity.training.Training; -import top.hcode.hoj.pojo.vo.TrainingVo; -import top.hcode.hoj.service.group.training.GroupTrainingService; -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -/** - * @Author: LengYun - * @Date: 2022/3/11 13:36 - * @Description: - */ -@Service -public class GroupTrainingServiceImpl implements GroupTrainingService { - - @Autowired - private GroupTrainingManager groupTrainingManager; - - @Override - public CommonResult> getTrainingList(Integer limit, Integer currentPage, Long gid) { - try { - return CommonResult.successResponse(groupTrainingManager.getTrainingList(limit, currentPage, gid)); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } catch (StatusNotFoundException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.NOT_FOUND); - } - } - - @Override - public CommonResult> getAdminTrainingList(Integer limit, Integer currentPage, Long gid) { - try { - return CommonResult.successResponse(groupTrainingManager.getAdminTrainingList(limit, currentPage, gid)); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } catch (StatusNotFoundException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.NOT_FOUND); - } - } - - @Override - public CommonResult getTraining(Long tid) { - try { - return CommonResult.successResponse(groupTrainingManager.getTraining(tid)); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } catch (StatusNotFoundException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.NOT_FOUND); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FAIL); - } - } - - @Override - public CommonResult addTraining(TrainingDto trainingDto) { - try { - groupTrainingManager.addTraining(trainingDto); - return CommonResult.successResponse(); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } catch (StatusNotFoundException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.NOT_FOUND); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FAIL); - } - } - - @Override - public CommonResult updateTraining(TrainingDto trainingDto) { - try { - groupTrainingManager.updateTraining(trainingDto); - return CommonResult.successResponse(); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } catch (StatusNotFoundException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.NOT_FOUND); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FAIL); - } - } - - @Override - public CommonResult deleteTraining(Long tid) { - try { - groupTrainingManager.deleteTraining(tid); - return CommonResult.successResponse(); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } catch (StatusNotFoundException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.NOT_FOUND); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FAIL); - } - } - - @Override - public CommonResult changeTrainingStatus(Long tid, Boolean status) { - try { - groupTrainingManager.changeTrainingStatus(tid, status); - return CommonResult.successResponse(); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } catch (StatusNotFoundException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.NOT_FOUND); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FAIL); - } - } -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/msg/AdminNoticeService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/msg/AdminNoticeService.java deleted file mode 100644 index 1ade551..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/msg/AdminNoticeService.java +++ /dev/null @@ -1,17 +0,0 @@ -package top.hcode.hoj.service.msg; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.entity.msg.AdminSysNotice; -import top.hcode.hoj.pojo.vo.AdminSysNoticeVo; - -public interface AdminNoticeService { - - public CommonResult> getSysNotice(Integer limit, Integer currentPage, String type); - - public CommonResult addSysNotice(AdminSysNotice adminSysNotice); - - public CommonResult deleteSysNotice(Long id); - - public CommonResult updateSysNotice(AdminSysNotice adminSysNotice); -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/msg/NoticeService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/msg/NoticeService.java deleted file mode 100644 index 7fc5d79..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/msg/NoticeService.java +++ /dev/null @@ -1,12 +0,0 @@ -package top.hcode.hoj.service.msg; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.vo.SysMsgVo; - -public interface NoticeService { - - public CommonResult> getSysNotice(Integer limit,Integer currentPage); - - public CommonResult> getMineNotice(Integer limit, Integer currentPage); -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/msg/UserMessageService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/msg/UserMessageService.java deleted file mode 100644 index cc31cf9..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/msg/UserMessageService.java +++ /dev/null @@ -1,20 +0,0 @@ -package top.hcode.hoj.service.msg; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.vo.UserMsgVo; -import top.hcode.hoj.pojo.vo.UserUnreadMsgCountVo; - -public interface UserMessageService { - - public CommonResult getUnreadMsgCount(); - - public CommonResult cleanMsg(String type, Long id); - - public CommonResult> getCommentMsg( Integer limit,Integer currentPage); - - public CommonResult> getReplyMsg(Integer limit, Integer currentPage); - - public CommonResult> getLikeMsg(Integer limit, Integer currentPage); - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/msg/impl/AdminNoticeServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/msg/impl/AdminNoticeServiceImpl.java deleted file mode 100644 index 334915d..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/msg/impl/AdminNoticeServiceImpl.java +++ /dev/null @@ -1,60 +0,0 @@ -package top.hcode.hoj.service.msg.impl; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.springframework.stereotype.Service; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.manager.msg.AdminNoticeManager; -import top.hcode.hoj.pojo.entity.msg.AdminSysNotice; -import top.hcode.hoj.pojo.vo.AdminSysNoticeVo; -import top.hcode.hoj.service.msg.AdminNoticeService; - -import javax.annotation.Resource; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/10 11:55 - * @Description: - */ -@Service -public class AdminNoticeServiceImpl implements AdminNoticeService { - - @Resource - private AdminNoticeManager adminNoticeManager; - - @Override - public CommonResult> getSysNotice(Integer limit, Integer currentPage, String type) { - - return CommonResult.successResponse(adminNoticeManager.getSysNotice(limit, currentPage, type)); - } - - @Override - public CommonResult addSysNotice(AdminSysNotice adminSysNotice) { - try { - adminNoticeManager.addSysNotice(adminSysNotice); - return CommonResult.successResponse(); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } - } - - @Override - public CommonResult deleteSysNotice(Long id) { - try { - adminNoticeManager.deleteSysNotice(id); - return CommonResult.successResponse(); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } - } - - @Override - public CommonResult updateSysNotice(AdminSysNotice adminSysNotice) { - try { - adminNoticeManager.updateSysNotice(adminSysNotice); - return CommonResult.successResponse(); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/msg/impl/NoticeServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/msg/impl/NoticeServiceImpl.java deleted file mode 100644 index 95d5ac7..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/msg/impl/NoticeServiceImpl.java +++ /dev/null @@ -1,32 +0,0 @@ -package top.hcode.hoj.service.msg.impl; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.springframework.stereotype.Service; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.manager.msg.NoticeManager; -import top.hcode.hoj.pojo.vo.SysMsgVo; -import top.hcode.hoj.service.msg.NoticeService; - -import javax.annotation.Resource; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/10 11:47 - * @Description: - */ -@Service -public class NoticeServiceImpl implements NoticeService { - - @Resource - private NoticeManager noticeManager; - - @Override - public CommonResult> getSysNotice(Integer limit, Integer currentPage) { - return CommonResult.successResponse(noticeManager.getSysNotice(limit, currentPage)); - } - - @Override - public CommonResult> getMineNotice(Integer limit, Integer currentPage) { - return CommonResult.successResponse(noticeManager.getMineNotice(limit, currentPage)); - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/msg/impl/UserMessageServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/msg/impl/UserMessageServiceImpl.java deleted file mode 100644 index 0511d94..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/msg/impl/UserMessageServiceImpl.java +++ /dev/null @@ -1,54 +0,0 @@ -package top.hcode.hoj.service.msg.impl; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.springframework.stereotype.Service; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.manager.msg.UserMessageManager; -import top.hcode.hoj.pojo.vo.UserMsgVo; -import top.hcode.hoj.pojo.vo.UserUnreadMsgCountVo; -import top.hcode.hoj.service.msg.UserMessageService; - -import javax.annotation.Resource; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/10 14:20 - * @Description: - */ -@Service -public class UserMessageServiceImpl implements UserMessageService { - - @Resource - private UserMessageManager userMessageManager; - - @Override - public CommonResult getUnreadMsgCount() { - return CommonResult.successResponse(userMessageManager.getUnreadMsgCount()); - } - - @Override - public CommonResult cleanMsg(String type, Long id) { - try { - userMessageManager.cleanMsg(type, id); - return CommonResult.successResponse(); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } - } - - @Override - public CommonResult> getCommentMsg(Integer limit, Integer currentPage) { - return CommonResult.successResponse(userMessageManager.getCommentMsg(limit, currentPage)); - } - - @Override - public CommonResult> getReplyMsg(Integer limit, Integer currentPage) { - return CommonResult.successResponse(userMessageManager.getReplyMsg(limit, currentPage)); - } - - @Override - public CommonResult> getLikeMsg(Integer limit, Integer currentPage) { - return CommonResult.successResponse(userMessageManager.getLikeMsg(limit, currentPage)); - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/AccountService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/AccountService.java deleted file mode 100644 index 3feece0..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/AccountService.java +++ /dev/null @@ -1,24 +0,0 @@ -package top.hcode.hoj.service.oj; - -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.dto.ChangeEmailDto; -import top.hcode.hoj.pojo.dto.ChangePasswordDto; -import top.hcode.hoj.pojo.dto.CheckUsernameOrEmailDto; -import top.hcode.hoj.pojo.vo.*; - - -public interface AccountService { - - public CommonResult checkUsernameOrEmail(CheckUsernameOrEmailDto checkUsernameOrEmailDto); - - public CommonResult getUserHomeInfo(String uid, String username); - - public CommonResult getUserCalendarHeatmap(String uid, String username); - - public CommonResult changePassword(ChangePasswordDto changePasswordDto); - - public CommonResult changeEmail(ChangeEmailDto changeEmailDto); - - public CommonResult changeUserInfo(UserInfoVo userInfoVo); - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/CommentService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/CommentService.java deleted file mode 100644 index d36a415..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/CommentService.java +++ /dev/null @@ -1,28 +0,0 @@ -package top.hcode.hoj.service.oj; - -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.dto.ReplyDto; -import top.hcode.hoj.pojo.entity.discussion.Comment; -import top.hcode.hoj.pojo.entity.discussion.Reply; -import top.hcode.hoj.pojo.vo.CommentListVo; -import top.hcode.hoj.pojo.vo.CommentVo; -import top.hcode.hoj.pojo.vo.ReplyVo; - -import java.util.List; - -public interface CommentService { - - public CommonResult getComments(Long cid, Integer did, Integer limit, Integer currentPage); - - public CommonResult addComment(Comment comment); - - public CommonResult deleteComment(Comment comment); - - public CommonResult addCommentLike(Integer cid, Boolean toLike, Integer sourceId, String sourceType); - - public CommonResult> getAllReply(Integer commentId, Long cid); - - public CommonResult addReply(ReplyDto replyDto); - - public CommonResult deleteReply(ReplyDto replyDto); -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/CommonService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/CommonService.java deleted file mode 100644 index b121135..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/CommonService.java +++ /dev/null @@ -1,31 +0,0 @@ -package top.hcode.hoj.service.oj; - -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.entity.problem.CodeTemplate; -import top.hcode.hoj.pojo.entity.problem.Language; -import top.hcode.hoj.pojo.entity.problem.Tag; -import top.hcode.hoj.pojo.entity.training.TrainingCategory; -import top.hcode.hoj.pojo.vo.CaptchaVo; -import top.hcode.hoj.pojo.vo.ProblemTagVo; - -import java.util.Collection; -import java.util.List; - -public interface CommonService { - - public CommonResult getCaptcha(); - - public CommonResult> getTrainingCategory(); - - public CommonResult> getAllProblemTagsList(String oj); - - public CommonResult> getProblemTagsAndClassification(String oj); - - public CommonResult> getProblemTags(Long pid); - - public CommonResult> getLanguages(Long pid, Boolean all); - - public CommonResult> getProblemLanguages(Long pid); - - public CommonResult> getProblemCodeTemplate(Long pid); -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/ContestAdminService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/ContestAdminService.java deleted file mode 100644 index a06fb39..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/ContestAdminService.java +++ /dev/null @@ -1,18 +0,0 @@ -package top.hcode.hoj.service.oj; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.dto.CheckACDto; -import top.hcode.hoj.pojo.entity.contest.ContestPrint; -import top.hcode.hoj.pojo.entity.contest.ContestRecord; - -public interface ContestAdminService { - - public CommonResult> getContestACInfo(Long cid, Integer currentPage, Integer limit); - - public CommonResult checkContestACInfo(CheckACDto checkACDto); - - public CommonResult> getContestPrint(Long cid, Integer currentPage, Integer limit); - - public CommonResult checkContestPrintStatus(Long id, Long cid); -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/ContestScoreboardService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/ContestScoreboardService.java deleted file mode 100644 index 3865907..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/ContestScoreboardService.java +++ /dev/null @@ -1,20 +0,0 @@ -package top.hcode.hoj.service.oj; - -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.dto.ContestRankDto; -import top.hcode.hoj.pojo.vo.ContestOutsideInfo; - -import java.util.List; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/11 22:18 - * @Description: - */ -public interface ContestScoreboardService { - - public CommonResult getContestOutsideInfo(Long cid); - - public CommonResult getContestOutsideScoreboard(ContestRankDto contestRankDto); - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/ContestService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/ContestService.java deleted file mode 100644 index 0d8e9bd..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/ContestService.java +++ /dev/null @@ -1,46 +0,0 @@ -package top.hcode.hoj.service.oj; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.dto.ContestPrintDto; -import top.hcode.hoj.pojo.dto.ContestRankDto; -import top.hcode.hoj.pojo.dto.RegisterContestDto; -import top.hcode.hoj.pojo.dto.UserReadContestAnnouncementDto; -import top.hcode.hoj.pojo.entity.common.Announcement; -import top.hcode.hoj.pojo.vo.*; - -import java.util.List; - -public interface ContestService { - - public CommonResult> getContestList(Integer limit, Integer currentPage, Integer status, Integer type, String keyword); - - public CommonResult getContestInfo(Long cid); - - public CommonResult toRegisterContest(RegisterContestDto registerContestDto); - - public CommonResult getContestAccess(Long cid); - - public CommonResult> getContestProblem(Long cid); - - public CommonResult getContestProblemDetails(Long cid, String displayId); - - public CommonResult> getContestSubmissionList(Integer limit, - Integer currentPage, - Boolean onlyMine, - String displayId, - Integer searchStatus, - String searchUsername, - Long searchCid, - Boolean beforeContestSubmit, - Boolean completeProblemID); - - public CommonResult getContestRank(ContestRankDto contestRankDto); - - public CommonResult> getContestAnnouncement(Long cid, Integer limit, Integer currentPage); - - public CommonResult> getContestUserNotReadAnnouncement(UserReadContestAnnouncementDto userReadContestAnnouncementDto); - - public CommonResult submitPrintText(ContestPrintDto contestPrintDto); - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/DiscussionService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/DiscussionService.java deleted file mode 100644 index 2606642..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/DiscussionService.java +++ /dev/null @@ -1,36 +0,0 @@ -package top.hcode.hoj.service.oj; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.entity.discussion.Discussion; -import top.hcode.hoj.pojo.entity.discussion.DiscussionReport; -import top.hcode.hoj.pojo.entity.problem.Category; -import top.hcode.hoj.pojo.vo.DiscussionVo; - -import java.util.List; - -public interface DiscussionService { - - public CommonResult> getDiscussionList(Integer limit, - Integer currentPage, - Integer categoryId, - String pid, - Boolean onlyMine, - String keyword, - Boolean admin); - - public CommonResult getDiscussion(Integer did); - - public CommonResult addDiscussion(Discussion discussion); - - public CommonResult updateDiscussion(Discussion discussion); - - public CommonResult removeDiscussion(Integer did); - - public CommonResult addDiscussionLike(Integer did, Boolean toLike); - - public CommonResult> getDiscussionCategory(); - - public CommonResult addDiscussionReport(DiscussionReport discussionReport); - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/HomeService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/HomeService.java deleted file mode 100644 index 8b7d926..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/HomeService.java +++ /dev/null @@ -1,32 +0,0 @@ -package top.hcode.hoj.service.oj; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.vo.ACMRankVo; -import top.hcode.hoj.pojo.vo.AnnouncementVo; -import top.hcode.hoj.pojo.vo.ContestVo; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/10 21:06 - * @Description: - */ -public interface HomeService { - - public CommonResult> getRecentContest(); - - public CommonResult>> getHomeCarousel(); - - public CommonResult> getRecentSevenACRank(); - - public CommonResult>> getRecentOtherContest(); - - public CommonResult> getCommonAnnouncement(Integer limit, Integer currentPage); - - public CommonResult> getWebConfig(); - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/JudgeService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/JudgeService.java deleted file mode 100644 index af0eb9b..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/JudgeService.java +++ /dev/null @@ -1,45 +0,0 @@ -package top.hcode.hoj.service.oj; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.dto.SubmitIdListDto; -import top.hcode.hoj.pojo.dto.TestJudgeDto; -import top.hcode.hoj.pojo.dto.SubmitJudgeDto; -import top.hcode.hoj.pojo.entity.judge.Judge; -import top.hcode.hoj.pojo.entity.judge.JudgeCase; -import top.hcode.hoj.pojo.vo.JudgeVo; -import top.hcode.hoj.pojo.vo.SubmissionInfoVo; -import top.hcode.hoj.pojo.vo.TestJudgeVo; - -import java.util.HashMap; -import java.util.List; - -public interface JudgeService { - - public CommonResult submitProblemJudge(SubmitJudgeDto judgeDto); - - public CommonResult submitProblemTestJudge(TestJudgeDto testJudgeDto); - - public CommonResult resubmit(Long submitId); - - public CommonResult getSubmission(Long submitId); - - public CommonResult getTestJudgeResult(String testJudgeKey); - - public CommonResult> getJudgeList(Integer limit, - Integer currentPage, - Boolean onlyMine, - String searchPid, - Integer searchStatus, - String searchUsername, - Boolean completeProblemID, - Long gid); - - public CommonResult updateSubmission(Judge judge); - - public CommonResult> checkCommonJudgeResult(SubmitIdListDto submitIdListDto); - - public CommonResult> checkContestJudgeResult(SubmitIdListDto submitIdListDto); - - public CommonResult> getALLCaseResult(Long submitId); -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/PassportService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/PassportService.java deleted file mode 100644 index d3e5540..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/PassportService.java +++ /dev/null @@ -1,31 +0,0 @@ -package top.hcode.hoj.service.oj; - - -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.dto.ApplyResetPasswordDto; -import top.hcode.hoj.pojo.dto.LoginDto; -import top.hcode.hoj.pojo.dto.RegisterDto; -import top.hcode.hoj.pojo.dto.ResetPasswordDto; -import top.hcode.hoj.pojo.vo.RegisterCodeVo; -import top.hcode.hoj.pojo.vo.UserInfoVo; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/11 17:39 - * @Description: - */ -public interface PassportService { - - public CommonResult login(LoginDto loginDto, HttpServletResponse response, HttpServletRequest request); - - public CommonResult getRegisterCode(String email); - - public CommonResult register(RegisterDto registerDto); - - public CommonResult applyResetPassword(ApplyResetPasswordDto applyResetPasswordDto); - - public CommonResult resetPassword(ResetPasswordDto resetPasswordDto); -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/ProblemService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/ProblemService.java deleted file mode 100644 index db843c0..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/ProblemService.java +++ /dev/null @@ -1,29 +0,0 @@ -package top.hcode.hoj.service.oj; - -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.dto.PidListDto; -import top.hcode.hoj.pojo.vo.ProblemInfoVo; -import top.hcode.hoj.pojo.vo.ProblemVo; -import top.hcode.hoj.pojo.vo.RandomProblemVo; - -import java.util.HashMap; -import java.util.List; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/11 11:04 - * @Description: - */ -public interface ProblemService { - - public CommonResult> getProblemList(Integer limit, Integer currentPage, - String keyword, List tagId, Integer difficulty, String oj); - - public CommonResult getRandomProblem(); - - public CommonResult> getUserProblemStatus(PidListDto pidListDto); - - public CommonResult getProblemInfo(String problemId, Long gid); - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/RankService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/RankService.java deleted file mode 100644 index a32bb0e..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/RankService.java +++ /dev/null @@ -1,9 +0,0 @@ -package top.hcode.hoj.service.oj; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import top.hcode.hoj.common.result.CommonResult; - -public interface RankService { - - public CommonResult getRankList(Integer limit, Integer currentPage, String searchUser, Integer type); -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/TrainingService.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/TrainingService.java deleted file mode 100644 index ae422a0..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/TrainingService.java +++ /dev/null @@ -1,31 +0,0 @@ -package top.hcode.hoj.service.oj; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.pojo.dto.RegisterTrainingDto; -import top.hcode.hoj.pojo.vo.AccessVo; -import top.hcode.hoj.pojo.vo.ProblemVo; -import top.hcode.hoj.pojo.vo.TrainingRankVo; -import top.hcode.hoj.pojo.vo.TrainingVo; - -import java.util.List; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/10 20:29 - * @Description: - */ -public interface TrainingService { - - public CommonResult> getTrainingList(Integer limit, Integer currentPage, String keyword, Long categoryId, String auth); - - public CommonResult getTraining(Long tid); - - public CommonResult> getTrainingProblemList(Long tid); - - public CommonResult toRegisterTraining(RegisterTrainingDto registerTrainingDto); - - public CommonResult getTrainingAccess( Long tid); - - public CommonResult> getTrainingRank(Long tid, Integer limit, Integer currentPage); -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/AccountServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/AccountServiceImpl.java deleted file mode 100644 index 666f230..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/AccountServiceImpl.java +++ /dev/null @@ -1,81 +0,0 @@ -package top.hcode.hoj.service.oj.impl; - -import org.springframework.stereotype.Service; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.exception.StatusSystemErrorException; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.common.result.ResultStatus; -import top.hcode.hoj.manager.oj.AccountManager; -import top.hcode.hoj.pojo.dto.ChangeEmailDto; -import top.hcode.hoj.pojo.dto.ChangePasswordDto; -import top.hcode.hoj.pojo.dto.CheckUsernameOrEmailDto; -import top.hcode.hoj.pojo.vo.*; -import top.hcode.hoj.service.oj.AccountService; - -import javax.annotation.Resource; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/11 19:35 - * @Description: - */ -@Service -public class AccountServiceImpl implements AccountService { - - @Resource - private AccountManager accountManager; - - @Override - public CommonResult checkUsernameOrEmail(CheckUsernameOrEmailDto checkUsernameOrEmailDto) { - return CommonResult.successResponse(accountManager.checkUsernameOrEmail(checkUsernameOrEmailDto)); - } - - @Override - public CommonResult getUserHomeInfo(String uid, String username) { - try { - return CommonResult.successResponse(accountManager.getUserHomeInfo(uid, username)); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } - } - - @Override - public CommonResult getUserCalendarHeatmap(String uid, String username) { - try { - return CommonResult.successResponse(accountManager.getUserCalendarHeatmap(uid, username)); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } - } - - @Override - public CommonResult changePassword(ChangePasswordDto changePasswordDto) { - try { - return CommonResult.successResponse(accountManager.changePassword(changePasswordDto)); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } catch (StatusSystemErrorException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.SYSTEM_ERROR); - } - } - - @Override - public CommonResult changeEmail(ChangeEmailDto changeEmailDto) { - try { - return CommonResult.successResponse(accountManager.changeEmail(changeEmailDto)); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } catch (StatusSystemErrorException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.SYSTEM_ERROR); - } - } - - @Override - public CommonResult changeUserInfo(UserInfoVo userInfoVo) { - try { - return CommonResult.successResponse(accountManager.changeUserInfo(userInfoVo)); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/CommentServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/CommentServiceImpl.java deleted file mode 100644 index 1a53df2..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/CommentServiceImpl.java +++ /dev/null @@ -1,106 +0,0 @@ -package top.hcode.hoj.service.oj.impl; - -import org.springframework.stereotype.Service; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.exception.StatusForbiddenException; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.common.result.ResultStatus; -import top.hcode.hoj.exception.AccessException; -import top.hcode.hoj.manager.oj.CommentManager; -import top.hcode.hoj.pojo.dto.ReplyDto; -import top.hcode.hoj.pojo.entity.discussion.Comment; -import top.hcode.hoj.pojo.vo.CommentListVo; -import top.hcode.hoj.pojo.vo.CommentVo; -import top.hcode.hoj.pojo.vo.ReplyVo; -import top.hcode.hoj.service.oj.CommentService; - -import javax.annotation.Resource; -import java.util.List; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/11 16:21 - * @Description: - */ -@Service -public class CommentServiceImpl implements CommentService { - - @Resource - private CommentManager commentManager; - - @Override - public CommonResult getComments(Long cid, Integer did, Integer limit, Integer currentPage) { - try { - return CommonResult.successResponse(commentManager.getComments(cid, did, limit, currentPage)); - } catch (StatusForbiddenException | AccessException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } - } - - @Override - public CommonResult addComment(Comment comment) { - try { - return CommonResult.successResponse(commentManager.addComment(comment)); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } catch (StatusForbiddenException | AccessException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } - } - - @Override - public CommonResult deleteComment(Comment comment) { - try { - commentManager.deleteComment(comment); - return CommonResult.successResponse(); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } catch (StatusForbiddenException | AccessException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } - } - - @Override - public CommonResult addCommentLike(Integer cid, Boolean toLike, Integer sourceId, String sourceType) { - try { - commentManager.addCommentLike(cid, toLike, sourceId, sourceType); - return CommonResult.successResponse(); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } - } - - @Override - public CommonResult> getAllReply(Integer commentId, Long cid) { - try { - return CommonResult.successResponse(commentManager.getAllReply(commentId, cid)); - } catch (StatusForbiddenException | AccessException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FAIL); - } - } - - @Override - public CommonResult addReply(ReplyDto replyDto) { - try { - return CommonResult.successResponse(commentManager.addReply(replyDto)); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } catch (StatusForbiddenException | AccessException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } - } - - @Override - public CommonResult deleteReply(ReplyDto replyDto) { - try { - commentManager.deleteReply(replyDto); - return CommonResult.successResponse(); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } catch (StatusForbiddenException | AccessException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/CommonServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/CommonServiceImpl.java deleted file mode 100644 index 7fecd26..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/CommonServiceImpl.java +++ /dev/null @@ -1,68 +0,0 @@ -package top.hcode.hoj.service.oj.impl; - -import org.springframework.stereotype.Service; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.manager.oj.CommonManager; -import top.hcode.hoj.pojo.entity.problem.CodeTemplate; -import top.hcode.hoj.pojo.entity.problem.Language; -import top.hcode.hoj.pojo.entity.problem.Tag; -import top.hcode.hoj.pojo.entity.training.TrainingCategory; -import top.hcode.hoj.pojo.vo.CaptchaVo; -import top.hcode.hoj.pojo.vo.ProblemTagVo; -import top.hcode.hoj.service.oj.CommonService; - -import javax.annotation.Resource; -import java.util.Collection; -import java.util.List; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/11 16:42 - * @Description: - */ -@Service -public class CommonServiceImpl implements CommonService { - - @Resource - private CommonManager commonManager; - - @Override - public CommonResult getCaptcha() { - return CommonResult.successResponse(commonManager.getCaptcha()); - } - - @Override - public CommonResult> getTrainingCategory() { - return CommonResult.successResponse(commonManager.getTrainingCategory()); - } - - @Override - public CommonResult> getAllProblemTagsList(String oj) { - return CommonResult.successResponse(commonManager.getAllProblemTagsList(oj)); - } - - @Override - public CommonResult> getProblemTagsAndClassification(String oj) { - return CommonResult.successResponse(commonManager.getProblemTagsAndClassification(oj)); - } - - @Override - public CommonResult> getProblemTags(Long pid) { - return CommonResult.successResponse(commonManager.getProblemTags(pid)); - } - - @Override - public CommonResult> getLanguages(Long pid, Boolean all) { - return CommonResult.successResponse(commonManager.getLanguages(pid, all)); - } - - @Override - public CommonResult> getProblemLanguages(Long pid) { - return CommonResult.successResponse(commonManager.getProblemLanguages(pid)); - } - - @Override - public CommonResult> getProblemCodeTemplate(Long pid) { - return CommonResult.successResponse(commonManager.getProblemCodeTemplate(pid)); - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/ContestAdminServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/ContestAdminServiceImpl.java deleted file mode 100644 index 7fa0561..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/ContestAdminServiceImpl.java +++ /dev/null @@ -1,70 +0,0 @@ -package top.hcode.hoj.service.oj.impl; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.springframework.stereotype.Service; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.exception.StatusForbiddenException; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.common.result.ResultStatus; -import top.hcode.hoj.manager.oj.ContestAdminManager; -import top.hcode.hoj.pojo.dto.CheckACDto; -import top.hcode.hoj.pojo.entity.contest.ContestPrint; -import top.hcode.hoj.pojo.entity.contest.ContestRecord; -import top.hcode.hoj.service.oj.ContestAdminService; - -import javax.annotation.Resource; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/11 19:54 - * @Description: - */ - -@Service -public class ContestAdminServiceImpl implements ContestAdminService { - - @Resource - private ContestAdminManager contestAdminManager; - - @Override - public CommonResult> getContestACInfo(Long cid, Integer currentPage, Integer limit) { - try { - return CommonResult.successResponse(contestAdminManager.getContestACInfo(cid, currentPage, limit)); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } - } - - @Override - public CommonResult checkContestACInfo(CheckACDto checkACDto) { - try { - contestAdminManager.checkContestACInfo(checkACDto); - return CommonResult.successResponse(); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } - } - - @Override - public CommonResult> getContestPrint(Long cid, Integer currentPage, Integer limit) { - try { - return CommonResult.successResponse(contestAdminManager.getContestPrint(cid, currentPage, limit)); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } - } - - @Override - public CommonResult checkContestPrintStatus(Long id, Long cid) { - try { - contestAdminManager.checkContestPrintStatus(id, cid); - return CommonResult.successResponse(); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/ContestScoreboardServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/ContestScoreboardServiceImpl.java deleted file mode 100644 index 05b51d8..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/ContestScoreboardServiceImpl.java +++ /dev/null @@ -1,49 +0,0 @@ -package top.hcode.hoj.service.oj.impl; - -import org.springframework.stereotype.Service; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.exception.StatusForbiddenException; -import top.hcode.hoj.common.exception.StatusNotFoundException; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.common.result.ResultStatus; -import top.hcode.hoj.manager.oj.ContestScoreboardManager; -import top.hcode.hoj.pojo.dto.ContestRankDto; -import top.hcode.hoj.pojo.vo.ContestOutsideInfo; -import top.hcode.hoj.service.oj.ContestScoreboardService; - -import javax.annotation.Resource; -import java.util.List; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/11 22:18 - * @Description: - */ -@Service -public class ContestScoreboardServiceImpl implements ContestScoreboardService { - - @Resource - private ContestScoreboardManager contestScoreboardManager; - - @Override - public CommonResult getContestOutsideInfo(Long cid) { - try { - return CommonResult.successResponse(contestScoreboardManager.getContestOutsideInfo(cid)); - } catch (StatusNotFoundException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.NOT_FOUND); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } - } - - @Override - public CommonResult getContestOutsideScoreboard(ContestRankDto contestRankDto) { - try { - return CommonResult.successResponse(contestScoreboardManager.getContestOutsideScoreboard(contestRankDto)); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/ContestServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/ContestServiceImpl.java deleted file mode 100644 index b26a4a4..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/ContestServiceImpl.java +++ /dev/null @@ -1,160 +0,0 @@ -package top.hcode.hoj.service.oj.impl; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.springframework.stereotype.Service; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.exception.StatusForbiddenException; -import top.hcode.hoj.common.exception.StatusNotFoundException; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.common.result.ResultStatus; -import top.hcode.hoj.manager.oj.ContestManager; -import top.hcode.hoj.pojo.dto.ContestPrintDto; -import top.hcode.hoj.pojo.dto.ContestRankDto; -import top.hcode.hoj.pojo.dto.RegisterContestDto; -import top.hcode.hoj.pojo.dto.UserReadContestAnnouncementDto; -import top.hcode.hoj.pojo.entity.common.Announcement; -import top.hcode.hoj.pojo.vo.*; -import top.hcode.hoj.service.oj.ContestService; - -import javax.annotation.Resource; -import java.util.List; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/12 15:06 - * @Description: - */ -@Service -public class ContestServiceImpl implements ContestService { - - @Resource - private ContestManager contestManager; - - @Override - public CommonResult> getContestList(Integer limit, Integer currentPage, Integer status, Integer type, String keyword) { - return CommonResult.successResponse(contestManager.getContestList(limit, currentPage, status, type, keyword)); - } - - @Override - public CommonResult getContestInfo(Long cid) { - try { - return CommonResult.successResponse(contestManager.getContestInfo(cid)); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } - } - - @Override - public CommonResult toRegisterContest(RegisterContestDto registerContestDto) { - try { - contestManager.toRegisterContest(registerContestDto); - return CommonResult.successResponse(); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } - } - - @Override - public CommonResult getContestAccess(Long cid) { - try { - return CommonResult.successResponse(contestManager.getContestAccess(cid)); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } - } - - @Override - public CommonResult> getContestProblem(Long cid) { - try { - return CommonResult.successResponse(contestManager.getContestProblem(cid)); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } - } - - @Override - public CommonResult getContestProblemDetails(Long cid, String displayId) { - try { - return CommonResult.successResponse(contestManager.getContestProblemDetails(cid, displayId)); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } catch (StatusNotFoundException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.NOT_FOUND); - } - } - - @Override - public CommonResult> getContestSubmissionList(Integer limit, - Integer currentPage, - Boolean onlyMine, - String displayId, - Integer searchStatus, - String searchUsername, - Long searchCid, - Boolean beforeContestSubmit, - Boolean completeProblemID) { - try { - return CommonResult.successResponse(contestManager.getContestSubmissionList(limit, - currentPage, - onlyMine, - displayId, - searchStatus, - searchUsername, - searchCid, - beforeContestSubmit, - completeProblemID)); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } - } - - @Override - public CommonResult getContestRank(ContestRankDto contestRankDto) { - try { - return CommonResult.successResponse(contestManager.getContestRank(contestRankDto)); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } - } - - @Override - public CommonResult> getContestAnnouncement(Long cid, Integer limit, Integer currentPage) { - try { - return CommonResult.successResponse(contestManager.getContestAnnouncement(cid, limit, currentPage)); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } - } - - @Override - public CommonResult> getContestUserNotReadAnnouncement(UserReadContestAnnouncementDto userReadContestAnnouncementDto) { - - return CommonResult.successResponse(contestManager.getContestUserNotReadAnnouncement(userReadContestAnnouncementDto)); - } - - @Override - public CommonResult submitPrintText(ContestPrintDto contestPrintDto) { - try { - contestManager.submitPrintText(contestPrintDto); - return CommonResult.successResponse(); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/DiscussionServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/DiscussionServiceImpl.java deleted file mode 100644 index fcf35ef..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/DiscussionServiceImpl.java +++ /dev/null @@ -1,113 +0,0 @@ -package top.hcode.hoj.service.oj.impl; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.springframework.stereotype.Service; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.exception.StatusForbiddenException; -import top.hcode.hoj.common.exception.StatusNotFoundException; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.common.result.ResultStatus; -import top.hcode.hoj.exception.AccessException; -import top.hcode.hoj.manager.oj.DiscussionManager; -import top.hcode.hoj.pojo.entity.discussion.Discussion; -import top.hcode.hoj.pojo.entity.discussion.DiscussionReport; -import top.hcode.hoj.pojo.entity.problem.Category; -import top.hcode.hoj.pojo.vo.DiscussionVo; -import top.hcode.hoj.service.oj.DiscussionService; - -import javax.annotation.Resource; -import java.util.List; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/11 15:47 - * @Description: - */ -@Service -public class DiscussionServiceImpl implements DiscussionService { - - @Resource - private DiscussionManager discussionManager; - - @Override - public CommonResult> getDiscussionList(Integer limit, Integer currentPage, Integer categoryId, String pid, Boolean onlyMine, String keyword, Boolean admin) { - return CommonResult.successResponse(discussionManager.getDiscussionList(limit, currentPage, categoryId, pid, onlyMine, keyword, admin)); - } - - @Override - public CommonResult getDiscussion(Integer did) { - try { - return CommonResult.successResponse(discussionManager.getDiscussion(did)); - } catch (StatusNotFoundException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.NOT_FOUND); - } catch (StatusForbiddenException | AccessException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } - } - - @Override - public CommonResult addDiscussion(Discussion discussion) { - try { - discussionManager.addDiscussion(discussion); - return CommonResult.successResponse(); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FAIL); - } catch (StatusNotFoundException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.NOT_FOUND); - } - } - - @Override - public CommonResult updateDiscussion(Discussion discussion) { - try { - discussionManager.updateDiscussion(discussion); - return CommonResult.successResponse(); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } - } - - @Override - public CommonResult removeDiscussion(Integer did) { - try { - discussionManager.removeDiscussion(did); - return CommonResult.successResponse(); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } - } - - @Override - public CommonResult addDiscussionLike(Integer did, Boolean toLike) { - try { - discussionManager.addDiscussionLike(did, toLike); - return CommonResult.successResponse(); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } - } - - @Override - public CommonResult> getDiscussionCategory() { - - return CommonResult.successResponse(discussionManager.getDiscussionCategory()); - } - - @Override - public CommonResult addDiscussionReport(DiscussionReport discussionReport) { - try { - discussionManager.addDiscussionReport(discussionReport); - return CommonResult.successResponse(); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/HomeServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/HomeServiceImpl.java deleted file mode 100644 index 25c9bb1..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/HomeServiceImpl.java +++ /dev/null @@ -1,57 +0,0 @@ -package top.hcode.hoj.service.oj.impl; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.springframework.stereotype.Service; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.manager.oj.HomeManager; -import top.hcode.hoj.pojo.vo.ACMRankVo; -import top.hcode.hoj.pojo.vo.AnnouncementVo; -import top.hcode.hoj.pojo.vo.ContestVo; -import top.hcode.hoj.service.oj.HomeService; - -import javax.annotation.Resource; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/10 21:08 - * @Description: - */ -@Service -public class HomeServiceImpl implements HomeService { - - @Resource - private HomeManager homeManager; - - @Override - public CommonResult> getRecentContest() { - return CommonResult.successResponse(homeManager.getRecentContest()); - } - - @Override - public CommonResult>> getHomeCarousel() { - return CommonResult.successResponse(homeManager.getHomeCarousel()); - } - - @Override - public CommonResult> getRecentSevenACRank() { - return CommonResult.successResponse(homeManager.getRecentSevenACRank()); - } - - @Override - public CommonResult>> getRecentOtherContest() { - return CommonResult.successResponse(homeManager.getRecentOtherContest()); - } - - @Override - public CommonResult> getCommonAnnouncement(Integer limit, Integer currentPage) { - return CommonResult.successResponse(homeManager.getCommonAnnouncement(limit, currentPage)); - } - - @Override - public CommonResult> getWebConfig() { - return CommonResult.successResponse(homeManager.getWebConfig()); - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/JudgeServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/JudgeServiceImpl.java deleted file mode 100644 index 84bb6ad..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/JudgeServiceImpl.java +++ /dev/null @@ -1,151 +0,0 @@ -package top.hcode.hoj.service.oj.impl; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.springframework.stereotype.Service; -import top.hcode.hoj.common.exception.*; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.common.result.ResultStatus; -import top.hcode.hoj.exception.AccessException; -import top.hcode.hoj.manager.oj.JudgeManager; -import top.hcode.hoj.pojo.dto.SubmitIdListDto; -import top.hcode.hoj.pojo.dto.TestJudgeDto; -import top.hcode.hoj.pojo.dto.SubmitJudgeDto; -import top.hcode.hoj.pojo.entity.judge.Judge; -import top.hcode.hoj.pojo.entity.judge.JudgeCase; -import top.hcode.hoj.pojo.vo.JudgeVo; -import top.hcode.hoj.pojo.vo.SubmissionInfoVo; -import top.hcode.hoj.pojo.vo.TestJudgeVo; -import top.hcode.hoj.service.oj.JudgeService; - -import javax.annotation.Resource; -import java.util.HashMap; -import java.util.List; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/11 15:09 - * @Description: - */ -@Service -public class JudgeServiceImpl implements JudgeService { - - @Resource - private JudgeManager judgeManager; - - @Override - public CommonResult submitProblemJudge(SubmitJudgeDto judgeDto) { - try { - return CommonResult.successResponse(judgeManager.submitProblemJudge(judgeDto)); - } catch (StatusForbiddenException | AccessException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } catch (StatusNotFoundException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.NOT_FOUND); - } catch (StatusAccessDeniedException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.ACCESS_DENIED); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } - } - - @Override - public CommonResult submitProblemTestJudge(TestJudgeDto testJudgeDto) { - try { - return CommonResult.successResponse(judgeManager.submitProblemTestJudge(testJudgeDto), "success"); - } catch (StatusForbiddenException | AccessException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } catch (StatusSystemErrorException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.SYSTEM_ERROR); - } - } - - @Override - public CommonResult resubmit(Long submitId) { - try { - return CommonResult.successResponse(judgeManager.resubmit(submitId)); - } catch (StatusNotFoundException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.NOT_FOUND); - } - } - - @Override - public CommonResult getSubmission(Long submitId) { - try { - return CommonResult.successResponse(judgeManager.getSubmission(submitId)); - } catch (StatusNotFoundException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.NOT_FOUND); - } catch (StatusAccessDeniedException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.ACCESS_DENIED); - } - } - - @Override - public CommonResult getTestJudgeResult(String testJudgeKey) { - try { - return CommonResult.successResponse(judgeManager.getTestJudgeResult(testJudgeKey)); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } - } - - @Override - public CommonResult> getJudgeList(Integer limit, - Integer currentPage, - Boolean onlyMine, - String searchPid, - Integer searchStatus, - String searchUsername, - Boolean completeProblemID, - Long gid) { - try { - return CommonResult.successResponse(judgeManager.getJudgeList(limit, - currentPage, - onlyMine, - searchPid, - searchStatus, - searchUsername, - completeProblemID, - gid)); - } catch (StatusAccessDeniedException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.ACCESS_DENIED); - } - } - - @Override - public CommonResult updateSubmission(Judge judge) { - try { - judgeManager.updateSubmission(judge); - return CommonResult.successResponse(); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } - } - - @Override - public CommonResult> checkCommonJudgeResult(SubmitIdListDto submitIdListDto) { - return CommonResult.successResponse(judgeManager.checkCommonJudgeResult(submitIdListDto)); - } - - @Override - public CommonResult> checkContestJudgeResult(SubmitIdListDto submitIdListDto) { - try { - return CommonResult.successResponse(judgeManager.checkContestJudgeResult(submitIdListDto)); - } catch (StatusNotFoundException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.NOT_FOUND); - } - } - - @Override - public CommonResult> getALLCaseResult(Long submitId) { - try { - return CommonResult.successResponse(judgeManager.getALLCaseResult(submitId)); - } catch (StatusNotFoundException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.NOT_FOUND); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/PassportServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/PassportServiceImpl.java deleted file mode 100644 index 7f723ca..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/PassportServiceImpl.java +++ /dev/null @@ -1,86 +0,0 @@ -package top.hcode.hoj.service.oj.impl; - -import org.springframework.stereotype.Service; -import top.hcode.hoj.common.exception.StatusAccessDeniedException; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.exception.StatusForbiddenException; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.common.result.ResultStatus; -import top.hcode.hoj.manager.oj.PassportManager; -import top.hcode.hoj.pojo.dto.ApplyResetPasswordDto; -import top.hcode.hoj.pojo.dto.LoginDto; -import top.hcode.hoj.pojo.dto.RegisterDto; -import top.hcode.hoj.pojo.dto.ResetPasswordDto; -import top.hcode.hoj.pojo.vo.RegisterCodeVo; -import top.hcode.hoj.pojo.vo.UserInfoVo; -import top.hcode.hoj.service.oj.PassportService; - -import javax.annotation.Resource; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/11 17:40 - * @Description: - */ -@Service -public class PassportServiceImpl implements PassportService { - - @Resource - private PassportManager passportManager; - - @Override - public CommonResult login(LoginDto loginDto, HttpServletResponse response, HttpServletRequest request) { - try { - return CommonResult.successResponse(passportManager.login(loginDto, response, request)); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } - } - - @Override - public CommonResult getRegisterCode(String email) { - try { - return CommonResult.successResponse(passportManager.getRegisterCode(email)); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } catch (StatusAccessDeniedException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.ACCESS_DENIED); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } - } - - @Override - public CommonResult register(RegisterDto registerDto) { - try { - passportManager.register(registerDto); - return CommonResult.successResponse(); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } catch (StatusAccessDeniedException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.ACCESS_DENIED); - } - } - - @Override - public CommonResult applyResetPassword(ApplyResetPasswordDto applyResetPasswordDto) { - try { - passportManager.applyResetPassword(applyResetPasswordDto); - return CommonResult.successResponse(); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } - } - - @Override - public CommonResult resetPassword(ResetPasswordDto resetPasswordDto) { - try { - passportManager.resetPassword(resetPasswordDto); - return CommonResult.successResponse(); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/ProblemServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/ProblemServiceImpl.java deleted file mode 100644 index 4607847..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/ProblemServiceImpl.java +++ /dev/null @@ -1,65 +0,0 @@ -package top.hcode.hoj.service.oj.impl; - -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import org.springframework.stereotype.Service; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.exception.StatusForbiddenException; -import top.hcode.hoj.common.exception.StatusNotFoundException; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.common.result.ResultStatus; -import top.hcode.hoj.manager.oj.ProblemManager; -import top.hcode.hoj.pojo.dto.PidListDto; -import top.hcode.hoj.pojo.vo.ProblemInfoVo; -import top.hcode.hoj.pojo.vo.ProblemVo; -import top.hcode.hoj.pojo.vo.RandomProblemVo; -import top.hcode.hoj.service.oj.ProblemService; - -import javax.annotation.Resource; -import java.util.HashMap; -import java.util.List; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/11 11:06 - * @Description: - */ -@Service -public class ProblemServiceImpl implements ProblemService { - - @Resource - private ProblemManager problemManager; - - @Override - public CommonResult> getProblemList(Integer limit, Integer currentPage, String keyword, List tagId, Integer difficulty, String oj) { - return CommonResult.successResponse(problemManager.getProblemList(limit, currentPage, keyword, tagId, difficulty, oj)); - } - - @Override - public CommonResult getRandomProblem() { - try { - return CommonResult.successResponse(problemManager.getRandomProblem()); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } - } - - @Override - public CommonResult> getUserProblemStatus(PidListDto pidListDto) { - try { - return CommonResult.successResponse(problemManager.getUserProblemStatus(pidListDto)); - } catch (StatusNotFoundException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.NOT_FOUND); - } - } - - @Override - public CommonResult getProblemInfo(String problemId, Long gid) { - try { - return CommonResult.successResponse(problemManager.getProblemInfo(problemId, gid)); - } catch (StatusNotFoundException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.NOT_FOUND); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/RankServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/RankServiceImpl.java deleted file mode 100644 index 7cd2a1b..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/RankServiceImpl.java +++ /dev/null @@ -1,31 +0,0 @@ -package top.hcode.hoj.service.oj.impl; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.springframework.stereotype.Service; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.manager.oj.RankManager; -import top.hcode.hoj.service.oj.RankService; - -import javax.annotation.Resource; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/10 20:56 - * @Description: - */ -@Service -public class RankServiceImpl implements RankService { - - @Resource - private RankManager rankManager; - - @Override - public CommonResult getRankList(Integer limit, Integer currentPage, String searchUser, Integer type) { - try { - return CommonResult.successResponse(rankManager.getRankList(limit, currentPage, searchUser, type)); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/TrainingServiceImpl.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/TrainingServiceImpl.java deleted file mode 100644 index d49e2d2..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/service/oj/impl/TrainingServiceImpl.java +++ /dev/null @@ -1,96 +0,0 @@ -package top.hcode.hoj.service.oj.impl; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.springframework.stereotype.Service; -import top.hcode.hoj.common.exception.StatusAccessDeniedException; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.exception.StatusForbiddenException; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.common.result.ResultStatus; -import top.hcode.hoj.manager.oj.TrainingManager; -import top.hcode.hoj.pojo.dto.RegisterTrainingDto; -import top.hcode.hoj.pojo.vo.AccessVo; -import top.hcode.hoj.pojo.vo.ProblemVo; -import top.hcode.hoj.pojo.vo.TrainingRankVo; -import top.hcode.hoj.pojo.vo.TrainingVo; -import top.hcode.hoj.service.oj.TrainingService; - -import javax.annotation.Resource; -import java.util.List; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/10 20:40 - * @Description: - */ -@Service -public class TrainingServiceImpl implements TrainingService { - - @Resource - private TrainingManager trainingManager; - - @Override - public CommonResult> getTrainingList(Integer limit, Integer currentPage, String keyword, Long categoryId, String auth) { - return CommonResult.successResponse(trainingManager.getTrainingList(limit, currentPage, keyword, categoryId, auth)); - } - - @Override - public CommonResult getTraining(Long tid) { - try { - return CommonResult.successResponse(trainingManager.getTraining(tid)); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } catch (StatusAccessDeniedException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.ACCESS_DENIED); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } - } - - @Override - public CommonResult> getTrainingProblemList(Long tid) { - try { - return CommonResult.successResponse(trainingManager.getTrainingProblemList(tid)); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } catch (StatusAccessDeniedException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.ACCESS_DENIED); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } - } - - @Override - public CommonResult toRegisterTraining(RegisterTrainingDto registerTrainingDto) { - try { - trainingManager.toRegisterTraining(registerTrainingDto); - return CommonResult.successResponse(); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } - } - - @Override - public CommonResult getTrainingAccess(Long tid) { - try { - return CommonResult.successResponse(trainingManager.getTrainingAccess(tid)); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } - } - - @Override - public CommonResult> getTrainingRank(Long tid, Integer limit, Integer currentPage) { - try { - return CommonResult.successResponse(trainingManager.getTrainingRank(tid, limit, currentPage)); - } catch (StatusFailException e) { - return CommonResult.errorResponse(e.getMessage()); - } catch (StatusAccessDeniedException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.ACCESS_DENIED); - } catch (StatusForbiddenException e) { - return CommonResult.errorResponse(e.getMessage(), ResultStatus.FORBIDDEN); - } - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/shiro/AccountProfile.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/shiro/AccountProfile.java deleted file mode 100644 index ffe96f9..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/shiro/AccountProfile.java +++ /dev/null @@ -1,56 +0,0 @@ -package top.hcode.hoj.shiro; - -import lombok.Data; -import top.hcode.hoj.pojo.entity.user.Role; - -import java.io.Serializable; -import java.util.Date; -import java.util.List; - -/** - * @Author: Himit_ZH - * @Date: 2020/7/19 22:59 - * @Description: - */ -@Data -public class AccountProfile implements Serializable { - private String uid; - - private String username; - - private String password; - - private String nickname; - - private String school; - - private String course; - - private String number; - - private String gender; - - private String realname; - - private String cfUsername; - - private String email; - - private String avatar; - - private String signature; - - private int status; - - private Date gmtCreate; - - - private Date gmtModified; - - - private List roles; - - public String getId(){ //shiro登录用户实体默认主键获取方法要为getId - return uid; - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/shiro/AccountRealm.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/shiro/AccountRealm.java deleted file mode 100644 index 876b1f5..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/shiro/AccountRealm.java +++ /dev/null @@ -1,92 +0,0 @@ -package top.hcode.hoj.shiro; - -import cn.hutool.core.bean.BeanUtil; -import lombok.extern.slf4j.Slf4j; -import org.apache.shiro.SecurityUtils; -import org.apache.shiro.authc.*; -import org.apache.shiro.authz.AuthorizationInfo; -import org.apache.shiro.authz.SimpleAuthorizationInfo; -import org.apache.shiro.realm.AuthorizingRealm; -import org.apache.shiro.session.Session; -import org.apache.shiro.subject.PrincipalCollection; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; - -import top.hcode.hoj.mapper.RoleAuthMapper; -import top.hcode.hoj.mapper.UserRoleMapper; -import top.hcode.hoj.pojo.entity.user.Auth; -import top.hcode.hoj.pojo.entity.user.Role; -import top.hcode.hoj.pojo.vo.UserRolesVo; -import top.hcode.hoj.utils.JwtUtils; - -import java.util.LinkedList; -import java.util.List; - -/** - * @Author: Himit_ZH - * @Date: 2020/7/19 22:57 - * @Description: - */ -@Slf4j -@Component -public class AccountRealm extends AuthorizingRealm { - - @Autowired - private JwtUtils jwtUtils; - - @Autowired - private UserRoleMapper userRoleMapper; - - @Autowired - private RoleAuthMapper roleAuthMapper; - - @Override - public boolean supports(AuthenticationToken token) { - return token instanceof JwtToken; - } - @Override - protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection principals) { - AccountProfile user = (AccountProfile) principals.getPrimaryPrincipal(); - //角色权限列表 - List permissionsNameList = new LinkedList<>(); - //用户角色列表 - List roleNameList = new LinkedList<>(); - //获取该用户角色所有的权限 - List roles = userRoleMapper.getRolesByUid(user.getUid()); - // 角色变动,同时需要修改会话里面的数据 - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userInfo = (UserRolesVo) session.getAttribute("userInfo"); - userInfo.setRoles(roles); - session.setAttribute("userInfo",userInfo); - for (Role role:roles) { - roleNameList.add(role.getRole()); - for (Auth auth : roleAuthMapper.getRoleAuths(role.getId()).getAuths()) { - permissionsNameList.add(auth.getPermission()); - } - } - SimpleAuthorizationInfo authorizationInfo = new SimpleAuthorizationInfo(); - - authorizationInfo.addRoles(roleNameList); - //添加权限 - authorizationInfo.addStringPermissions(permissionsNameList); - return authorizationInfo; - } - @Override - protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken token) throws AuthenticationException { - JwtToken jwt = (JwtToken) token; - String userId = jwtUtils.getClaimByToken((String) jwt.getPrincipal()).getSubject(); - UserRolesVo userRoles = userRoleMapper.getUserRoles(userId, null); - if(userRoles == null) { - throw new UnknownAccountException("账户不存在!"); - } - if(userRoles.getStatus() == 1) { - throw new LockedAccountException("该账户已被封禁,请联系管理员进行处理!"); - } - AccountProfile profile = new AccountProfile(); - BeanUtil.copyProperties(userRoles, profile); - // 写入会话,后续不必重复查询 - Session session = SecurityUtils.getSubject().getSession(); - session.setAttribute("userInfo", userRoles); - return new SimpleAuthenticationInfo(profile, jwt.getCredentials(), getName()); - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/shiro/JwtFilter.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/shiro/JwtFilter.java deleted file mode 100644 index 28d6256..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/shiro/JwtFilter.java +++ /dev/null @@ -1,143 +0,0 @@ -package top.hcode.hoj.shiro; - - -import cn.hutool.json.JSONUtil; -import com.baomidou.mybatisplus.core.toolkit.StringUtils; -import io.jsonwebtoken.Claims; -import org.apache.shiro.authc.AuthenticationException; -import org.apache.shiro.authc.AuthenticationToken; -import org.apache.shiro.web.filter.authc.AuthenticatingFilter; -import org.apache.shiro.web.util.WebUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; -import org.springframework.web.bind.annotation.RequestMethod; -import top.hcode.hoj.common.result.CommonResult; -import top.hcode.hoj.common.result.ResultStatus; -import top.hcode.hoj.utils.JwtUtils; -import top.hcode.hoj.utils.RedisUtils; - - -import javax.servlet.ServletRequest; -import javax.servlet.ServletResponse; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; - -/** - * @Author: Himit_ZH - * @Date: 2020/7/19 23:16 - * @Description: - */ -@Component -public class JwtFilter extends AuthenticatingFilter { - - @Autowired - private JwtUtils jwtUtils; - - private final static String TOKEN_KEY = "token-key:"; - - private final static String TOKEN_LOCK = "token-lock:"; - - private final static String TOKEN_REFRESH = "token-refresh:"; - - @Autowired - private RedisUtils redisUtils; - - @Override - protected AuthenticationToken createToken(ServletRequest servletRequest, ServletResponse servletResponse) throws Exception { - // 获取 token - HttpServletRequest request = (HttpServletRequest) servletRequest; - String jwt = request.getHeader("Authorization"); - if (StringUtils.isEmpty(jwt)) { - return null; - } - return new JwtToken(jwt); - } - - @Override - protected boolean onAccessDenied(ServletRequest servletRequest, ServletResponse servletResponse) throws Exception { - HttpServletRequest request = (HttpServletRequest) servletRequest; - String token = request.getHeader("Authorization"); - if (StringUtils.isEmpty(token)) { - return true; - } else { - // 判断是否已过期 - Claims claim = jwtUtils.getClaimByToken(token); - if (claim == null || jwtUtils.isTokenExpired(claim.getExpiration())) { - return true; - } - String userId = claim.getSubject(); - if (!redisUtils.hasKey(TOKEN_REFRESH + userId) && redisUtils.hasKey(TOKEN_KEY + userId)) { - //过了需更新token时间,但是还未过期,则进行token刷新 - HttpServletResponse httpResponse = (HttpServletResponse) servletResponse; - HttpServletRequest httpRequest = (HttpServletRequest) servletRequest; - this.refreshToken(httpRequest, httpResponse, userId); - } - } - // 执行自动登录 - return executeLogin(servletRequest, servletResponse); - } - - /** - * 刷新Token,并更新token到前端 - * - * @param request - * @param userId - * @param response - * @return - */ - private void refreshToken(HttpServletRequest request, HttpServletResponse response, String userId) throws IOException { - boolean lock = redisUtils.getLock(TOKEN_LOCK + userId, 20);// 获取锁20s - if (lock) { - String newToken = jwtUtils.generateToken(userId); - response.setHeader("Access-Control-Allow-Credentials", "true"); - response.setHeader("Authorization", newToken); //放到信息头部 - response.setHeader("Access-Control-Expose-Headers", "Refresh-Token,Authorization,Url-Type"); //让前端可用访问 - response.setHeader("Url-Type", request.getHeader("Url-Type")); // 为了前端能区别请求来源 - response.setHeader("Refresh-Token", "true"); //告知前端需要刷新token - } - redisUtils.releaseLock(TOKEN_LOCK + userId); - } - - - @Override - protected boolean onLoginFailure(AuthenticationToken token, AuthenticationException e, ServletRequest request, ServletResponse response) { - HttpServletResponse httpResponse = (HttpServletResponse) response; - HttpServletRequest httpRequest = (HttpServletRequest) request; - try { - //处理登录失败的异常 - Throwable throwable = e.getCause() == null ? e : e.getCause(); - CommonResult result = CommonResult.errorResponse(throwable.getMessage(), ResultStatus.ACCESS_DENIED); - String json = JSONUtil.toJsonStr(result); - httpResponse.setContentType("application/json;charset=utf-8"); - httpResponse.setHeader("Access-Control-Expose-Headers", "Refresh-Token,Authorization,Url-Type"); //让前端可用访问 - httpResponse.setHeader("Access-Control-Allow-Credentials", "true"); - httpResponse.setHeader("Url-Type", httpRequest.getHeader("Url-Type")); // 为了前端能区别请求来源 - httpResponse.setStatus(HttpServletResponse.SC_UNAUTHORIZED); - httpResponse.getWriter().print(json); - } catch (IOException e1) { - } - return false; - } - - - /** - * 对跨域提供支持 - */ - @Override - protected boolean preHandle(ServletRequest request, ServletResponse response) throws Exception { - HttpServletRequest httpServletRequest = WebUtils.toHttp(request); - HttpServletResponse httpServletResponse = WebUtils.toHttp(response); - httpServletResponse.setHeader("Access-control-Allow-Origin", httpServletRequest.getHeader("Origin")); - httpServletResponse.setHeader("Access-Control-Allow-Methods", "GET,POST,OPTIONS,PUT,DELETE"); - httpServletResponse.setHeader("Access-Control-Allow-Headers", httpServletRequest.getHeader("Access-Control-Request-Headers")); - httpServletResponse.setHeader("Access-Control-Expose-Headers", - "Refresh-Token,Authorization,Url-Type,Content-disposition,Content-Type"); //让前端可用访问 - // 跨域时会首先发送一个OPTIONS请求,这里我们给OPTIONS请求直接返回正常状态 - if (httpServletRequest.getMethod().equals(RequestMethod.OPTIONS.name())) { - httpServletResponse.setStatus(org.springframework.http.HttpStatus.OK.value()); - return false; - } - return super.preHandle(request, response); - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/shiro/JwtToken.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/shiro/JwtToken.java deleted file mode 100644 index 5008f76..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/shiro/JwtToken.java +++ /dev/null @@ -1,27 +0,0 @@ -package top.hcode.hoj.shiro; - -import org.apache.shiro.authc.AuthenticationToken; - -/** - * @Author: Himit_ZH - * @Date: 2020/7/19 22:58 - * @Description: - */ -public class JwtToken implements AuthenticationToken { - - private String token; - - public JwtToken(String token) { - this.token = token; - } - - @Override - public Object getPrincipal() { - return token; - } - - @Override - public Object getCredentials() { - return token; - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/utils/CodeForcesUtils.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/utils/CodeForcesUtils.java deleted file mode 100644 index 4475a16..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/utils/CodeForcesUtils.java +++ /dev/null @@ -1,82 +0,0 @@ -package top.hcode.hoj.utils; - -import cn.hutool.core.io.resource.ResourceUtil; -import lombok.extern.slf4j.Slf4j; - -import javax.script.*; -import java.io.FileNotFoundException; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.net.MalformedURLException; -import java.net.URL; -import java.net.URLConnection; -import java.util.List; - -@Slf4j(topic = "hoj") -public class CodeForcesUtils { - private static String RCPC; - - public static String getRCPC() { - return RCPC; - } - - public static void updateRCPC(List list) { - - ScriptEngine se = new ScriptEngineManager().getEngineByName("javascript"); - Bindings bindings = se.createBindings(); - bindings.put("string", 4); - se.setBindings(bindings, ScriptContext.ENGINE_SCOPE); - - String file = ResourceUtil.readUtf8Str("CodeForcesAES.js"); - try { - se.eval(file); - // 是否可调用 - if (se instanceof Invocable) { - Invocable in = (Invocable) se; - RCPC = (String) in.invokeFunction("getRCPC", list.get(0), list.get(1), list.get(2)); - } - } catch (ScriptException e) { - log.error("CodeForcesUtils.updateRCPC throw ScriptException ->", e); - } catch (NoSuchMethodException e) { - log.error("CodeForcesUtils.updateRCPC throw NoSuchMethodException ->", e); - } - } - - public static void downloadPDF(String urlStr, String savePath) { - try { - int byteRead; - URL url = new URL(urlStr); - URLConnection conn = url.openConnection(); - conn.setConnectTimeout(30000); - conn.setReadTimeout(30000); - conn.setRequestProperty("User-Agent", - "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.54 Safari/537.36"); - conn.setRequestProperty("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9"); - conn.setRequestProperty("Accept-Language", "zh-CN,zh;q=0.9,en;q=0.8"); - conn.setRequestProperty("Accept-Encoding", "gzip, deflate, br");//注意编码,gzip可能会乱码 - conn.setRequestProperty("Content-Encoding", "utf8"); - conn.setRequestProperty("Connection", "keep-alive"); - conn.setRequestProperty("Upgrade-Insecure-Requests", "1"); - conn.setRequestProperty("cookie", "RCPC=" + getRCPC()); - conn.setRequestProperty("Cache-Control", "max-age=0"); - conn.setRequestProperty("Content-Type", "application/pdf"); - - InputStream inStream = conn.getInputStream(); - FileOutputStream fs = new FileOutputStream(savePath); - - byte[] buffer = new byte[1024]; - while ((byteRead = inStream.read(buffer)) != -1) { - fs.write(buffer, 0, byteRead); - } - inStream.close(); - fs.close(); - } catch (FileNotFoundException e1) { - log.error("CodeForcesUtils.downloadPDF throw FileNotFoundException ->", e1); - } catch (MalformedURLException e2) { - log.error("CodeForcesUtils.downloadPDF throw MalformedURLException ->", e2); - } catch (IOException e3) { - log.error("CodeForcesUtils.downloadPDF throw IOException ->", e3); - } - } -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/utils/ConfigUtils.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/utils/ConfigUtils.java deleted file mode 100644 index 0f4163c..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/utils/ConfigUtils.java +++ /dev/null @@ -1,128 +0,0 @@ -package top.hcode.hoj.utils; - -import cn.hutool.core.text.UnicodeUtil; -import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; -import org.springframework.util.CollectionUtils; -import top.hcode.hoj.pojo.vo.ConfigVo; - -import java.util.List; - -/** - * @Author: Himit_ZH - * @Date: 2020/12/2 23:17 - * @Description: - */ -@Component -@Slf4j(topic = "hoj") -public class ConfigUtils { - - @Autowired - private ConfigVo configVo; - - public String getConfigContent() { - return buildYamlStr(configVo); - } - - public String buildYamlStr(ConfigVo configVo) { - return "hoj:\n" + - " jwt:\n" + - " # 加密秘钥\n" + - " secret: " + configVo.getTokenSecret() + "\n" + - " # token有效时长,1天,单位秒\n" + - " expire: " + configVo.getTokenExpire() + "\n" + - " checkRefreshExpire: " + configVo.getCheckRefreshExpire() + "\n" + - " header: token\n" + - " judge:\n" + - " # 调用判题服务器的token\n" + - " token: " + configVo.getJudgeToken() + "\n" + - " db:\n" + - " host: " + configVo.getMysqlHost() + "\n" + - " port: " + configVo.getMysqlPort() + "\n" + - " public-host: " + configVo.getMysqlPublicHost() + "\n" + - " public-port: " + configVo.getMysqlPublicPort() + "\n" + - " name: " + configVo.getMysqlDBName() + "\n" + - " username: " + configVo.getMysqlUsername() + "\n" + - " password: " + configVo.getMysqlPassword() + "\n" + - " mail:\n" + - " ssl: " + configVo.getEmailSsl() + "\n" + - " username: " + configVo.getEmailUsername() + "\n" + - " password: " + configVo.getEmailPassword() + "\n" + - " host: " + configVo.getEmailHost() + "\n" + - " port: " + configVo.getEmailPort() + "\n" + - " background-img: " + configVo.getEmailBGImg() + "\n" + - " redis:\n" + - " host: " + configVo.getRedisHost() + "\n" + - " port: " + configVo.getRedisPort() + "\n" + - " password: " + configVo.getRedisPassword() + "\n" + - " web-config:\n" + - " base-url: \"" + UnicodeUtil.toUnicode(configVo.getBaseUrl(), false) + "\"\n" + - " name: \"" + UnicodeUtil.toUnicode(configVo.getName(), false) + "\"\n" + - " short-name: \"" + UnicodeUtil.toUnicode(configVo.getShortName(), false) + "\"\n" + - " description: \"" + UnicodeUtil.toUnicode(configVo.getDescription(), false) + "\"\n" + - " register: " + configVo.getRegister() + "\n" + - " footer:\n" + - " record:\n" + - " name: \"" + UnicodeUtil.toUnicode(configVo.getRecordName(), false) + "\"\n" + - " url: \"" + UnicodeUtil.toUnicode(configVo.getRecordUrl(), false) + "\"\n" + - " project:\n" + - " name: \"" + UnicodeUtil.toUnicode(configVo.getProjectName(), false) + "\"\n" + - " url: \"" + UnicodeUtil.toUnicode(configVo.getProjectUrl(), false) + "\"\n" + - " hdu:\n" + - " account:\n" + - " username: " + listToStr(configVo.getHduUsernameList()) + "\n" + - " password: " + listToStr(configVo.getHduPasswordList()) + "\n" + - " cf:\n" + - " account:\n" + - " username: " + listToStr(configVo.getCfUsernameList()) + "\n" + - " password: " + listToStr(configVo.getCfPasswordList()) + "\n" + - " poj:\n" + - " account:\n" + - " username: " + listToStr(configVo.getPojUsernameList()) + "\n" + - " password: " + listToStr(configVo.getPojPasswordList()) + "\n" + - " atcoder:\n" + - " account:\n" + - " username: " + listToStr(configVo.getAtcoderUsernameList()) + "\n" + - " password: " + listToStr(configVo.getAtcoderPasswordList()) + "\n" + - " spoj:\n" + - " account:\n" + - " username: " + listToStr(configVo.getSpojUsernameList()) + "\n" + - " password: " + listToStr(configVo.getSpojPasswordList()) + "\n" + - " switch:\n" + - " judge:\n" + - " public: " + configVo.getOpenPublicJudge() + "\n" + - " group: " + configVo.getOpenGroupJudge() + "\n" + - " contest: " + configVo.getOpenContestJudge() + "\n" + - " hide-non-contest-code: " + configVo.getHideNonContestSubmissionCode() + "\n" + - " submit-interval: " + configVo.getDefaultSubmitInterval() + "\n" + - " discussion:\n" + - " public: " + configVo.getOpenPublicDiscussion() + "\n" + - " group: " + configVo.getOpenGroupDiscussion() + "\n" + - " ac-initial-value: " + configVo.getDefaultCreateDiscussionACInitValue() + "\n" + - " create-daily: " + configVo.getDefaultCreateDiscussionDailyLimit() + "\n" + - " comment:\n" + - " contest: " + configVo.getOpenContestComment() + "\n" + - " ac-initial-value: " + configVo.getDefaultCreateCommentACInitValue() + "\n" + - " group:\n" + - " ac-initial-value: " + configVo.getDefaultCreateGroupACInitValue() + "\n" + - " create-daily: " + configVo.getDefaultCreateGroupDailyLimit() + "\n" + - " create-total: " + configVo.getDefaultCreateGroupLimit(); - } - - private String listToStr(List list) { - if (CollectionUtils.isEmpty(list)) { - return ""; - } - StringBuilder listStr = new StringBuilder(); - for (int i = 0; i < list.size(); i++) { - if (i != list.size() - 1) { - listStr.append(list.get(i)).append(","); - } else { - listStr.append(list.get(i)); - } - } - return listStr.toString(); - } - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/utils/Constants.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/utils/Constants.java deleted file mode 100644 index ab1cc33..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/utils/Constants.java +++ /dev/null @@ -1,333 +0,0 @@ -package top.hcode.hoj.utils; - -/** - * @Author: Himit_ZH - * @Date: 2021/1/1 13:00 - * @Description: 常量枚举类 - */ -public class Constants { - - /** - * @Description 提交评测结果的状态码 - * @Since 2021/1/1 - */ - public enum Judge { - STATUS_NOT_SUBMITTED(-10, "Not Submitted", null), - STATUS_SUBMITTED_UNKNOWN_RESULT(-5, "Submitted Unknown Result", null), - STATUS_CANCELLED(-4, "Cancelled","ca"), - STATUS_PRESENTATION_ERROR(-3, "Presentation Error", "pe"), - STATUS_COMPILE_ERROR(-2, "Compile Error", "ce"), - STATUS_WRONG_ANSWER(-1, "Wrong Answer", "wa"), - STATUS_ACCEPTED(0, "Accepted", "ac"), - STATUS_TIME_LIMIT_EXCEEDED(1, "Time Limit Exceeded", "tle"), - STATUS_MEMORY_LIMIT_EXCEEDED(2, "Memory Limit Exceeded", "mle"), - STATUS_RUNTIME_ERROR(3, "Runtime Error", "re"), - STATUS_SYSTEM_ERROR(4, "System Error", "se"), - STATUS_PENDING(5, "Pending", null), - STATUS_COMPILING(6, "Compiling", null), - STATUS_JUDGING(7, "Judging", null), - STATUS_PARTIAL_ACCEPTED(8, "Partial Accepted", "pa"), - STATUS_SUBMITTING(9, "Submitting", null), - STATUS_SUBMITTED_FAILED(10, "Submitted Failed", null), - STATUS_NULL(15, "No Status", null), - JUDGE_SERVER_SUBMIT_PREFIX(-1002, "Judge SubmitId-ServerId:", null); - - private Judge(Integer status, String name, String columnName) { - this.status = status; - this.name = name; - this.columnName = columnName; - } - - private final Integer status; - private final String name; - private final String columnName; - - public Integer getStatus() { - return status; - } - - public String getName() { - return name; - } - - public String getColumnName() { - return columnName; - } - } - - /** - * 等待判题的redis队列 - * @Since 2021/12/22 - */ - - public enum Queue{ - CONTEST_JUDGE_WAITING("Contest_Waiting_Handle_Queue"), - GENERAL_JUDGE_WAITING("General_Waiting_Handle_Queue"), - TEST_JUDGE_WAITING("Test_Judge_Waiting_Handle_Queue"), - CONTEST_REMOTE_JUDGE_WAITING_HANDLE("Contest_Remote_Waiting_Handle_Queue"), - GENERAL_REMOTE_JUDGE_WAITING_HANDLE("General_Remote_Waiting_Handle_Queue"); - - private Queue(String name) { - this.name = name; - } - private final String name; - public String getName() { - return name; - } - } - - public enum RemoteOJ { - HDU("HDU"), - CODEFORCES("CF"), - GYM("GYM"), - POJ("POJ"), - SPOJ("SPOJ"), - ATCODER("AC"); - - private final String name; - - private RemoteOJ(String name) { - this.name = name; - } - - public String getName() { - return name; - } - - public static Boolean isRemoteOJ(String name) { - for (RemoteOJ remoteOJ : RemoteOJ.values()) { - if (remoteOJ.getName().equals(name)) { - return true; - } - } - return false; - - } - public static RemoteOJ getRemoteOJ(String name){ - for (RemoteOJ remoteOJ : RemoteOJ.values()) { - if (remoteOJ.getName().equals(name)) { - return remoteOJ; - } - } - return null; - } - } - - - /** - * @Description 比赛相关的常量 - * @Since 2021/1/7 - */ - public enum Contest { - TYPE_ACM(0, "ACM"), - TYPE_OI(1, "OI"), - - STATUS_SCHEDULED(-1, "Scheduled"), - STATUS_RUNNING(0, "Running"), - STATUS_ENDED(1, "Ended"), - - AUTH_PUBLIC(0, "Public"), - AUTH_PRIVATE(1, "Private"), - AUTH_PROTECT(2, "Protect"), - - RECORD_NOT_AC_PENALTY(-1, "未AC通过算罚时"), - RECORD_NOT_AC_NOT_PENALTY(0, "未AC通过不罚时"), - RECORD_AC(1, "AC通过"), - - OI_CONTEST_RANK_CACHE(null,"oi_contest_rank_cache"), - - CONTEST_RANK_CAL_RESULT_CACHE(null,"contest_rank_cal_result_cache"), - - OI_RANK_RECENT_SCORE(null,"Recent"), - OI_RANK_HIGHEST_SCORE(null,"Highest"); - - private final Integer code; - private final String name; - - Contest(Integer code, String name) { - this.code = code; - this.name = name; - } - - public Integer getCode() { - return code; - } - - public String getName() { - return name; - } - } - - /** - * @Description 账户相关常量 - * @Since 2021/1/8 - */ - - public enum Account { - CODE_CHANGE_PASSWORD_FAIL("change-password-fail:"), - CODE_CHANGE_PASSWORD_LOCK("change-password-lock:"), - CODE_ACCOUNT_LOCK("account-lock:"), - CODE_CHANGE_EMAIL_FAIL("change-email-fail:"), - CODE_CHANGE_EMAIL_LOCK("change-email-lock:"), - - TRY_LOGIN_NUM("try-login-num:"), - - ACM_RANK_CACHE("acm_rank_cache"), - OI_RANK_CACHE("oi_rank_cache"), - - GROUP_RANK_CACHE("group_rank_cache"), - - SUPER_ADMIN_UID_LIST_CACHE("super_admin_uid_list_case"), - - SUBMIT_NON_CONTEST_LOCK("submit_non_contest_lock:"), - TEST_JUDGE_LOCK("test_judge_lock:"), - SUBMIT_CONTEST_LOCK("submit_contest_lock:"), - DISCUSSION_ADD_NUM_LOCK("discussion_add_num_lock:"), - GROUP_ADD_NUM_LOCK("group_add_num_lock"), - CONTEST_ADD_PRINT_LOCK("contest_add_print_lock:"), - - REMOTE_JUDGE_CF_ACCOUNT_NUM("remote_judge_cf_account:"); - - private final String code; - - Account(String code) { - this.code = code; - } - - public String getCode() { - return code; - } - } - - - /** - * @Description 文件操作的一些常量 - * @Since 2021/1/10 - */ - public enum File { - - - USER_AVATAR_FOLDER("/hoj/file/avatar"), - - GROUP_AVATAR_FOLDER("/hoj/file/avatar/group"), - - HOME_CAROUSEL_FOLDER("/hoj/file/carousel"), - - MARKDOWN_FILE_FOLDER("/hoj/file/md"), - - PROBLEM_FILE_FOLDER("/hoj/file/problem"), - - CONTEST_TEXT_PRINT_FOLDER("/hoj/file/contest_print"), - - IMG_API("/api/public/img/"), - - FILE_API("/api/public/file/"), - - TESTCASE_TMP_FOLDER("/hoj/file/zip"), - - TESTCASE_BASE_FOLDER("/hoj/testcase"), - - FILE_DOWNLOAD_TMP_FOLDER("/hoj/file/zip/download"), - - CONTEST_AC_SUBMISSION_TMP_FOLDER("/hoj/file/zip/contest_ac"); - - private final String path; - - File(String path) { - this.path = path; - } - - public String getPath() { - return path; - } - } - - - /** - * @Description 邮件任务的一些常量 - * @Since 2021/1/14 - */ - - public enum Email { - - OJ_URL("OJ_UR"), - OJ_NAME("OJ_NAME"), - OJ_SHORT_NAME("OJ_SHORT_NAME"), - EMAIL_FROM("EMAIL_FROM"), - EMAIL_BACKGROUND_IMG("EMAIL_BACKGROUND_IMG"), - REGISTER_KEY_PREFIX("register-user:"), - RESET_PASSWORD_KEY_PREFIX("reset-password:"), - RESET_EMAIL_LOCK("reset-email-lock:"), - REGISTER_EMAIL_LOCK("register-email-lock:"); - - private final String value; - - Email(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - } - - public enum Schedule { - RECENT_OTHER_CONTEST("recent-other-contest"); - - private final String code; - - Schedule(String code) { - this.code = code; - } - - public String getCode() { - return code; - - } - } - - /** - * @Description 训练题单的一些常量 - * @Since 2021/11/20 - */ - public enum Training { - - AUTH_PRIVATE("Private"), - AUTH_PUBLIC("Public"); - - private final String value; - - Training(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - } - - public enum JudgeMode { - DEFAULT("default"), - SPJ("spj"), - INTERACTIVE("interactive"); - - private final String mode; - - JudgeMode(String mode) { - this.mode = mode; - } - - public String getMode() { - return mode; - } - - public static JudgeMode getJudgeMode(String mode){ - for (JudgeMode judgeMode : JudgeMode.values()) { - if (judgeMode.getMode().equals(mode)) { - return judgeMode; - } - } - return null; - } - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/utils/IpUtils.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/utils/IpUtils.java deleted file mode 100644 index aaacf15..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/utils/IpUtils.java +++ /dev/null @@ -1,65 +0,0 @@ -package top.hcode.hoj.utils; - -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Component; - -import javax.servlet.http.HttpServletRequest; -import java.net.InetAddress; -import java.net.UnknownHostException; - -/** - * @Author: Himit_ZH - * @Date: 2020/10/30 11:12 - * @Description: - */ -@Slf4j(topic = "hoj") -public class IpUtils { - - public static String getUserIpAddr(HttpServletRequest request) { - String ipAddress = null; - try { - ipAddress = request.getHeader("x-forwarded-for"); - if (ipAddress == null || ipAddress.length() == 0 || "unknown".equalsIgnoreCase(ipAddress)) { - ipAddress = request.getHeader("Proxy-Client-IP"); - } - if (ipAddress == null || ipAddress.length() == 0 || "unknown".equalsIgnoreCase(ipAddress)) { - ipAddress = request.getHeader("WL-Proxy-Client-IP"); - } - if (ipAddress == null || ipAddress.length() == 0 || "unknown".equalsIgnoreCase(ipAddress)) { - ipAddress = request.getRemoteAddr(); - if (ipAddress.equals("127.0.0.1")) { - // 根据网卡取本机配置的IP - try { - ipAddress = InetAddress.getLocalHost().getHostAddress(); - } catch (UnknownHostException e) { - log.error("用户ip获取异常------->{}", e.getMessage()); - } - } - } - // 通过多个代理的情况,第一个IP为客户端真实IP,多个IP按照','分割 - if (ipAddress != null) { - if (ipAddress.contains(",")) { - return ipAddress.split(",")[0]; - } else { - return ipAddress; - } - } else { - return ""; - } - } catch (Exception e) { - log.error("用户ip获取异常------->{}", e.getMessage()); - return ""; - } - } - - public static String getServiceIp() { - InetAddress address = null; - try { - address = InetAddress.getLocalHost(); - return address.getHostAddress(); //返回IP地址 - } catch (UnknownHostException e) { - log.error("本地ip获取异常---------->{}", e.getMessage()); - } - return null; - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/utils/JsoupUtils.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/utils/JsoupUtils.java deleted file mode 100644 index 1675419..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/utils/JsoupUtils.java +++ /dev/null @@ -1,84 +0,0 @@ -package top.hcode.hoj.utils; - -import cn.hutool.json.JSONObject; -import org.jsoup.Connection; -import org.jsoup.Jsoup; -import org.jsoup.nodes.Document; -import org.jsoup.nodes.Entities; - -import java.io.IOException; -import java.util.Map; - -public class JsoupUtils { - - /** - * 获取连接 - * - * @param url api网址 - * @param params 请求参数 - * @param headers 用户头 - * @return 返回一个object - * @throws IOException - */ - public static Connection getConnectionFromUrl(String url, Map params, Map headers) throws IOException { - // 给url添加参数 - if (params != null) { - StringBuilder sb = new StringBuilder(); - sb.append(url); - if (url.indexOf("?") <= 0) { - sb.append("?"); - } - for (Map.Entry entry : params.entrySet()) { - sb.append(entry.getKey()).append("=").append(entry.getValue()); - } - url = sb.toString(); - } - Connection connection = Jsoup.connect(url); - // 设置用户代理 - connection.userAgent("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36"); - // 设置超时时间30秒 - connection.timeout(30000); - // 设置请求头 - if (headers != null) { - connection.headers(headers); - } - return connection; - } - - /** - * 通过jsoup连接返回json格式 - * - * @param connection Jsoup的connection连接 - * @return - * @throws IOException - */ - public static JSONObject getJsonFromConnection(Connection connection) throws IOException { - // 设置忽略请求类型 - connection.ignoreContentType(true); - String body = connection.execute().body(); - return new JSONObject(body); - } - - public static Connection.Response postResponse(Connection connection, Map postData) throws IOException { - connection.data(postData); - return connection.method(Connection.Method.POST).execute(); - } - - public static Connection.Response getResponse(Connection connection, Map getData) throws IOException { - //添加参数 - if (getData != null) { - connection.data(getData); - } - return connection.method(Connection.Method.GET).execute(); - } - public static Document getDocument(Connection connection, Map getData) throws IOException { - //添加参数 - if (getData != null) { - connection.data(getData); - } - Document document = connection.get(); - document.outputSettings().escapeMode(Entities.EscapeMode.xhtml); - document.outputSettings().prettyPrint(false); - return document; - } -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/utils/JwtUtils.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/utils/JwtUtils.java deleted file mode 100644 index ab20b75..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/utils/JwtUtils.java +++ /dev/null @@ -1,74 +0,0 @@ -package top.hcode.hoj.utils; - -import io.jsonwebtoken.Claims; -import io.jsonwebtoken.Jwts; -import io.jsonwebtoken.SignatureAlgorithm; -import lombok.Data; -import lombok.extern.slf4j.Slf4j; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.context.properties.ConfigurationProperties; -import org.springframework.stereotype.Component; - -import java.util.Date; - - -@Slf4j -@Data -@Component -@ConfigurationProperties(prefix = "hoj.jwt") -public class JwtUtils { - - private String secret; - private long expire; - private String header; - private long checkRefreshExpire; - private final static String TOKEN_KEY = "token-key:"; - private final static String TOKEN_REFRESH = "token-refresh:"; - - @Autowired - private RedisUtils redisUtils; - - /** - * 生成jwt token - */ - public String generateToken(String userId) { - Date nowDate = new Date(); - //过期时间 - Date expireDate = new Date(nowDate.getTime() + expire * 1000); - - String token = Jwts.builder() - .setHeaderParam("type", "JWT") - .setSubject(userId) - .setIssuedAt(nowDate) - .setExpiration(expireDate) - .signWith(SignatureAlgorithm.HS512, secret) - .compact(); - redisUtils.set(TOKEN_REFRESH + userId, token, checkRefreshExpire); - redisUtils.set(TOKEN_KEY + userId, token, expire); - return token; - } - - public Claims getClaimByToken(String token) { - try { - return Jwts.parser() - .setSigningKey(secret) - .parseClaimsJws(token) - .getBody(); - } catch (Exception e) { - log.debug("validate is token error ", e); - return null; - } - } - - /** - * token是否过期 - * - * @return true:过期 - */ - public boolean isTokenExpired(Date expiration) { - return expiration.before(new Date()); - } - - -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/utils/RedisUtils.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/utils/RedisUtils.java deleted file mode 100644 index 711acef..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/utils/RedisUtils.java +++ /dev/null @@ -1,664 +0,0 @@ -package top.hcode.hoj.utils; - -import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.data.redis.core.RedisTemplate; -import org.springframework.stereotype.Component; -import org.springframework.util.CollectionUtils; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.concurrent.TimeUnit; - -/** - * @Author: Himit_ZH - * @Date: 2020/10/23 23:48 - * @Description: - */ - -@Component -@Slf4j(topic = "hoj") -public final class RedisUtils { - - @Autowired - private RedisTemplate redisTemplate; - // =============================common============================ - - public boolean getLock(String lockName, int expireTime) { - boolean result = false; - try { - boolean isExist = hasKey(lockName); - if (!isExist) { - set(lockName, 0); - expire(lockName, expireTime <= 0 ? 3600 : expireTime); - } - long reVal = incr(lockName, 1); - if (1 == reVal) { - //获取到锁 - result = true; - } - } catch (Exception e) { - log.error("获取锁过程出错-->", e.getMessage()); - } - return result; - } - - public boolean releaseLock(String lockName) { - - return expire(lockName, 10); - } - - /** - * 指定缓存失效时间 - * - * @param key 键 - * @param time 时间(秒) - */ - public boolean expire(String key, long time) { - try { - if (time > 0) { - redisTemplate.expire(key, time, TimeUnit.SECONDS); - } - return true; - } catch (Exception e) { - e.printStackTrace(); - return false; - } - } - - /** - * 根据key 获取过期时间 - * - * @param key 键 不能为null - * @return 时间(秒) 返回0代表为永久有效 - */ - public long getExpire(String key) { - return redisTemplate.getExpire(key, TimeUnit.SECONDS); - } - - /** - * 判断key是否存在 - * - * @param key 键 - * @return true 存在 false不存在 - */ - public boolean hasKey(String key) { - try { - return redisTemplate.hasKey(key); - } catch (Exception e) { - e.printStackTrace(); - return false; - } - } - - - /** - * 删除缓存 - * - * @param key 可以传一个值 或多个 - */ - @SuppressWarnings("unchecked") - public void del(String... key) { - if (key != null && key.length > 0) { - if (key.length == 1) { - redisTemplate.delete(key[0]); - } else { - redisTemplate.delete(CollectionUtils.arrayToList(key)); - } - } - } - - - // ============================String============================= - - /** - * 普通缓存获取 - * - * @param key 键 - * @return 值 - */ - public Object get(String key) { - return key == null ? null : redisTemplate.opsForValue().get(key); - } - - /** - * 普通缓存放入 - * - * @param key 键 - * @param value 值 - * @return true成功 false失败 - */ - - public boolean set(String key, Object value) { - try { - redisTemplate.opsForValue().set(key, value); - return true; - } catch (Exception e) { - e.printStackTrace(); - return false; - } - } - - - /** - * 普通缓存放入并设置时间 - * - * @param key 键 - * @param value 值 - * @param time 时间(秒) time要大于0 如果time小于等于0 将设置无限期 - * @return true成功 false 失败 - */ - - public boolean set(String key, Object value, long time) { - try { - if (time > 0) { - redisTemplate.opsForValue().set(key, value, time, TimeUnit.SECONDS); - } else { - set(key, value); - } - return true; - } catch (Exception e) { - e.printStackTrace(); - return false; - } - } - - - /** - * 递增 - * - * @param key 键 - * @param delta 要增加几(大于0) - */ - public long incr(String key, long delta) { - if (delta < 0) { - throw new RuntimeException("递增因子必须大于0"); - } - return redisTemplate.opsForValue().increment(key, delta); - } - - - /** - * 递减 - * - * @param key 键 - * @param delta 要减少几(小于0) - */ - public long decr(String key, long delta) { - if (delta < 0) { - throw new RuntimeException("递减因子必须大于0"); - } - return redisTemplate.opsForValue().increment(key, -delta); - } - - - // ================================Map================================= - - /** - * HashGet - * - * @param key 键 不能为null - * @param item 项 不能为null - */ - public Object hget(String key, String item) { - return redisTemplate.opsForHash().get(key, item); - } - - /** - * 获取hashKey对应的所有键值 - * - * @param key 键 - * @return 对应的多个键值 - */ - public Map hmget(String key) { - return redisTemplate.opsForHash().entries(key); - } - - /** - * HashSet - * - * @param key 键 - * @param map 对应多个键值 - */ - public boolean hmset(String key, Map map) { - try { - redisTemplate.opsForHash().putAll(key, map); - return true; - } catch (Exception e) { - e.printStackTrace(); - return false; - } - } - - - /** - * HashSet 并设置时间 - * - * @param key 键 - * @param map 对应多个键值 - * @param time 时间(秒) - * @return true成功 false失败 - */ - public boolean hmset(String key, Map map, long time) { - try { - redisTemplate.opsForHash().putAll(key, map); - if (time > 0) { - expire(key, time); - } - return true; - } catch (Exception e) { - e.printStackTrace(); - return false; - } - } - - - /** - * 向一张hash表中放入数据,如果不存在将创建 - * - * @param key 键 - * @param item 项 - * @param value 值 - * @return true 成功 false失败 - */ - public boolean hset(String key, String item, Object value) { - try { - redisTemplate.opsForHash().put(key, item, value); - return true; - } catch (Exception e) { - e.printStackTrace(); - return false; - } - } - - /** - * 向一张hash表中放入数据,如果不存在将创建 - * - * @param key 键 - * @param item 项 - * @param value 值 - * @param time 时间(秒) 注意:如果已存在的hash表有时间,这里将会替换原有的时间 - * @return true 成功 false失败 - */ - public boolean hset(String key, String item, Object value, long time) { - try { - redisTemplate.opsForHash().put(key, item, value); - if (time > 0) { - expire(key, time); - } - return true; - } catch (Exception e) { - e.printStackTrace(); - return false; - } - } - - - /** - * 删除hash表中的值 - * - * @param key 键 不能为null - * @param item 项 可以使多个 不能为null - */ - public void hdel(String key, Object... item) { - redisTemplate.opsForHash().delete(key, item); - } - - - /** - * 判断hash表中是否有该项的值 - * - * @param key 键 不能为null - * @param item 项 不能为null - * @return true 存在 false不存在 - */ - public boolean hHasKey(String key, String item) { - return redisTemplate.opsForHash().hasKey(key, item); - } - - - /** - * hash递增 如果不存在,就会创建一个 并把新增后的值返回 - * - * @param key 键 - * @param item 项 - * @param by 要增加几(大于0) - */ - public double hincr(String key, String item, double by) { - return redisTemplate.opsForHash().increment(key, item, by); - } - - - /** - * hash递减 - * - * @param key 键 - * @param item 项 - * @param by 要减少记(小于0) - */ - public double hdecr(String key, String item, double by) { - return redisTemplate.opsForHash().increment(key, item, -by); - } - - - // ============================set============================= - - /** - * 根据key获取Set中的所有值 - * - * @param key 键 - */ - public Set sGet(String key) { - try { - return redisTemplate.opsForSet().members(key); - } catch (Exception e) { - e.printStackTrace(); - return null; - } - } - - - /** - * 根据value从一个set中查询,是否存在 - * - * @param key 键 - * @param value 值 - * @return true 存在 false不存在 - */ - public boolean sHasKey(String key, Object value) { - try { - return redisTemplate.opsForSet().isMember(key, value); - } catch (Exception e) { - e.printStackTrace(); - return false; - } - } - - - /** - * 将数据放入set缓存 - * - * @param key 键 - * @param values 值 可以是多个 - * @return 成功个数 - */ - public long sSet(String key, Object... values) { - try { - return redisTemplate.opsForSet().add(key, values); - } catch (Exception e) { - e.printStackTrace(); - return 0; - } - } - - - /** - * 将set数据放入缓存 - * - * @param key 键 - * @param time 时间(秒) - * @param values 值 可以是多个 - * @return 成功个数 - */ - public long sSetAndTime(String key, long time, Object... values) { - try { - Long count = redisTemplate.opsForSet().add(key, values); - if (time > 0) - expire(key, time); - return count; - } catch (Exception e) { - e.printStackTrace(); - return 0; - } - } - - - /** - * 获取set缓存的长度 - * - * @param key 键 - */ - public long sGetSetSize(String key) { - try { - return redisTemplate.opsForSet().size(key); - } catch (Exception e) { - e.printStackTrace(); - return 0; - } - } - - - /** - * 移除值为value的 - * - * @param key 键 - * @param values 值 可以是多个 - * @return 移除的个数 - */ - - public long setRemove(String key, Object... values) { - try { - Long count = redisTemplate.opsForSet().remove(key, values); - return count; - } catch (Exception e) { - e.printStackTrace(); - return 0; - } - } - - // ===============================list================================= - - /** - * 获取list缓存的内容 - * - * @param key 键 - * @param start 开始 - * @param end 结束 0 到 -1代表所有值 - */ - public List lGet(String key, long start, long end) { - try { - return redisTemplate.opsForList().range(key, start, end); - } catch (Exception e) { - e.printStackTrace(); - return null; - } - } - - - /** - * 获取list缓存的长度 - * - * @param key 键 - */ - public long lGetListSize(String key) { - try { - return redisTemplate.opsForList().size(key); - } catch (Exception e) { - e.printStackTrace(); - return 0; - } - } - - - /** - * 通过索引 获取list中的值 - * - * @param key 键 - * @param index 索引 index>=0时, 0 表头,1 第二个元素,依次类推;index<0时,-1,表尾,-2倒数第二个元素,依次类推 - */ - public Object lGetIndex(String key, long index) { - try { - return redisTemplate.opsForList().index(key, index); - } catch (Exception e) { - e.printStackTrace(); - return null; - } - } - - - /** - * 将list右边放入缓存 - * - * @param key 键 - * @param value 值 - */ - public boolean lrPush(String key, Object value) { - try { - redisTemplate.opsForList().rightPush(key, value); - return true; - } catch (Exception e) { - e.printStackTrace(); - return false; - } - } - - /** - * 将list左边放入缓存 - * - * @param key 键 - * @param value 值 - */ - public boolean llPush(String key, Object value) { - try { - redisTemplate.opsForList().leftPush(key, value); - return true; - } catch (Exception e) { - e.printStackTrace(); - return false; - } - } - - /** - * 将list右边放入缓存 - * - * @param key 键 - * @param value 值 - * @param time 时间(秒) - */ - public boolean lrPush(String key, Object value, long time) { - try { - redisTemplate.opsForList().rightPush(key, value); - if (time > 0) - expire(key, time); - return true; - } catch (Exception e) { - e.printStackTrace(); - return false; - } - - } - - - /** - * 将list放入缓存 - * - * @param key 键 - * @param value 值 - * @return - */ - public boolean lrPush(String key, List value) { - try { - redisTemplate.opsForList().rightPushAll(key, value); - return true; - } catch (Exception e) { - e.printStackTrace(); - return false; - } - - } - - - public boolean llPushList(String key, List value) { - try { - redisTemplate.opsForList().leftPushAll(key, value); - return true; - } catch (Exception e) { - e.printStackTrace(); - return false; - } - - } - - - public Object lrPop(String key) { - try { - return redisTemplate.opsForList().rightPop(key, 10, TimeUnit.SECONDS); - } catch (Exception e) { - e.printStackTrace(); - return null; - } - } - - /** - * 将list放入缓存 - * - * @param key 键 - * @param value 值 - * @param time 时间(秒) - * @return - */ - public boolean llPush(String key, List value, long time) { - try { - redisTemplate.opsForList().rightPushAll(key, value); - if (time > 0) - expire(key, time); - return true; - } catch (Exception e) { - e.printStackTrace(); - return false; - } - } - - /** - * 根据索引修改list中的某条数据 - * - * @param key 键 - * @param index 索引 - * @param value 值 - * @return - */ - - public boolean lUpdateIndex(String key, long index, Object value) { - try { - redisTemplate.opsForList().set(key, index, value); - return true; - } catch (Exception e) { - e.printStackTrace(); - return false; - } - } - - /** - * 移除N个值为value - * - * @param key 键 - * @param count 移除多少个 - * @param value 值 - * @return 移除的个数 - */ - - public long lRemove(String key, long count, Object value) { - try { - Long remove = redisTemplate.opsForList().remove(key, count, value); - return remove; - } catch (Exception e) { - e.printStackTrace(); - return 0; - } - - } - - - /** - * 给特定频道发布消息 - * - * @param channel 管道主题 - * @param message 消息 - * @return - */ - public void sendMessage(String channel, Object message) throws Exception { - redisTemplate.convertAndSend(channel, message); - } - - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/utils/ServiceContextUtils.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/utils/ServiceContextUtils.java deleted file mode 100644 index 32e524f..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/utils/ServiceContextUtils.java +++ /dev/null @@ -1,29 +0,0 @@ -package top.hcode.hoj.utils; - -import org.springframework.core.annotation.AnnotationUtils; - -import java.lang.annotation.Annotation; -import java.lang.reflect.Method; - -/** - * @Author Himit_ZH - * @Date 2022/5/9 - */ -public class ServiceContextUtils { - /** - * 先从method上获取注解,获取不到再从class上获取 - * - * @param method - * @param clazz - * @param annotationClass - * @param - * @return 注解对象 - */ - public static T getAnnotation(Method method, Class clazz, Class annotationClass) { - T annotation = AnnotationUtils.getAnnotation(method, annotationClass); - if (annotation == null) { - annotation = AnnotationUtils.findAnnotation(clazz, annotationClass); - } - return annotation; - } -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/utils/ShiroUtils.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/utils/ShiroUtils.java deleted file mode 100644 index ecdc806..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/utils/ShiroUtils.java +++ /dev/null @@ -1,21 +0,0 @@ -package top.hcode.hoj.utils; - -import org.apache.shiro.SecurityUtils; -import top.hcode.hoj.shiro.AccountProfile; - - -/** - * @Author: Himit_ZH - * @Date: 2020/7/20 14:13 - * @Description: - */ -public class ShiroUtils { - - private ShiroUtils() { - } - - public static AccountProfile getProfile(){ - return (AccountProfile) SecurityUtils.getSubject().getPrincipal(); - } - -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/validator/AccessValidator.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/validator/AccessValidator.java deleted file mode 100644 index f910692..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/validator/AccessValidator.java +++ /dev/null @@ -1,57 +0,0 @@ -package top.hcode.hoj.validator; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; -import top.hcode.hoj.annotation.HOJAccessEnum; -import top.hcode.hoj.exception.AccessException; -import top.hcode.hoj.pojo.vo.ConfigVo; - -/** - * @Author Himit_ZH - * @Date 2022/5/9 - */ -@Component -public class AccessValidator { - - @Autowired - private ConfigVo configVo; - - public void validateAccess(HOJAccessEnum hojAccessEnum) throws AccessException { - switch (hojAccessEnum) { - case PUBLIC_DISCUSSION: - if (!configVo.getOpenPublicDiscussion()) { - throw new AccessException("网站当前未开启公开讨论区的功能,不可访问!"); - } - break; - case GROUP_DISCUSSION: - if (!configVo.getOpenGroupDiscussion()) { - throw new AccessException("网站当前未开启团队讨论区的功能,不可访问!"); - } - break; - case CONTEST_COMMENT: - if (!configVo.getOpenContestComment()) { - throw new AccessException("网站当前未开启比赛评论区的功能,不可访问!"); - } - break; - case PUBLIC_JUDGE: - if (!configVo.getOpenPublicJudge()) { - throw new AccessException("网站当前未开启题目评测的功能,禁止提交或调试!"); - } - break; - case GROUP_JUDGE: - if (!configVo.getOpenGroupJudge()) { - throw new AccessException("网站当前未开启团队内题目评测的功能,禁止提交或调试!"); - } - break; - case CONTEST_JUDGE: - if (!configVo.getOpenContestJudge()) { - throw new AccessException("网站当前未开启比赛题目评测的功能,禁止提交或调试!"); - } - break; - case HIDE_NON_CONTEST_SUBMISSION_CODE: - if (configVo.getHideNonContestSubmissionCode()) { - throw new AccessException("网站当前开启了隐藏非比赛提交代码不显示的功能!"); - } - } - } -} diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/validator/ContestValidator.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/validator/ContestValidator.java deleted file mode 100644 index 9cd56d8..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/validator/ContestValidator.java +++ /dev/null @@ -1,152 +0,0 @@ -package top.hcode.hoj.validator; - -import cn.hutool.core.util.ReUtil; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import org.apache.shiro.SecurityUtils; -import org.apache.shiro.session.Session; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; -import org.springframework.util.StringUtils; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.common.exception.StatusForbiddenException; -import top.hcode.hoj.pojo.entity.contest.Contest; -import top.hcode.hoj.pojo.entity.contest.ContestRegister; -import top.hcode.hoj.pojo.vo.UserRolesVo; -import top.hcode.hoj.dao.contest.ContestRegisterEntityService; -import top.hcode.hoj.utils.Constants; - -import javax.annotation.Resource; -import java.util.Date; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/11 20:06 - * @Description: - */ -@Component -public class ContestValidator { - - @Resource - private ContestRegisterEntityService contestRegisterEntityService; - - @Autowired - private GroupValidator groupValidator; - - public boolean isSealRank(String uid, Contest contest, Boolean forceRefresh, Boolean isRoot) { - // 如果是管理员同时选择强制刷新榜单,则封榜无效 - Long gid = contest.getGid(); - boolean isContestAdmin = isRoot || contest.getUid().equals(uid); - if (forceRefresh && (isContestAdmin || (contest.getIsGroup() && groupValidator.isGroupRoot(uid, gid)))) { - return false; - } else if (contest.getSealRank() && contest.getSealRankTime() != null) { // 该比赛开启封榜模式 - Date now = new Date(); - // 如果现在时间处于封榜开始到比赛结束之间 - if (now.after(contest.getSealRankTime()) && now.before(contest.getEndTime())) { - return true; - } - // 或者没有开启赛后自动解除封榜,不可刷新榜单 - return !contest.getAutoRealRank() && now.after(contest.getEndTime()); - } - return false; - } - - - /** - * @param contest - * @param userRolesVo - * @param isRoot - * @MethodName validateContestAuth - * @Description 需要对该比赛做判断,是否处于开始或结束状态才可以获取,同时若是私有赛需要判断是否已注册(比赛管理员包括超级管理员可以直接获取) - * @Since 2021/1/17 - */ - public void validateContestAuth(Contest contest, UserRolesVo userRolesVo, Boolean isRoot) throws StatusFailException, StatusForbiddenException { - - if (contest == null || !contest.getVisible()) { - throw new StatusFailException("对不起,该比赛不存在!"); - } - - boolean isContestAdmin = isRoot || contest.getUid().equals(userRolesVo.getUid()); - Long gid = contest.getGid(); - // 若是比赛管理者 - if (isContestAdmin || (contest.getIsGroup() && groupValidator.isGroupRoot(userRolesVo.getUid(), gid))) { - return; - } - - // 判断一下比赛的状态,还未开始不能查看题目。 - if (contest.getStatus().intValue() != Constants.Contest.STATUS_RUNNING.getCode() && - contest.getStatus().intValue() != Constants.Contest.STATUS_ENDED.getCode()) { - throw new StatusForbiddenException("比赛还未开始,您无权访问该比赛!"); - } else { - - if (contest.getIsGroup() && !groupValidator.isGroupMember(userRolesVo.getUid(), gid)) { - throw new StatusForbiddenException("对不起,您并非团队内的成员无法参加该团队内的比赛!"); - } - - // 如果是处于比赛正在进行阶段,需要判断该场比赛是否为私有赛,私有赛需要判断该用户是否已注册 - if (contest.getAuth().intValue() == Constants.Contest.AUTH_PRIVATE.getCode()) { - QueryWrapper registerQueryWrapper = new QueryWrapper<>(); - registerQueryWrapper.eq("cid", contest.getId()).eq("uid", userRolesVo.getUid()); - ContestRegister register = contestRegisterEntityService.getOne(registerQueryWrapper); - if (register == null) { // 如果数据为空,表示未注册私有赛,不可访问 - throw new StatusForbiddenException("对不起,请先到比赛首页输入比赛密码进行注册!"); - } - - if (contest.getOpenAccountLimit() - && !validateAccountRule(contest.getAccountLimitRule(), userRolesVo.getUsername())) { - throw new StatusForbiddenException("对不起!本次比赛只允许特定账号规则的用户参赛!"); - } - } - } - - } - - - public void validateJudgeAuth(Contest contest, String uid) throws StatusForbiddenException { - - if (contest.getAuth().intValue() == Constants.Contest.AUTH_PRIVATE.getCode() || - contest.getAuth().intValue() == Constants.Contest.AUTH_PROTECT.getCode()) { - QueryWrapper queryWrapper = new QueryWrapper<>(); - queryWrapper.eq("cid", contest.getId()).eq("uid", uid); - ContestRegister register = contestRegisterEntityService.getOne(queryWrapper, false); - // 如果还没注册 - if (register == null) { - throw new StatusForbiddenException("对不起,请你先注册该比赛,提交代码失败!"); - } - } - } - - - public boolean validateAccountRule(String accountRule, String username) { - - String prefix = ReUtil.get("([\\s\\S]*?)", - accountRule, 1); - String suffix = ReUtil.get("([\\s\\S]*?)", - accountRule, 1); - String start = ReUtil.get("([\\s\\S]*?)", - accountRule, 1); - String end = ReUtil.get("([\\s\\S]*?)", - accountRule, 1); - String extra = ReUtil.get("([\\s\\S]*?)", - accountRule, 1); - - int startNum = Integer.parseInt(start); - int endNum = Integer.parseInt(end); - - for (int i = startNum; i <= endNum; i++) { - if (username.equals(prefix + i + suffix)) { - return true; - } - } - // 额外账号列表 - if (!StringUtils.isEmpty(extra)) { - String[] accountList = extra.trim().split(" "); - for (String account : accountList) { - if (username.equals(account)) { - return true; - } - } - } - - return false; - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/validator/GroupValidator.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/validator/GroupValidator.java deleted file mode 100644 index 207944a..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/validator/GroupValidator.java +++ /dev/null @@ -1,60 +0,0 @@ -package top.hcode.hoj.validator; - -import top.hcode.hoj.dao.group.GroupEntityService; -import top.hcode.hoj.dao.group.GroupMemberEntityService; -import top.hcode.hoj.pojo.entity.group.Group; -import top.hcode.hoj.pojo.entity.group.GroupMember; - -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; - -/** - * @Author: LengYun - * @Date: 2022/3/11 13:36 - * @Description: - */ -@Component -public class GroupValidator { - - @Autowired - private GroupMemberEntityService groupMemberEntityService; - - @Autowired - private GroupEntityService groupEntityService; - - public boolean isGroupMember(String uid, Long gid) { - QueryWrapper groupMemberQueryWrapper = new QueryWrapper<>(); - groupMemberQueryWrapper.eq("gid", gid).eq("uid", uid).in("auth", 3, 4, 5); - - GroupMember groupMember = groupMemberEntityService.getOne(groupMemberQueryWrapper,false); - - return groupMember != null || isGroupOwner(uid, gid); - } - - public boolean isGroupAdmin(String uid, Long gid) { - QueryWrapper groupMemberQueryWrapper = new QueryWrapper<>(); - groupMemberQueryWrapper.eq("gid", gid).eq("uid", uid).in("auth", 4, 5); - - GroupMember groupMember = groupMemberEntityService.getOne(groupMemberQueryWrapper,false); - - return groupMember != null || isGroupOwner(uid, gid); - } - - public boolean isGroupRoot(String uid, Long gid) { - - QueryWrapper groupMemberQueryWrapper = new QueryWrapper<>(); - groupMemberQueryWrapper.eq("gid", gid).eq("uid", uid).eq("auth", 5); - - GroupMember groupMember = groupMemberEntityService.getOne(groupMemberQueryWrapper,false); - - return groupMember != null; - } - - public boolean isGroupOwner(String uid, Long gid) { - - Group group = groupEntityService.getById(gid); - - return group != null && uid.equals(group.getUid()); - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/validator/JudgeValidator.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/validator/JudgeValidator.java deleted file mode 100644 index d9e963a..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/validator/JudgeValidator.java +++ /dev/null @@ -1,146 +0,0 @@ -package top.hcode.hoj.validator; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; -import org.springframework.util.StringUtils; -import top.hcode.hoj.annotation.HOJAccessEnum; -import top.hcode.hoj.common.exception.StatusFailException; -import top.hcode.hoj.exception.AccessException; -import top.hcode.hoj.pojo.dto.TestJudgeDto; -import top.hcode.hoj.pojo.dto.SubmitJudgeDto; - -import javax.annotation.PostConstruct; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/11 11:20 - * @Description: - */ -@Component -public class JudgeValidator { - - @Autowired - private AccessValidator accessValidator; - - private final static List HOJ_LANGUAGE_LIST = Arrays.asList("C++", "C++ With O2", - "C", "C With O2", "Python3", "Python2", "Java", "Golang", "C#", "PHP", "PyPy2", "PyPy3", - "JavaScript Node", "JavaScript V8"); - - private static HashMap MODE_MAP_LANGUAGE; - - @PostConstruct - public void init() { - MODE_MAP_LANGUAGE = new HashMap<>(); - MODE_MAP_LANGUAGE.put("text/x-c++src", "C++ With O2"); - MODE_MAP_LANGUAGE.put("text/x-csrc", "C With O2"); - MODE_MAP_LANGUAGE.put("text/x-java", "Java"); - MODE_MAP_LANGUAGE.put("text/x-go", "Golang"); - MODE_MAP_LANGUAGE.put("text/x-csharp", "C#"); - MODE_MAP_LANGUAGE.put("text/x-php", "PHP"); - } - - public void validateSubmissionInfo(SubmitJudgeDto submitJudgeDto) throws StatusFailException, AccessException { - - if (submitJudgeDto.getGid() != null) { // 团队内的提交 - accessValidator.validateAccess(HOJAccessEnum.GROUP_JUDGE); - } else if (submitJudgeDto.getCid() != null && submitJudgeDto.getCid() != 0) { - accessValidator.validateAccess(HOJAccessEnum.CONTEST_JUDGE); - } else { - accessValidator.validateAccess(HOJAccessEnum.PUBLIC_JUDGE); - } - - if (!submitJudgeDto.getIsRemote() && !HOJ_LANGUAGE_LIST.contains(submitJudgeDto.getLanguage())) { - throw new StatusFailException("提交的代码的语言错误!请使用" + HOJ_LANGUAGE_LIST + "中之一的语言!"); - } - - if (submitJudgeDto.getCode().length() < 50 - && !submitJudgeDto.getLanguage().contains("Py") - && !submitJudgeDto.getLanguage().contains("PHP") - && !submitJudgeDto.getLanguage().contains("JavaScript")) { - throw new StatusFailException("提交的代码是无效的,代码字符长度请不要低于50!"); - } - - if (submitJudgeDto.getCode().length() > 65535) { - throw new StatusFailException("提交的代码是无效的,代码字符长度请不要超过65535!"); - } - } - - public void validateTestJudgeInfo(TestJudgeDto testJudgeDto) throws StatusFailException, AccessException { - String type = testJudgeDto.getType(); - switch (type) { - case "public": - accessValidator.validateAccess(HOJAccessEnum.PUBLIC_JUDGE); - break; - case "contest": - accessValidator.validateAccess(HOJAccessEnum.CONTEST_JUDGE); - break; - case "group": - accessValidator.validateAccess(HOJAccessEnum.GROUP_JUDGE); - break; - default: - throw new StatusFailException("请求参数type错误!"); - } - - if (StringUtils.isEmpty(testJudgeDto.getCode())) { - throw new StatusFailException("在线调试的代码不可为空!"); - } - - if (StringUtils.isEmpty(testJudgeDto.getLanguage())) { - throw new StatusFailException("在线调试的编程语言不可为空!"); - } - - // Remote Judge的编程语言需要转换成HOJ的编程语言才能进行自测 - if (testJudgeDto.getIsRemoteJudge() != null && testJudgeDto.getIsRemoteJudge()) { - String language = MODE_MAP_LANGUAGE.get(testJudgeDto.getMode()); - if (language != null) { - testJudgeDto.setLanguage(language); - } else { - String dtoLanguage = testJudgeDto.getLanguage(); - if (dtoLanguage.contains("PyPy 3") || dtoLanguage.contains("PyPy3")) { - testJudgeDto.setLanguage("PyPy3"); - } else if (dtoLanguage.contains("PyPy")) { - testJudgeDto.setLanguage("PyPy2"); - } else if (dtoLanguage.contains("Python 3")) { - testJudgeDto.setLanguage("Python3"); - } else if (dtoLanguage.contains("Python")) { - testJudgeDto.setLanguage("Python2"); - }else if (dtoLanguage.contains("Node")){ - testJudgeDto.setLanguage("JavaScript Node"); - }else if (dtoLanguage.contains("JavaScript")){ - testJudgeDto.setLanguage("JavaScript V8"); - } - } - } - - if (!HOJ_LANGUAGE_LIST.contains(testJudgeDto.getLanguage())) { - throw new StatusFailException("提交的代码的语言错误!请使用" + HOJ_LANGUAGE_LIST + "中之一的语言!"); - } - - if (StringUtils.isEmpty(testJudgeDto.getUserInput())) { - throw new StatusFailException("在线调试的输入数据不可为空!"); - } - - if (testJudgeDto.getUserInput().length() > 1000) { - throw new StatusFailException("在线调试的输入数据字符长度不能超过1000!"); - } - - if (testJudgeDto.getPid() == null) { - throw new StatusFailException("在线调试所属题目的id不能为空!"); - } - - if (testJudgeDto.getCode().length() < 50 - && !testJudgeDto.getLanguage().contains("Py") - && !testJudgeDto.getLanguage().contains("PHP") - && !testJudgeDto.getLanguage().contains("JavaScript")) { - throw new StatusFailException("提交的代码是无效的,代码字符长度请不要低于50!"); - } - - if (testJudgeDto.getCode().length() > 65535) { - throw new StatusFailException("提交的代码是无效的,代码字符长度请不要超过65535!"); - } - - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/validator/TrainingValidator.java b/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/validator/TrainingValidator.java deleted file mode 100644 index b6b4395..0000000 --- a/src/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/validator/TrainingValidator.java +++ /dev/null @@ -1,109 +0,0 @@ -package top.hcode.hoj.validator; - -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import org.apache.shiro.SecurityUtils; -import org.apache.shiro.session.Session; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; -import top.hcode.hoj.common.exception.StatusAccessDeniedException; -import top.hcode.hoj.common.exception.StatusForbiddenException; -import top.hcode.hoj.dao.training.TrainingRegisterEntityService; -import top.hcode.hoj.pojo.entity.training.Training; -import top.hcode.hoj.pojo.entity.training.TrainingRegister; -import top.hcode.hoj.pojo.vo.UserRolesVo; -import top.hcode.hoj.utils.Constants; - -import javax.annotation.Resource; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/21 20:55 - * @Description: - */ -@Component -public class TrainingValidator { - - @Resource - private TrainingRegisterEntityService trainingRegisterEntityService; - - @Autowired - private GroupValidator groupValidator; - - public void validateTrainingAuth(Training training) throws StatusAccessDeniedException, StatusForbiddenException { - Session session = SecurityUtils.getSubject().getSession(); - UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo"); - validateTrainingAuth(training, userRolesVo); - } - - - public void validateTrainingAuth(Training training, UserRolesVo userRolesVo) throws StatusAccessDeniedException, StatusForbiddenException { - - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); // 是否为超级管理员 - - if (training.getIsGroup()) { - if (!groupValidator.isGroupMember(userRolesVo.getUid(), training.getGid()) && !isRoot) { - throw new StatusForbiddenException("对不起,您并非该团队内的成员,无权操作!"); - } - } - - if (Constants.Training.AUTH_PRIVATE.getValue().equals(training.getAuth())) { - - if (userRolesVo == null) { - throw new StatusAccessDeniedException("该训练属于私有题单,请先登录以校验权限!"); - } - - boolean isAuthor = training.getAuthor().equals(userRolesVo.getUsername()); // 是否为该私有训练的创建者 - - if (isRoot - || isAuthor - || (training.getIsGroup() && groupValidator.isGroupRoot(userRolesVo.getUid(), training.getGid()))) { - return; - } - - // 如果三者都不是,需要做注册权限校验 - checkTrainingRegister(training.getId(), userRolesVo.getUid()); - } - } - - private void checkTrainingRegister(Long tid, String uid) throws StatusAccessDeniedException, StatusForbiddenException { - QueryWrapper trainingRegisterQueryWrapper = new QueryWrapper<>(); - trainingRegisterQueryWrapper.eq("tid", tid); - trainingRegisterQueryWrapper.eq("uid", uid); - TrainingRegister trainingRegister = trainingRegisterEntityService.getOne(trainingRegisterQueryWrapper, false); - - if (trainingRegister == null) { - throw new StatusAccessDeniedException("该训练属于私有,请先使用专属密码注册!"); - } - - if (!trainingRegister.getStatus()) { - throw new StatusForbiddenException("错误:你已被禁止参加该训练!"); - } - } - - public boolean isInTrainingOrAdmin(Training training, UserRolesVo userRolesVo) throws StatusAccessDeniedException { - if (Constants.Training.AUTH_PRIVATE.getValue().equals(training.getAuth())) { - if (userRolesVo == null) { - throw new StatusAccessDeniedException("该训练属于私有题单,请先登录以校验权限!"); - } - boolean isRoot = SecurityUtils.getSubject().hasRole("root"); // 是否为超级管理员 - boolean isAuthor = training.getAuthor().equals(userRolesVo.getUsername()); // 是否为该私有训练的创建者 - - - if (isRoot - || isAuthor - || (training.getIsGroup() && groupValidator.isGroupRoot(userRolesVo.getUid(), training.getGid()))) { - return true; - } - - // 如果三者都不是,需要做注册权限校验 - QueryWrapper trainingRegisterQueryWrapper = new QueryWrapper<>(); - trainingRegisterQueryWrapper.eq("tid", training.getId()); - trainingRegisterQueryWrapper.eq("uid", userRolesVo.getUid()); - TrainingRegister trainingRegister = trainingRegisterEntityService.getOne(trainingRegisterQueryWrapper, false); - - return trainingRegister != null && trainingRegister.getStatus(); - - } - return true; - } -} \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/resources/CodeForcesAES.js b/src/hoj-springboot/DataBackup/src/main/resources/CodeForcesAES.js deleted file mode 100644 index b27e347..0000000 --- a/src/hoj-springboot/DataBackup/src/main/resources/CodeForcesAES.js +++ /dev/null @@ -1,722 +0,0 @@ -function getRCPC(a, b, c) { - a = toNumbers(a); - b = toNumbers(b); - c = toNumbers(c); - return toHex(slowAES.decrypt(c, 2, a, b)); -} - -function toNumbers(d) { - var e = []; - d.replace(/(..)/g, function(d) { - e.push(parseInt(d, 16)) - }); - return e -} - -function toHex() { - for (var d = [], d = 1 == arguments.length && arguments[0].constructor == Array ? arguments[0] : arguments, e = "", f = 0; f < d.length; f++) e += (16 > d[f] ? "0" : "") + d[f].toString(16); - return e.toLowerCase() -} - -var slowAES = { - /* - * START AES SECTION - */ - aes: { - // structure of valid key sizes - keySize: { - SIZE_128: 16, - SIZE_192: 24, - SIZE_256: 32 - }, - - // Rijndael S-box - sbox: [ - 0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76, - 0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0, 0xad, 0xd4, 0xa2, 0xaf, 0x9c, 0xa4, 0x72, 0xc0, - 0xb7, 0xfd, 0x93, 0x26, 0x36, 0x3f, 0xf7, 0xcc, 0x34, 0xa5, 0xe5, 0xf1, 0x71, 0xd8, 0x31, 0x15, - 0x04, 0xc7, 0x23, 0xc3, 0x18, 0x96, 0x05, 0x9a, 0x07, 0x12, 0x80, 0xe2, 0xeb, 0x27, 0xb2, 0x75, - 0x09, 0x83, 0x2c, 0x1a, 0x1b, 0x6e, 0x5a, 0xa0, 0x52, 0x3b, 0xd6, 0xb3, 0x29, 0xe3, 0x2f, 0x84, - 0x53, 0xd1, 0x00, 0xed, 0x20, 0xfc, 0xb1, 0x5b, 0x6a, 0xcb, 0xbe, 0x39, 0x4a, 0x4c, 0x58, 0xcf, - 0xd0, 0xef, 0xaa, 0xfb, 0x43, 0x4d, 0x33, 0x85, 0x45, 0xf9, 0x02, 0x7f, 0x50, 0x3c, 0x9f, 0xa8, - 0x51, 0xa3, 0x40, 0x8f, 0x92, 0x9d, 0x38, 0xf5, 0xbc, 0xb6, 0xda, 0x21, 0x10, 0xff, 0xf3, 0xd2, - 0xcd, 0x0c, 0x13, 0xec, 0x5f, 0x97, 0x44, 0x17, 0xc4, 0xa7, 0x7e, 0x3d, 0x64, 0x5d, 0x19, 0x73, - 0x60, 0x81, 0x4f, 0xdc, 0x22, 0x2a, 0x90, 0x88, 0x46, 0xee, 0xb8, 0x14, 0xde, 0x5e, 0x0b, 0xdb, - 0xe0, 0x32, 0x3a, 0x0a, 0x49, 0x06, 0x24, 0x5c, 0xc2, 0xd3, 0xac, 0x62, 0x91, 0x95, 0xe4, 0x79, - 0xe7, 0xc8, 0x37, 0x6d, 0x8d, 0xd5, 0x4e, 0xa9, 0x6c, 0x56, 0xf4, 0xea, 0x65, 0x7a, 0xae, 0x08, - 0xba, 0x78, 0x25, 0x2e, 0x1c, 0xa6, 0xb4, 0xc6, 0xe8, 0xdd, 0x74, 0x1f, 0x4b, 0xbd, 0x8b, 0x8a, - 0x70, 0x3e, 0xb5, 0x66, 0x48, 0x03, 0xf6, 0x0e, 0x61, 0x35, 0x57, 0xb9, 0x86, 0xc1, 0x1d, 0x9e, - 0xe1, 0xf8, 0x98, 0x11, 0x69, 0xd9, 0x8e, 0x94, 0x9b, 0x1e, 0x87, 0xe9, 0xce, 0x55, 0x28, 0xdf, - 0x8c, 0xa1, 0x89, 0x0d, 0xbf, 0xe6, 0x42, 0x68, 0x41, 0x99, 0x2d, 0x0f, 0xb0, 0x54, 0xbb, 0x16 - ], - - // Rijndael Inverted S-box - rsbox: [0x52, 0x09, 0x6a, 0xd5, 0x30, 0x36, 0xa5, 0x38, 0xbf, 0x40, 0xa3, 0x9e, 0x81, 0xf3, 0xd7, 0xfb, 0x7c, 0xe3, 0x39, 0x82, 0x9b, 0x2f, 0xff, 0x87, 0x34, 0x8e, 0x43, 0x44, 0xc4, 0xde, 0xe9, 0xcb, 0x54, 0x7b, 0x94, 0x32, 0xa6, 0xc2, 0x23, 0x3d, 0xee, 0x4c, 0x95, 0x0b, 0x42, 0xfa, 0xc3, 0x4e, 0x08, 0x2e, 0xa1, 0x66, 0x28, 0xd9, 0x24, 0xb2, 0x76, 0x5b, 0xa2, 0x49, 0x6d, 0x8b, 0xd1, 0x25, 0x72, 0xf8, 0xf6, 0x64, 0x86, 0x68, 0x98, 0x16, 0xd4, 0xa4, 0x5c, 0xcc, 0x5d, 0x65, 0xb6, 0x92, 0x6c, 0x70, 0x48, 0x50, 0xfd, 0xed, 0xb9, 0xda, 0x5e, 0x15, 0x46, 0x57, 0xa7, 0x8d, 0x9d, 0x84, 0x90, 0xd8, 0xab, 0x00, 0x8c, 0xbc, 0xd3, 0x0a, 0xf7, 0xe4, 0x58, 0x05, 0xb8, 0xb3, 0x45, 0x06, 0xd0, 0x2c, 0x1e, 0x8f, 0xca, 0x3f, 0x0f, 0x02, 0xc1, 0xaf, 0xbd, 0x03, 0x01, 0x13, 0x8a, 0x6b, 0x3a, 0x91, 0x11, 0x41, 0x4f, 0x67, 0xdc, 0xea, 0x97, 0xf2, 0xcf, 0xce, 0xf0, 0xb4, 0xe6, 0x73, 0x96, 0xac, 0x74, 0x22, 0xe7, 0xad, 0x35, 0x85, 0xe2, 0xf9, 0x37, 0xe8, 0x1c, 0x75, 0xdf, 0x6e, 0x47, 0xf1, 0x1a, 0x71, 0x1d, 0x29, 0xc5, 0x89, 0x6f, 0xb7, 0x62, 0x0e, 0xaa, 0x18, 0xbe, 0x1b, 0xfc, 0x56, 0x3e, 0x4b, 0xc6, 0xd2, 0x79, 0x20, 0x9a, 0xdb, 0xc0, 0xfe, 0x78, 0xcd, 0x5a, 0xf4, 0x1f, 0xdd, 0xa8, 0x33, 0x88, 0x07, 0xc7, 0x31, 0xb1, 0x12, 0x10, 0x59, 0x27, 0x80, 0xec, 0x5f, 0x60, 0x51, 0x7f, 0xa9, 0x19, 0xb5, 0x4a, 0x0d, 0x2d, 0xe5, 0x7a, 0x9f, 0x93, 0xc9, 0x9c, 0xef, 0xa0, 0xe0, 0x3b, 0x4d, 0xae, 0x2a, 0xf5, 0xb0, 0xc8, 0xeb, 0xbb, 0x3c, 0x83, 0x53, 0x99, 0x61, 0x17, 0x2b, 0x04, 0x7e, 0xba, 0x77, 0xd6, 0x26, 0xe1, 0x69, 0x14, 0x63, 0x55, 0x21, 0x0c, 0x7d], - - /* rotate the word eight bits to the left */ - rotate: function(word) { - var c = word[0]; - for (var i = 0; i < 3; i++) - word[i] = word[i + 1]; - word[3] = c; - - return word; - }, - - // Rijndael Rcon - Rcon: [ - 0x8d, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, - 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, - 0x7d, 0xfa, 0xef, 0xc5, 0x91, 0x39, 0x72, 0xe4, 0xd3, 0xbd, 0x61, 0xc2, 0x9f, - 0x25, 0x4a, 0x94, 0x33, 0x66, 0xcc, 0x83, 0x1d, 0x3a, 0x74, 0xe8, 0xcb, 0x8d, - 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, 0xab, - 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d, - 0xfa, 0xef, 0xc5, 0x91, 0x39, 0x72, 0xe4, 0xd3, 0xbd, 0x61, 0xc2, 0x9f, 0x25, - 0x4a, 0x94, 0x33, 0x66, 0xcc, 0x83, 0x1d, 0x3a, 0x74, 0xe8, 0xcb, 0x8d, 0x01, - 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d, - 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, - 0xef, 0xc5, 0x91, 0x39, 0x72, 0xe4, 0xd3, 0xbd, 0x61, 0xc2, 0x9f, 0x25, 0x4a, - 0x94, 0x33, 0x66, 0xcc, 0x83, 0x1d, 0x3a, 0x74, 0xe8, 0xcb, 0x8d, 0x01, 0x02, - 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d, 0x9a, - 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, - 0xc5, 0x91, 0x39, 0x72, 0xe4, 0xd3, 0xbd, 0x61, 0xc2, 0x9f, 0x25, 0x4a, 0x94, - 0x33, 0x66, 0xcc, 0x83, 0x1d, 0x3a, 0x74, 0xe8, 0xcb, 0x8d, 0x01, 0x02, 0x04, - 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d, 0x9a, 0x2f, - 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5, - 0x91, 0x39, 0x72, 0xe4, 0xd3, 0xbd, 0x61, 0xc2, 0x9f, 0x25, 0x4a, 0x94, 0x33, - 0x66, 0xcc, 0x83, 0x1d, 0x3a, 0x74, 0xe8, 0xcb - ], - - G2X: [ - 0x00, 0x02, 0x04, 0x06, 0x08, 0x0a, 0x0c, 0x0e, 0x10, 0x12, 0x14, 0x16, - 0x18, 0x1a, 0x1c, 0x1e, 0x20, 0x22, 0x24, 0x26, 0x28, 0x2a, 0x2c, 0x2e, - 0x30, 0x32, 0x34, 0x36, 0x38, 0x3a, 0x3c, 0x3e, 0x40, 0x42, 0x44, 0x46, - 0x48, 0x4a, 0x4c, 0x4e, 0x50, 0x52, 0x54, 0x56, 0x58, 0x5a, 0x5c, 0x5e, - 0x60, 0x62, 0x64, 0x66, 0x68, 0x6a, 0x6c, 0x6e, 0x70, 0x72, 0x74, 0x76, - 0x78, 0x7a, 0x7c, 0x7e, 0x80, 0x82, 0x84, 0x86, 0x88, 0x8a, 0x8c, 0x8e, - 0x90, 0x92, 0x94, 0x96, 0x98, 0x9a, 0x9c, 0x9e, 0xa0, 0xa2, 0xa4, 0xa6, - 0xa8, 0xaa, 0xac, 0xae, 0xb0, 0xb2, 0xb4, 0xb6, 0xb8, 0xba, 0xbc, 0xbe, - 0xc0, 0xc2, 0xc4, 0xc6, 0xc8, 0xca, 0xcc, 0xce, 0xd0, 0xd2, 0xd4, 0xd6, - 0xd8, 0xda, 0xdc, 0xde, 0xe0, 0xe2, 0xe4, 0xe6, 0xe8, 0xea, 0xec, 0xee, - 0xf0, 0xf2, 0xf4, 0xf6, 0xf8, 0xfa, 0xfc, 0xfe, 0x1b, 0x19, 0x1f, 0x1d, - 0x13, 0x11, 0x17, 0x15, 0x0b, 0x09, 0x0f, 0x0d, 0x03, 0x01, 0x07, 0x05, - 0x3b, 0x39, 0x3f, 0x3d, 0x33, 0x31, 0x37, 0x35, 0x2b, 0x29, 0x2f, 0x2d, - 0x23, 0x21, 0x27, 0x25, 0x5b, 0x59, 0x5f, 0x5d, 0x53, 0x51, 0x57, 0x55, - 0x4b, 0x49, 0x4f, 0x4d, 0x43, 0x41, 0x47, 0x45, 0x7b, 0x79, 0x7f, 0x7d, - 0x73, 0x71, 0x77, 0x75, 0x6b, 0x69, 0x6f, 0x6d, 0x63, 0x61, 0x67, 0x65, - 0x9b, 0x99, 0x9f, 0x9d, 0x93, 0x91, 0x97, 0x95, 0x8b, 0x89, 0x8f, 0x8d, - 0x83, 0x81, 0x87, 0x85, 0xbb, 0xb9, 0xbf, 0xbd, 0xb3, 0xb1, 0xb7, 0xb5, - 0xab, 0xa9, 0xaf, 0xad, 0xa3, 0xa1, 0xa7, 0xa5, 0xdb, 0xd9, 0xdf, 0xdd, - 0xd3, 0xd1, 0xd7, 0xd5, 0xcb, 0xc9, 0xcf, 0xcd, 0xc3, 0xc1, 0xc7, 0xc5, - 0xfb, 0xf9, 0xff, 0xfd, 0xf3, 0xf1, 0xf7, 0xf5, 0xeb, 0xe9, 0xef, 0xed, - 0xe3, 0xe1, 0xe7, 0xe5 - ], - - G3X: [ - 0x00, 0x03, 0x06, 0x05, 0x0c, 0x0f, 0x0a, 0x09, 0x18, 0x1b, 0x1e, 0x1d, - 0x14, 0x17, 0x12, 0x11, 0x30, 0x33, 0x36, 0x35, 0x3c, 0x3f, 0x3a, 0x39, - 0x28, 0x2b, 0x2e, 0x2d, 0x24, 0x27, 0x22, 0x21, 0x60, 0x63, 0x66, 0x65, - 0x6c, 0x6f, 0x6a, 0x69, 0x78, 0x7b, 0x7e, 0x7d, 0x74, 0x77, 0x72, 0x71, - 0x50, 0x53, 0x56, 0x55, 0x5c, 0x5f, 0x5a, 0x59, 0x48, 0x4b, 0x4e, 0x4d, - 0x44, 0x47, 0x42, 0x41, 0xc0, 0xc3, 0xc6, 0xc5, 0xcc, 0xcf, 0xca, 0xc9, - 0xd8, 0xdb, 0xde, 0xdd, 0xd4, 0xd7, 0xd2, 0xd1, 0xf0, 0xf3, 0xf6, 0xf5, - 0xfc, 0xff, 0xfa, 0xf9, 0xe8, 0xeb, 0xee, 0xed, 0xe4, 0xe7, 0xe2, 0xe1, - 0xa0, 0xa3, 0xa6, 0xa5, 0xac, 0xaf, 0xaa, 0xa9, 0xb8, 0xbb, 0xbe, 0xbd, - 0xb4, 0xb7, 0xb2, 0xb1, 0x90, 0x93, 0x96, 0x95, 0x9c, 0x9f, 0x9a, 0x99, - 0x88, 0x8b, 0x8e, 0x8d, 0x84, 0x87, 0x82, 0x81, 0x9b, 0x98, 0x9d, 0x9e, - 0x97, 0x94, 0x91, 0x92, 0x83, 0x80, 0x85, 0x86, 0x8f, 0x8c, 0x89, 0x8a, - 0xab, 0xa8, 0xad, 0xae, 0xa7, 0xa4, 0xa1, 0xa2, 0xb3, 0xb0, 0xb5, 0xb6, - 0xbf, 0xbc, 0xb9, 0xba, 0xfb, 0xf8, 0xfd, 0xfe, 0xf7, 0xf4, 0xf1, 0xf2, - 0xe3, 0xe0, 0xe5, 0xe6, 0xef, 0xec, 0xe9, 0xea, 0xcb, 0xc8, 0xcd, 0xce, - 0xc7, 0xc4, 0xc1, 0xc2, 0xd3, 0xd0, 0xd5, 0xd6, 0xdf, 0xdc, 0xd9, 0xda, - 0x5b, 0x58, 0x5d, 0x5e, 0x57, 0x54, 0x51, 0x52, 0x43, 0x40, 0x45, 0x46, - 0x4f, 0x4c, 0x49, 0x4a, 0x6b, 0x68, 0x6d, 0x6e, 0x67, 0x64, 0x61, 0x62, - 0x73, 0x70, 0x75, 0x76, 0x7f, 0x7c, 0x79, 0x7a, 0x3b, 0x38, 0x3d, 0x3e, - 0x37, 0x34, 0x31, 0x32, 0x23, 0x20, 0x25, 0x26, 0x2f, 0x2c, 0x29, 0x2a, - 0x0b, 0x08, 0x0d, 0x0e, 0x07, 0x04, 0x01, 0x02, 0x13, 0x10, 0x15, 0x16, - 0x1f, 0x1c, 0x19, 0x1a - ], - - G9X: [ - 0x00, 0x09, 0x12, 0x1b, 0x24, 0x2d, 0x36, 0x3f, 0x48, 0x41, 0x5a, 0x53, - 0x6c, 0x65, 0x7e, 0x77, 0x90, 0x99, 0x82, 0x8b, 0xb4, 0xbd, 0xa6, 0xaf, - 0xd8, 0xd1, 0xca, 0xc3, 0xfc, 0xf5, 0xee, 0xe7, 0x3b, 0x32, 0x29, 0x20, - 0x1f, 0x16, 0x0d, 0x04, 0x73, 0x7a, 0x61, 0x68, 0x57, 0x5e, 0x45, 0x4c, - 0xab, 0xa2, 0xb9, 0xb0, 0x8f, 0x86, 0x9d, 0x94, 0xe3, 0xea, 0xf1, 0xf8, - 0xc7, 0xce, 0xd5, 0xdc, 0x76, 0x7f, 0x64, 0x6d, 0x52, 0x5b, 0x40, 0x49, - 0x3e, 0x37, 0x2c, 0x25, 0x1a, 0x13, 0x08, 0x01, 0xe6, 0xef, 0xf4, 0xfd, - 0xc2, 0xcb, 0xd0, 0xd9, 0xae, 0xa7, 0xbc, 0xb5, 0x8a, 0x83, 0x98, 0x91, - 0x4d, 0x44, 0x5f, 0x56, 0x69, 0x60, 0x7b, 0x72, 0x05, 0x0c, 0x17, 0x1e, - 0x21, 0x28, 0x33, 0x3a, 0xdd, 0xd4, 0xcf, 0xc6, 0xf9, 0xf0, 0xeb, 0xe2, - 0x95, 0x9c, 0x87, 0x8e, 0xb1, 0xb8, 0xa3, 0xaa, 0xec, 0xe5, 0xfe, 0xf7, - 0xc8, 0xc1, 0xda, 0xd3, 0xa4, 0xad, 0xb6, 0xbf, 0x80, 0x89, 0x92, 0x9b, - 0x7c, 0x75, 0x6e, 0x67, 0x58, 0x51, 0x4a, 0x43, 0x34, 0x3d, 0x26, 0x2f, - 0x10, 0x19, 0x02, 0x0b, 0xd7, 0xde, 0xc5, 0xcc, 0xf3, 0xfa, 0xe1, 0xe8, - 0x9f, 0x96, 0x8d, 0x84, 0xbb, 0xb2, 0xa9, 0xa0, 0x47, 0x4e, 0x55, 0x5c, - 0x63, 0x6a, 0x71, 0x78, 0x0f, 0x06, 0x1d, 0x14, 0x2b, 0x22, 0x39, 0x30, - 0x9a, 0x93, 0x88, 0x81, 0xbe, 0xb7, 0xac, 0xa5, 0xd2, 0xdb, 0xc0, 0xc9, - 0xf6, 0xff, 0xe4, 0xed, 0x0a, 0x03, 0x18, 0x11, 0x2e, 0x27, 0x3c, 0x35, - 0x42, 0x4b, 0x50, 0x59, 0x66, 0x6f, 0x74, 0x7d, 0xa1, 0xa8, 0xb3, 0xba, - 0x85, 0x8c, 0x97, 0x9e, 0xe9, 0xe0, 0xfb, 0xf2, 0xcd, 0xc4, 0xdf, 0xd6, - 0x31, 0x38, 0x23, 0x2a, 0x15, 0x1c, 0x07, 0x0e, 0x79, 0x70, 0x6b, 0x62, - 0x5d, 0x54, 0x4f, 0x46 - ], - - GBX: [ - 0x00, 0x0b, 0x16, 0x1d, 0x2c, 0x27, 0x3a, 0x31, 0x58, 0x53, 0x4e, 0x45, - 0x74, 0x7f, 0x62, 0x69, 0xb0, 0xbb, 0xa6, 0xad, 0x9c, 0x97, 0x8a, 0x81, - 0xe8, 0xe3, 0xfe, 0xf5, 0xc4, 0xcf, 0xd2, 0xd9, 0x7b, 0x70, 0x6d, 0x66, - 0x57, 0x5c, 0x41, 0x4a, 0x23, 0x28, 0x35, 0x3e, 0x0f, 0x04, 0x19, 0x12, - 0xcb, 0xc0, 0xdd, 0xd6, 0xe7, 0xec, 0xf1, 0xfa, 0x93, 0x98, 0x85, 0x8e, - 0xbf, 0xb4, 0xa9, 0xa2, 0xf6, 0xfd, 0xe0, 0xeb, 0xda, 0xd1, 0xcc, 0xc7, - 0xae, 0xa5, 0xb8, 0xb3, 0x82, 0x89, 0x94, 0x9f, 0x46, 0x4d, 0x50, 0x5b, - 0x6a, 0x61, 0x7c, 0x77, 0x1e, 0x15, 0x08, 0x03, 0x32, 0x39, 0x24, 0x2f, - 0x8d, 0x86, 0x9b, 0x90, 0xa1, 0xaa, 0xb7, 0xbc, 0xd5, 0xde, 0xc3, 0xc8, - 0xf9, 0xf2, 0xef, 0xe4, 0x3d, 0x36, 0x2b, 0x20, 0x11, 0x1a, 0x07, 0x0c, - 0x65, 0x6e, 0x73, 0x78, 0x49, 0x42, 0x5f, 0x54, 0xf7, 0xfc, 0xe1, 0xea, - 0xdb, 0xd0, 0xcd, 0xc6, 0xaf, 0xa4, 0xb9, 0xb2, 0x83, 0x88, 0x95, 0x9e, - 0x47, 0x4c, 0x51, 0x5a, 0x6b, 0x60, 0x7d, 0x76, 0x1f, 0x14, 0x09, 0x02, - 0x33, 0x38, 0x25, 0x2e, 0x8c, 0x87, 0x9a, 0x91, 0xa0, 0xab, 0xb6, 0xbd, - 0xd4, 0xdf, 0xc2, 0xc9, 0xf8, 0xf3, 0xee, 0xe5, 0x3c, 0x37, 0x2a, 0x21, - 0x10, 0x1b, 0x06, 0x0d, 0x64, 0x6f, 0x72, 0x79, 0x48, 0x43, 0x5e, 0x55, - 0x01, 0x0a, 0x17, 0x1c, 0x2d, 0x26, 0x3b, 0x30, 0x59, 0x52, 0x4f, 0x44, - 0x75, 0x7e, 0x63, 0x68, 0xb1, 0xba, 0xa7, 0xac, 0x9d, 0x96, 0x8b, 0x80, - 0xe9, 0xe2, 0xff, 0xf4, 0xc5, 0xce, 0xd3, 0xd8, 0x7a, 0x71, 0x6c, 0x67, - 0x56, 0x5d, 0x40, 0x4b, 0x22, 0x29, 0x34, 0x3f, 0x0e, 0x05, 0x18, 0x13, - 0xca, 0xc1, 0xdc, 0xd7, 0xe6, 0xed, 0xf0, 0xfb, 0x92, 0x99, 0x84, 0x8f, - 0xbe, 0xb5, 0xa8, 0xa3 - ], - - GDX: [ - 0x00, 0x0d, 0x1a, 0x17, 0x34, 0x39, 0x2e, 0x23, 0x68, 0x65, 0x72, 0x7f, - 0x5c, 0x51, 0x46, 0x4b, 0xd0, 0xdd, 0xca, 0xc7, 0xe4, 0xe9, 0xfe, 0xf3, - 0xb8, 0xb5, 0xa2, 0xaf, 0x8c, 0x81, 0x96, 0x9b, 0xbb, 0xb6, 0xa1, 0xac, - 0x8f, 0x82, 0x95, 0x98, 0xd3, 0xde, 0xc9, 0xc4, 0xe7, 0xea, 0xfd, 0xf0, - 0x6b, 0x66, 0x71, 0x7c, 0x5f, 0x52, 0x45, 0x48, 0x03, 0x0e, 0x19, 0x14, - 0x37, 0x3a, 0x2d, 0x20, 0x6d, 0x60, 0x77, 0x7a, 0x59, 0x54, 0x43, 0x4e, - 0x05, 0x08, 0x1f, 0x12, 0x31, 0x3c, 0x2b, 0x26, 0xbd, 0xb0, 0xa7, 0xaa, - 0x89, 0x84, 0x93, 0x9e, 0xd5, 0xd8, 0xcf, 0xc2, 0xe1, 0xec, 0xfb, 0xf6, - 0xd6, 0xdb, 0xcc, 0xc1, 0xe2, 0xef, 0xf8, 0xf5, 0xbe, 0xb3, 0xa4, 0xa9, - 0x8a, 0x87, 0x90, 0x9d, 0x06, 0x0b, 0x1c, 0x11, 0x32, 0x3f, 0x28, 0x25, - 0x6e, 0x63, 0x74, 0x79, 0x5a, 0x57, 0x40, 0x4d, 0xda, 0xd7, 0xc0, 0xcd, - 0xee, 0xe3, 0xf4, 0xf9, 0xb2, 0xbf, 0xa8, 0xa5, 0x86, 0x8b, 0x9c, 0x91, - 0x0a, 0x07, 0x10, 0x1d, 0x3e, 0x33, 0x24, 0x29, 0x62, 0x6f, 0x78, 0x75, - 0x56, 0x5b, 0x4c, 0x41, 0x61, 0x6c, 0x7b, 0x76, 0x55, 0x58, 0x4f, 0x42, - 0x09, 0x04, 0x13, 0x1e, 0x3d, 0x30, 0x27, 0x2a, 0xb1, 0xbc, 0xab, 0xa6, - 0x85, 0x88, 0x9f, 0x92, 0xd9, 0xd4, 0xc3, 0xce, 0xed, 0xe0, 0xf7, 0xfa, - 0xb7, 0xba, 0xad, 0xa0, 0x83, 0x8e, 0x99, 0x94, 0xdf, 0xd2, 0xc5, 0xc8, - 0xeb, 0xe6, 0xf1, 0xfc, 0x67, 0x6a, 0x7d, 0x70, 0x53, 0x5e, 0x49, 0x44, - 0x0f, 0x02, 0x15, 0x18, 0x3b, 0x36, 0x21, 0x2c, 0x0c, 0x01, 0x16, 0x1b, - 0x38, 0x35, 0x22, 0x2f, 0x64, 0x69, 0x7e, 0x73, 0x50, 0x5d, 0x4a, 0x47, - 0xdc, 0xd1, 0xc6, 0xcb, 0xe8, 0xe5, 0xf2, 0xff, 0xb4, 0xb9, 0xae, 0xa3, - 0x80, 0x8d, 0x9a, 0x97 - ], - - GEX: [ - 0x00, 0x0e, 0x1c, 0x12, 0x38, 0x36, 0x24, 0x2a, 0x70, 0x7e, 0x6c, 0x62, - 0x48, 0x46, 0x54, 0x5a, 0xe0, 0xee, 0xfc, 0xf2, 0xd8, 0xd6, 0xc4, 0xca, - 0x90, 0x9e, 0x8c, 0x82, 0xa8, 0xa6, 0xb4, 0xba, 0xdb, 0xd5, 0xc7, 0xc9, - 0xe3, 0xed, 0xff, 0xf1, 0xab, 0xa5, 0xb7, 0xb9, 0x93, 0x9d, 0x8f, 0x81, - 0x3b, 0x35, 0x27, 0x29, 0x03, 0x0d, 0x1f, 0x11, 0x4b, 0x45, 0x57, 0x59, - 0x73, 0x7d, 0x6f, 0x61, 0xad, 0xa3, 0xb1, 0xbf, 0x95, 0x9b, 0x89, 0x87, - 0xdd, 0xd3, 0xc1, 0xcf, 0xe5, 0xeb, 0xf9, 0xf7, 0x4d, 0x43, 0x51, 0x5f, - 0x75, 0x7b, 0x69, 0x67, 0x3d, 0x33, 0x21, 0x2f, 0x05, 0x0b, 0x19, 0x17, - 0x76, 0x78, 0x6a, 0x64, 0x4e, 0x40, 0x52, 0x5c, 0x06, 0x08, 0x1a, 0x14, - 0x3e, 0x30, 0x22, 0x2c, 0x96, 0x98, 0x8a, 0x84, 0xae, 0xa0, 0xb2, 0xbc, - 0xe6, 0xe8, 0xfa, 0xf4, 0xde, 0xd0, 0xc2, 0xcc, 0x41, 0x4f, 0x5d, 0x53, - 0x79, 0x77, 0x65, 0x6b, 0x31, 0x3f, 0x2d, 0x23, 0x09, 0x07, 0x15, 0x1b, - 0xa1, 0xaf, 0xbd, 0xb3, 0x99, 0x97, 0x85, 0x8b, 0xd1, 0xdf, 0xcd, 0xc3, - 0xe9, 0xe7, 0xf5, 0xfb, 0x9a, 0x94, 0x86, 0x88, 0xa2, 0xac, 0xbe, 0xb0, - 0xea, 0xe4, 0xf6, 0xf8, 0xd2, 0xdc, 0xce, 0xc0, 0x7a, 0x74, 0x66, 0x68, - 0x42, 0x4c, 0x5e, 0x50, 0x0a, 0x04, 0x16, 0x18, 0x32, 0x3c, 0x2e, 0x20, - 0xec, 0xe2, 0xf0, 0xfe, 0xd4, 0xda, 0xc8, 0xc6, 0x9c, 0x92, 0x80, 0x8e, - 0xa4, 0xaa, 0xb8, 0xb6, 0x0c, 0x02, 0x10, 0x1e, 0x34, 0x3a, 0x28, 0x26, - 0x7c, 0x72, 0x60, 0x6e, 0x44, 0x4a, 0x58, 0x56, 0x37, 0x39, 0x2b, 0x25, - 0x0f, 0x01, 0x13, 0x1d, 0x47, 0x49, 0x5b, 0x55, 0x7f, 0x71, 0x63, 0x6d, - 0xd7, 0xd9, 0xcb, 0xc5, 0xef, 0xe1, 0xf3, 0xfd, 0xa7, 0xa9, 0xbb, 0xb5, - 0x9f, 0x91, 0x83, 0x8d - ], - - // Key Schedule Core - core: function(word, iteration) { - /* rotate the 32-bit word 8 bits to the left */ - word = this.rotate(word); - /* apply S-Box substitution on all 4 parts of the 32-bit word */ - for (var i = 0; i < 4; ++i) - word[i] = this.sbox[word[i]]; - /* XOR the output of the rcon operation with i to the first part (leftmost) only */ - word[0] = word[0] ^ this.Rcon[iteration]; - return word; - }, - - /* Rijndael's key expansion - * expands an 128,192,256 key into an 176,208,240 bytes key - * - * expandedKey is a pointer to an char array of large enough size - * key is a pointer to a non-expanded key - */ - expandKey: function(key, size) { - var expandedKeySize = (16 * (this.numberOfRounds(size) + 1)); - - /* current expanded keySize, in bytes */ - var currentSize = 0; - var rconIteration = 1; - var t = []; // temporary 4-byte variable - - var expandedKey = []; - for (var i = 0; i < expandedKeySize; i++) - expandedKey[i] = 0; - - /* set the 16,24,32 bytes of the expanded key to the input key */ - for (var j = 0; j < size; j++) - expandedKey[j] = key[j]; - currentSize += size; - - while (currentSize < expandedKeySize) { - /* assign the previous 4 bytes to the temporary value t */ - for (var k = 0; k < 4; k++) - t[k] = expandedKey[(currentSize - 4) + k]; - - /* every 16,24,32 bytes we apply the core schedule to t - * and increment rconIteration afterwards - */ - if (currentSize % size == 0) - t = this.core(t, rconIteration++); - - /* For 256-bit keys, we add an extra sbox to the calculation */ - if (size == this.keySize.SIZE_256 && ((currentSize % size) == 16)) - for (var l = 0; l < 4; l++) - t[l] = this.sbox[t[l]]; - - /* We XOR t with the four-byte block 16,24,32 bytes before the new expanded key. - * This becomes the next four bytes in the expanded key. - */ - for (var m = 0; m < 4; m++) { - expandedKey[currentSize] = expandedKey[currentSize - size] ^ t[m]; - currentSize++; - } - } - return expandedKey; - }, - - // Adds (XORs) the round key to the state - addRoundKey: function(state, roundKey) { - for (var i = 0; i < 16; i++) - state[i] ^= roundKey[i]; - return state; - }, - - // Creates a round key from the given expanded key and the - // position within the expanded key. - createRoundKey: function(expandedKey, roundKeyPointer) { - var roundKey = []; - for (var i = 0; i < 4; i++) - for (var j = 0; j < 4; j++) - roundKey[j * 4 + i] = expandedKey[roundKeyPointer + i * 4 + j]; - return roundKey; - }, - - /* substitute all the values from the state with the value in the SBox - * using the state value as index for the SBox - */ - subBytes: function(state, isInv) { - for (var i = 0; i < 16; i++) - state[i] = isInv ? this.rsbox[state[i]] : this.sbox[state[i]]; - return state; - }, - - /* iterate over the 4 rows and call shiftRow() with that row */ - shiftRows: function(state, isInv) { - for (var i = 0; i < 4; i++) - state = this.shiftRow(state, i * 4, i, isInv); - return state; - }, - - /* each iteration shifts the row to the left by 1 */ - shiftRow: function(state, statePointer, nbr, isInv) { - for (var i = 0; i < nbr; i++) { - if (isInv) { - var tmp = state[statePointer + 3]; - for (var j = 3; j > 0; j--) - state[statePointer + j] = state[statePointer + j - 1]; - state[statePointer] = tmp; - } else { - var tmp = state[statePointer]; - for (var j = 0; j < 3; j++) - state[statePointer + j] = state[statePointer + j + 1]; - state[statePointer + 3] = tmp; - } - } - return state; - }, - - // galois multiplication of 8 bit characters a and b - galois_multiplication: function(a, b) { - var p = 0; - for (var counter = 0; counter < 8; counter++) { - if ((b & 1) == 1) - p ^= a; - if (p > 0x100) p ^= 0x100; - var hi_bit_set = (a & 0x80); //keep p 8 bit - a <<= 1; - if (a > 0x100) a ^= 0x100; //keep a 8 bit - if (hi_bit_set == 0x80) - a ^= 0x1b; - if (a > 0x100) a ^= 0x100; //keep a 8 bit - b >>= 1; - if (b > 0x100) b ^= 0x100; //keep b 8 bit - } - return p; - }, - - // galois multipication of the 4x4 matrix - mixColumns: function(state, isInv) { - var column = []; - /* iterate over the 4 columns */ - for (var i = 0; i < 4; i++) { - /* construct one column by iterating over the 4 rows */ - for (var j = 0; j < 4; j++) - column[j] = state[(j * 4) + i]; - /* apply the mixColumn on one column */ - column = this.mixColumn(column, isInv); - /* put the values back into the state */ - for (var k = 0; k < 4; k++) - state[(k * 4) + i] = column[k]; - } - return state; - }, - - // galois multipication of 1 column of the 4x4 matrix - mixColumn: function(column, isInv) { - var mult = []; - if (isInv) - mult = [14, 9, 13, 11]; - else - mult = [2, 1, 1, 3]; - var cpy = []; - for (var i = 0; i < 4; i++) - cpy[i] = column[i]; - - column[0] = this.galois_multiplication(cpy[0], mult[0]) ^ - this.galois_multiplication(cpy[3], mult[1]) ^ - this.galois_multiplication(cpy[2], mult[2]) ^ - this.galois_multiplication(cpy[1], mult[3]); - column[1] = this.galois_multiplication(cpy[1], mult[0]) ^ - this.galois_multiplication(cpy[0], mult[1]) ^ - this.galois_multiplication(cpy[3], mult[2]) ^ - this.galois_multiplication(cpy[2], mult[3]); - column[2] = this.galois_multiplication(cpy[2], mult[0]) ^ - this.galois_multiplication(cpy[1], mult[1]) ^ - this.galois_multiplication(cpy[0], mult[2]) ^ - this.galois_multiplication(cpy[3], mult[3]); - column[3] = this.galois_multiplication(cpy[3], mult[0]) ^ - this.galois_multiplication(cpy[2], mult[1]) ^ - this.galois_multiplication(cpy[1], mult[2]) ^ - this.galois_multiplication(cpy[0], mult[3]); - return column; - }, - - // applies the 4 operations of the forward round in sequence - round: function(state, roundKey) { - state = this.subBytes(state, false); - state = this.shiftRows(state, false); - state = this.mixColumns(state, false); - state = this.addRoundKey(state, roundKey); - return state; - }, - - // applies the 4 operations of the inverse round in sequence - invRound: function(state, roundKey) { - state = this.shiftRows(state, true); - state = this.subBytes(state, true); - state = this.addRoundKey(state, roundKey); - state = this.mixColumns(state, true); - return state; - }, - - /* - * Perform the initial operations, the standard round, and the final operations - * of the forward aes, creating a round key for each round - */ - main: function(state, expandedKey, nbrRounds) { - state = this.addRoundKey(state, this.createRoundKey(expandedKey, 0)); - for (var i = 1; i < nbrRounds; i++) - state = this.round(state, this.createRoundKey(expandedKey, 16 * i)); - state = this.subBytes(state, false); - state = this.shiftRows(state, false); - state = this.addRoundKey(state, this.createRoundKey(expandedKey, 16 * nbrRounds)); - return state; - }, - - /* - * Perform the initial operations, the standard round, and the final operations - * of the inverse aes, creating a round key for each round - */ - invMain: function(state, expandedKey, nbrRounds) { - state = this.addRoundKey(state, this.createRoundKey(expandedKey, 16 * nbrRounds)); - for (var i = nbrRounds - 1; i > 0; i--) - state = this.invRound(state, this.createRoundKey(expandedKey, 16 * i)); - state = this.shiftRows(state, true); - state = this.subBytes(state, true); - state = this.addRoundKey(state, this.createRoundKey(expandedKey, 0)); - return state; - }, - - numberOfRounds: function(size) { - var nbrRounds; - switch (size) /* set the number of rounds */ { - case this.keySize.SIZE_128: - nbrRounds = 10; - break; - case this.keySize.SIZE_192: - nbrRounds = 12; - break; - case this.keySize.SIZE_256: - nbrRounds = 14; - break; - default: - return null; - break; - } - return nbrRounds; - }, - - // encrypts a 128 bit input block against the given key of size specified - encrypt: function(input, key, size) { - var output = []; - var block = []; /* the 128 bit block to encode */ - var nbrRounds = this.numberOfRounds(size); - /* Set the block values, for the block: - * a0,0 a0,1 a0,2 a0,3 - * a1,0 a1,1 a1,2 a1,3 - * a2,0 a2,1 a2,2 a2,3 - * a3,0 a3,1 a3,2 a3,3 - * the mapping order is a0,0 a1,0 a2,0 a3,0 a0,1 a1,1 ... a2,3 a3,3 - */ - for (var i = 0; i < 4; i++) /* iterate over the columns */ - for (var j = 0; j < 4; j++) /* iterate over the rows */ - block[(i + (j * 4))] = input[(i * 4) + j]; - - /* expand the key into an 176, 208, 240 bytes key */ - var expandedKey = this.expandKey(key, size); /* the expanded key */ - /* encrypt the block using the expandedKey */ - block = this.main(block, expandedKey, nbrRounds); - for (var k = 0; k < 4; k++) /* unmap the block again into the output */ - for (var l = 0; l < 4; l++) /* iterate over the rows */ - output[(k * 4) + l] = block[(k + (l * 4))]; - return output; - }, - - // decrypts a 128 bit input block against the given key of size specified - decrypt: function(input, key, size) { - var output = []; - var block = []; /* the 128 bit block to decode */ - var nbrRounds = this.numberOfRounds(size); - /* Set the block values, for the block: - * a0,0 a0,1 a0,2 a0,3 - * a1,0 a1,1 a1,2 a1,3 - * a2,0 a2,1 a2,2 a2,3 - * a3,0 a3,1 a3,2 a3,3 - * the mapping order is a0,0 a1,0 a2,0 a3,0 a0,1 a1,1 ... a2,3 a3,3 - */ - for (var i = 0; i < 4; i++) /* iterate over the columns */ - for (var j = 0; j < 4; j++) /* iterate over the rows */ - block[(i + (j * 4))] = input[(i * 4) + j]; - /* expand the key into an 176, 208, 240 bytes key */ - var expandedKey = this.expandKey(key, size); - /* decrypt the block using the expandedKey */ - block = this.invMain(block, expandedKey, nbrRounds); - for (var k = 0; k < 4; k++) /* unmap the block again into the output */ - for (var l = 0; l < 4; l++) /* iterate over the rows */ - output[(k * 4) + l] = block[(k + (l * 4))]; - return output; - } - }, - /* - * END AES SECTION - */ - - /* - * START MODE OF OPERATION SECTION - */ - //structure of supported modes of operation - modeOfOperation: { - OFB: 0, - CFB: 1, - CBC: 2 - }, - - // get a 16 byte block (aes operates on 128bits) - getBlock: function(bytesIn, start, end, mode) { - if (end - start > 16) - end = start + 16; - - return bytesIn.slice(start, end); - }, - - /* - * Mode of Operation Encryption - * bytesIn - Input String as array of bytes - * mode - mode of type modeOfOperation - * key - a number array of length 'size' - * size - the bit length of the key - * iv - the 128 bit number array Initialization Vector - */ - encrypt: function(bytesIn, mode, key, iv) { - var size = key.length; - if (iv.length % 16) { - throw 'iv length must be 128 bits.'; - } - // the AES input/output - var byteArray = []; - var input = []; - var output = []; - var ciphertext = []; - var cipherOut = []; - // char firstRound - var firstRound = true; - if (mode == this.modeOfOperation.CBC) - this.padBytesIn(bytesIn); - if (bytesIn !== null) { - for (var j = 0; j < Math.ceil(bytesIn.length / 16); j++) { - var start = j * 16; - var end = j * 16 + 16; - if (j * 16 + 16 > bytesIn.length) - end = bytesIn.length; - byteArray = this.getBlock(bytesIn, start, end, mode); - if (mode == this.modeOfOperation.CFB) { - if (firstRound) { - output = this.aes.encrypt(iv, key, size); - firstRound = false; - } else - output = this.aes.encrypt(input, key, size); - for (var i = 0; i < 16; i++) - ciphertext[i] = byteArray[i] ^ output[i]; - for (var k = 0; k < end - start; k++) - cipherOut.push(ciphertext[k]); - input = ciphertext; - } else if (mode == this.modeOfOperation.OFB) { - if (firstRound) { - output = this.aes.encrypt(iv, key, size); - firstRound = false; - } else - output = this.aes.encrypt(input, key, size); - for (var i = 0; i < 16; i++) - ciphertext[i] = byteArray[i] ^ output[i]; - for (var k = 0; k < end - start; k++) - cipherOut.push(ciphertext[k]); - input = output; - } else if (mode == this.modeOfOperation.CBC) { - for (var i = 0; i < 16; i++) - input[i] = byteArray[i] ^ ((firstRound) ? iv[i] : ciphertext[i]); - firstRound = false; - ciphertext = this.aes.encrypt(input, key, size); - // always 16 bytes because of the padding for CBC - for (var k = 0; k < 16; k++) - cipherOut.push(ciphertext[k]); - } - } - } - return cipherOut; - }, - - /* - * Mode of Operation Decryption - * cipherIn - Encrypted String as array of bytes - * originalsize - The unencrypted string length - required for CBC - * mode - mode of type modeOfOperation - * key - a number array of length 'size' - * size - the bit length of the key - * iv - the 128 bit number array Initialization Vector - */ - decrypt: function(cipherIn, mode, key, iv) { - var size = key.length; - if (iv.length % 16) { - throw 'iv length must be 128 bits.'; - } - // the AES input/output - var ciphertext = []; - var input = []; - var output = []; - var byteArray = []; - var bytesOut = []; - // char firstRound - var firstRound = true; - if (cipherIn !== null) { - for (var j = 0; j < Math.ceil(cipherIn.length / 16); j++) { - var start = j * 16; - var end = j * 16 + 16; - if (j * 16 + 16 > cipherIn.length) - end = cipherIn.length; - ciphertext = this.getBlock(cipherIn, start, end, mode); - if (mode == this.modeOfOperation.CFB) { - if (firstRound) { - output = this.aes.encrypt(iv, key, size); - firstRound = false; - } else - output = this.aes.encrypt(input, key, size); - for (i = 0; i < 16; i++) - byteArray[i] = output[i] ^ ciphertext[i]; - for (var k = 0; k < end - start; k++) - bytesOut.push(byteArray[k]); - input = ciphertext; - } else if (mode == this.modeOfOperation.OFB) { - if (firstRound) { - output = this.aes.encrypt(iv, key, size); - firstRound = false; - } else - output = this.aes.encrypt(input, key, size); - for (i = 0; i < 16; i++) - byteArray[i] = output[i] ^ ciphertext[i]; - for (var k = 0; k < end - start; k++) - bytesOut.push(byteArray[k]); - input = output; - } else if (mode == this.modeOfOperation.CBC) { - output = this.aes.decrypt(ciphertext, key, size); - for (i = 0; i < 16; i++) - byteArray[i] = ((firstRound) ? iv[i] : input[i]) ^ output[i]; - firstRound = false; - for (var k = 0; k < end - start; k++) - bytesOut.push(byteArray[k]); - input = ciphertext; - } - } - if (mode == this.modeOfOperation.CBC) - this.unpadBytesOut(bytesOut); - } - return bytesOut; - }, - padBytesIn: function(data) { - var len = data.length; - var padByte = 16 - (len % 16); - for (var i = 0; i < padByte; i++) { - data.push(padByte); - } - }, - unpadBytesOut: function(data) { - var padCount = 0; - var padByte = -1; - var blockSize = 16; - if (data.length > 16) { - for (var i = data.length - 1; i >= data.length - 1 - blockSize; i--) { - if (data[i] <= blockSize) { - if (padByte == -1) - padByte = data[i]; - if (data[i] != padByte) { - padCount = 0; - break; - } - padCount++; - } else - break; - if (padCount == padByte) - break; - } - if (padCount > 0) - data.splice(data.length - padCount, padCount); - } - } - /* - * END MODE OF OPERATION SECTION - */ -}; \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/resources/application-dev.yml b/src/hoj-springboot/DataBackup/src/main/resources/application-dev.yml deleted file mode 100644 index eceb93b..0000000 --- a/src/hoj-springboot/DataBackup/src/main/resources/application-dev.yml +++ /dev/null @@ -1,120 +0,0 @@ -# redis配置 -redis-host: 127.0.0.1 -redis-port: 6379 -redis-password: hoj123456 - -# 本服务连接mysql的地址和端口号 -mysql-host: 127.0.0.1 -mysql-port: 3306 -# mysql的公网地址和端口号 -mysql-public-host: 127.0.0.1 -mysql-public-port: 3306 -mysql-username: root -mysql-password: hoj123456 -mysql-name: hoj - -# token密钥,default表示随机生成 -jwt-token-secret: default -# token过期时间 单位s -jwt-token-expire: 86400 -# token可刷新的过期时间 单位s -jwt-token-fresh-expire: 43200 - -# 网站是否开启远程评测 -open-remote-judge: true -# 调用评测服务的token, default表示随机生成 -judge-token: default - -# 邮箱服务地址 -email-host: smtp.qq.com -# 邮箱服务端口号 -email-port: 465 -# 邮箱账号 -email-username: your_email_username -# 邮箱授权码 -email-password: your_email_password - -# 以下为各个remote judge平台的账号配置 -hdu-username-list: -hdu-password-list: -poj-username-list: -poj-password-list: -cf-username-list: -cf-password-list: -atcoder-username-list: -atcoder-password-list: -spoj-username-list: -spoj-password-list: -# 是否强制用配置更新覆盖remote judge的账号 -forced-update-remote-judge-account: false - -server: - port: 6688 - servlet: - encoding: - force: true - -spring: - # 配置文件上传限制 - servlet: - multipart: - max-file-size: 512MB - max-request-size: 512MB - - redis: - host: ${redis-host} - port: ${redis-port} - timeout: 60000 - jedis: - pool: - min-idle: 10 #连接池中的最小空闲连接 - max-idle: 50 #连接池中的最大空闲连接 - max-active: 200 #连接池最大连接数(使用负值表示没有限制) - max-wait: -1 #连接池最大阻塞等待时间(使用负值表示没有限制) - password: ${redis-password} - datasource: - username: ${mysql-username} - password: ${mysql-password} - url: jdbc:mysql://${mysql-host}:${mysql-port}/${mysql-name}?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai&allowMultiQueries=true&rewriteBatchedStatements=true - driver-class-name: com.mysql.cj.jdbc.Driver - type: com.alibaba.druid.pool.DruidDataSource - initial-size: 10 # 初始化时建立物理连接的个数。初始化发生在显示调用init方法,或者第一次getConnection时 - min-idle: 20 # 最小连接池数量 - maxActive: 200 # 最大连接池数量 - maxWait: 60000 # 获取连接时最大等待时间,单位毫秒。配置了maxWait之后,缺省启用公平锁,并发效率会有所下降,如果需要可以通过配置 - timeBetweenEvictionRunsMillis: 60000 # 关闭空闲连接的检测时间间隔.Destroy线程会检测连接的间隔时间,如果连接空闲时间大于等于minEvictableIdleTimeMillis则关闭物理连接。 - minEvictableIdleTimeMillis: 300000 # 连接的最小生存时间.连接保持空闲而不被驱逐的最小时间 - validationQuery: SELECT 1 FROM DUAL # 验证数据库服务可用性的sql.用来检测连接是否有效的sql 因数据库方言而差, 例如 oracle 应该写成 SELECT 1 FROM DUAL - testWhileIdle: true # 申请连接时检测空闲时间,根据空闲时间再检测连接是否有效.建议配置为true,不影响性能,并且保证安全性。申请连接的时候检测,如果空闲时间大于timeBetweenEvictionRun - testOnBorrow: false # 申请连接时直接检测连接是否有效.申请连接时执行validationQuery检测连接是否有效,做了这个配置会降低性能。 - testOnReturn: false # 归还连接时检测连接是否有效.归还连接时执行validationQuery检测连接是否有效,做了这个配置会降低性能。 - poolPreparedStatements: true # 开启PSCache - maxPoolPreparedStatementPerConnectionSize: 20 #设置PSCache值 - connectionErrorRetryAttempts: 3 # 连接出错后再尝试连接三次 - breakAfterAcquireFailure: true # 数据库服务宕机自动重连机制 - timeBetweenConnectErrorMillis: 300000 # 连接出错后重试时间间隔 - asyncInit: true # 异步初始化策略 - remove-abandoned: true # 是否自动回收超时连接 - remove-abandoned-timeout: 1800 # 超时时间(以秒数为单位) - transaction-query-timeout: 6000 # 事务超时时间 - filters: stat,wall,log4j #数据库日志 - connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=500 - thymeleaf: - encoding: UTF-8 - -shiro-redis: - enabled: true - redis-manager: - host: ${redis-host}:${redis-port} - password: ${redis-password} - -logging: - level: - com: - alibaba: - nacos: - client: - naming: info - root: info - file: - path: ./hoj_backend \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/resources/application-prod.yml b/src/hoj-springboot/DataBackup/src/main/resources/application-prod.yml deleted file mode 100644 index 50f08d6..0000000 --- a/src/hoj-springboot/DataBackup/src/main/resources/application-prod.yml +++ /dev/null @@ -1,124 +0,0 @@ -# 默认以下配置默认会读取环境变量的值 - -# redis配置 -redis-host: ${REDIS_HOST:172.20.0.2} -redis-port: ${REDIS_PORT:6379} -redis-password: ${REDIS_PASSWORD:hoj123456} - -# 本服务连接mysql的地址和端口号 -mysql-host: ${MYSQL_HOST:172.20.0.3} -mysql-port: ${MYSQL_PORT:3306} -# mysql的公网地址和端口号 -mysql-public-host: ${MYSQL_PUBLIC_HOST:172.20.0.3} -mysql-public-port: ${MYSQL_PUBLIC_PORT:3306} -mysql-username: ${MYSQL_USERNAME:root} -mysql-password: ${MYSQL_ROOT_PASSWORD:hoj123456} -mysql-name: ${MYSQL_DATABASE_NAME:hoj} - -# token密钥,default表示随机生成 -jwt-token-secret: ${JWT_TOKEN_SECRET:default} -# token过期时间 单位s -jwt-token-expire: ${JWT_TOKEN_EXPIRE:86400} -# token可刷新的过期时间 单位s -jwt-token-fresh-expire: ${JWT_TOKEN_FRESH_EXPIRE:43200} - -# 网站是否开启远程评测 -open-remote-judge: ${OPEN_REMOTE_JUDGE:true} -# 调用评测服务的token, default表示随机生成 -judge-token: ${JUDGE_TOKEN:default} - -# 邮箱服务地址 -email-host: ${EMAIL_SERVER_HOST:smtp.qq.com} -# 邮箱服务端口号 -email-port: ${EMAIL_SERVER_PORT:465} -# 邮箱账号 -email-username: ${EMAIL_USERNAME:your_email_username} -# 邮箱授权码 -email-password: ${EMAIL_PASSWORD:your_email_password} - -# 以下为各个remote judge平台的账号配置 -hdu-username-list: ${HDU_ACCOUNT_USERNAME_LIST:} -hdu-password-list: ${HDU_ACCOUNT_PASSWORD_LIST:} -poj-username-list: ${POJ_ACCOUNT_USERNAME_LIST:} -poj-password-list: ${POJ_ACCOUNT_PASSWORD_LIST:} -cf-username-list: ${CF_ACCOUNT_USERNAME_LIST:} -cf-password-list: ${CF_ACCOUNT_PASSWORD_LIST:} -atcoder-username-list: ${ATCODER_ACCOUNT_USERNAME_LIST:} -atcoder-password-list: ${ATCODER_ACCOUNT_PASSWORD_LIST:} -spoj-username-list: ${SPOJ_ACCOUNT_USERNAME_LIST:} -spoj-password-list: ${SPOJ_ACCOUNT_PASSWORD_LIST:} -# 是否强制用配置更新覆盖remote judge的账号 -forced-update-remote-judge-account: ${FORCED_UPDATE_REMOTE_JUDGE_ACCOUNT:false} - -server: - port: ${BACKEND_SERVER_PORT:6688} - servlet: - encoding: - force: true - -spring: - # 配置文件上传限制 - servlet: - multipart: - max-file-size: 512MB - max-request-size: 512MB - - redis: - host: ${redis-host} - port: ${redis-port} - timeout: 60000 - jedis: - pool: - min-idle: 10 #连接池中的最小空闲连接 - max-idle: 50 #连接池中的最大空闲连接 - max-active: 200 #连接池最大连接数(使用负值表示没有限制) - max-wait: -1 #连接池最大阻塞等待时间(使用负值表示没有限制) - password: ${redis-password} - datasource: - username: ${mysql-username} - password: ${mysql-password} - url: jdbc:mysql://${mysql-host}:${mysql-port}/${mysql-name}?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai&allowMultiQueries=true&rewriteBatchedStatements=true - driver-class-name: com.mysql.cj.jdbc.Driver - type: com.alibaba.druid.pool.DruidDataSource - initial-size: 10 # 初始化时建立物理连接的个数。初始化发生在显示调用init方法,或者第一次getConnection时 - min-idle: 20 # 最小连接池数量 - maxActive: 200 # 最大连接池数量 - maxWait: 60000 # 获取连接时最大等待时间,单位毫秒。配置了maxWait之后,缺省启用公平锁,并发效率会有所下降,如果需要可以通过配置 - timeBetweenEvictionRunsMillis: 60000 # 关闭空闲连接的检测时间间隔.Destroy线程会检测连接的间隔时间,如果连接空闲时间大于等于minEvictableIdleTimeMillis则关闭物理连接。 - minEvictableIdleTimeMillis: 300000 # 连接的最小生存时间.连接保持空闲而不被驱逐的最小时间 - validationQuery: SELECT 1 FROM DUAL # 验证数据库服务可用性的sql.用来检测连接是否有效的sql 因数据库方言而差, 例如 oracle 应该写成 SELECT 1 FROM DUAL - testWhileIdle: true # 申请连接时检测空闲时间,根据空闲时间再检测连接是否有效.建议配置为true,不影响性能,并且保证安全性。申请连接的时候检测,如果空闲时间大于timeBetweenEvictionRun - testOnBorrow: false # 申请连接时直接检测连接是否有效.申请连接时执行validationQuery检测连接是否有效,做了这个配置会降低性能。 - testOnReturn: false # 归还连接时检测连接是否有效.归还连接时执行validationQuery检测连接是否有效,做了这个配置会降低性能。 - poolPreparedStatements: true # 开启PSCache - maxPoolPreparedStatementPerConnectionSize: 20 #设置PSCache值 - connectionErrorRetryAttempts: 3 # 连接出错后再尝试连接三次 - breakAfterAcquireFailure: true # 数据库服务宕机自动重连机制 - timeBetweenConnectErrorMillis: 300000 # 连接出错后重试时间间隔 - asyncInit: true # 异步初始化策略 - remove-abandoned: true # 是否自动回收超时连接 - remove-abandoned-timeout: 1800 # 超时时间(以秒数为单位) - transaction-query-timeout: 6000 # 事务超时时间 - filters: stat,wall,log4j #数据库日志 - connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=500 - thymeleaf: - encoding: UTF-8 - -shiro-redis: - enabled: true - redis-manager: - host: ${redis-host}:${redis-port} - password: ${redis-password} - -logging: - level: - com: - alibaba: - nacos: - client: - naming: error - gargoylesoftware: off - root: error - config: classpath:logback-spring.xml - file: - path: /hoj/log/backend \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/resources/application.yml b/src/hoj-springboot/DataBackup/src/main/resources/application.yml deleted file mode 100644 index ceee3ab..0000000 --- a/src/hoj-springboot/DataBackup/src/main/resources/application.yml +++ /dev/null @@ -1,13 +0,0 @@ -mybatis-plus: - mapper-locations: classpath*:top/hcode/hoj/mapper/xml/**Mapper.xml - type-aliases-package: top.hcode.hoj.pojo.entity - configuration: - cache-enabled: true - # 关闭打印 mybatis-plus 的 LOGO - global-config: - banner: false - -# 消费者将要去访问的微服务名称(注册成功进入nacos的微服务提供者) -service-url: - name: hoj-judgeserver # 服务名 - diff --git a/src/hoj-springboot/DataBackup/src/main/resources/banner.txt b/src/hoj-springboot/DataBackup/src/main/resources/banner.txt deleted file mode 100644 index 005a375..0000000 --- a/src/hoj-springboot/DataBackup/src/main/resources/banner.txt +++ /dev/null @@ -1,21 +0,0 @@ -${AnsiColor.BRIGHT_YELLOW} - - ,--, ,----.. - ,--.'| ,----.. / / \ ,---, ,---,. - ,--, | : / / \ / . : .' .' `\ ,' .' | -,---.'| : '| : : . / ;. \,---.' \ ,---.' | -| | : _' |. | ;. /. ; / ` ;| | .`\ || | .' -: : |.' |. ; /--` ; | ; \ ; |: : | ' |: : |-, -| ' ' ; :; | ; | : | ; | '| ' ' ; :: | ;/| -' | .'. || : | . | ' ' ' :' | ; . || : .' -| | : | '. | '___ ' ; \; / || | : | '| | |-, -' : | : ;' ; : .'| \ \ ', / ' : | / ; ' : ;/| -| | ' ,/ ' | '/ : ; : / | | '` ,/ | | \ -; : ;--' | : / \ \ .' ; : .' | : .' -| ,/ \ \ .' `---` | ,.' | | ,' -'---' `---` '---' `----' - Hcode Online Judge(HOJ) - Backend - @Author Himit_ZH - @Last Update 20220821 - ->Github<- https://www.github.com/HimitZH/HOJ - ->Gitee<- https://gitee.com/himitzh0730/hoj \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/resources/bootstrap.yml b/src/hoj-springboot/DataBackup/src/main/resources/bootstrap.yml deleted file mode 100644 index 437a60d..0000000 --- a/src/hoj-springboot/DataBackup/src/main/resources/bootstrap.yml +++ /dev/null @@ -1,31 +0,0 @@ -# nacos配置 -nacos-url: ${NACOS_URL:127.0.0.1:8848} -nacos-username: ${NACOS_USERNAME:root} -nacos-password: ${NACOS_PASSWORD:hoj123456} - -spring: - profiles: - active: prod - application: - name: hoj-data-backup - cloud: - nacos: - discovery: - username: ${nacos-username} - password: ${nacos-password} - server-addr: ${nacos-url} # Nacos 作为服务注册中心 nacos的地址 - config: - username: ${nacos-username} - password: ${nacos-password} - server-addr: ${nacos-url} #Nacos 作为配置中心地址 nacos的地址 - file-extension: yml #指定yaml格式的配置 - group: DEFAULT_GROUP # 指定分组 - type: yaml - #namespace:命名空间ID 默认为public - prefix: hoj - url: http://${nacos-url} - -# ${spring.application.name}-${spring.profile.active}.${spring.cloud.naces.config.file-extension} -# ${spring.cloud.nacos.config.prefix}-${spring.profile.active}.${spring.cloud.naces.config.file-extension} -# hoj-prod.yml - diff --git a/src/hoj-springboot/DataBackup/src/main/resources/email-rule.yml b/src/hoj-springboot/DataBackup/src/main/resources/email-rule.yml deleted file mode 100644 index 91a2579..0000000 --- a/src/hoj-springboot/DataBackup/src/main/resources/email-rule.yml +++ /dev/null @@ -1,39 +0,0 @@ -# 邮箱地址黑名单 -hoj: - blacklist: - - "@ccmail.uk" - - "@exdonuts.com" - - "@hamham.uk" - - "@digdig.org" - - "@owleyes.ch" - - "@stayhome.li" - - "@fanclub.pm" - - "@hotsoup.be" - - "@simaenaga.com" - - "@tapi.re" - - "@fuwari.be" - - "@magim.be" - - "@mirai.re" - - "@moimoi.re" - - "@heisei.be" - - "@honeys.be" - - "@mbox.re" - - "@uma3.be" - - "@fuwa.li" - - "@kpost.be" - - "@risu.be" - - "@fuwa.be" - - "@usako.net" - - "@eay.jp" - - "@via.tokyo.jp" - - "@ichigo.me" - - "@choco.la" - - "@cream.pink" - - "@merry.pink" - - "@neko2.net" - - "@fuwamofu.com" - - "@ruru.be" - - "@macr2.com" - - "@f5.si" - - "@ahk.jp" - - "@svk.jp" \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/resources/logback-spring.xml b/src/hoj-springboot/DataBackup/src/main/resources/logback-spring.xml deleted file mode 100644 index 4fc87af..0000000 --- a/src/hoj-springboot/DataBackup/src/main/resources/logback-spring.xml +++ /dev/null @@ -1,78 +0,0 @@ - - - - - hoj - - - - - - %yellow(%d{yyyy-MM-dd HH:mm:ss}) %red([%thread]) %highlight(%-5level) %cyan(%logger{50}) - %magenta(%msg) %n - - UTF-8 - - - - - - - info - - DENY - - ACCEPT - - - - %d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{50} - %msg%n - - UTF-8 - - - - - ${logging.path}/hoj.info.%d{yyyy-MM-dd}.%i.log - - 7 - - 200MB - - 1GB - - - - - - error - - - - %d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{50} - %msg%n - - - - - - ${logging.path}/hoj.error.%d{yyyy-MM-dd}.%i.log - - 7 - - 200MB - - 1GB - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/resources/templates/emailTemplate_registerCode.html b/src/hoj-springboot/DataBackup/src/main/resources/templates/emailTemplate_registerCode.html deleted file mode 100644 index 0135a59..0000000 --- a/src/hoj-springboot/DataBackup/src/main/resources/templates/emailTemplate_registerCode.html +++ /dev/null @@ -1,74 +0,0 @@ - - - - - [[${OJ_SHORT_NAME}]]用户注册验证码 - - -
-
-
- -
-
-
-

- Dear New [[${OJ_SHORT_NAME}]]er -

-
-
-

- 来自 邮件提醒 -

-

- 您收到这封电子邮件是因为您 (也可能是某人冒充您的名义) 在 [[${OJ_SHORT_NAME}]] 上进行注册。假如这不是您本人所申请, - 请不用理会这封电子邮件, 但是如果您持续收到这类的信件骚扰, 请您尽快联络管理员。 -

-
- 请使用以下验证码完成后续注册流程:
-
- 注意:请您在收到邮件10分钟内([[${EXPIRE_TIME}]]前)使用,否则该验证码将会失效。 -
-     - -
-
- -
-

- 欢迎常来访问!
- © 2021 -

-

-
-
-
- - \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/resources/templates/emailTemplate_resetPassword.html b/src/hoj-springboot/DataBackup/src/main/resources/templates/emailTemplate_resetPassword.html deleted file mode 100644 index f478d42..0000000 --- a/src/hoj-springboot/DataBackup/src/main/resources/templates/emailTemplate_resetPassword.html +++ /dev/null @@ -1,72 +0,0 @@ - - - - - [[${OJ_SHORT_NAME}]]的重置密码邮件 - - -
-
-
- -
-
-
-

-

-
-
-

- 来自 邮件提醒 -

-

- 您收到这封电子邮件是因为您 (也可能是某人冒充您的名义) 在 [[${OJ_SHORT_NAME}]] 上进行密码重置操作。假如这不是您本人所申请, 请不用理会这封电子邮件, 但是如果您持续收到这类的信件骚扰, 请您尽快联络管理员。 -

-
- 请点击下面的链接完成后续重置密码的流程:
- CLICK HERE
- 注意:请您在收到邮件10分钟内([[${EXPIRE_TIME}]]前)使用,否则该重置密码链接将会失效。 -
-     - -
-
- -
-

- 欢迎常来访问!
- © 2021 -

-

-
-
-
- - \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/main/resources/templates/emailTemplate_testEmail.html b/src/hoj-springboot/DataBackup/src/main/resources/templates/emailTemplate_testEmail.html deleted file mode 100644 index 97ff2c3..0000000 --- a/src/hoj-springboot/DataBackup/src/main/resources/templates/emailTemplate_testEmail.html +++ /dev/null @@ -1,72 +0,0 @@ - - - - - [[${OJ_SHORT_NAME}]]超级管理员测试邮箱可用性邮件 - - -
-
-
- -
-
-
-

- Dear Super Admin -

-
-
-

- 来自 邮件提醒 -

-

- 您收到这封电子邮件是因为您在 [[${OJ_SHORT_NAME}]] 上进行邮箱配置更新,然后进行邮箱可行性的测试。 -

-
- 经过本邮件的接收,可证实:
- Test Success
-
-     - -
-
- -
-

- 欢迎常来访问!
- © 2021 -

-

-
-
-
- - \ No newline at end of file diff --git a/src/hoj-springboot/DataBackup/src/test/java/top/hcode/hoj/DataBackupApplicationTests.java b/src/hoj-springboot/DataBackup/src/test/java/top/hcode/hoj/DataBackupApplicationTests.java deleted file mode 100644 index f7ff9e8..0000000 --- a/src/hoj-springboot/DataBackup/src/test/java/top/hcode/hoj/DataBackupApplicationTests.java +++ /dev/null @@ -1,269 +0,0 @@ -package top.hcode.hoj; - -import cn.hutool.core.util.ReUtil; - -import cn.hutool.crypto.SecureUtil; -import com.alibaba.cloud.nacos.NacosDiscoveryProperties; -import com.alibaba.nacos.api.exception.NacosException; -import com.alibaba.nacos.api.naming.NamingService; -import com.alibaba.nacos.api.naming.pojo.Instance; - -import org.jsoup.Connection; -import org.jsoup.nodes.Document; -import org.junit.jupiter.api.Test; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.util.StringUtils; -import org.springframework.web.client.RestTemplate; -import top.hcode.hoj.mapper.*; -import top.hcode.hoj.pojo.entity.problem.Language; -import top.hcode.hoj.pojo.entity.problem.Problem; -import top.hcode.hoj.dao.common.impl.AnnouncementEntityServiceImpl; -import top.hcode.hoj.dao.discussion.impl.DiscussionEntityServiceImpl; -import top.hcode.hoj.dao.problem.impl.LanguageEntityServiceImpl; -import top.hcode.hoj.dao.user.impl.UserInfoEntityServiceImpl; -import top.hcode.hoj.dao.user.impl.UserRoleEntityServiceImpl; -import top.hcode.hoj.utils.IpUtils; -import top.hcode.hoj.utils.JsoupUtils; -import top.hcode.hoj.utils.RedisUtils; - -import java.io.IOException; -import java.net.*; -import java.util.*; -import java.util.regex.Pattern; - -/** - * @Author: Himit_ZH - * @Date: 2020/10/24 17:24 - * @Description: - */ -@SpringBootTest -public class DataBackupApplicationTests { - - @Autowired - private JudgeMapper judgeMapper; - - @Autowired - private UserRoleMapper userRoleMapper; - - @Autowired - private UserRoleEntityServiceImpl userRoleService; - - @Autowired - private RoleAuthMapper roleAuthMapper; - - @Autowired - private ContestMapper contestMapper; - - @Autowired - private UserInfoEntityServiceImpl userInfoService; - - - @Autowired - private AnnouncementEntityServiceImpl announcementService; - - @Autowired - private DiscussionEntityServiceImpl discussionService; - - @Test - public void Test1() { - String hoj123456 = SecureUtil.md5("hoj123456"); - System.out.println(hoj123456); - } - - @Autowired - private NacosDiscoveryProperties discoveryProperties; - - @Test - public void Test2() { - String clusterName = discoveryProperties.getClusterName(); - System.out.println(clusterName); - // 获取该微服务的所有健康实例 - // 获取服务发现的相关API - NamingService namingService = discoveryProperties.namingServiceInstance(); - try { - // 获取该微服务的所有健康实例 - List instances = namingService.selectInstances("hoj-judge-server", true); - System.out.println(instances); - } catch (NacosException e) { - e.printStackTrace(); - } - - } - - @Test - public void Test3() { - String serviceIp = IpUtils.getServiceIp(); - System.out.println(serviceIp); - } - - - @Autowired - private RestTemplate restTemplate; - - @Test - public void Test5() throws IOException { - Enumeration ifaces = null; - try { - ifaces = NetworkInterface.getNetworkInterfaces(); - } catch (SocketException e) { - - } - String siteLocalAddress = null; - while (ifaces.hasMoreElements()) { - NetworkInterface iface = ifaces.nextElement(); - Enumeration addresses = iface.getInetAddresses(); - while (addresses.hasMoreElements()) { - InetAddress addr = addresses.nextElement(); - String hostAddress = addr.getHostAddress(); - if (addr instanceof Inet4Address) { - if (addr.isSiteLocalAddress()) { - siteLocalAddress = hostAddress; - } else { - break; - } - } - } - } - System.out.println(siteLocalAddress == null ? "" : siteLocalAddress); - } - - @Autowired - private RedisUtils redisUtils; - @Autowired - private UserInfoMapper userInfoMapper; - - @Test - public void Test6() throws IOException { - String JUDGE_NAME = "HDU"; - String HOST = "http://acm.hdu.edu.cn"; - String PROBLEM_URL = "/showproblem.php?pid=%s"; - Problem info = new Problem(); - String url = HOST + String.format(PROBLEM_URL, 1016); - Connection connection = JsoupUtils.getConnectionFromUrl(url, null, null); - Document document = JsoupUtils.getDocument(connection, null); - String html = document.html(); - info.setDescription(ReUtil.get(">Problem Description
([\\s\\S]*?)
", html, 1).replaceAll("src=\"../../", "src=\"" + HOST + "/")); - info.setInput(ReUtil.get(">Input
([\\s\\S]*?)
", html, 1)); - info.setOutput(ReUtil.get(">Output
([\\s\\S]*?)
", html, 1)); - info.setIsRemote(true); - System.out.println(info.getDescription()); - System.out.println(info.getInput()); - System.out.println(info.getOutput()); - } - - @Test - public void Test7() throws IOException { - String JUDGE_NAME = "CF"; - String HOST = "https://codeforces.com"; - String PROBLEM_URL = "/problemset/problem/%s/%s"; - - String problemId = "750A"; - String contestId = ReUtil.get("([0-9]+)[A-Z]{1}[0-9]{0,1}", problemId, 1); - String problemNum = ReUtil.get("[0-9]+([A-Z]{1}[0-9]{0,1})", problemId, 1); - - - String url = HOST + String.format(PROBLEM_URL, contestId, problemNum); - Connection connection = JsoupUtils.getConnectionFromUrl(url, null, null); - Document document = JsoupUtils.getDocument(connection, null); - String html = document.html(); - Problem info = new Problem(); - info.setProblemId(JUDGE_NAME + "-" + problemId); - - info.setTitle(ReUtil.get("
\\s*" + problemNum + "\\. ([\\s\\S]*?)
", html, 1).trim()); - - info.setTimeLimit(1000 * Integer.parseInt(ReUtil.get("([\\d\\.]+) (seconds?|s)\\s*", html, 1))); - - info.setMemoryLimit(Integer.parseInt(ReUtil.get("(\\d+) (megabytes|MB)\\s*", html, 1))); - - String tmpDesc = ReUtil.get("standard output\\s*
([\\s\\S]*?)
[\\s\\S]*?)
\\s*Input\\s*
([\\s\\S]*?)
", html, 1)); - - info.setOutput(ReUtil.get("
\\s*Output\\s*
([\\s\\S]*?)
", html, 1)); - - - List inputExampleList = ReUtil.findAll(Pattern.compile("
Input
([\\s\\S]*?)
"), html, 1); - - List outputExampleList = ReUtil.findAll(Pattern.compile("
Output
([\\s\\S]*?)
"), html, 1); - - - StringBuilder sb = new StringBuilder(); - - for (int i = 0; i < inputExampleList.size() && i < outputExampleList.size(); i++) { - sb.append(""); - sb.append(inputExampleList.get(i).replace("
", "")).append(""); - sb.append(""); - sb.append(outputExampleList.get(i).replace("
", "")).append("
"); - } - - info.setExamples(sb.toString()); - - System.out.println(info.getExamples()); - - info.setHint(ReUtil.get("
\\s*Note\\s*
([\\s\\S]*?)
", html, 1)); - info.setIsRemote(true); - info.setSource(String.format("

Problem:%s

" + - "Contest:" + ReUtil.get("(]+/contest/\\d+\">.+?)", html, 1).replace("/contest", HOST + "/contest") - .replace("color: black", "color: #009688;") + "

", - contestId, problemNum, JUDGE_NAME + "-" + problemId)); - - List all = ReUtil.findAll(Pattern.compile("([\\s\\S]*?)"), html, 1); - } - - - @Autowired - private LanguageEntityServiceImpl languageService; - - @Test - public void Test8() throws IOException { - LinkedHashMap languageList = new LinkedHashMap<>(); - languageList.put("GNU GCC C11 5.1.0", "text/x-csrc"); - languageList.put("Clang++17 Diagnostics", "text/x-c++src"); - languageList.put("GNU G++11 5.1.0", "text/x-c++src"); - languageList.put("GNU G++14 6.4.0", "text/x-c++src"); - languageList.put("GNU G++17 7.3.0", "text/x-c++src"); - languageList.put("Microsoft Visual C++ 2010", "text/x-c++src"); - languageList.put("Microsoft Visual C++ 2017", "text/x-c++src"); - languageList.put("C# Mono 6.8", "text/x-csharp"); - languageList.put("D DMD32 v2.091.0", "text/x-d"); - languageList.put("Go 1.15.6", "text/x-go"); - languageList.put("Haskell GHC 8.10.1", "text/x-haskell"); - languageList.put("Java 1.8.0_241", "text/x-java"); - languageList.put("Kotlin 1.4.0", "text/x-java"); - languageList.put("OCaml 4.02.1", "text/x-ocaml"); - languageList.put("Delphi 7", "text/x-pascal"); - languageList.put("Free Pascal 3.0.2", "text/x-pascal"); - languageList.put("PascalABC.NET 3.4.2", "text/x-pascal"); - languageList.put("Perl 5.20.1", "text/x-perl"); - languageList.put("PHP 7.2.13", "text/x-php"); - languageList.put("Python 2.7.18", "text/x-python"); - languageList.put("Python 3.9.1", "text/x-python"); - languageList.put("PyPy 2.7 (7.3.0)", "text/x-python"); - languageList.put("PyPy 3.7 (7.3.0)", "text/x-python"); - languageList.put("Ruby 3.0.0", "text/x-ruby"); - languageList.put("Rust 1.49.0", "text/x-rustsrc"); - languageList.put("Scala 2.12.8", "text/x-scala"); - languageList.put("JavaScript V8 4.8.0", "text/javascript"); - languageList.put("Node.js 12.6.3", "text/javascript"); - languageList.put("C# 8, .NET Core 3.1", "text/x-csharp"); - languageList.put("Java 11.0.6", "text/x-java"); - - List languageList1 = new LinkedList<>(); - for (String key : languageList.keySet()) { - String tmp = languageList.get(key); - languageList1.add(new Language().setName(key).setDescription(key).setOj("CF").setIsSpj(false).setContentType(tmp)); - - } - boolean b = languageService.saveOrUpdateBatch(languageList1); - System.out.println(b); - } - - -} \ No newline at end of file diff --git a/src/hoj-springboot/JudgeServer/pom.xml b/src/hoj-springboot/JudgeServer/pom.xml deleted file mode 100644 index e67d582..0000000 --- a/src/hoj-springboot/JudgeServer/pom.xml +++ /dev/null @@ -1,134 +0,0 @@ - - - - hoj-springboot - top.hcode - 1.0-SNAPSHOT - - 4.0.0 - JudgeServer - jar - - - - - org.springframework.boot - spring-boot-maven-plugin - - - top.hcode.hoj.JudgeServerApplication - ZIP - - - - - repackage - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - - 8 - 8 - UTF-8 - - - - - - - - top.hcode - api - 1.0-SNAPSHOT - - - com.alibaba.cloud - spring-cloud-starter-alibaba-nacos-config - - - - com.alibaba.nacos - nacos-client - - - - - com.alibaba.nacos - nacos-client - 1.4.2 - - - com.alibaba.cloud - spring-cloud-starter-alibaba-nacos-discovery - - - org.springframework.boot - spring-boot-starter-web - - - org.springframework.boot - spring-boot-starter-actuator - - - org.projectlombok - lombok - true - - - com.alibaba - druid - - - com.baomidou - mybatis-plus-boot-starter - - - mysql - mysql-connector-java - - - - cn.hutool - hutool-all - 5.7.2 - - - - com.github.oshi - oshi-core - 5.6.1 - - - - - org.jsoup - jsoup - 1.13.1 - - - - - org.springframework.boot - spring-boot-starter-test - test - - - org.junit.vintage - junit-vintage-engine - - - - - org.junit.jupiter - junit-jupiter-api - - - - \ No newline at end of file diff --git a/src/hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java b/src/hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java deleted file mode 100644 index 5e4ccdc..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java +++ /dev/null @@ -1,2098 +0,0 @@ -// -// Source code recreated from a .class file by IntelliJ IDEA -// (powered by Fernflower decompiler) -// - -package com.alibaba.druid.pool; - -import com.alibaba.druid.DruidRuntimeException; -import com.alibaba.druid.filter.Filter; -import com.alibaba.druid.filter.FilterChainImpl; -import com.alibaba.druid.filter.FilterManager; -import com.alibaba.druid.pool.vendor.NullExceptionSorter; -import com.alibaba.druid.proxy.jdbc.DataSourceProxy; -import com.alibaba.druid.proxy.jdbc.TransactionInfo; -import com.alibaba.druid.stat.JdbcDataSourceStat; -import com.alibaba.druid.stat.JdbcSqlStat; -import com.alibaba.druid.stat.JdbcStatManager; -import com.alibaba.druid.support.logging.Log; -import com.alibaba.druid.support.logging.LogFactory; -import com.alibaba.druid.util.*; - -import javax.management.JMException; -import javax.management.ObjectName; -import javax.management.openmbean.CompositeDataSupport; -import javax.security.auth.callback.NameCallback; -import javax.security.auth.callback.PasswordCallback; -import javax.sql.DataSource; -import java.io.PrintWriter; -import java.io.Serializable; -import java.sql.*; -import java.util.Date; -import java.util.*; -import java.util.concurrent.CopyOnWriteArrayList; -import java.util.concurrent.ScheduledExecutorService; -import java.util.concurrent.atomic.AtomicIntegerFieldUpdater; -import java.util.concurrent.atomic.AtomicLongFieldUpdater; -import java.util.concurrent.locks.Condition; -import java.util.concurrent.locks.ReentrantLock; -import java.util.logging.Logger; - -public abstract class DruidAbstractDataSource extends WrapperAdapter implements DruidAbstractDataSourceMBean, DataSource, DataSourceProxy, Serializable { - private static final long serialVersionUID = 1L; - private static final Log LOG = LogFactory.getLog(DruidAbstractDataSource.class); - public static final int DEFAULT_INITIAL_SIZE = 0; - public static final int DEFAULT_MAX_ACTIVE_SIZE = 8; - public static final int DEFAULT_MAX_IDLE = 8; - public static final int DEFAULT_MIN_IDLE = 0; - public static final int DEFAULT_MAX_WAIT = -1; - public static final String DEFAULT_VALIDATION_QUERY = null; - public static final boolean DEFAULT_TEST_ON_BORROW = false; - public static final boolean DEFAULT_TEST_ON_RETURN = false; - public static final boolean DEFAULT_WHILE_IDLE = true; - public static final long DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS = 60000L; - public static final long DEFAULT_TIME_BETWEEN_CONNECT_ERROR_MILLIS = 500L; - public static final int DEFAULT_NUM_TESTS_PER_EVICTION_RUN = 3; - public static final long DEFAULT_MIN_EVICTABLE_IDLE_TIME_MILLIS = 1800000L; - public static final long DEFAULT_MAX_EVICTABLE_IDLE_TIME_MILLIS = 25200000L; - public static final long DEFAULT_PHY_TIMEOUT_MILLIS = -1L; - protected volatile boolean defaultAutoCommit = true; - protected volatile Boolean defaultReadOnly; - protected volatile Integer defaultTransactionIsolation; - protected volatile String defaultCatalog = null; - protected String name; - protected volatile String username; - protected volatile String password; - protected volatile String jdbcUrl; - protected volatile String driverClass; - protected volatile ClassLoader driverClassLoader; - protected volatile Properties connectProperties = new Properties(); - protected volatile PasswordCallback passwordCallback; - protected volatile NameCallback userCallback; - protected volatile int initialSize = 0; - protected volatile int maxActive = 8; - protected volatile int minIdle = 0; - protected volatile int maxIdle = 8; - protected volatile long maxWait = -1L; - protected int notFullTimeoutRetryCount = 0; - protected volatile String validationQuery; - protected volatile int validationQueryTimeout; - protected volatile boolean testOnBorrow; - protected volatile boolean testOnReturn; - protected volatile boolean testWhileIdle; - protected volatile boolean poolPreparedStatements; - protected volatile boolean sharePreparedStatements; - protected volatile int maxPoolPreparedStatementPerConnectionSize; - protected volatile boolean inited; - protected volatile boolean initExceptionThrow; - protected PrintWriter logWriter; - protected List filters; - private boolean clearFiltersEnable; - protected volatile ExceptionSorter exceptionSorter; - protected Driver driver; - protected volatile int queryTimeout; - protected volatile int transactionQueryTimeout; - protected long createTimespan; - protected volatile int maxWaitThreadCount; - protected volatile boolean accessToUnderlyingConnectionAllowed; - protected volatile long timeBetweenEvictionRunsMillis; - protected volatile int numTestsPerEvictionRun; - protected volatile long minEvictableIdleTimeMillis; - protected volatile long maxEvictableIdleTimeMillis; - protected volatile long keepAliveBetweenTimeMillis; - protected volatile long phyTimeoutMillis; - protected volatile long phyMaxUseCount; - protected volatile boolean removeAbandoned; - protected volatile long removeAbandonedTimeoutMillis; - protected volatile boolean logAbandoned; - protected volatile int maxOpenPreparedStatements; - protected volatile List connectionInitSqls; - protected volatile String dbType; - protected volatile long timeBetweenConnectErrorMillis; - protected volatile ValidConnectionChecker validConnectionChecker; - protected final Map activeConnections; - protected static final Object PRESENT = new Object(); - protected long id; - protected int connectionErrorRetryAttempts; - protected boolean breakAfterAcquireFailure; - protected long transactionThresholdMillis; - protected final Date createdTime; - protected Date initedTime; - protected volatile long errorCount; - protected volatile long dupCloseCount; - protected volatile long startTransactionCount; - protected volatile long commitCount; - protected volatile long rollbackCount; - protected volatile long cachedPreparedStatementHitCount; - protected volatile long preparedStatementCount; - protected volatile long closedPreparedStatementCount; - protected volatile long cachedPreparedStatementCount; - protected volatile long cachedPreparedStatementDeleteCount; - protected volatile long cachedPreparedStatementMissCount; - static final AtomicLongFieldUpdater errorCountUpdater = AtomicLongFieldUpdater.newUpdater(DruidAbstractDataSource.class, "errorCount"); - static final AtomicLongFieldUpdater dupCloseCountUpdater = AtomicLongFieldUpdater.newUpdater(DruidAbstractDataSource.class, "dupCloseCount"); - static final AtomicLongFieldUpdater startTransactionCountUpdater = AtomicLongFieldUpdater.newUpdater(DruidAbstractDataSource.class, "startTransactionCount"); - static final AtomicLongFieldUpdater commitCountUpdater = AtomicLongFieldUpdater.newUpdater(DruidAbstractDataSource.class, "commitCount"); - static final AtomicLongFieldUpdater rollbackCountUpdater = AtomicLongFieldUpdater.newUpdater(DruidAbstractDataSource.class, "rollbackCount"); - static final AtomicLongFieldUpdater cachedPreparedStatementHitCountUpdater = AtomicLongFieldUpdater.newUpdater(DruidAbstractDataSource.class, "cachedPreparedStatementHitCount"); - static final AtomicLongFieldUpdater preparedStatementCountUpdater = AtomicLongFieldUpdater.newUpdater(DruidAbstractDataSource.class, "preparedStatementCount"); - static final AtomicLongFieldUpdater closedPreparedStatementCountUpdater = AtomicLongFieldUpdater.newUpdater(DruidAbstractDataSource.class, "closedPreparedStatementCount"); - static final AtomicLongFieldUpdater cachedPreparedStatementCountUpdater = AtomicLongFieldUpdater.newUpdater(DruidAbstractDataSource.class, "cachedPreparedStatementCount"); - static final AtomicLongFieldUpdater cachedPreparedStatementDeleteCountUpdater = AtomicLongFieldUpdater.newUpdater(DruidAbstractDataSource.class, "cachedPreparedStatementDeleteCount"); - static final AtomicLongFieldUpdater cachedPreparedStatementMissCountUpdater = AtomicLongFieldUpdater.newUpdater(DruidAbstractDataSource.class, "cachedPreparedStatementMissCount"); - protected final Histogram transactionHistogram; - private boolean dupCloseLogEnable; - private ObjectName objectName; - protected volatile long executeCount; - protected volatile long executeQueryCount; - protected volatile long executeUpdateCount; - protected volatile long executeBatchCount; - static final AtomicLongFieldUpdater executeQueryCountUpdater = AtomicLongFieldUpdater.newUpdater(DruidAbstractDataSource.class, "executeQueryCount"); - static final AtomicLongFieldUpdater executeUpdateCountUpdater = AtomicLongFieldUpdater.newUpdater(DruidAbstractDataSource.class, "executeUpdateCount"); - static final AtomicLongFieldUpdater executeBatchCountUpdater = AtomicLongFieldUpdater.newUpdater(DruidAbstractDataSource.class, "executeBatchCount"); - static final AtomicLongFieldUpdater executeCountUpdater = AtomicLongFieldUpdater.newUpdater(DruidAbstractDataSource.class, "executeCount"); - protected volatile Throwable createError; - protected volatile Throwable lastError; - protected volatile long lastErrorTimeMillis; - protected volatile Throwable lastCreateError; - protected volatile long lastCreateErrorTimeMillis; - protected volatile long lastCreateStartTimeMillis; - protected boolean isOracle; - protected boolean isMySql; - protected boolean useOracleImplicitCache; - protected ReentrantLock lock; - protected Condition notEmpty; - protected Condition empty; - protected ReentrantLock activeConnectionLock; - protected volatile int createErrorCount; - protected volatile int creatingCount; - protected volatile int directCreateCount; - protected volatile long createCount; - protected volatile long destroyCount; - protected volatile long createStartNanos; - static final AtomicIntegerFieldUpdater createErrorCountUpdater = AtomicIntegerFieldUpdater.newUpdater(DruidAbstractDataSource.class, "createErrorCount"); - static final AtomicIntegerFieldUpdater creatingCountUpdater = AtomicIntegerFieldUpdater.newUpdater(DruidAbstractDataSource.class, "creatingCount"); - static final AtomicIntegerFieldUpdater directCreateCountUpdater = AtomicIntegerFieldUpdater.newUpdater(DruidAbstractDataSource.class, "directCreateCount"); - static final AtomicLongFieldUpdater createCountUpdater = AtomicLongFieldUpdater.newUpdater(DruidAbstractDataSource.class, "createCount"); - static final AtomicLongFieldUpdater destroyCountUpdater = AtomicLongFieldUpdater.newUpdater(DruidAbstractDataSource.class, "destroyCount"); - static final AtomicLongFieldUpdater createStartNanosUpdater = AtomicLongFieldUpdater.newUpdater(DruidAbstractDataSource.class, "createStartNanos"); - private Boolean useUnfairLock; - private boolean useLocalSessionState; - protected long timeBetweenLogStatsMillis; - protected DruidDataSourceStatLogger statLogger; - private boolean asyncCloseConnectionEnable; - protected int maxCreateTaskCount; - protected boolean failFast; - protected volatile int failContinuous; - protected volatile long failContinuousTimeMillis; - protected ScheduledExecutorService destroyScheduler; - protected ScheduledExecutorService createScheduler; - static final AtomicLongFieldUpdater failContinuousTimeMillisUpdater = AtomicLongFieldUpdater.newUpdater(DruidAbstractDataSource.class, "failContinuousTimeMillis"); - static final AtomicIntegerFieldUpdater failContinuousUpdater = AtomicIntegerFieldUpdater.newUpdater(DruidAbstractDataSource.class, "failContinuous"); - protected boolean initVariants; - protected boolean initGlobalVariants; - protected volatile boolean onFatalError; - protected volatile int onFatalErrorMaxActive; - protected volatile int fatalErrorCount; - protected volatile int fatalErrorCountLastShrink; - protected volatile long lastFatalErrorTimeMillis; - protected volatile String lastFatalErrorSql; - protected volatile Throwable lastFatalError; - protected volatile long connectionIdSeed; - protected volatile long statementIdSeed; - protected volatile long resultSetIdSeed; - protected volatile long transactionIdSeed; - protected volatile long metaDataIdSeed; - static final AtomicLongFieldUpdater connectionIdSeedUpdater = AtomicLongFieldUpdater.newUpdater(DruidAbstractDataSource.class, "connectionIdSeed"); - static final AtomicLongFieldUpdater statementIdSeedUpdater = AtomicLongFieldUpdater.newUpdater(DruidAbstractDataSource.class, "statementIdSeed"); - static final AtomicLongFieldUpdater resultSetIdSeedUpdater = AtomicLongFieldUpdater.newUpdater(DruidAbstractDataSource.class, "resultSetIdSeed"); - static final AtomicLongFieldUpdater transactionIdSeedUpdater = AtomicLongFieldUpdater.newUpdater(DruidAbstractDataSource.class, "transactionIdSeed"); - static final AtomicLongFieldUpdater metaDataIdSeedUpdater = AtomicLongFieldUpdater.newUpdater(DruidAbstractDataSource.class, "metaDataIdSeed"); - - public DruidAbstractDataSource(boolean lockFair) { - this.validationQuery = DEFAULT_VALIDATION_QUERY; - this.validationQueryTimeout = -1; - this.testOnBorrow = false; - this.testOnReturn = false; - this.testWhileIdle = true; - this.poolPreparedStatements = false; - this.sharePreparedStatements = false; - this.maxPoolPreparedStatementPerConnectionSize = 10; - this.inited = false; - this.initExceptionThrow = true; - this.logWriter = new PrintWriter(System.out); - this.filters = new CopyOnWriteArrayList(); - this.clearFiltersEnable = true; - this.exceptionSorter = null; - this.maxWaitThreadCount = -1; - this.accessToUnderlyingConnectionAllowed = true; - this.timeBetweenEvictionRunsMillis = 60000L; - this.numTestsPerEvictionRun = 3; - this.minEvictableIdleTimeMillis = 1800000L; - this.maxEvictableIdleTimeMillis = 25200000L; - this.keepAliveBetweenTimeMillis = 120000L; - this.phyTimeoutMillis = -1L; - this.phyMaxUseCount = -1L; - this.removeAbandonedTimeoutMillis = 300000L; - this.maxOpenPreparedStatements = -1; - this.timeBetweenConnectErrorMillis = 500L; - this.validConnectionChecker = null; - this.activeConnections = new IdentityHashMap(); - this.connectionErrorRetryAttempts = 1; - this.breakAfterAcquireFailure = false; - this.transactionThresholdMillis = 0L; - this.createdTime = new Date(); - this.errorCount = 0L; - this.dupCloseCount = 0L; - this.startTransactionCount = 0L; - this.commitCount = 0L; - this.rollbackCount = 0L; - this.cachedPreparedStatementHitCount = 0L; - this.preparedStatementCount = 0L; - this.closedPreparedStatementCount = 0L; - this.cachedPreparedStatementCount = 0L; - this.cachedPreparedStatementDeleteCount = 0L; - this.cachedPreparedStatementMissCount = 0L; - this.transactionHistogram = new Histogram(new long[]{1L, 10L, 100L, 1000L, 10000L, 100000L}); - this.dupCloseLogEnable = false; - this.executeCount = 0L; - this.executeQueryCount = 0L; - this.executeUpdateCount = 0L; - this.executeBatchCount = 0L; - this.isOracle = false; - this.isMySql = false; - this.useOracleImplicitCache = true; - this.activeConnectionLock = new ReentrantLock(); - this.createErrorCount = 0; - this.creatingCount = 0; - this.directCreateCount = 0; - this.createCount = 0L; - this.destroyCount = 0L; - this.createStartNanos = 0L; - this.useUnfairLock = null; - this.useLocalSessionState = true; - this.statLogger = new DruidDataSourceStatLoggerImpl(); - this.asyncCloseConnectionEnable = false; - this.maxCreateTaskCount = 3; - this.failFast = false; - this.failContinuous = 0; - this.failContinuousTimeMillis = 0L; - this.initVariants = false; - this.initGlobalVariants = false; - this.onFatalError = false; - this.onFatalErrorMaxActive = 0; - this.fatalErrorCount = 0; - this.fatalErrorCountLastShrink = 0; - this.lastFatalErrorTimeMillis = 0L; - this.lastFatalErrorSql = null; - this.lastFatalError = null; - this.connectionIdSeed = 10000L; - this.statementIdSeed = 20000L; - this.resultSetIdSeed = 50000L; - this.transactionIdSeed = 60000L; - this.metaDataIdSeed = 80000L; - this.lock = new ReentrantLock(lockFair); - this.notEmpty = this.lock.newCondition(); - this.empty = this.lock.newCondition(); - } - - public boolean isUseLocalSessionState() { - return this.useLocalSessionState; - } - - public void setUseLocalSessionState(boolean useLocalSessionState) { - this.useLocalSessionState = useLocalSessionState; - } - - public DruidDataSourceStatLogger getStatLogger() { - return this.statLogger; - } - - public void setStatLoggerClassName(String className) { - try { - Class clazz = Class.forName(className); - DruidDataSourceStatLogger statLogger = (DruidDataSourceStatLogger)clazz.newInstance(); - this.setStatLogger(statLogger); - } catch (Exception var4) { - throw new IllegalArgumentException(className, var4); - } - } - - public void setStatLogger(DruidDataSourceStatLogger statLogger) { - this.statLogger = statLogger; - } - - public long getTimeBetweenLogStatsMillis() { - return this.timeBetweenLogStatsMillis; - } - - public void setTimeBetweenLogStatsMillis(long timeBetweenLogStatsMillis) { - this.timeBetweenLogStatsMillis = timeBetweenLogStatsMillis; - } - - public boolean isOracle() { - return this.isOracle; - } - - public void setOracle(boolean isOracle) { - if (this.inited) { - throw new IllegalStateException(); - } else { - this.isOracle = isOracle; - } - } - - public boolean isUseUnfairLock() { - return this.lock.isFair(); - } - - public void setUseUnfairLock(boolean useUnfairLock) { - if (this.lock.isFair() != !useUnfairLock) { - if (!this.inited) { - ReentrantLock lock = this.lock; - lock.lock(); - - try { - if (!this.inited) { - this.lock = new ReentrantLock(!useUnfairLock); - this.notEmpty = this.lock.newCondition(); - this.empty = this.lock.newCondition(); - this.useUnfairLock = useUnfairLock; - } - } finally { - lock.unlock(); - } - } - - } - } - - public boolean isUseOracleImplicitCache() { - return this.useOracleImplicitCache; - } - - public void setUseOracleImplicitCache(boolean useOracleImplicitCache) { - if (this.useOracleImplicitCache != useOracleImplicitCache) { - this.useOracleImplicitCache = useOracleImplicitCache; - boolean isOracleDriver10 = this.isOracle() && this.driver != null && this.driver.getMajorVersion() == 10; - if (isOracleDriver10 && useOracleImplicitCache) { - this.getConnectProperties().setProperty("oracle.jdbc.FreeMemoryOnEnterImplicitCache", "true"); - } else { - this.getConnectProperties().remove("oracle.jdbc.FreeMemoryOnEnterImplicitCache"); - } - } - - } - - public Throwable getLastCreateError() { - return this.lastCreateError; - } - - public Throwable getLastError() { - return this.lastError; - } - - public long getLastErrorTimeMillis() { - return this.lastErrorTimeMillis; - } - - public Date getLastErrorTime() { - return this.lastErrorTimeMillis <= 0L ? null : new Date(this.lastErrorTimeMillis); - } - - public long getLastCreateErrorTimeMillis() { - return this.lastCreateErrorTimeMillis; - } - - public Date getLastCreateErrorTime() { - return this.lastCreateErrorTimeMillis <= 0L ? null : new Date(this.lastCreateErrorTimeMillis); - } - - public int getTransactionQueryTimeout() { - return this.transactionQueryTimeout <= 0 ? this.queryTimeout : this.transactionQueryTimeout; - } - - public void setTransactionQueryTimeout(int transactionQueryTimeout) { - this.transactionQueryTimeout = transactionQueryTimeout; - } - - public long getExecuteCount() { - return this.executeCount + this.executeQueryCount + this.executeUpdateCount + this.executeBatchCount; - } - - public long getExecuteUpdateCount() { - return this.executeUpdateCount; - } - - public long getExecuteQueryCount() { - return this.executeQueryCount; - } - - public long getExecuteBatchCount() { - return this.executeBatchCount; - } - - public long getAndResetExecuteCount() { - return executeCountUpdater.getAndSet(this, 0L) + executeQueryCountUpdater.getAndSet(this, 0L) + executeUpdateCountUpdater.getAndSet(this, 0L) + executeBatchCountUpdater.getAndSet(this, 0L); - } - - public long getExecuteCount2() { - return this.executeCount; - } - - public void incrementExecuteCount() { - executeCountUpdater.incrementAndGet(this); - } - - public void incrementExecuteUpdateCount() { - ++this.executeUpdateCount; - } - - public void incrementExecuteQueryCount() { - ++this.executeQueryCount; - } - - public void incrementExecuteBatchCount() { - ++this.executeBatchCount; - } - - public boolean isDupCloseLogEnable() { - return this.dupCloseLogEnable; - } - - public void setDupCloseLogEnable(boolean dupCloseLogEnable) { - this.dupCloseLogEnable = dupCloseLogEnable; - } - - public ObjectName getObjectName() { - return this.objectName; - } - - public void setObjectName(ObjectName objectName) { - this.objectName = objectName; - } - - public Histogram getTransactionHistogram() { - return this.transactionHistogram; - } - - public void incrementCachedPreparedStatementCount() { - cachedPreparedStatementCountUpdater.incrementAndGet(this); - } - - public void decrementCachedPreparedStatementCount() { - cachedPreparedStatementCountUpdater.decrementAndGet(this); - } - - public void incrementCachedPreparedStatementDeleteCount() { - cachedPreparedStatementDeleteCountUpdater.incrementAndGet(this); - } - - public void incrementCachedPreparedStatementMissCount() { - cachedPreparedStatementMissCountUpdater.incrementAndGet(this); - } - - public long getCachedPreparedStatementMissCount() { - return this.cachedPreparedStatementMissCount; - } - - public long getCachedPreparedStatementAccessCount() { - return this.cachedPreparedStatementMissCount + this.cachedPreparedStatementHitCount; - } - - public long getCachedPreparedStatementDeleteCount() { - return this.cachedPreparedStatementDeleteCount; - } - - public long getCachedPreparedStatementCount() { - return this.cachedPreparedStatementCount; - } - - public void incrementClosedPreparedStatementCount() { - closedPreparedStatementCountUpdater.incrementAndGet(this); - } - - public long getClosedPreparedStatementCount() { - return this.closedPreparedStatementCount; - } - - public void incrementPreparedStatementCount() { - preparedStatementCountUpdater.incrementAndGet(this); - } - - public long getPreparedStatementCount() { - return this.preparedStatementCount; - } - - public void incrementCachedPreparedStatementHitCount() { - cachedPreparedStatementHitCountUpdater.incrementAndGet(this); - } - - public long getCachedPreparedStatementHitCount() { - return this.cachedPreparedStatementHitCount; - } - - public long getTransactionThresholdMillis() { - return this.transactionThresholdMillis; - } - - public void setTransactionThresholdMillis(long transactionThresholdMillis) { - this.transactionThresholdMillis = transactionThresholdMillis; - } - - public abstract void logTransaction(TransactionInfo var1); - - public long[] getTransactionHistogramValues() { - return this.transactionHistogram.toArray(); - } - - public long[] getTransactionHistogramRanges() { - return this.transactionHistogram.getRanges(); - } - - public long getCommitCount() { - return this.commitCount; - } - - public void incrementCommitCount() { - commitCountUpdater.incrementAndGet(this); - } - - public long getRollbackCount() { - return this.rollbackCount; - } - - public void incrementRollbackCount() { - rollbackCountUpdater.incrementAndGet(this); - } - - public long getStartTransactionCount() { - return this.startTransactionCount; - } - - public void incrementStartTransactionCount() { - startTransactionCountUpdater.incrementAndGet(this); - } - - public boolean isBreakAfterAcquireFailure() { - return this.breakAfterAcquireFailure; - } - - public void setBreakAfterAcquireFailure(boolean breakAfterAcquireFailure) { - this.breakAfterAcquireFailure = breakAfterAcquireFailure; - } - - public int getConnectionErrorRetryAttempts() { - return this.connectionErrorRetryAttempts; - } - - public void setConnectionErrorRetryAttempts(int connectionErrorRetryAttempts) { - this.connectionErrorRetryAttempts = connectionErrorRetryAttempts; - } - - public long getDupCloseCount() { - return this.dupCloseCount; - } - - public int getMaxPoolPreparedStatementPerConnectionSize() { - return this.maxPoolPreparedStatementPerConnectionSize; - } - - public void setMaxPoolPreparedStatementPerConnectionSize(int maxPoolPreparedStatementPerConnectionSize) { - if (maxPoolPreparedStatementPerConnectionSize > 0) { - this.poolPreparedStatements = true; - } else { - this.poolPreparedStatements = false; - } - - this.maxPoolPreparedStatementPerConnectionSize = maxPoolPreparedStatementPerConnectionSize; - } - - public boolean isSharePreparedStatements() { - return this.sharePreparedStatements; - } - - public void setSharePreparedStatements(boolean sharePreparedStatements) { - this.sharePreparedStatements = sharePreparedStatements; - } - - public void incrementDupCloseCount() { - dupCloseCountUpdater.incrementAndGet(this); - } - - public ValidConnectionChecker getValidConnectionChecker() { - return this.validConnectionChecker; - } - - public void setValidConnectionChecker(ValidConnectionChecker validConnectionChecker) { - this.validConnectionChecker = validConnectionChecker; - } - - public String getValidConnectionCheckerClassName() { - return this.validConnectionChecker == null ? null : this.validConnectionChecker.getClass().getName(); - } - - public void setValidConnectionCheckerClassName(String validConnectionCheckerClass) throws Exception { - Class clazz = Utils.loadClass(validConnectionCheckerClass); - ValidConnectionChecker validConnectionChecker = null; - if (clazz != null) { - validConnectionChecker = (ValidConnectionChecker)clazz.newInstance(); - this.validConnectionChecker = validConnectionChecker; - } else { - LOG.error("load validConnectionCheckerClass error : " + validConnectionCheckerClass); - } - - } - - public String getDbType() { - return this.dbType; - } - - public void setDbType(String dbType) { - this.dbType = dbType; - } - - public void addConnectionProperty(String name, String value) { - if (!StringUtils.equals(this.connectProperties.getProperty(name), value)) { - if (this.inited) { - throw new UnsupportedOperationException(); - } else { - this.connectProperties.put(name, value); - } - } - } - - public Collection getConnectionInitSqls() { - Collection result = this.connectionInitSqls; - return result == null ? Collections.emptyList() : result; - } - - public void setConnectionInitSqls(Collection connectionInitSqls) { - if (connectionInitSqls != null && connectionInitSqls.size() > 0) { - ArrayList newVal = null; - Iterator var3 = connectionInitSqls.iterator(); - - while(var3.hasNext()) { - Object o = var3.next(); - if (o != null) { - String s = o.toString(); - s = s.trim(); - if (s.length() != 0) { - if (newVal == null) { - newVal = new ArrayList(); - } - - newVal.add(s); - } - } - } - - this.connectionInitSqls = newVal; - } else { - this.connectionInitSqls = null; - } - - } - - public long getTimeBetweenConnectErrorMillis() { - return this.timeBetweenConnectErrorMillis; - } - - public void setTimeBetweenConnectErrorMillis(long timeBetweenConnectErrorMillis) { - this.timeBetweenConnectErrorMillis = timeBetweenConnectErrorMillis; - } - - public int getMaxOpenPreparedStatements() { - return this.maxPoolPreparedStatementPerConnectionSize; - } - - public void setMaxOpenPreparedStatements(int maxOpenPreparedStatements) { - this.setMaxPoolPreparedStatementPerConnectionSize(maxOpenPreparedStatements); - } - - public boolean isLogAbandoned() { - return this.logAbandoned; - } - - public void setLogAbandoned(boolean logAbandoned) { - this.logAbandoned = logAbandoned; - } - - public int getRemoveAbandonedTimeout() { - return (int)(this.removeAbandonedTimeoutMillis / 1000L); - } - - public void setRemoveAbandonedTimeout(int removeAbandonedTimeout) { - this.removeAbandonedTimeoutMillis = (long)removeAbandonedTimeout * 1000L; - } - - public void setRemoveAbandonedTimeoutMillis(long removeAbandonedTimeoutMillis) { - this.removeAbandonedTimeoutMillis = removeAbandonedTimeoutMillis; - } - - public long getRemoveAbandonedTimeoutMillis() { - return this.removeAbandonedTimeoutMillis; - } - - public boolean isRemoveAbandoned() { - return this.removeAbandoned; - } - - public void setRemoveAbandoned(boolean removeAbandoned) { - this.removeAbandoned = removeAbandoned; - } - - public long getMinEvictableIdleTimeMillis() { - return this.minEvictableIdleTimeMillis; - } - - public void setMinEvictableIdleTimeMillis(long minEvictableIdleTimeMillis) { - if (minEvictableIdleTimeMillis < 30000L) { - LOG.error("minEvictableIdleTimeMillis should be greater than 30000"); - } - - this.minEvictableIdleTimeMillis = minEvictableIdleTimeMillis; - } - - public long getKeepAliveBetweenTimeMillis() { - return this.keepAliveBetweenTimeMillis; - } - - public void setKeepAliveBetweenTimeMillis(long keepAliveBetweenTimeMillis) { - if (keepAliveBetweenTimeMillis < 30000L) { - LOG.error("keepAliveBetweenTimeMillis should be greater than 30000"); - } - - this.keepAliveBetweenTimeMillis = keepAliveBetweenTimeMillis; - } - - public long getMaxEvictableIdleTimeMillis() { - return this.maxEvictableIdleTimeMillis; - } - - public void setMaxEvictableIdleTimeMillis(long maxEvictableIdleTimeMillis) { - if (maxEvictableIdleTimeMillis < 30000L) { - LOG.error("maxEvictableIdleTimeMillis should be greater than 30000"); - } - - if (maxEvictableIdleTimeMillis < this.minEvictableIdleTimeMillis) { - throw new IllegalArgumentException("maxEvictableIdleTimeMillis must be grater than minEvictableIdleTimeMillis"); - } else { - this.maxEvictableIdleTimeMillis = maxEvictableIdleTimeMillis; - } - } - - public long getPhyTimeoutMillis() { - return this.phyTimeoutMillis; - } - - public void setPhyTimeoutMillis(long phyTimeoutMillis) { - this.phyTimeoutMillis = phyTimeoutMillis; - } - - public long getPhyMaxUseCount() { - return this.phyMaxUseCount; - } - - public void setPhyMaxUseCount(long phyMaxUseCount) { - this.phyMaxUseCount = phyMaxUseCount; - } - - public int getNumTestsPerEvictionRun() { - return this.numTestsPerEvictionRun; - } - - /** @deprecated */ - @Deprecated - public void setNumTestsPerEvictionRun(int numTestsPerEvictionRun) { - this.numTestsPerEvictionRun = numTestsPerEvictionRun; - } - - public long getTimeBetweenEvictionRunsMillis() { - return this.timeBetweenEvictionRunsMillis; - } - - public void setTimeBetweenEvictionRunsMillis(long timeBetweenEvictionRunsMillis) { - this.timeBetweenEvictionRunsMillis = timeBetweenEvictionRunsMillis; - } - - public int getMaxWaitThreadCount() { - return this.maxWaitThreadCount; - } - - public void setMaxWaitThreadCount(int maxWaithThreadCount) { - this.maxWaitThreadCount = maxWaithThreadCount; - } - - public String getValidationQuery() { - return this.validationQuery; - } - - public void setValidationQuery(String validationQuery) { - this.validationQuery = validationQuery; - } - - public int getValidationQueryTimeout() { - return this.validationQueryTimeout; - } - - public void setValidationQueryTimeout(int validationQueryTimeout) { - if (validationQueryTimeout < 0 && "sqlserver".equals(this.dbType)) { - LOG.error("validationQueryTimeout should be >= 0"); - } - - this.validationQueryTimeout = validationQueryTimeout; - } - - public boolean isAccessToUnderlyingConnectionAllowed() { - return this.accessToUnderlyingConnectionAllowed; - } - - public void setAccessToUnderlyingConnectionAllowed(boolean accessToUnderlyingConnectionAllowed) { - this.accessToUnderlyingConnectionAllowed = accessToUnderlyingConnectionAllowed; - } - - public boolean isTestOnBorrow() { - return this.testOnBorrow; - } - - public void setTestOnBorrow(boolean testOnBorrow) { - this.testOnBorrow = testOnBorrow; - } - - public boolean isTestOnReturn() { - return this.testOnReturn; - } - - public void setTestOnReturn(boolean testOnReturn) { - this.testOnReturn = testOnReturn; - } - - public boolean isTestWhileIdle() { - return this.testWhileIdle; - } - - public void setTestWhileIdle(boolean testWhileIdle) { - this.testWhileIdle = testWhileIdle; - } - - public boolean isDefaultAutoCommit() { - return this.defaultAutoCommit; - } - - public void setDefaultAutoCommit(boolean defaultAutoCommit) { - this.defaultAutoCommit = defaultAutoCommit; - } - - public Boolean getDefaultReadOnly() { - return this.defaultReadOnly; - } - - public void setDefaultReadOnly(Boolean defaultReadOnly) { - this.defaultReadOnly = defaultReadOnly; - } - - public Integer getDefaultTransactionIsolation() { - return this.defaultTransactionIsolation; - } - - public void setDefaultTransactionIsolation(Integer defaultTransactionIsolation) { - this.defaultTransactionIsolation = defaultTransactionIsolation; - } - - public String getDefaultCatalog() { - return this.defaultCatalog; - } - - public void setDefaultCatalog(String defaultCatalog) { - this.defaultCatalog = defaultCatalog; - } - - public PasswordCallback getPasswordCallback() { - return this.passwordCallback; - } - - public void setPasswordCallback(PasswordCallback passwordCallback) { - this.passwordCallback = passwordCallback; - } - - public void setPasswordCallbackClassName(String passwordCallbackClassName) throws Exception { - Class clazz = Utils.loadClass(passwordCallbackClassName); - if (clazz != null) { - this.passwordCallback = (PasswordCallback)clazz.newInstance(); - } else { - LOG.error("load passwordCallback error : " + passwordCallbackClassName); - this.passwordCallback = null; - } - - } - - public NameCallback getUserCallback() { - return this.userCallback; - } - - public void setUserCallback(NameCallback userCallback) { - this.userCallback = userCallback; - } - - public boolean isInitVariants() { - return this.initVariants; - } - - public void setInitVariants(boolean initVariants) { - this.initVariants = initVariants; - } - - public boolean isInitGlobalVariants() { - return this.initGlobalVariants; - } - - public void setInitGlobalVariants(boolean initGlobalVariants) { - this.initGlobalVariants = initGlobalVariants; - } - - public int getQueryTimeout() { - return this.queryTimeout; - } - - public void setQueryTimeout(int seconds) { - this.queryTimeout = seconds; - } - - public String getName() { - return this.name != null ? this.name : "DataSource-" + System.identityHashCode(this); - } - - public void setName(String name) { - this.name = name; - } - - public boolean isPoolPreparedStatements() { - return this.poolPreparedStatements; - } - - public abstract void setPoolPreparedStatements(boolean var1); - - public long getMaxWait() { - return this.maxWait; - } - - public void setMaxWait(long maxWaitMillis) { - if (maxWaitMillis != this.maxWait) { - if (maxWaitMillis > 0L && this.useUnfairLock == null && !this.inited) { - ReentrantLock lock = this.lock; - lock.lock(); - - try { - if (!this.inited && !lock.isFair()) { - this.lock = new ReentrantLock(true); - this.notEmpty = this.lock.newCondition(); - this.empty = this.lock.newCondition(); - } - } finally { - lock.unlock(); - } - } - - if (this.inited) { - LOG.error("maxWait changed : " + this.maxWait + " -> " + maxWaitMillis); - } - - this.maxWait = maxWaitMillis; - } - } - - public int getNotFullTimeoutRetryCount() { - return this.notFullTimeoutRetryCount; - } - - public void setNotFullTimeoutRetryCount(int notFullTimeoutRetryCount) { - this.notFullTimeoutRetryCount = notFullTimeoutRetryCount; - } - - public int getMinIdle() { - return this.minIdle; - } - - public void setMinIdle(int value) { - if (value != this.minIdle) { - if (this.inited && value > this.maxActive) { - throw new IllegalArgumentException("minIdle greater than maxActive, " + this.maxActive + " < " + this.minIdle); - } else if (this.minIdle < 0) { - throw new IllegalArgumentException("minIdle must > 0"); - } else { - this.minIdle = value; - } - } - } - - public int getMaxIdle() { - return this.maxIdle; - } - - /** @deprecated */ - @Deprecated - public void setMaxIdle(int maxIdle) { - LOG.error("maxIdle is deprecated"); - this.maxIdle = maxIdle; - } - - public int getInitialSize() { - return this.initialSize; - } - - public void setInitialSize(int initialSize) { - if (this.initialSize != initialSize) { - if (this.inited) { - throw new UnsupportedOperationException(); - } else { - this.initialSize = initialSize; - } - } - } - - public long getCreateErrorCount() { - return (long)this.createErrorCount; - } - - public int getMaxActive() { - return this.maxActive; - } - - public abstract void setMaxActive(int var1); - - public String getUsername() { - return this.username; - } - - public void setUsername(String username) { - if (!StringUtils.equals(this.username, username)) { -// if (this.inited) { -// throw new UnsupportedOperationException(); -// } else { - this.username = username; -// } - } - } - - public String getPassword() { - return this.password; - } - - public void setPassword(String password) { - if (!StringUtils.equals(this.password, password)) { - if (this.inited) { - LOG.info("password changed"); - } - - this.password = password; - } - } - - public Properties getConnectProperties() { - return this.connectProperties; - } - - public abstract void setConnectProperties(Properties var1); - - public void setConnectionProperties(String connectionProperties) { - if (connectionProperties != null && connectionProperties.trim().length() != 0) { - String[] entries = connectionProperties.split(";"); - Properties properties = new Properties(); - - for(int i = 0; i < entries.length; ++i) { - String entry = entries[i]; - if (entry.length() > 0) { - int index = entry.indexOf(61); - if (index > 0) { - String name = entry.substring(0, index); - String value = entry.substring(index + 1); - properties.setProperty(name, value); - } else { - properties.setProperty(entry, ""); - } - } - } - - this.setConnectProperties(properties); - } else { - this.setConnectProperties((Properties)null); - } - } - - public String getUrl() { - return this.jdbcUrl; - } - - public String getRawJdbcUrl() { - return this.jdbcUrl; - } - - public void setUrl(String jdbcUrl) { - if (!StringUtils.equals(this.jdbcUrl, jdbcUrl)) { -// if (this.inited) { -// throw new UnsupportedOperationException(); -// } else { - if (jdbcUrl != null) { - jdbcUrl = jdbcUrl.trim(); - } - - this.jdbcUrl = jdbcUrl; -// } - } - } - - public String getDriverClassName() { - return this.driverClass; - } - - public void setDriverClassName(String driverClass) { - if (driverClass != null && driverClass.length() > 256) { - throw new IllegalArgumentException("driverClassName length > 256."); - } else { - if ("oracle.jdbc.driver.OracleDriver".equalsIgnoreCase(driverClass)) { - driverClass = "oracle.jdbc.OracleDriver"; - LOG.warn("oracle.jdbc.driver.OracleDriver is deprecated.Having use oracle.jdbc.OracleDriver."); - } - - if (this.inited) { - if (!StringUtils.equals(this.driverClass, driverClass)) { - throw new UnsupportedOperationException(); - } - } else { - this.driverClass = driverClass; - } - } - } - - public ClassLoader getDriverClassLoader() { - return this.driverClassLoader; - } - - public void setDriverClassLoader(ClassLoader driverClassLoader) { - this.driverClassLoader = driverClassLoader; - } - - public PrintWriter getLogWriter() { - return this.logWriter; - } - - public void setLogWriter(PrintWriter out) throws SQLException { - this.logWriter = out; - } - - public void setLoginTimeout(int seconds) { - DriverManager.setLoginTimeout(seconds); - } - - public int getLoginTimeout() { - return DriverManager.getLoginTimeout(); - } - - public Driver getDriver() { - return this.driver; - } - - public void setDriver(Driver driver) { - this.driver = driver; - } - - public int getDriverMajorVersion() { - return this.driver == null ? -1 : this.driver.getMajorVersion(); - } - - public int getDriverMinorVersion() { - return this.driver == null ? -1 : this.driver.getMinorVersion(); - } - - public ExceptionSorter getExceptionSorter() { - return this.exceptionSorter; - } - - public String getExceptionSorterClassName() { - return this.exceptionSorter == null ? null : this.exceptionSorter.getClass().getName(); - } - - public void setExceptionSorter(ExceptionSorter exceptionSoter) { - this.exceptionSorter = exceptionSoter; - } - - public void setExceptionSorterClassName(String exceptionSorter) throws Exception { - this.setExceptionSorter(exceptionSorter); - } - - public void setExceptionSorter(String exceptionSorter) throws SQLException { - if (exceptionSorter == null) { - this.exceptionSorter = NullExceptionSorter.getInstance(); - } else { - exceptionSorter = exceptionSorter.trim(); - if (exceptionSorter.length() == 0) { - this.exceptionSorter = NullExceptionSorter.getInstance(); - } else { - Class clazz = Utils.loadClass(exceptionSorter); - if (clazz == null) { - LOG.error("load exceptionSorter error : " + exceptionSorter); - } else { - try { - this.exceptionSorter = (ExceptionSorter)clazz.newInstance(); - } catch (Exception var4) { - throw new SQLException("create exceptionSorter error", var4); - } - } - - } - } - } - - public List getProxyFilters() { - return this.filters; - } - - public void setProxyFilters(List filters) { - if (filters != null) { - this.filters.addAll(filters); - } - - } - - public String[] getFilterClasses() { - List filterConfigList = this.getProxyFilters(); - List classes = new ArrayList(); - Iterator var3 = filterConfigList.iterator(); - - while(var3.hasNext()) { - Filter filter = (Filter)var3.next(); - classes.add(filter.getClass().getName()); - } - - return (String[])classes.toArray(new String[classes.size()]); - } - - public void setFilters(String filters) throws SQLException { - if (filters != null && filters.startsWith("!")) { - filters = filters.substring(1); - this.clearFilters(); - } - - this.addFilters(filters); - } - - public void addFilters(String filters) throws SQLException { - if (filters != null && filters.length() != 0) { - String[] filterArray = filters.split("\\,"); - String[] var3 = filterArray; - int var4 = filterArray.length; - - for(int var5 = 0; var5 < var4; ++var5) { - String item = var3[var5]; - FilterManager.loadFilter(this.filters, item.trim()); - } - - } - } - - public void clearFilters() { - if (this.isClearFiltersEnable()) { - this.filters.clear(); - } - } - - public void validateConnection(Connection conn) throws SQLException { - String query = this.getValidationQuery(); - if (conn.isClosed()) { - throw new SQLException("validateConnection: connection closed"); - } else if (this.validConnectionChecker != null) { - boolean result = true; - Exception error = null; - - try { - result = this.validConnectionChecker.isValidConnection(conn, this.validationQuery, this.validationQueryTimeout); - if (result && this.onFatalError) { - this.lock.lock(); - - try { - if (this.onFatalError) { - this.onFatalError = false; - } - } finally { - this.lock.unlock(); - } - } - } catch (SQLException var24) { - throw var24; - } catch (Exception var25) { - error = var25; - } - - if (!result) { - SQLException sqlError = error != null ? new SQLException("validateConnection false", error) : new SQLException("validateConnection false"); - throw sqlError; - } - } else { - if (null != query) { - Statement stmt = null; - ResultSet rs = null; - - try { - stmt = conn.createStatement(); - if (this.getValidationQueryTimeout() > 0) { - stmt.setQueryTimeout(this.getValidationQueryTimeout()); - } - - rs = stmt.executeQuery(query); - if (!rs.next()) { - throw new SQLException("validationQuery didn't return a row"); - } - - if (this.onFatalError) { - this.lock.lock(); - - try { - if (this.onFatalError) { - this.onFatalError = false; - } - } finally { - this.lock.unlock(); - } - } - } finally { - JdbcUtils.close(rs); - JdbcUtils.close(stmt); - } - } - - } - } - - /** @deprecated */ - protected boolean testConnectionInternal(Connection conn) { - return this.testConnectionInternal((DruidConnectionHolder)null, conn); - } - - protected boolean testConnectionInternal(DruidConnectionHolder holder, Connection conn) { - String sqlFile = JdbcSqlStat.getContextSqlFile(); - String sqlName = JdbcSqlStat.getContextSqlName(); - if (sqlFile != null) { - JdbcSqlStat.setContextSqlFile((String)null); - } - - if (sqlName != null) { - JdbcSqlStat.setContextSqlName((String)null); - } - - try { - boolean valid; - if (this.validConnectionChecker == null) { - if (conn.isClosed()) { - valid = false; - return valid; - } else if (null == this.validationQuery) { - valid = true; - return valid; - } else { - Statement stmt = null; - ResultSet rset = null; - - boolean var7; - try { - stmt = conn.createStatement(); - if (this.getValidationQueryTimeout() > 0) { - stmt.setQueryTimeout(this.validationQueryTimeout); - } - - rset = stmt.executeQuery(this.validationQuery); - if (!rset.next()) { - var7 = false; - return var7; - } - } finally { - JdbcUtils.close(rset); - JdbcUtils.close(stmt); - } - - if (this.onFatalError) { - this.lock.lock(); - - try { - if (this.onFatalError) { - this.onFatalError = false; - } - } finally { - this.lock.unlock(); - } - } - - var7 = true; - return var7; - } - } else { - valid = this.validConnectionChecker.isValidConnection(conn, this.validationQuery, this.validationQueryTimeout); - long currentTimeMillis = System.currentTimeMillis(); - if (holder != null) { - holder.lastValidTimeMillis = currentTimeMillis; - } - - if (valid && this.isMySql) { - long lastPacketReceivedTimeMs = MySqlUtils.getLastPacketReceivedTimeMs(conn); - if (lastPacketReceivedTimeMs > 0L) { - long mysqlIdleMillis = currentTimeMillis - lastPacketReceivedTimeMs; - if (lastPacketReceivedTimeMs > 0L && mysqlIdleMillis >= this.timeBetweenEvictionRunsMillis) { - this.discardConnection(conn); - String errorMsg = "discard long time none received connection. , jdbcUrl : " + this.jdbcUrl + ", jdbcUrl : " + this.jdbcUrl + ", lastPacketReceivedIdleMillis : " + mysqlIdleMillis; - LOG.error(errorMsg); - boolean var13 = false; - return var13; - } - } - } - - if (valid && this.onFatalError) { - this.lock.lock(); - - try { - if (this.onFatalError) { - this.onFatalError = false; - } - } finally { - this.lock.unlock(); - } - } - - boolean var46 = valid; - return var46; - } - } catch (Throwable var41) { - boolean var6 = false; - return var6; - } finally { - if (sqlFile != null) { - JdbcSqlStat.setContextSqlFile(sqlFile); - } - - if (sqlName != null) { - JdbcSqlStat.setContextSqlName(sqlName); - } - - } - } - - public Set getActiveConnections() { - this.activeConnectionLock.lock(); - - HashSet var1; - try { - var1 = new HashSet(this.activeConnections.keySet()); - } finally { - this.activeConnectionLock.unlock(); - } - - return var1; - } - - public List getActiveConnectionStackTrace() { - List list = new ArrayList(); - Iterator var2 = this.getActiveConnections().iterator(); - - while(var2.hasNext()) { - DruidPooledConnection conn = (DruidPooledConnection)var2.next(); - list.add(Utils.toString(conn.getConnectStackTrace())); - } - - return list; - } - - public long getCreateTimespanNano() { - return this.createTimespan; - } - - public long getCreateTimespanMillis() { - return this.createTimespan / 1000000L; - } - - public Driver getRawDriver() { - return this.driver; - } - - public boolean isClearFiltersEnable() { - return this.clearFiltersEnable; - } - - public void setClearFiltersEnable(boolean clearFiltersEnable) { - this.clearFiltersEnable = clearFiltersEnable; - } - - public long createConnectionId() { - return connectionIdSeedUpdater.incrementAndGet(this); - } - - public long createStatementId() { - return statementIdSeedUpdater.getAndIncrement(this); - } - - public long createMetaDataId() { - return metaDataIdSeedUpdater.getAndIncrement(this); - } - - public long createResultSetId() { - return resultSetIdSeedUpdater.getAndIncrement(this); - } - - public long createTransactionId() { - return transactionIdSeedUpdater.getAndIncrement(this); - } - - void initStatement(DruidPooledConnection conn, Statement stmt) throws SQLException { - boolean transaction = !conn.getConnectionHolder().underlyingAutoCommit; - int queryTimeout = transaction ? this.getTransactionQueryTimeout() : this.getQueryTimeout(); - if (queryTimeout > 0) { - stmt.setQueryTimeout(queryTimeout); - } - - } - - public void handleConnectionException(DruidPooledConnection conn, Throwable t) throws SQLException { - this.handleConnectionException(conn, t, (String)null); - } - - public abstract void handleConnectionException(DruidPooledConnection var1, Throwable var2, String var3) throws SQLException; - - protected abstract void recycle(DruidPooledConnection var1) throws SQLException; - - public Connection createPhysicalConnection(String url, Properties info) throws SQLException { - Object conn; - if (this.getProxyFilters().size() == 0) { - conn = this.getDriver().connect(url, info); - } else { - conn = (new FilterChainImpl(this)).connection_connect(info); - } - - createCountUpdater.incrementAndGet(this); - return (Connection)conn; - } - - public PhysicalConnectionInfo createPhysicalConnection() throws SQLException { - String url = this.getUrl(); - Properties connectProperties = this.getConnectProperties(); - String user; - if (this.getUserCallback() != null) { - user = this.getUserCallback().getName(); - } else { - user = this.getUsername(); - } - - String password = this.getPassword(); - PasswordCallback passwordCallback = this.getPasswordCallback(); - if (passwordCallback != null) { - if (passwordCallback instanceof DruidPasswordCallback) { - DruidPasswordCallback druidPasswordCallback = (DruidPasswordCallback)passwordCallback; - druidPasswordCallback.setUrl(url); - druidPasswordCallback.setProperties(connectProperties); - } - - char[] chars = passwordCallback.getPassword(); - if (chars != null) { - password = new String(chars); - } - } - - Properties physicalConnectProperties = new Properties(); - if (connectProperties != null) { - physicalConnectProperties.putAll(connectProperties); - } - - if (user != null && user.length() != 0) { - physicalConnectProperties.put("user", user); - } - - if (password != null && password.length() != 0) { - physicalConnectProperties.put("password", password); - } - - Connection conn = null; - long connectStartNanos = System.nanoTime(); - Map variables = this.initVariants ? new HashMap() : null; - Map globalVariables = this.initGlobalVariants ? new HashMap() : null; - createStartNanosUpdater.set(this, connectStartNanos); - creatingCountUpdater.incrementAndGet(this); - boolean var27 = false; - - long connectedNanos; - long initedNanos; - long validatedNanos; - try { - var27 = true; - conn = this.createPhysicalConnection(url, physicalConnectProperties); - connectedNanos = System.nanoTime(); - if (conn == null) { - throw new SQLException("connect error, url " + url + ", driverClass " + this.driverClass); - } - - this.initPhysicalConnection(conn, variables, globalVariables); - initedNanos = System.nanoTime(); - this.validateConnection(conn); - validatedNanos = System.nanoTime(); - this.setFailContinuous(false); - this.setCreateError((Throwable)null); - var27 = false; - } catch (SQLException var28) { - this.setCreateError(var28); - JdbcUtils.close(conn); - throw var28; - } catch (RuntimeException var29) { - this.setCreateError(var29); - JdbcUtils.close(conn); - throw var29; - } catch (Error var30) { - createErrorCountUpdater.incrementAndGet(this); - this.setCreateError(var30); - JdbcUtils.close(conn); - throw var30; - } finally { - if (var27) { - long nano = System.nanoTime() - connectStartNanos; - this.createTimespan += nano; - creatingCountUpdater.decrementAndGet(this); - } - } - - long nano = System.nanoTime() - connectStartNanos; - this.createTimespan += nano; - creatingCountUpdater.decrementAndGet(this); - return new PhysicalConnectionInfo(conn, connectStartNanos, connectedNanos, initedNanos, validatedNanos, variables, globalVariables); - } - - protected void setCreateError(Throwable ex) { - if (ex == null) { - this.lock.lock(); - - try { - if (this.createError != null) { - this.createError = null; - } - } finally { - this.lock.unlock(); - } - - } else { - createErrorCountUpdater.incrementAndGet(this); - long now = System.currentTimeMillis(); - this.lock.lock(); - - try { - this.createError = ex; - this.lastCreateError = ex; - this.lastCreateErrorTimeMillis = now; - } finally { - this.lock.unlock(); - } - - } - } - - public boolean isFailContinuous() { - return failContinuousUpdater.get(this) == 1; - } - - protected void setFailContinuous(boolean fail) { - if (fail) { - failContinuousTimeMillisUpdater.set(this, System.currentTimeMillis()); - } else { - failContinuousTimeMillisUpdater.set(this, 0L); - } - - boolean currentState = failContinuousUpdater.get(this) == 1; - if (currentState != fail) { - if (fail) { - failContinuousUpdater.set(this, 1); - if (LOG.isInfoEnabled()) { - LOG.info("{dataSource-" + this.getID() + "} failContinuous is true"); - } - } else { - failContinuousUpdater.set(this, 0); - if (LOG.isInfoEnabled()) { - LOG.info("{dataSource-" + this.getID() + "} failContinuous is false"); - } - } - - } - } - - public void initPhysicalConnection(Connection conn) throws SQLException { - this.initPhysicalConnection(conn, (Map)null, (Map)null); - } - - public void initPhysicalConnection(Connection conn, Map variables, Map globalVariables) throws SQLException { - if (conn.getAutoCommit() != this.defaultAutoCommit) { - conn.setAutoCommit(this.defaultAutoCommit); - } - - if (this.defaultReadOnly != null && conn.isReadOnly() != this.defaultReadOnly) { - conn.setReadOnly(this.defaultReadOnly); - } - - if (this.getDefaultTransactionIsolation() != null && conn.getTransactionIsolation() != this.getDefaultTransactionIsolation()) { - conn.setTransactionIsolation(this.getDefaultTransactionIsolation()); - } - - if (this.getDefaultCatalog() != null && this.getDefaultCatalog().length() != 0) { - conn.setCatalog(this.getDefaultCatalog()); - } - - Collection initSqls = this.getConnectionInitSqls(); - if (initSqls.size() != 0 || variables != null || globalVariables != null) { - Statement stmt = null; - - try { - stmt = conn.createStatement(); - Iterator var6 = initSqls.iterator(); - - String name; - while(var6.hasNext()) { - name = (String)var6.next(); - if (name != null) { - stmt.execute(name); - } - } - - if ("mysql".equals(this.dbType) || "aliyun_ads".equals(this.dbType)) { - ResultSet rs; - Object value; - if (variables != null) { - rs = null; - - try { - rs = stmt.executeQuery("show variables"); - - while(rs.next()) { - name = rs.getString(1); - value = rs.getObject(2); - variables.put(name, value); - } - } finally { - JdbcUtils.close(rs); - } - } - - if (globalVariables != null) { - rs = null; - - try { - rs = stmt.executeQuery("show global variables"); - - while(rs.next()) { - name = rs.getString(1); - value = rs.getObject(2); - globalVariables.put(name, value); - } - } finally { - JdbcUtils.close(rs); - } - } - } - } finally { - JdbcUtils.close(stmt); - } - - } - } - - public abstract int getActivePeak(); - - public CompositeDataSupport getCompositeData() throws JMException { - JdbcDataSourceStat stat = this.getDataSourceStat(); - Map map = new HashMap(); - map.put("ID", this.getID()); - map.put("URL", this.getUrl()); - map.put("Name", this.getName()); - map.put("FilterClasses", this.getFilterClasses()); - map.put("CreatedTime", this.getCreatedTime()); - map.put("RawDriverClassName", this.getDriverClassName()); - map.put("RawUrl", this.getUrl()); - map.put("RawDriverMajorVersion", this.getRawDriverMajorVersion()); - map.put("RawDriverMinorVersion", this.getRawDriverMinorVersion()); - map.put("Properties", this.getProperties()); - map.put("ConnectionActiveCount", (long)this.getActiveCount()); - map.put("ConnectionActiveCountMax", this.getActivePeak()); - map.put("ConnectionCloseCount", this.getCloseCount()); - map.put("ConnectionCommitCount", this.getCommitCount()); - map.put("ConnectionRollbackCount", this.getRollbackCount()); - map.put("ConnectionConnectLastTime", stat.getConnectionStat().getConnectLastTime()); - map.put("ConnectionConnectErrorCount", this.getCreateCount()); - if (this.createError != null) { - map.put("ConnectionConnectErrorLastTime", this.getLastCreateErrorTime()); - map.put("ConnectionConnectErrorLastMessage", this.createError.getMessage()); - map.put("ConnectionConnectErrorLastStackTrace", Utils.getStackTrace(this.createError)); - } else { - map.put("ConnectionConnectErrorLastTime", (Object)null); - map.put("ConnectionConnectErrorLastMessage", (Object)null); - map.put("ConnectionConnectErrorLastStackTrace", (Object)null); - } - - map.put("StatementCreateCount", stat.getStatementStat().getCreateCount()); - map.put("StatementPrepareCount", stat.getStatementStat().getPrepareCount()); - map.put("StatementPreCallCount", stat.getStatementStat().getPrepareCallCount()); - map.put("StatementExecuteCount", stat.getStatementStat().getExecuteCount()); - map.put("StatementRunningCount", stat.getStatementStat().getRunningCount()); - map.put("StatementConcurrentMax", stat.getStatementStat().getConcurrentMax()); - map.put("StatementCloseCount", stat.getStatementStat().getCloseCount()); - map.put("StatementErrorCount", stat.getStatementStat().getErrorCount()); - map.put("StatementLastErrorTime", (Object)null); - map.put("StatementLastErrorMessage", (Object)null); - map.put("StatementLastErrorStackTrace", (Object)null); - map.put("StatementExecuteMillisTotal", stat.getStatementStat().getMillisTotal()); - map.put("StatementExecuteLastTime", stat.getStatementStat().getExecuteLastTime()); - map.put("ConnectionConnectingCount", stat.getConnectionStat().getConnectingCount()); - map.put("ResultSetCloseCount", stat.getResultSetStat().getCloseCount()); - map.put("ResultSetOpenCount", stat.getResultSetStat().getOpenCount()); - map.put("ResultSetOpenningCount", stat.getResultSetStat().getOpeningCount()); - map.put("ResultSetOpenningMax", stat.getResultSetStat().getOpeningMax()); - map.put("ResultSetFetchRowCount", stat.getResultSetStat().getFetchRowCount()); - map.put("ResultSetLastOpenTime", stat.getResultSetStat().getLastOpenTime()); - map.put("ResultSetErrorCount", stat.getResultSetStat().getErrorCount()); - map.put("ResultSetOpenningMillisTotal", stat.getResultSetStat().getAliveMillisTotal()); - map.put("ResultSetLastErrorTime", stat.getResultSetStat().getLastErrorTime()); - map.put("ResultSetLastErrorMessage", (Object)null); - map.put("ResultSetLastErrorStackTrace", (Object)null); - map.put("ConnectionConnectCount", this.getConnectCount()); - if (this.createError != null) { - map.put("ConnectionErrorLastMessage", this.createError.getMessage()); - map.put("ConnectionErrorLastStackTrace", Utils.getStackTrace(this.createError)); - } else { - map.put("ConnectionErrorLastMessage", (Object)null); - map.put("ConnectionErrorLastStackTrace", (Object)null); - } - - map.put("ConnectionConnectMillisTotal", stat.getConnectionStat().getConnectMillis()); - map.put("ConnectionConnectingCountMax", stat.getConnectionStat().getConnectingMax()); - map.put("ConnectionConnectMillisMax", stat.getConnectionStat().getConnectMillisMax()); - map.put("ConnectionErrorLastTime", stat.getConnectionStat().getErrorLastTime()); - map.put("ConnectionAliveMillisMax", stat.getConnectionConnectAliveMillisMax()); - map.put("ConnectionAliveMillisMin", stat.getConnectionConnectAliveMillisMin()); - map.put("ConnectionHistogram", stat.getConnectionHistogramValues()); - map.put("StatementHistogram", stat.getStatementStat().getHistogramValues()); - return new CompositeDataSupport(JdbcStatManager.getDataSourceCompositeType(), map); - } - - public long getID() { - return this.id; - } - - public Date getCreatedTime() { - return this.createdTime; - } - - public abstract int getRawDriverMajorVersion(); - - public abstract int getRawDriverMinorVersion(); - - public abstract String getProperties(); - - public Logger getParentLogger() throws SQLFeatureNotSupportedException { - throw new SQLFeatureNotSupportedException(); - } - - public void closePreapredStatement(PreparedStatementHolder stmtHolder) { - if (stmtHolder != null) { - closedPreparedStatementCountUpdater.incrementAndGet(this); - this.decrementCachedPreparedStatementCount(); - this.incrementCachedPreparedStatementDeleteCount(); - JdbcUtils.close(stmtHolder.statement); - } - } - - protected void cloneTo(DruidAbstractDataSource to) { - to.defaultAutoCommit = this.defaultAutoCommit; - to.defaultReadOnly = this.defaultReadOnly; - to.defaultTransactionIsolation = this.defaultTransactionIsolation; - to.defaultCatalog = this.defaultCatalog; - to.name = this.name; - to.username = this.username; - to.password = this.password; - to.jdbcUrl = this.jdbcUrl; - to.driverClass = this.driverClass; - to.connectProperties = this.connectProperties; - to.passwordCallback = this.passwordCallback; - to.userCallback = this.userCallback; - to.initialSize = this.initialSize; - to.maxActive = this.maxActive; - to.minIdle = this.minIdle; - to.maxIdle = this.maxIdle; - to.maxWait = this.maxWait; - to.validationQuery = this.validationQuery; - to.validationQueryTimeout = this.validationQueryTimeout; - to.testOnBorrow = this.testOnBorrow; - to.testOnReturn = this.testOnReturn; - to.testWhileIdle = this.testWhileIdle; - to.poolPreparedStatements = this.poolPreparedStatements; - to.sharePreparedStatements = this.sharePreparedStatements; - to.maxPoolPreparedStatementPerConnectionSize = this.maxPoolPreparedStatementPerConnectionSize; - to.logWriter = this.logWriter; - if (this.filters != null) { - to.filters = new ArrayList(this.filters); - } - - to.exceptionSorter = this.exceptionSorter; - to.driver = this.driver; - to.queryTimeout = this.queryTimeout; - to.transactionQueryTimeout = this.transactionQueryTimeout; - to.accessToUnderlyingConnectionAllowed = this.accessToUnderlyingConnectionAllowed; - to.timeBetweenEvictionRunsMillis = this.timeBetweenEvictionRunsMillis; - to.numTestsPerEvictionRun = this.numTestsPerEvictionRun; - to.minEvictableIdleTimeMillis = this.minEvictableIdleTimeMillis; - to.removeAbandoned = this.removeAbandoned; - to.removeAbandonedTimeoutMillis = this.removeAbandonedTimeoutMillis; - to.logAbandoned = this.logAbandoned; - to.maxOpenPreparedStatements = this.maxOpenPreparedStatements; - if (this.connectionInitSqls != null) { - to.connectionInitSqls = new ArrayList(this.connectionInitSqls); - } - - to.dbType = this.dbType; - to.timeBetweenConnectErrorMillis = this.timeBetweenConnectErrorMillis; - to.validConnectionChecker = this.validConnectionChecker; - to.connectionErrorRetryAttempts = this.connectionErrorRetryAttempts; - to.breakAfterAcquireFailure = this.breakAfterAcquireFailure; - to.transactionThresholdMillis = this.transactionThresholdMillis; - to.dupCloseLogEnable = this.dupCloseLogEnable; - to.isOracle = this.isOracle; - to.useOracleImplicitCache = this.useOracleImplicitCache; - to.asyncCloseConnectionEnable = this.asyncCloseConnectionEnable; - to.createScheduler = this.createScheduler; - to.destroyScheduler = this.destroyScheduler; - } - - public abstract void discardConnection(Connection var1); - - public boolean isAsyncCloseConnectionEnable() { - return this.isRemoveAbandoned() ? true : this.asyncCloseConnectionEnable; - } - - public void setAsyncCloseConnectionEnable(boolean asyncCloseConnectionEnable) { - this.asyncCloseConnectionEnable = asyncCloseConnectionEnable; - } - - public ScheduledExecutorService getCreateScheduler() { - return this.createScheduler; - } - - public void setCreateScheduler(ScheduledExecutorService createScheduler) { - if (this.isInited()) { - throw new DruidRuntimeException("dataSource inited."); - } else { - this.createScheduler = createScheduler; - } - } - - public ScheduledExecutorService getDestroyScheduler() { - return this.destroyScheduler; - } - - public void setDestroyScheduler(ScheduledExecutorService destroyScheduler) { - if (this.isInited()) { - throw new DruidRuntimeException("dataSource inited."); - } else { - this.destroyScheduler = destroyScheduler; - } - } - - public boolean isInited() { - return this.inited; - } - - public int getMaxCreateTaskCount() { - return this.maxCreateTaskCount; - } - - public void setMaxCreateTaskCount(int maxCreateTaskCount) { - if (maxCreateTaskCount < 1) { - throw new IllegalArgumentException(); - } else { - this.maxCreateTaskCount = maxCreateTaskCount; - } - } - - public boolean isFailFast() { - return this.failFast; - } - - public void setFailFast(boolean failFast) { - this.failFast = failFast; - } - - public int getOnFatalErrorMaxActive() { - return this.onFatalErrorMaxActive; - } - - public void setOnFatalErrorMaxActive(int onFatalErrorMaxActive) { - this.onFatalErrorMaxActive = onFatalErrorMaxActive; - } - - public boolean isOnFatalError() { - return this.onFatalError; - } - - public boolean isInitExceptionThrow() { - return this.initExceptionThrow; - } - - public void setInitExceptionThrow(boolean initExceptionThrow) { - this.initExceptionThrow = initExceptionThrow; - } - - public static class PhysicalConnectionInfo { - private Connection connection; - private long connectStartNanos; - private long connectedNanos; - private long initedNanos; - private long validatedNanos; - private Map vairiables; - private Map globalVairiables; - long createTaskId; - - public PhysicalConnectionInfo(Connection connection, long connectStartNanos, long connectedNanos, long initedNanos, long validatedNanos) { - this(connection, connectStartNanos, connectedNanos, initedNanos, validatedNanos, (Map)null, (Map)null); - } - - public PhysicalConnectionInfo(Connection connection, long connectStartNanos, long connectedNanos, long initedNanos, long validatedNanos, Map vairiables, Map globalVairiables) { - this.connection = connection; - this.connectStartNanos = connectStartNanos; - this.connectedNanos = connectedNanos; - this.initedNanos = initedNanos; - this.validatedNanos = validatedNanos; - this.vairiables = vairiables; - this.globalVairiables = globalVairiables; - } - - public Connection getPhysicalConnection() { - return this.connection; - } - - public long getConnectStartNanos() { - return this.connectStartNanos; - } - - public long getConnectedNanos() { - return this.connectedNanos; - } - - public long getInitedNanos() { - return this.initedNanos; - } - - public long getValidatedNanos() { - return this.validatedNanos; - } - - public long getConnectNanoSpan() { - return this.connectedNanos - this.connectStartNanos; - } - - public Map getVairiables() { - return this.vairiables; - } - - public Map getGlobalVairiables() { - return this.globalVairiables; - } - } -} diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/JudgeServerApplication.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/JudgeServerApplication.java deleted file mode 100644 index 115e2e3..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/JudgeServerApplication.java +++ /dev/null @@ -1,22 +0,0 @@ -package top.hcode.hoj; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.cloud.client.discovery.EnableDiscoveryClient; -import org.springframework.scheduling.annotation.EnableAsync; -import org.springframework.transaction.annotation.EnableTransactionManagement; - -/** - * @Author: Himit_ZH - * @Date: 2020/10/29 22:12 - * @Description: 判题机服务系统启动类 - */ -@EnableDiscoveryClient -@SpringBootApplication -@EnableAsync(proxyTargetClass=true) //开启异步注解 -@EnableTransactionManagement -public class JudgeServerApplication { - public static void main(String[] args) { - SpringApplication.run(JudgeServerApplication.class,args); - } -} \ No newline at end of file diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/common/CommonResult.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/common/CommonResult.java deleted file mode 100644 index 8bbde9a..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/common/CommonResult.java +++ /dev/null @@ -1,73 +0,0 @@ -package top.hcode.hoj.common; - -import lombok.Data; - -@Data -public class CommonResult{ - - private final Integer status; // 状态码 - - private final T data; // 返回的数据 - - private final String msg; // 自定义信息 - - - /** - * 成功的结果 - * - * @param data 返回结果 - * @param msg 返回信息 - */ - public static CommonResult successResponse(T data, String msg) { - return new CommonResult<>(ResultStatus.SUCCESS.getStatus(), data, msg); - } - - - /** - * 成功的结果 - * - * @param data 返回结果 - */ - public static CommonResult successResponse(T data) { - return new CommonResult(ResultStatus.SUCCESS.getStatus(), data, "success"); - } - - /** - * 成功的结果 - * - * @param msg 返回信息 - */ - public static CommonResult successResponse(String msg) { - return new CommonResult(ResultStatus.SUCCESS.getStatus(), null, msg); - } - - /** - * 成功的结果 - */ - public static CommonResult successResponse() { - return new CommonResult(ResultStatus.SUCCESS.getStatus(), null, "success"); - } - - - /** - * 失败的结果,无异常 - * - * @param msg 返回信息 - */ - public static CommonResult errorResponse(String msg) { - return new CommonResult(ResultStatus.FAIL.getStatus(), null, msg); - } - - public static CommonResult errorResponse(ResultStatus resultStatus) { - return new CommonResult(resultStatus.getStatus(), null, resultStatus.getDescription()); - } - - public static CommonResult errorResponse(String msg, ResultStatus resultStatus) { - return new CommonResult(resultStatus.getStatus(), null, msg); - } - - public static CommonResult errorResponse(String msg, Integer status) { - return new CommonResult(status, null, msg); - } - -} \ No newline at end of file diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/common/ResultStatus.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/common/ResultStatus.java deleted file mode 100644 index aa1329e..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/common/ResultStatus.java +++ /dev/null @@ -1,31 +0,0 @@ -package top.hcode.hoj.common; - -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/9 15:17 - * @Description: - */ -@Getter -@AllArgsConstructor -public enum ResultStatus { - - SUCCESS(200,"成功"), - - FAIL(400,"失败"), - - ACCESS_DENIED(401,"访问受限"), - - FORBIDDEN(403,"拒绝访问"), - - NOT_FOUND(404,"数据不存在"), - - SYSTEM_ERROR(500,"系统错误"); - - - private int status; - - private String description; -} \ No newline at end of file diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/common/exception/CompileError.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/common/exception/CompileError.java deleted file mode 100644 index 1db9227..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/common/exception/CompileError.java +++ /dev/null @@ -1,22 +0,0 @@ -package top.hcode.hoj.common.exception; - -import lombok.Data; - -/** - * @Author: Himit_ZH - * @Date: 2021/1/31 00:16 - * @Description: - */ -@Data -public class CompileError extends Exception { - private String message; - private String stdout; - private String stderr; - - public CompileError(String message, String stdout, String stderr) { - super(message); - this.message = message; - this.stdout = stdout; - this.stderr = stderr; - } -} \ No newline at end of file diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/common/exception/RuntimeError.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/common/exception/RuntimeError.java deleted file mode 100644 index ad97b38..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/common/exception/RuntimeError.java +++ /dev/null @@ -1,22 +0,0 @@ -package top.hcode.hoj.common.exception; - -import lombok.Data; - -/** - * @Author: Himit_ZH - * @Date: 2021/1/31 00:16 - * @Description: - */ -@Data -public class RuntimeError extends Exception { - private String message; - private String stdout; - private String stderr; - - public RuntimeError(String message, String stdout, String stderr) { - super(message); - this.message = message; - this.stdout = stdout; - this.stderr = stderr; - } -} \ No newline at end of file diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/common/exception/SubmitError.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/common/exception/SubmitError.java deleted file mode 100644 index 44e007c..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/common/exception/SubmitError.java +++ /dev/null @@ -1,22 +0,0 @@ -package top.hcode.hoj.common.exception; - -import lombok.Data; - -/** - * @Author: Himit_ZH - * @Date: 2021/4/16 13:52 - * @Description: - */ -@Data -public class SubmitError extends Exception { - private String message; - private String stdout; - private String stderr; - - public SubmitError(String message, String stdout, String stderr) { - super(message); - this.message = message; - this.stdout = stdout; - this.stderr = stderr; - } -} \ No newline at end of file diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/common/exception/SystemError.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/common/exception/SystemError.java deleted file mode 100644 index 003442d..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/common/exception/SystemError.java +++ /dev/null @@ -1,23 +0,0 @@ -package top.hcode.hoj.common.exception; - -import lombok.Data; - -/** - * @Author: Himit_ZH - * @Date: 2021/1/31 00:17 - * @Description: - */ -@Data -public class SystemError extends Exception { - private String message; - private String stdout; - private String stderr; - - public SystemError(String message, String stdout, String stderr) { - super(message + " " + stderr); - this.message = message; - this.stdout = stdout; - this.stderr = stderr; - } - -} \ No newline at end of file diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/config/AsyncTaskConfig.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/config/AsyncTaskConfig.java deleted file mode 100644 index ec77a4b..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/config/AsyncTaskConfig.java +++ /dev/null @@ -1,48 +0,0 @@ -package top.hcode.hoj.config; - -import org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler; -import org.springframework.context.annotation.Configuration; -import org.springframework.scheduling.annotation.AsyncConfigurer; -import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; - -import java.util.concurrent.Executor; -import java.util.concurrent.ThreadPoolExecutor; - -/** - * @Author: Himit_ZH - * @Date: 2020/11/6 23:36 - * @Description: - */ -@Configuration -public class AsyncTaskConfig implements AsyncConfigurer { - @Override - public Executor getAsyncExecutor() { - ThreadPoolTaskExecutor taskExecutor = new ThreadPoolTaskExecutor(); - // 线程池维护线程的最少数量 - taskExecutor.setCorePoolSize(10); - // 线程池维护线程的最大数量 - taskExecutor.setMaxPoolSize(50); - // 缓存队列 - taskExecutor.setQueueCapacity(200); - //活跃时间 - taskExecutor.setKeepAliveSeconds(10); - // 对拒绝task的处理策略 - //(1) 默认的ThreadPoolExecutor.AbortPolicy 处理程序遭到拒绝将抛出运行时RejectedExecutionException; - //(2) ThreadPoolExecutor.CallerRunsPolicy 线程调用运行该任务的 execute 本身。此策略提供简单的反馈控制机制,能够减缓新任务的提交速度 - //(3) ThreadPoolExecutor.DiscardPolicy 不能执行的任务将被删除; - //(4) ThreadPoolExecutor.DiscardOldestPolicy 如果执行程序尚未关闭,则位于工作队列头部的任务将被删除,然后重试执行程序(如果再次失败,则重复此过程) - taskExecutor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy()); - // 线程名前缀,方便排查问题 - taskExecutor.setThreadNamePrefix("order-send-thread-"); - // 注意一定要初始化 - taskExecutor.initialize(); - - return taskExecutor; - - } - - @Override - public AsyncUncaughtExceptionHandler getAsyncUncaughtExceptionHandler() { - return null; - } -} \ No newline at end of file diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/config/DruidConfiguration.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/config/DruidConfiguration.java deleted file mode 100644 index d2e63de..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/config/DruidConfiguration.java +++ /dev/null @@ -1,65 +0,0 @@ -package top.hcode.hoj.config; - -import com.alibaba.druid.pool.DruidDataSource; -import lombok.Data; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.cloud.context.config.annotation.RefreshScope; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; - -/** - * @Author: Himit_ZH - * @Date: 2021/5/21 17:57 - * @Description: - */ -@Configuration -@RefreshScope -@Data -public class DruidConfiguration { - - @Value("${hoj.db.username:root}") - private String username; - - @Value("${hoj.db.password:hoj123456}") - private String password; - - @Value("${hoj.db.public-host:172.20.0.3}") - private String host; - - @Value("${hoj.db.port:3306}") - private Integer port; - - @Value("${hoj.db.name:hoj}") - private String name; - - @Value("${spring.datasource.driver-class-name}") - private String driverClassName; - - @Value("${spring.datasource.initial-size}") - private Integer initialSize; - - @Value("${spring.datasource.min-idle}") - private Integer minIdle; - - @Value("${spring.datasource.maxActive}") - private Integer maxActive; - - @Value("${spring.datasource.maxWait}") - private Integer maxWait; - - @Bean(name = "datasource") - @RefreshScope - public DruidDataSource dataSource() { - DruidDataSource datasource = new DruidDataSource(); - String url = "jdbc:mysql://" + host + ":" + port + "/" + name + "?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai&allowMultiQueries=true&rewriteBatchedStatements=true"; - datasource.setUrl(url); - datasource.setUsername(username); - datasource.setPassword(password); - datasource.setDriverClassName(driverClassName); - datasource.setMaxActive(maxActive); - datasource.setInitialSize(initialSize); - datasource.setMinIdle(minIdle); - datasource.setMaxWait(maxWait); - return datasource; - } -} \ No newline at end of file diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/config/MyMetaObjectConfig.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/config/MyMetaObjectConfig.java deleted file mode 100644 index 4a28463..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/config/MyMetaObjectConfig.java +++ /dev/null @@ -1,27 +0,0 @@ -package top.hcode.hoj.config; - -import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler; -import org.apache.ibatis.reflection.MetaObject; -import org.springframework.stereotype.Component; - -import java.util.Date; - -/** - * @Author: Himit_ZH - * @Date: 2020/12/4 14:14 - * @Description: 处理mybatis-plus自动填充时间 - */ -@Component -public class MyMetaObjectConfig implements MetaObjectHandler { - - @Override - public void insertFill(MetaObject metaObject) { - this.setFieldValByName("gmtCreate",new Date(),metaObject); - this.setFieldValByName("gmtModified",new Date(),metaObject); - } - - @Override - public void updateFill(MetaObject metaObject) { - this.setFieldValByName("gmtModified", new Date(), metaObject); - } -} \ No newline at end of file diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/config/MybatisPlusConfig.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/config/MybatisPlusConfig.java deleted file mode 100644 index 5f81911..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/config/MybatisPlusConfig.java +++ /dev/null @@ -1,24 +0,0 @@ -package top.hcode.hoj.config; -import com.baomidou.mybatisplus.extension.plugins.OptimisticLockerInterceptor; -import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor; -import org.mybatis.spring.annotation.MapperScan; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.transaction.annotation.EnableTransactionManagement; - -/** - * @Author: Himit_ZH - * @Date: 2020/7/19 21:04 - * @Description: - */ -@Configuration -@EnableTransactionManagement -@MapperScan("top.hcode.hoj.mapper") -public class MybatisPlusConfig { - - // 注册乐观锁插件 - @Bean - public OptimisticLockerInterceptor optimisticLockerInterceptor() { - return new OptimisticLockerInterceptor(); - } -} \ No newline at end of file diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/config/NacosConfig.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/config/NacosConfig.java deleted file mode 100644 index aedb0f1..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/config/NacosConfig.java +++ /dev/null @@ -1,75 +0,0 @@ -package top.hcode.hoj.config; - -import com.alibaba.cloud.nacos.NacosDiscoveryProperties; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.Primary; -import top.hcode.hoj.util.IpUtils; - -import java.util.HashMap; - -/** - * @Author: Himit_ZH - * @Date: 2021/2/6 00:46 - * @Description: - */ -@Configuration -public class NacosConfig { - - private static final int cpuNum = Runtime.getRuntime().availableProcessors(); - - - @Value("${hoj-judge-server.max-task-num}") - private Integer maxTaskNum; - - @Value("${hoj-judge-server.remote-judge.max-task-num}") - private Integer maxRemoteTaskNum; - - @Value("${hoj-judge-server.remote-judge.open}") - private Boolean openRemoteJudge; - - @Value("${hoj-judge-server.ip}") - private String ip; - - @Value("${hoj-judge-server.port}") - private Integer port; - - @Value("${hoj-judge-server.name}") - private String name; - - - /** - * 用于改变程序自动获取的本机ip - */ - @Bean - @Primary - public NacosDiscoveryProperties nacosProperties() { - NacosDiscoveryProperties nacosDiscoveryProperties = new NacosDiscoveryProperties(); - //此处我只改了ip,其他参数可以根据自己的需求改变 - nacosDiscoveryProperties.setIp(IpUtils.getServiceIp()); - HashMap meta = new HashMap<>(); - int max = cpuNum * 2 + 1; - if (maxTaskNum != -1) { - max = maxTaskNum; - } - meta.put("maxTaskNum", String.valueOf(max)); - if (openRemoteJudge) { - max = (cpuNum * 2 + 1) * 2; - if (maxRemoteTaskNum != -1) { - max = maxRemoteTaskNum; - } - meta.put("maxRemoteTaskNum", String.valueOf(max)); - } - meta.put("judgeName", name); - nacosDiscoveryProperties.setMetadata(meta); - if (!ip.equals("-1")) { - nacosDiscoveryProperties.setIp(ip); - } - nacosDiscoveryProperties.setPort(port); - - nacosDiscoveryProperties.setService("hoj-judge-server"); - return nacosDiscoveryProperties; - } - -} \ No newline at end of file diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/config/RestTemplateConfig.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/config/RestTemplateConfig.java deleted file mode 100644 index 828506b..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/config/RestTemplateConfig.java +++ /dev/null @@ -1,23 +0,0 @@ -package top.hcode.hoj.config; - -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.http.client.ClientHttpRequestFactory; -import org.springframework.http.client.SimpleClientHttpRequestFactory; -import org.springframework.web.client.RestTemplate; - -@Configuration -public class RestTemplateConfig { - @Bean - public RestTemplate restTemplate(ClientHttpRequestFactory factory) { - return new RestTemplate(factory); - } - - @Bean - public ClientHttpRequestFactory simpleClientHttpRequestFactory() { - SimpleClientHttpRequestFactory factory = new SimpleClientHttpRequestFactory(); - factory.setReadTimeout(90000);//单位为ms - factory.setConnectTimeout(10000);//单位为ms - return factory; - } -} \ No newline at end of file diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/config/StartupRunner.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/config/StartupRunner.java deleted file mode 100644 index 37738b4..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/config/StartupRunner.java +++ /dev/null @@ -1,97 +0,0 @@ -package top.hcode.hoj.config; - -import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; -import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.boot.CommandLineRunner; -import org.springframework.stereotype.Component; -import org.springframework.transaction.annotation.Transactional; -import top.hcode.hoj.dao.JudgeServerEntityService; -import top.hcode.hoj.pojo.entity.judge.JudgeServer; -import top.hcode.hoj.util.IpUtils; - -import java.util.HashMap; - - -/** - * @Author: Himit_ZH - * @Date: 2021/2/19 22:11 - * @Description:项目启动加载类,启动完毕将该判题机加入到redis里面 - */ -@Component -@Slf4j -public class StartupRunner implements CommandLineRunner { - - @Value("${hoj-judge-server.max-task-num}") - private Integer maxTaskNum; - - @Value("${hoj-judge-server.remote-judge.max-task-num}") - private Integer maxRemoteTaskNum; - - @Value("${hoj-judge-server.remote-judge.open}") - private Boolean openRemoteJudge; - - @Value("${hoj-judge-server.name}") - private String name; - - @Value("${hoj-judge-server.ip}") - private String ip; - - @Value("${hoj-judge-server.port}") - private Integer port; - - private static final int cpuNum = Runtime.getRuntime().availableProcessors(); - - @Autowired - private JudgeServerEntityService judgeServerEntityService; - - @Override - @Transactional - public void run(String... args) { - - log.info("IP of the current judge server:" + ip); - log.info("Port of the current judge server:" + port); - - if (maxTaskNum == -1) { - maxTaskNum = cpuNum + 1; - } - if (ip.equals("-1")) { - ip = IpUtils.getLocalIpv4Address(); - } - UpdateWrapper judgeServerQueryWrapper = new UpdateWrapper<>(); - judgeServerQueryWrapper.eq("ip", ip).eq("port", port); - judgeServerEntityService.remove(judgeServerQueryWrapper); - boolean isOk1 = judgeServerEntityService.save(new JudgeServer() - .setCpuCore(cpuNum) - .setIp(ip) - .setPort(port) - .setUrl(ip + ":" + port) - .setMaxTaskNumber(maxTaskNum) - .setIsRemote(false) - .setName(name)); - boolean isOk2 = true; - if (openRemoteJudge) { - if (maxRemoteTaskNum == -1) { - maxRemoteTaskNum = cpuNum * 2 + 1; - } - isOk2 = judgeServerEntityService.save(new JudgeServer() - .setCpuCore(cpuNum) - .setIp(ip) - .setPort(port) - .setUrl(ip + ":" + port) - .setMaxTaskNumber(maxRemoteTaskNum) - .setIsRemote(true) - .setName(name)); - } - - if (!isOk1 || !isOk2) { - log.error("初始化判题机信息到数据库失败,请重新启动试试!"); - } else { - HashMap judgeServerInfo = judgeServerEntityService.getJudgeServerInfo(); - log.info("HOJ-JudgeServer had successfully started! The judge config and sandbox config Info:" + judgeServerInfo); - } - - } - -} \ No newline at end of file diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/controller/JudgeController.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/controller/JudgeController.java deleted file mode 100644 index 84f1537..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/controller/JudgeController.java +++ /dev/null @@ -1,138 +0,0 @@ -package top.hcode.hoj.controller; - - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.cloud.context.config.annotation.RefreshScope; -import org.springframework.util.StringUtils; -import org.springframework.web.bind.annotation.*; -import top.hcode.hoj.common.CommonResult; -import top.hcode.hoj.common.ResultStatus; -import top.hcode.hoj.common.exception.SystemError; -import top.hcode.hoj.dao.JudgeServerEntityService; -import top.hcode.hoj.pojo.dto.CompileDTO; -import top.hcode.hoj.pojo.dto.TestJudgeReq; -import top.hcode.hoj.pojo.dto.TestJudgeRes; -import top.hcode.hoj.pojo.entity.judge.Judge; -import top.hcode.hoj.pojo.dto.ToJudgeDTO; -import top.hcode.hoj.service.JudgeService; - -import java.util.HashMap; - - -/** - * @Author: Himit_ZH - * @Date: 2020/10/29 22:22 - * @Description: 处理代码提交 - */ -@RestController -@RefreshScope -public class JudgeController { - - @Autowired - private JudgeService judgeService; - - @Value("${hoj.judge.token}") - private String judgeToken; - - @Value("${hoj-judge-server.remote-judge.open}") - private Boolean openRemoteJudge; - - @Autowired - private JudgeServerEntityService judgeServerEntityService; - - @RequestMapping("/version") - public CommonResult> getVersion() { - return CommonResult.successResponse(judgeServerEntityService.getJudgeServerInfo(), "运行正常"); - } - - @PostMapping(value = "/judge") - public CommonResult submitProblemJudge(@RequestBody ToJudgeDTO toJudgeDTO) { - - if (!toJudgeDTO.getToken().equals(judgeToken)) { - return CommonResult.errorResponse("对不起!您使用的判题服务调用凭证不正确!访问受限!", ResultStatus.ACCESS_DENIED); - } - - Judge judge = toJudgeDTO.getJudge(); - - if (judge == null || judge.getSubmitId() == null || judge.getUid() == null || judge.getPid() == null) { - return CommonResult.errorResponse("调用参数错误!请检查您的调用参数!"); - } - - judgeService.judge(judge); - - return CommonResult.successResponse("判题机评测完成!"); - } - - - @PostMapping(value = "/test-judge") - public CommonResult submitProblemTestJudge(@RequestBody TestJudgeReq testJudgeReq) { - - if (testJudgeReq == null - || StringUtils.isEmpty(testJudgeReq.getCode()) - || StringUtils.isEmpty(testJudgeReq.getLanguage()) - || StringUtils.isEmpty(testJudgeReq.getUniqueKey()) - || testJudgeReq.getTimeLimit() == null - || testJudgeReq.getMemoryLimit() == null - || testJudgeReq.getStackLimit() == null) { - return CommonResult.errorResponse("调用参数错误!请检查您的调用参数!"); - } - - if (!testJudgeReq.getToken().equals(judgeToken)) { - return CommonResult.errorResponse("对不起!您使用的判题服务调用凭证不正确!访问受限!", ResultStatus.ACCESS_DENIED); - } - return CommonResult.successResponse(judgeService.testJudge(testJudgeReq)); - } - - - @PostMapping(value = "/compile-spj") - public CommonResult compileSpj(@RequestBody CompileDTO compileDTO) { - - if (!compileDTO.getToken().equals(judgeToken)) { - return CommonResult.errorResponse("对不起!您使用的判题服务调用凭证不正确!访问受限!", ResultStatus.ACCESS_DENIED); - } - - try { - judgeService.compileSpj(compileDTO.getCode(), compileDTO.getPid(), compileDTO.getLanguage(), compileDTO.getExtraFiles()); - return CommonResult.successResponse(null, "编译成功!"); - } catch (SystemError systemError) { - return CommonResult.errorResponse(systemError.getStderr(), ResultStatus.SYSTEM_ERROR); - } - } - - @PostMapping(value = "/compile-interactive") - public CommonResult compileInteractive(@RequestBody CompileDTO compileDTO) { - - if (!compileDTO.getToken().equals(judgeToken)) { - return CommonResult.errorResponse("对不起!您使用的判题服务调用凭证不正确!访问受限!", ResultStatus.ACCESS_DENIED); - } - - try { - judgeService.compileInteractive(compileDTO.getCode(), compileDTO.getPid(), compileDTO.getLanguage(), compileDTO.getExtraFiles()); - return CommonResult.successResponse(null, "编译成功!"); - } catch (SystemError systemError) { - return CommonResult.errorResponse(systemError.getStderr(), ResultStatus.SYSTEM_ERROR); - } - } - - @PostMapping(value = "/remote-judge") - public CommonResult remoteJudge(@RequestBody ToJudgeDTO toJudgeDTO) { - - if (!openRemoteJudge) { - return CommonResult.errorResponse("对不起!该判题服务器未开启远程虚拟判题功能!", ResultStatus.ACCESS_DENIED); - } - - if (!toJudgeDTO.getToken().equals(judgeToken)) { - return CommonResult.errorResponse("对不起!您使用的判题服务调用凭证不正确!访问受限!", ResultStatus.ACCESS_DENIED); - } - - - if (toJudgeDTO.getJudge() == null) { - return CommonResult.errorResponse("请求参数不能为空!"); - } - - judgeService.remoteJudge(toJudgeDTO); - - return CommonResult.successResponse("提交成功"); - } -} \ No newline at end of file diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/controller/SystemConfigController.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/controller/SystemConfigController.java deleted file mode 100644 index 49ab787..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/controller/SystemConfigController.java +++ /dev/null @@ -1,25 +0,0 @@ -package top.hcode.hoj.controller; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; -import top.hcode.hoj.service.SystemConfigService; - -import java.util.HashMap; - -/** - * @Author: Himit_ZH - * @Date: 2020/12/3 20:12 - * @Description: - */ -@RestController -public class SystemConfigController { - - @Autowired - private SystemConfigService systemConfigService; - - @RequestMapping("/get-sys-config") - public HashMap getSystemConfig(){ - return systemConfigService.getSystemConfig(); - } -} \ No newline at end of file diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/ContestEntityService.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/ContestEntityService.java deleted file mode 100644 index 6433a13..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/ContestEntityService.java +++ /dev/null @@ -1,17 +0,0 @@ -package top.hcode.hoj.dao; - - -import com.baomidou.mybatisplus.extension.service.IService; -import top.hcode.hoj.pojo.entity.contest.Contest; - -/** - *

- * 服务类 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -public interface ContestEntityService extends IService { - -} diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/ContestRecordEntityService.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/ContestRecordEntityService.java deleted file mode 100644 index a1283f0..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/ContestRecordEntityService.java +++ /dev/null @@ -1,16 +0,0 @@ -package top.hcode.hoj.dao; - -import com.baomidou.mybatisplus.extension.service.IService; -import top.hcode.hoj.pojo.entity.contest.ContestRecord; - -/** - *

- * 服务类 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -public interface ContestRecordEntityService extends IService { - void updateContestRecord(Integer score, Integer status, Long submitId, Integer useTime); -} diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/JudgeCaseEntityService.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/JudgeCaseEntityService.java deleted file mode 100644 index a09daee..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/JudgeCaseEntityService.java +++ /dev/null @@ -1,16 +0,0 @@ -package top.hcode.hoj.dao; - -import com.baomidou.mybatisplus.extension.service.IService; -import top.hcode.hoj.pojo.entity.judge.JudgeCase; - -/** - *

- * 服务类 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -public interface JudgeCaseEntityService extends IService { - -} diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/JudgeEntityService.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/JudgeEntityService.java deleted file mode 100644 index c4fe1e9..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/JudgeEntityService.java +++ /dev/null @@ -1,17 +0,0 @@ -package top.hcode.hoj.dao; - -import com.baomidou.mybatisplus.extension.service.IService; -import top.hcode.hoj.pojo.entity.judge.Judge; - - -/** - *

- * 服务类 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -public interface JudgeEntityService extends IService { - -} diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/JudgeServerEntityService.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/JudgeServerEntityService.java deleted file mode 100644 index 403d8e6..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/JudgeServerEntityService.java +++ /dev/null @@ -1,11 +0,0 @@ -package top.hcode.hoj.dao; - -import com.baomidou.mybatisplus.extension.service.IService; -import top.hcode.hoj.pojo.entity.judge.JudgeServer; - -import java.util.HashMap; - -public interface JudgeServerEntityService extends IService { - - public HashMap getJudgeServerInfo(); -} diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/ProblemCaseEntityService.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/ProblemCaseEntityService.java deleted file mode 100644 index 2f27a7d..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/ProblemCaseEntityService.java +++ /dev/null @@ -1,12 +0,0 @@ -package top.hcode.hoj.dao; - -import com.baomidou.mybatisplus.extension.service.IService; -import top.hcode.hoj.pojo.entity.problem.ProblemCase; - -/** - * @Author: Himit_ZH - * @Date: 2020/12/14 19:58 - * @Description: - */ -public interface ProblemCaseEntityService extends IService { -} \ No newline at end of file diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/ProblemCountEntityService.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/ProblemCountEntityService.java deleted file mode 100644 index 869b9b2..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/ProblemCountEntityService.java +++ /dev/null @@ -1,18 +0,0 @@ -package top.hcode.hoj.dao; - -import com.baomidou.mybatisplus.extension.service.IService; -import top.hcode.hoj.pojo.entity.problem.ProblemCount; - -/** - *

- * 服务类 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -public interface ProblemCountEntityService extends IService { - - void updateCount(int status, Long pid); - -} diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/ProblemEntityService.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/ProblemEntityService.java deleted file mode 100644 index fae253d..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/ProblemEntityService.java +++ /dev/null @@ -1,18 +0,0 @@ -package top.hcode.hoj.dao; - -import com.baomidou.mybatisplus.extension.service.IService; -import top.hcode.hoj.pojo.entity.problem.Problem; - - -/** - *

- * 服务类 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ - -public interface ProblemEntityService extends IService { - -} diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/RemoteJudgeAccountEntityService.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/RemoteJudgeAccountEntityService.java deleted file mode 100644 index 8416668..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/RemoteJudgeAccountEntityService.java +++ /dev/null @@ -1,7 +0,0 @@ -package top.hcode.hoj.dao; - -import com.baomidou.mybatisplus.extension.service.IService; -import top.hcode.hoj.pojo.entity.judge.RemoteJudgeAccount; - -public interface RemoteJudgeAccountEntityService extends IService { -} diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/UserAcproblemEntityService.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/UserAcproblemEntityService.java deleted file mode 100644 index a62e752..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/UserAcproblemEntityService.java +++ /dev/null @@ -1,16 +0,0 @@ -package top.hcode.hoj.dao; - -import com.baomidou.mybatisplus.extension.service.IService; -import top.hcode.hoj.pojo.entity.user.UserAcproblem; - -/** - *

- * 服务类 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -public interface UserAcproblemEntityService extends IService { - -} diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/UserRecordEntityService.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/UserRecordEntityService.java deleted file mode 100644 index 061c4fa..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/UserRecordEntityService.java +++ /dev/null @@ -1,18 +0,0 @@ -package top.hcode.hoj.dao; - - -import com.baomidou.mybatisplus.extension.service.IService; -import top.hcode.hoj.pojo.entity.user.UserRecord; - - -/** - *

- * 服务类 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -public interface UserRecordEntityService extends IService { - void updateRecord(String uid, Long submitId, Long pid, Integer score); -} diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/impl/ContestEntityServiceImpl.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/impl/ContestEntityServiceImpl.java deleted file mode 100644 index 24ada6b..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/impl/ContestEntityServiceImpl.java +++ /dev/null @@ -1,21 +0,0 @@ -package top.hcode.hoj.dao.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.stereotype.Service;; -import top.hcode.hoj.mapper.ContestMapper; - -import top.hcode.hoj.pojo.entity.contest.Contest; -import top.hcode.hoj.dao.ContestEntityService; - -/** - *

- * 服务实现类 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -@Service -public class ContestEntityServiceImpl extends ServiceImpl implements ContestEntityService { - -} diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/impl/ContestRecordEntityServiceImpl.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/impl/ContestRecordEntityServiceImpl.java deleted file mode 100644 index c593c07..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/impl/ContestRecordEntityServiceImpl.java +++ /dev/null @@ -1,90 +0,0 @@ -package top.hcode.hoj.dao.impl; - - -import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import top.hcode.hoj.mapper.ContestRecordMapper; -import top.hcode.hoj.pojo.entity.contest.ContestRecord; -import top.hcode.hoj.dao.ContestRecordEntityService; -import top.hcode.hoj.util.Constants; - -import java.util.Arrays; -import java.util.List; - -/** - *

- * 服务实现类 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -@Service -public class ContestRecordEntityServiceImpl extends ServiceImpl implements ContestRecordEntityService { - - @Autowired - private ContestRecordMapper contestRecordMapper; - - private static List penaltyStatus = Arrays.asList( - Constants.Judge.STATUS_PRESENTATION_ERROR.getStatus(), - Constants.Judge.STATUS_WRONG_ANSWER.getStatus(), - Constants.Judge.STATUS_TIME_LIMIT_EXCEEDED.getStatus(), - Constants.Judge.STATUS_MEMORY_LIMIT_EXCEEDED.getStatus(), - Constants.Judge.STATUS_RUNTIME_ERROR.getStatus()); - - - @Override - public void updateContestRecord(Integer score, Integer status, Long submitId, Integer useTime) { - UpdateWrapper updateWrapper = new UpdateWrapper<>(); - // 如果是AC - if (status.intValue() == Constants.Judge.STATUS_ACCEPTED.getStatus()) { - updateWrapper.set("status", Constants.Contest.RECORD_AC.getCode()); - // 部分通过 - } else if (status.intValue() == Constants.Judge.STATUS_PARTIAL_ACCEPTED.getStatus()) { - updateWrapper.set("status", Constants.Contest.RECORD_NOT_AC_NOT_PENALTY.getCode()); - // 需要被罚时的状态 - } else if (penaltyStatus.contains(status)) { - updateWrapper.set("status", Constants.Contest.RECORD_NOT_AC_PENALTY.getCode()); - - } else { - updateWrapper.set("status", Constants.Contest.RECORD_NOT_AC_NOT_PENALTY.getCode()); - } - - if (score != null) { - updateWrapper.set("score", score); - } - - updateWrapper.set("use_time", useTime); - - updateWrapper.eq("submit_id", submitId); // submit_id一定只有一个 - boolean result = contestRecordMapper.update(null, updateWrapper) > 0; - if (!result) { - tryAgainUpdate(updateWrapper); - } - } - - public void tryAgainUpdate(UpdateWrapper updateWrapper) { - boolean retryable; - int attemptNumber = 0; - do { - boolean result = contestRecordMapper.update(null, updateWrapper) > 0; - if (result) { - break; - } else { - attemptNumber++; - retryable = attemptNumber < 8; - if (attemptNumber == 8) { - log.error("更新contest_record表超过最大重试次数"); - break; - } - try { - Thread.sleep(500); - } catch (InterruptedException e) { - log.error(e.getMessage()); - } - } - } while (retryable); - } -} diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/impl/JudgeCaseEntityServiceImpl.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/impl/JudgeCaseEntityServiceImpl.java deleted file mode 100644 index b012681..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/impl/JudgeCaseEntityServiceImpl.java +++ /dev/null @@ -1,20 +0,0 @@ -package top.hcode.hoj.dao.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.stereotype.Service; -import top.hcode.hoj.mapper.JudgeCaseMapper; -import top.hcode.hoj.pojo.entity.judge.JudgeCase; -import top.hcode.hoj.dao.JudgeCaseEntityService; - -/** - *

- * 服务实现类 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -@Service -public class JudgeCaseEntityServiceImpl extends ServiceImpl implements JudgeCaseEntityService { - -} diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/impl/JudgeEntityServiceImpl.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/impl/JudgeEntityServiceImpl.java deleted file mode 100644 index a4dde44..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/impl/JudgeEntityServiceImpl.java +++ /dev/null @@ -1,21 +0,0 @@ -package top.hcode.hoj.dao.impl; - - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.stereotype.Service; -import top.hcode.hoj.mapper.JudgeMapper; -import top.hcode.hoj.pojo.entity.judge.Judge; -import top.hcode.hoj.dao.JudgeEntityService; - -/** - *

- * 服务实现类 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -@Service -public class JudgeEntityServiceImpl extends ServiceImpl implements JudgeEntityService { - -} diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/impl/JudgeServerEntityServiceImpl.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/impl/JudgeServerEntityServiceImpl.java deleted file mode 100644 index fa946c3..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/impl/JudgeServerEntityServiceImpl.java +++ /dev/null @@ -1,82 +0,0 @@ -package top.hcode.hoj.dao.impl; - -import cn.hutool.core.map.MapUtil; -import cn.hutool.json.JSONUtil; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.cloud.context.config.annotation.RefreshScope; -import org.springframework.stereotype.Service; -import top.hcode.hoj.judge.SandboxRun; -import top.hcode.hoj.mapper.JudgeServerMapper; -import top.hcode.hoj.pojo.entity.judge.JudgeServer; -import top.hcode.hoj.dao.JudgeServerEntityService; - -import java.util.Arrays; -import java.util.Date; -import java.util.HashMap; - -/** - * @Author: Himit_ZH - * @Date: 2021/4/15 11:27 - * @Description: - */ -@Service -@Slf4j(topic = "hoj") -@RefreshScope -public class JudgeServerEntityServiceImpl extends ServiceImpl implements JudgeServerEntityService { - - - @Value("${hoj-judge-server.max-task-num}") - private Integer maxTaskNum; - - @Value("${hoj-judge-server.remote-judge.open}") - private Boolean isOpenRemoteJudge; - - @Value("${hoj-judge-server.remote-judge.max-task-num}") - private Integer RemoteJudgeMaxTaskNum; - - @Value("${hoj-judge-server.name}") - private String name; - - @Override - public HashMap getJudgeServerInfo() { - - HashMap res = new HashMap<>(); - - res.put("version", "20220820"); - res.put("currentTime", new Date()); - res.put("judgeServerName", name); - res.put("cpu", Runtime.getRuntime().availableProcessors()); - res.put("languages", Arrays.asList("G++ 7.5.0", "GCC 7.5.0", "Python 3.7.5", - "Python 2.7.17", "OpenJDK 1.8", "Golang 1.16", "C# Mono 4.6.2", - "PHP 7.3.33","JavaScript Node 14.19.0","JavaScript V8 8.4.109", - "PyPy 2.7.18 (7.3.8)","PyPy 3.8.12 (7.3.8)")); - - if (maxTaskNum == -1) { - res.put("maxTaskNum", Runtime.getRuntime().availableProcessors() + 1); - } else { - res.put("maxTaskNum", maxTaskNum); - } - if (isOpenRemoteJudge) { - res.put("isOpenRemoteJudge", true); - if (RemoteJudgeMaxTaskNum == -1) { - res.put("remoteJudgeMaxTaskNum", Runtime.getRuntime().availableProcessors() * 2 + 1); - } else { - res.put("remoteJudgeMaxTaskNum", RemoteJudgeMaxTaskNum); - } - } - - String versionResp = ""; - - try { - versionResp = SandboxRun.getRestTemplate().getForObject(SandboxRun.getSandboxBaseUrl() + "/version", String.class); - } catch (Exception e) { - res.put("SandBoxMsg", MapUtil.builder().put("error", e.getMessage()).map()); - return res; - } - - res.put("SandBoxMsg", JSONUtil.parseObj(versionResp)); - return res; - } -} \ No newline at end of file diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/impl/ProblemCaseEntityServiceImpl.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/impl/ProblemCaseEntityServiceImpl.java deleted file mode 100644 index 541a4cd..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/impl/ProblemCaseEntityServiceImpl.java +++ /dev/null @@ -1,16 +0,0 @@ -package top.hcode.hoj.dao.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.stereotype.Service; -import top.hcode.hoj.mapper.ProblemCaseMapper; -import top.hcode.hoj.pojo.entity.problem.ProblemCase; -import top.hcode.hoj.dao.ProblemCaseEntityService; - -/** - * @Author: Himit_ZH - * @Date: 2020/12/14 19:59 - * @Description: - */ -@Service -public class ProblemCaseEntityServiceImpl extends ServiceImpl implements ProblemCaseEntityService { -} \ No newline at end of file diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/impl/ProblemCountEntityServiceImpl.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/impl/ProblemCountEntityServiceImpl.java deleted file mode 100644 index 242ac95..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/impl/ProblemCountEntityServiceImpl.java +++ /dev/null @@ -1,128 +0,0 @@ -package top.hcode.hoj.dao.impl; - -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.scheduling.annotation.Async; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Isolation; -import org.springframework.transaction.annotation.Transactional; -import top.hcode.hoj.mapper.ProblemCountMapper; -import top.hcode.hoj.pojo.entity.problem.ProblemCount; -import top.hcode.hoj.dao.ProblemCountEntityService; -import top.hcode.hoj.util.Constants; - - -/** - *

- * 服务实现类 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -@Service -public class ProblemCountEntityServiceImpl extends ServiceImpl implements ProblemCountEntityService { - - @Autowired - private ProblemCountMapper problemCountMapper; - - // 默认的事务隔离等级可重复读会产生幻读,读不到新的version数据,所以需要更换等级为读已提交 - @Transactional(rollbackFor = Exception.class, isolation = Isolation.READ_COMMITTED) - @Async - public void updateCount(int status, Long pid) { - - // 更新problem_count 表 - QueryWrapper problemCountQueryWrapper = new QueryWrapper(); - problemCountQueryWrapper.eq("pid", pid); - ProblemCount problemCount = problemCountMapper.selectOne(problemCountQueryWrapper); - ProblemCount newProblemCount = getNewProblemCount(status, problemCount); - newProblemCount.setVersion(problemCount.getVersion()); - int num = problemCountMapper.updateById(newProblemCount); - - - if (num == 1) { - return; - } else { - // 进行重试操作 - tryAgainUpdate(status, pid); - } - - } - - @Transactional(rollbackFor = Exception.class, isolation = Isolation.READ_COMMITTED) - public boolean tryAgainUpdate(int status, Long pid) { - boolean retryable; - int attemptNumber = 0; - do { - // 查询最新版本号 - QueryWrapper problemCountQueryWrapper = new QueryWrapper(); - problemCountQueryWrapper.eq("pid", pid); - ProblemCount problemCount = problemCountMapper.selectOne(problemCountQueryWrapper); - - // 更新 - ProblemCount newProblemCount = getNewProblemCount(status, problemCount); - newProblemCount.setVersion(problemCount.getVersion()); - boolean success = problemCountMapper.updateById(newProblemCount) == 1; - - - if (success) { - return true; - } else { - attemptNumber++; - retryable = attemptNumber < 8; - if (attemptNumber == 8) { - log.error("超过最大重试次数"); - break; - } - try { - Thread.sleep(300); - } catch (InterruptedException e) { - log.error(e.getMessage()); - } - } - } while (retryable); - - return false; - } - - public ProblemCount getNewProblemCount(int status, ProblemCount oldProblemCount) { - - ProblemCount newProblemCount = new ProblemCount(); - newProblemCount.setPid(oldProblemCount.getPid()).setTotal(oldProblemCount.getTotal() + 1); - Constants.Judge type = Constants.Judge.getTypeByStatus(status); - switch (type) { - case STATUS_ACCEPTED: - newProblemCount.setAc(oldProblemCount.getAc() + 1); - break; - case STATUS_MEMORY_LIMIT_EXCEEDED: - newProblemCount.setMle(oldProblemCount.getMle() + 1); - break; - case STATUS_TIME_LIMIT_EXCEEDED: - newProblemCount.setTle(oldProblemCount.getTle() + 1); - break; - case STATUS_RUNTIME_ERROR: - newProblemCount.setRe(oldProblemCount.getRe() + 1); - break; - case STATUS_PRESENTATION_ERROR: - newProblemCount.setPe(oldProblemCount.getPe() + 1); - break; - case STATUS_COMPILE_ERROR: - newProblemCount.setCe(oldProblemCount.getCe() + 1); - break; - case STATUS_WRONG_ANSWER: - newProblemCount.setWa(oldProblemCount.getWa() + 1); - break; - case STATUS_SYSTEM_ERROR: - newProblemCount.setSe(oldProblemCount.getSe() + 1); - break; - case STATUS_PARTIAL_ACCEPTED: - newProblemCount.setPa(oldProblemCount.getPa() + 1); - break; - default: - break; - } - return newProblemCount; - } - -} diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/impl/ProblemEntityServiceImpl.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/impl/ProblemEntityServiceImpl.java deleted file mode 100644 index 6ab9bd4..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/impl/ProblemEntityServiceImpl.java +++ /dev/null @@ -1,21 +0,0 @@ -package top.hcode.hoj.dao.impl; - - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.stereotype.Service; -import top.hcode.hoj.mapper.ProblemMapper; -import top.hcode.hoj.pojo.entity.problem.Problem; -import top.hcode.hoj.dao.ProblemEntityService; - -/** - *

- * 服务实现类 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -@Service -public class ProblemEntityServiceImpl extends ServiceImpl implements ProblemEntityService { - -} diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/impl/RemoteJudgeAccountEntityServiceImpl.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/impl/RemoteJudgeAccountEntityServiceImpl.java deleted file mode 100644 index 196b937..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/impl/RemoteJudgeAccountEntityServiceImpl.java +++ /dev/null @@ -1,17 +0,0 @@ -package top.hcode.hoj.dao.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.stereotype.Service; -import top.hcode.hoj.mapper.RemoteJudgeAccountMapper; -import top.hcode.hoj.pojo.entity.judge.RemoteJudgeAccount; -import top.hcode.hoj.dao.RemoteJudgeAccountEntityService; - - -/** - * @Author: Himit_ZH - * @Date: 2021/5/18 17:46 - * @Description: - */ -@Service -public class RemoteJudgeAccountEntityServiceImpl extends ServiceImpl implements RemoteJudgeAccountEntityService { -} \ No newline at end of file diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/impl/UserAcproblemEntityServiceImpl.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/impl/UserAcproblemEntityServiceImpl.java deleted file mode 100644 index f33da6e..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/impl/UserAcproblemEntityServiceImpl.java +++ /dev/null @@ -1,21 +0,0 @@ -package top.hcode.hoj.dao.impl; - - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.stereotype.Service; -import top.hcode.hoj.mapper.UserAcproblemMapper; -import top.hcode.hoj.pojo.entity.user.UserAcproblem; -import top.hcode.hoj.dao.UserAcproblemEntityService; - -/** - *

- * 服务实现类 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -@Service -public class UserAcproblemEntityServiceImpl extends ServiceImpl implements UserAcproblemEntityService { - -} diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/impl/UserRecordEntityServiceImpl.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/impl/UserRecordEntityServiceImpl.java deleted file mode 100644 index 87b90b3..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/dao/impl/UserRecordEntityServiceImpl.java +++ /dev/null @@ -1,120 +0,0 @@ -package top.hcode.hoj.dao.impl; - -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.scheduling.annotation.Async; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Isolation; -import org.springframework.transaction.annotation.Transactional; -import top.hcode.hoj.dao.JudgeEntityService; -import top.hcode.hoj.mapper.UserRecordMapper; -import top.hcode.hoj.pojo.entity.judge.Judge; -import top.hcode.hoj.pojo.entity.user.UserRecord; - -import top.hcode.hoj.dao.UserRecordEntityService; - -/** - *

- * 服务实现类 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -@Service -public class UserRecordEntityServiceImpl extends ServiceImpl implements UserRecordEntityService { - - @Autowired - private UserRecordMapper userRecordMapper; - - @Autowired - private JudgeEntityService judgeEntityService; - - /** - * @MethodNameupdateRecord - * @Params * @param null - * @Description 本方法不启用,不适合数据一致性 - * @Return - * @Since 2021/6/2 - */ - @Transactional(rollbackFor = Exception.class, isolation = Isolation.READ_COMMITTED) - @Async - @Override - @Deprecated - public void updateRecord(String uid, Long submitId, Long pid, Integer score) { - QueryWrapper judgeQueryWrapper = new QueryWrapper<>(); - judgeQueryWrapper.isNotNull("score") - .eq("cid", 0)// 非比赛提交 - .eq("pid", pid) - .eq("uid", uid) - .ne("submit_id", submitId) - .orderByDesc("score") - .last("limit 1"); - Judge lastHighScoreJudge = judgeEntityService.getOne(judgeQueryWrapper); - // 之前没有提交过,那么就需要修改 - boolean result = true; - if (lastHighScoreJudge == null) { - UpdateWrapper userRecordUpdateWrapper = new UpdateWrapper<>(); - userRecordUpdateWrapper.setSql("total_score=total_score+" + score).eq("uid", uid); - result = userRecordMapper.update(null, userRecordUpdateWrapper) == 1; - } else if (lastHighScoreJudge.getScore() < score) { - //如果之前该题目最高得分的提交比现在得分低,也需要修改 - int addValue = score - lastHighScoreJudge.getScore(); - UpdateWrapper userRecordUpdateWrapper = new UpdateWrapper<>(); - userRecordUpdateWrapper.setSql("total_score=total_score+" + addValue).eq("uid", uid); - result = userRecordMapper.update(null, userRecordUpdateWrapper) == 1; - } - if (result) { - return; - } else { // 失败则开始尝试 - tryAgainUpdate(uid, score); - } - } - - @Transactional(isolation = Isolation.READ_COMMITTED) - public boolean tryAgainUpdate(String uid, Integer score) { - boolean retryable; - int attemptNumber = 0; - do { - // 查询最新版本号 - QueryWrapper judgeQueryWrapper = new QueryWrapper<>(); - judgeQueryWrapper.isNotNull("score").orderByDesc("score").isNull("cid") // 非比赛提交 - .last("limit 1"); - Judge lastHighScoreJudge = judgeEntityService.getOne(judgeQueryWrapper); - - // 更新 - boolean success = true; - if (lastHighScoreJudge == null) { - UpdateWrapper userRecordUpdateWrapper = new UpdateWrapper<>(); - userRecordUpdateWrapper.set("total_score", score).eq("uid", uid); - success = userRecordMapper.update(null, userRecordUpdateWrapper) == 1; - } else if (lastHighScoreJudge.getScore() < score) { - //如果之前该题目最高得分的提交比现在得分低,也需要修改 - int addValue = score - lastHighScoreJudge.getScore(); - UpdateWrapper userRecordUpdateWrapper = new UpdateWrapper<>(); - userRecordUpdateWrapper.setSql("total_score=total_score+" + addValue).eq("uid", uid); - success = userRecordMapper.update(null, userRecordUpdateWrapper) == 1; - } - - if (success) { - return true; - } else { - attemptNumber++; - retryable = attemptNumber < 8; - if (attemptNumber == 8) { - log.error("更新user_record表超过最大重试次数"); - break; - } - try { - Thread.sleep(300); - } catch (InterruptedException e) { - log.error(e.getMessage()); - } - } - } while (retryable); - - return false; - } -} diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/AbstractJudge.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/AbstractJudge.java deleted file mode 100644 index 2ee1ee1..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/AbstractJudge.java +++ /dev/null @@ -1,168 +0,0 @@ -package top.hcode.hoj.judge; - -import cn.hutool.core.util.ReUtil; -import cn.hutool.json.JSONArray; -import cn.hutool.json.JSONObject; -import org.springframework.util.StringUtils; -import top.hcode.hoj.common.exception.SystemError; -import top.hcode.hoj.judge.entity.JudgeDTO; -import top.hcode.hoj.judge.entity.JudgeGlobalDTO; -import top.hcode.hoj.judge.entity.SandBoxRes; -import top.hcode.hoj.util.Constants; -import top.hcode.hoj.util.JudgeUtils; - -import java.io.File; -import java.text.MessageFormat; -import java.util.List; - -/** - * @Author: Himit_ZH - * @Date: 2022/1/2 20:46 - * @Description: - */ -public abstract class AbstractJudge { - - protected static final int SPJ_PC = 99; - - protected static final int SPJ_AC = 100; - - protected static final int SPJ_PE = 101; - - protected static final int SPJ_WA = 102; - - protected static final int SPJ_ERROR = 103; - - public JSONObject judge(JudgeDTO judgeDTO, JudgeGlobalDTO judgeGlobalDTO) throws SystemError { - - JSONArray judgeResultList = judgeCase(judgeDTO, judgeGlobalDTO); - - switch (judgeGlobalDTO.getJudgeMode()) { - case SPJ: - case TEST: - case DEFAULT: - return process(judgeDTO, judgeGlobalDTO, judgeResultList); - case INTERACTIVE: - return processMultiple(judgeDTO, judgeGlobalDTO, judgeResultList); - default: - throw new RuntimeException("The problem mode is error:" + judgeGlobalDTO.getJudgeMode()); - } - - } - - public abstract JSONArray judgeCase(JudgeDTO judgeDTO, JudgeGlobalDTO judgeGlobalDTO) throws SystemError; - - private JSONObject process(JudgeDTO judgeDTO, JudgeGlobalDTO judgeGlobalDTO, JSONArray judgeResultList) throws SystemError { - JSONObject judgeResult = (JSONObject) judgeResultList.get(0); - SandBoxRes sandBoxRes = SandBoxRes.builder() - .stdout(((JSONObject) judgeResult.get("files")).getStr("stdout")) - .stderr(((JSONObject) judgeResult.get("files")).getStr("stderr")) - .time(judgeResult.getLong("time") / 1000000) // ns->ms - .memory(judgeResult.getLong("memory") / 1024) // b-->kb - .exitCode(judgeResult.getInt("exitStatus")) - .status(judgeResult.getInt("status")) - .build(); - - return checkResult(sandBoxRes, judgeDTO, judgeGlobalDTO); - } - - private JSONObject processMultiple(JudgeDTO judgeDTO, JudgeGlobalDTO judgeGlobalDTO, JSONArray judgeResultList) throws SystemError { - - JSONObject userJudgeResult = (JSONObject) judgeResultList.get(0); - SandBoxRes userSandBoxRes = SandBoxRes.builder() - .stdout(((JSONObject) userJudgeResult.get("files")).getStr("stdout")) - .stderr(((JSONObject) userJudgeResult.get("files")).getStr("stderr")) - .time(userJudgeResult.getLong("time") / 1000000) // ns->ms - .memory(userJudgeResult.getLong("memory") / 1024) // b-->kb - .exitCode(userJudgeResult.getInt("exitStatus")) - .status(userJudgeResult.getInt("status")) - .build(); - - JSONObject interactiveJudgeResult = (JSONObject) judgeResultList.get(1); - SandBoxRes interactiveSandBoxRes = SandBoxRes.builder() - .stdout(((JSONObject) interactiveJudgeResult.get("files")).getStr("stdout")) - .stderr(((JSONObject) interactiveJudgeResult.get("files")).getStr("stderr")) - .time(interactiveJudgeResult.getLong("time") / 1000000) // ns->ms - .memory(interactiveJudgeResult.getLong("memory") / 1024) // b-->kb - .exitCode(interactiveJudgeResult.getInt("exitStatus")) - .status(interactiveJudgeResult.getInt("status")) - .build(); - - return checkMultipleResult(userSandBoxRes, interactiveSandBoxRes, judgeDTO, judgeGlobalDTO); - } - - public abstract JSONObject checkResult(SandBoxRes sandBoxRes, JudgeDTO judgeDTO, JudgeGlobalDTO judgeGlobalDTO) throws SystemError; - - public abstract JSONObject checkMultipleResult(SandBoxRes userSandBoxRes, SandBoxRes interactiveSandBoxRes, JudgeDTO judgeDTO, JudgeGlobalDTO judgeGlobalDTO); - - protected static List parseRunCommand(String command, - Constants.RunConfig runConfig, - String testCaseInputName, - String userOutputName, - String testCaseOutputName) { - - command = MessageFormat.format(command, Constants.JudgeDir.TMPFS_DIR.getContent(), - runConfig.getExeName(), Constants.JudgeDir.TMPFS_DIR.getContent() + File.separator + testCaseInputName, - Constants.JudgeDir.TMPFS_DIR.getContent() + File.separator + userOutputName, - Constants.JudgeDir.TMPFS_DIR.getContent() + File.separator + testCaseOutputName); - - return JudgeUtils.translateCommandline(command); - } - - protected JSONObject parseTestLibErr(String msg) { - - JSONObject res = new JSONObject(2); - String output = msg.substring(0, Math.min(1024, msg.length())); - if (output.startsWith("ok ")) { - res.set("code", SPJ_AC); - res.set("errMsg", output.split("ok ")[1]); - } else if (output.startsWith("wrong answer ")) { - res.set("code", SPJ_WA); - res.set("errMsg", output.split("wrong answer ")[1]); - } else if (output.startsWith("wrong output format ")) { - res.set("code", SPJ_WA); - res.set("errMsg", "May be output presentation error. " + output.split("wrong output format")[1]); - } else if (output.startsWith("partially correct ")) { - res.set("errMsg", output.split("partially correct ")[1]); - String numStr = ReUtil.get("partially correct \\(([\\s\\S]*?)\\) ", output, 1); - double percentage = 0.0; - if (!StringUtils.isEmpty(numStr)) { - percentage = Integer.parseInt(numStr) * 1.0 / 100; - } - res.set("percentage", percentage); - res.set("code", SPJ_PC); - } else if (output.startsWith("points ")) { - res.set("code", SPJ_PC); - String numStr = output.split("points ")[1].split(" ")[0]; - double percentage = 0.0; - if (!StringUtils.isEmpty(numStr)) { - percentage = Double.parseDouble(numStr) / 100; - } - if (percentage == 1) { - res.set("code", SPJ_AC); - } else { - res.set("percentage", percentage); - } - String tmp = output.split("points ")[1]; - res.set("errMsg", tmp.substring(0, Math.min(1024, tmp.length()))); - } else if (output.startsWith("FAIL ")) { - res.set("code", SPJ_ERROR); - res.set("errMsg", output.split("FAIL ")[1]); - } else { - res.set("code", SPJ_ERROR); - res.set("errMsg", output); - } - return res; - } - - - // 去除行末尾空白符 - protected String rtrim(String value) { - if (value == null) return null; - StringBuilder sb = new StringBuilder(); - String[] strArr = value.split("\n"); - for (String str : strArr) { - sb.append(str.replaceAll("\\s+$", "")).append("\n"); - } - return sb.toString().replaceAll("\\s+$", ""); - } -} \ No newline at end of file diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/Compiler.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/Compiler.java deleted file mode 100644 index 294f7dd..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/Compiler.java +++ /dev/null @@ -1,137 +0,0 @@ -package top.hcode.hoj.judge; - -import cn.hutool.json.JSONArray; -import cn.hutool.json.JSONObject; -import org.springframework.util.StringUtils; -import top.hcode.hoj.common.exception.CompileError; -import top.hcode.hoj.common.exception.SubmitError; -import top.hcode.hoj.common.exception.SystemError; -import top.hcode.hoj.util.Constants; -import top.hcode.hoj.util.JudgeUtils; - -import java.io.File; -import java.text.MessageFormat; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; - -/** - * @Author: Himit_ZH - * @Date: 2021/4/16 12:14 - * @Description: 判题流程解耦重构2.0,该类只负责编译 - */ -public class Compiler { - public static String compile(Constants.CompileConfig compileConfig, String code, - String language, HashMap extraFiles) throws SystemError, CompileError, SubmitError { - - if (compileConfig == null) { - throw new RuntimeException("Unsupported language " + language); - } - - // 调用安全沙箱进行编译 - JSONArray result = SandboxRun.compile(compileConfig.getMaxCpuTime(), - compileConfig.getMaxRealTime(), - compileConfig.getMaxMemory(), - 256 * 1024 * 1024L, - compileConfig.getSrcName(), - compileConfig.getExeName(), - parseCompileCommand(compileConfig.getCommand(), compileConfig), - compileConfig.getEnvs(), - code, - extraFiles, - true, - false, - null - ); - JSONObject compileResult = (JSONObject) result.get(0); - if (compileResult.getInt("status").intValue() != Constants.Judge.STATUS_ACCEPTED.getStatus()) { - throw new CompileError("Compile Error.", ((JSONObject) compileResult.get("files")).getStr("stdout"), - ((JSONObject) compileResult.get("files")).getStr("stderr")); - } - - String fileId = ((JSONObject) compileResult.get("fileIds")).getStr(compileConfig.getExeName()); - if (StringUtils.isEmpty(fileId)) { - throw new SubmitError("Executable file not found.", ((JSONObject) compileResult.get("files")).getStr("stdout"), - ((JSONObject) compileResult.get("files")).getStr("stderr")); - } - return fileId; - } - - public static Boolean compileSpj(String code, Long pid, String language, HashMap extraFiles) throws SystemError { - - Constants.CompileConfig spjCompiler = Constants.CompileConfig.getCompilerByLanguage("SPJ-" + language); - if (spjCompiler == null) { - throw new RuntimeException("Unsupported SPJ language:" + language); - } - - boolean copyOutExe = true; - if (pid == null) { // 题目id为空,则不进行本地存储,可能为新建题目时测试特判程序是否正常的判断而已 - copyOutExe = false; - } - - // 调用安全沙箱对特别判题程序进行编译 - JSONArray res = SandboxRun.compile(spjCompiler.getMaxCpuTime(), - spjCompiler.getMaxRealTime(), - spjCompiler.getMaxMemory(), - 256 * 1024 * 1024L, - spjCompiler.getSrcName(), - spjCompiler.getExeName(), - parseCompileCommand(spjCompiler.getCommand(), spjCompiler), - spjCompiler.getEnvs(), - code, - extraFiles, - false, - copyOutExe, - Constants.JudgeDir.SPJ_WORKPLACE_DIR.getContent() + File.separator + pid - ); - JSONObject compileResult = (JSONObject) res.get(0); - if (compileResult.getInt("status").intValue() != Constants.Judge.STATUS_ACCEPTED.getStatus()) { - throw new SystemError("Special Judge Code Compile Error.", ((JSONObject) compileResult.get("files")).getStr("stdout"), - ((JSONObject) compileResult.get("files")).getStr("stderr")); - } - return true; - } - - - public static Boolean compileInteractive(String code, Long pid, String language, HashMap extraFiles) throws SystemError { - - Constants.CompileConfig interactiveCompiler = Constants.CompileConfig.getCompilerByLanguage("INTERACTIVE-" + language); - if (interactiveCompiler == null) { - throw new RuntimeException("Unsupported interactive language:" + language); - } - - boolean copyOutExe = true; - if (pid == null) { // 题目id为空,则不进行本地存储,可能为新建题目时测试特判程序是否正常的判断而已 - copyOutExe = false; - } - - // 调用安全沙箱对特别判题程序进行编译 - JSONArray res = SandboxRun.compile(interactiveCompiler.getMaxCpuTime(), - interactiveCompiler.getMaxRealTime(), - interactiveCompiler.getMaxMemory(), - 256 * 1024 * 1024L, - interactiveCompiler.getSrcName(), - interactiveCompiler.getExeName(), - parseCompileCommand(interactiveCompiler.getCommand(), interactiveCompiler), - interactiveCompiler.getEnvs(), - code, - extraFiles, - false, - copyOutExe, - Constants.JudgeDir.INTERACTIVE_WORKPLACE_DIR.getContent() + File.separator + pid - ); - JSONObject compileResult = (JSONObject) res.get(0); - if (compileResult.getInt("status").intValue() != Constants.Judge.STATUS_ACCEPTED.getStatus()) { - throw new SystemError("Interactive Judge Code Compile Error.", ((JSONObject) compileResult.get("files")).getStr("stdout"), - ((JSONObject) compileResult.get("files")).getStr("stderr")); - } - return true; - } - - private static List parseCompileCommand(String command, Constants.CompileConfig compileConfig) { - - command = MessageFormat.format(command, Constants.JudgeDir.TMPFS_DIR.getContent(), - compileConfig.getSrcName(), compileConfig.getExeName()); - return JudgeUtils.translateCommandline(command); - } -} \ No newline at end of file diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/JudgeContext.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/JudgeContext.java deleted file mode 100644 index 833a941..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/JudgeContext.java +++ /dev/null @@ -1,117 +0,0 @@ -package top.hcode.hoj.judge; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; -import top.hcode.hoj.common.exception.SystemError; -import top.hcode.hoj.dao.ContestRecordEntityService; -import top.hcode.hoj.dao.UserAcproblemEntityService; -import top.hcode.hoj.pojo.dto.TestJudgeReq; -import top.hcode.hoj.pojo.dto.TestJudgeRes; -import top.hcode.hoj.pojo.entity.judge.Judge; -import top.hcode.hoj.pojo.entity.problem.Problem; -import top.hcode.hoj.pojo.entity.user.UserAcproblem; -import top.hcode.hoj.util.Constants; - -import java.util.HashMap; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/12 15:49 - * @Description: - */ -@Component -public class JudgeContext { - - @Autowired - private JudgeStrategy judgeStrategy; - - @Autowired - private UserAcproblemEntityService userAcproblemEntityService; - - @Autowired - private ContestRecordEntityService contestRecordEntityService; - - public Judge Judge(Problem problem, Judge judge) { - - // c和c++为一倍时间和空间,其它语言为2倍时间和空间 - if (!judge.getLanguage().equals("C++") - && !judge.getLanguage().equals("C") - && !judge.getLanguage().equals("C++ With O2") - && !judge.getLanguage().equals("C With O2")) { - problem.setTimeLimit(problem.getTimeLimit() * 2); - problem.setMemoryLimit(problem.getMemoryLimit() * 2); - } - - HashMap judgeResult = judgeStrategy.judge(problem, judge); - - Judge finalJudgeRes = new Judge(); - finalJudgeRes.setSubmitId(judge.getSubmitId()); - // 如果是编译失败、提交错误或者系统错误就有错误提醒 - if (judgeResult.get("code") == Constants.Judge.STATUS_COMPILE_ERROR.getStatus() || - judgeResult.get("code") == Constants.Judge.STATUS_SYSTEM_ERROR.getStatus() || - judgeResult.get("code") == Constants.Judge.STATUS_RUNTIME_ERROR.getStatus() || - judgeResult.get("code") == Constants.Judge.STATUS_SUBMITTED_FAILED.getStatus()) { - finalJudgeRes.setErrorMessage((String) judgeResult.getOrDefault("errMsg", "")); - } - // 设置最终结果状态码 - finalJudgeRes.setStatus((Integer) judgeResult.get("code")); - // 设置最大时间和最大空间不超过题目限制时间和空间 - // kb - Integer memory = (Integer) judgeResult.get("memory"); - finalJudgeRes.setMemory(Math.min(memory, problem.getMemoryLimit() * 1024)); - // ms - Integer time = (Integer) judgeResult.get("time"); - finalJudgeRes.setTime(Math.min(time, problem.getTimeLimit())); - // score - finalJudgeRes.setScore((Integer) judgeResult.getOrDefault("score", null)); - // oi_rank_score - finalJudgeRes.setOiRankScore((Integer) judgeResult.getOrDefault("oiRankScore", null)); - - return finalJudgeRes; - } - - public TestJudgeRes testJudge(TestJudgeReq testJudgeReq) { - // c和c++为一倍时间和空间,其它语言为2倍时间和空间 - if (!testJudgeReq.getLanguage().equals("C++") - && !testJudgeReq.getLanguage().equals("C") - && !testJudgeReq.getLanguage().equals("C++ With O2") - && !testJudgeReq.getLanguage().equals("C With O2")) { - testJudgeReq.setTimeLimit(testJudgeReq.getTimeLimit() * 2); - testJudgeReq.setMemoryLimit(testJudgeReq.getMemoryLimit() * 2); - } - return judgeStrategy.testJudge(testJudgeReq); - } - - public Boolean compileSpj(String code, Long pid, String spjLanguage, HashMap extraFiles) throws SystemError { - return Compiler.compileSpj(code, pid, spjLanguage, extraFiles); - } - - public Boolean compileInteractive(String code, Long pid, String interactiveLanguage, HashMap extraFiles) throws SystemError { - return Compiler.compileInteractive(code, pid, interactiveLanguage, extraFiles); - } - - - public void updateOtherTable(Long submitId, - Integer status, - Long cid, - String uid, - Long pid, - Long gid, - Integer score, - Integer useTime) { - - if (cid == 0) { // 非比赛提交 - // 如果是AC,就更新user_acproblem表, - if (status.intValue() == Constants.Judge.STATUS_ACCEPTED.getStatus() && gid == null) { - userAcproblemEntityService.saveOrUpdate(new UserAcproblem() - .setPid(pid) - .setUid(uid) - .setSubmitId(submitId) - ); - } - - } else { //如果是比赛提交 - contestRecordEntityService.updateContestRecord(score, status, submitId, useTime); - } - } -} \ No newline at end of file diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/JudgeRun.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/JudgeRun.java deleted file mode 100644 index bc7a441..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/JudgeRun.java +++ /dev/null @@ -1,218 +0,0 @@ -package top.hcode.hoj.judge; - -import cn.hutool.json.JSONArray; -import cn.hutool.json.JSONObject; -import org.springframework.stereotype.Component; -import top.hcode.hoj.common.exception.SystemError; -import top.hcode.hoj.judge.entity.JudgeDTO; -import top.hcode.hoj.judge.entity.JudgeGlobalDTO; -import top.hcode.hoj.judge.task.DefaultJudge; -import top.hcode.hoj.judge.task.InteractiveJudge; -import top.hcode.hoj.judge.task.SpecialJudge; -import top.hcode.hoj.judge.task.TestJudge; -import top.hcode.hoj.pojo.dto.TestJudgeReq; -import top.hcode.hoj.pojo.dto.TestJudgeRes; -import top.hcode.hoj.pojo.entity.problem.Problem; -import top.hcode.hoj.util.Constants; -import top.hcode.hoj.util.JudgeUtils; -import top.hcode.hoj.util.ThreadPoolUtils; - -import javax.annotation.Resource; -import java.io.File; -import java.util.*; -import java.util.concurrent.*; - -/** - * @Author: Himit_ZH - * @Date: 2021/4/16 12:15 - * @Description: 判题流程解耦重构3.0,该类负责输入数据进入程序进行测评 - */ -@Component -public class JudgeRun { - - @Resource - private DefaultJudge defaultJudge; - - @Resource - private SpecialJudge specialJudge; - - @Resource - private InteractiveJudge interactiveJudge; - - @Resource - private TestJudge testJudge; - - public List judgeAllCase(Long submitId, - Problem problem, - String judgeLanguage, - String testCasesDir, - JSONObject testCasesInfo, - String userFileId, - String userFileContent, - Boolean getUserOutput) - throws SystemError, ExecutionException, InterruptedException { - - if (testCasesInfo == null) { - throw new SystemError("The evaluation data of the problem does not exist", null, null); - } - - List> futureTasks = new ArrayList<>(); - JSONArray testcaseList = (JSONArray) testCasesInfo.get("testCases"); - - // 默认给题目限制时间+200ms用来测评 - Long testTime = (long) problem.getTimeLimit() + 200; - - Constants.JudgeMode judgeMode = Constants.JudgeMode.getJudgeMode(problem.getJudgeMode()); - - if (judgeMode == null) { - throw new RuntimeException("The judge mode of problem " + problem.getProblemId() + " error:" + problem.getJudgeMode()); - } - - // 用户输出的文件夹 - String runDir = Constants.JudgeDir.RUN_WORKPLACE_DIR.getContent() + File.separator + submitId; - - Constants.RunConfig runConfig = Constants.RunConfig.getRunnerByLanguage(judgeLanguage); - Constants.RunConfig spjConfig = Constants.RunConfig.getRunnerByLanguage("SPJ-" + problem.getSpjLanguage()); - Constants.RunConfig interactiveConfig = Constants.RunConfig.getRunnerByLanguage("INTERACTIVE-" + problem.getSpjLanguage()); - - JudgeGlobalDTO judgeGlobalDTO = JudgeGlobalDTO.builder() - .problemId(problem.getId()) - .judgeMode(judgeMode) - .userFileId(userFileId) - .userFileContent(userFileContent) - .runDir(runDir) - .testTime(testTime) - .maxMemory((long) problem.getMemoryLimit()) - .maxTime((long) problem.getTimeLimit()) - .maxStack(problem.getStackLimit()) - .testCaseInfo(testCasesInfo) - .judgeExtraFiles(JudgeUtils.getProblemExtraFileMap(problem, "judge")) - .runConfig(runConfig) - .spjRunConfig(spjConfig) - .interactiveRunConfig(interactiveConfig) - .needUserOutputFile(getUserOutput) - .removeEOLBlank(problem.getIsRemoveEndBlank()) - .build(); - - for (int index = 0; index < testcaseList.size(); index++) { - JSONObject testcase = (JSONObject) testcaseList.get(index); - // 将每个需要测试的线程任务加入任务列表中 - final int testCaseId = index + 1; - // 输入文件名 - final String inputFileName = testcase.getStr("inputName"); - // 输出文件名 - final String outputFileName = testcase.getStr("outputName"); - // 题目数据的输入文件的路径 - final String testCaseInputPath = testCasesDir + File.separator + inputFileName; - // 题目数据的输出文件的路径 - final String testCaseOutputPath = testCasesDir + File.separator + outputFileName; - // 数据库表的测试样例id - final Long caseId = testcase.getLong("caseId", null); - // 该测试点的满分 - final Integer score = testcase.getInt("score", 0); - - final Long maxOutputSize = Math.max(testcase.getLong("outputSize", 0L) * 2, 16 * 1024 * 1024L); - - JudgeDTO judgeDTO = JudgeDTO.builder() - .testCaseId(testCaseId) - .testCaseInputPath(testCaseInputPath) - .testCaseOutputPath(testCaseOutputPath) - .maxOutputSize(maxOutputSize) - .build(); - - futureTasks.add(new FutureTask<>(() -> { - JSONObject result; - switch (judgeMode) { - case DEFAULT: - result = defaultJudge.judge(judgeDTO, judgeGlobalDTO); - break; - case SPJ: - result = specialJudge.judge(judgeDTO, judgeGlobalDTO); - break; - case INTERACTIVE: - result = interactiveJudge.judge(judgeDTO, judgeGlobalDTO); - break; - default: - throw new RuntimeException("The problem mode is error:" + judgeMode); - } - result.set("caseId", caseId); - result.set("score", score); - result.set("inputFileName", inputFileName); - result.set("outputFileName", outputFileName); - return result; - })); - } - - // 提交到线程池进行执行 - for (FutureTask futureTask : futureTasks) { - ThreadPoolUtils.getInstance().getThreadPool().submit(futureTask); - } - List result = new LinkedList<>(); - while (futureTasks.size() > 0) { - Iterator> iterable = futureTasks.iterator(); - //遍历一遍 - while (iterable.hasNext()) { - FutureTask future = iterable.next(); - if (future.isDone() && !future.isCancelled()) { - // 获取线程返回结果 - JSONObject tmp = future.get(); - result.add(tmp); - // 任务完成移除任务 - iterable.remove(); - } else { - Thread.sleep(10); // 避免CPU高速运转,这里休息10毫秒 - } - } - } - return result; - } - - public TestJudgeRes testJudgeCase(String userFileId, TestJudgeReq testJudgeReq) throws ExecutionException, InterruptedException { - - // 默认给限制时间+200ms用来测评 - Long testTime = testJudgeReq.getTimeLimit() + 200L; - - Constants.RunConfig runConfig = Constants.RunConfig.getRunnerByLanguage(testJudgeReq.getLanguage()); - - JudgeGlobalDTO judgeGlobalDTO = JudgeGlobalDTO.builder() - .judgeMode(Constants.JudgeMode.TEST) - .userFileId(userFileId) - .userFileContent(testJudgeReq.getCode()) - .testTime(testTime) - .maxMemory((long) testJudgeReq.getMemoryLimit()) - .maxTime((long) testJudgeReq.getTimeLimit()) - .maxStack(testJudgeReq.getStackLimit()) - .removeEOLBlank(testJudgeReq.getIsRemoveEndBlank()) - .runConfig(runConfig) - .build(); - - Long maxOutputSize = Math.max(testJudgeReq.getTestCaseInput().length() * 2L, 16 * 1024 * 1024L); - - JudgeDTO judgeDTO = JudgeDTO.builder() - .testCaseInputContent(testJudgeReq.getTestCaseInput() + "\n") - .maxOutputSize(maxOutputSize) - .testCaseOutputContent(testJudgeReq.getExpectedOutput()) - .build(); - - FutureTask testJudgeFutureTask = new FutureTask<>(() -> testJudge.judge(judgeDTO, judgeGlobalDTO)); - - ThreadPoolUtils.getInstance() - .getThreadPool() - .submit(testJudgeFutureTask); - - while (true) { - if (testJudgeFutureTask.isDone() && !testJudgeFutureTask.isCancelled()) { - JSONObject judgeRes = testJudgeFutureTask.get(); - return TestJudgeRes.builder() - .status(judgeRes.getInt("status")) - .memory(judgeRes.getLong("memory")) - .time(judgeRes.getLong("time")) - .stdout(judgeRes.getStr("output")) - .stderr(judgeRes.getStr("errMsg")) - .build(); - } - Thread.sleep(100); // 避免CPU高速运转,这里休息100毫秒 - } - } - -} \ No newline at end of file diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/JudgeStrategy.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/JudgeStrategy.java deleted file mode 100644 index 44028e2..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/JudgeStrategy.java +++ /dev/null @@ -1,409 +0,0 @@ -package top.hcode.hoj.judge; - -import cn.hutool.core.io.FileUtil; -import cn.hutool.core.io.file.FileReader; -import cn.hutool.core.io.file.FileWriter; -import cn.hutool.json.JSONObject; -import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Component; -import org.springframework.util.StringUtils; -import top.hcode.hoj.common.exception.CompileError; -import top.hcode.hoj.common.exception.SubmitError; -import top.hcode.hoj.common.exception.SystemError; -import top.hcode.hoj.dao.JudgeCaseEntityService; -import top.hcode.hoj.dao.JudgeEntityService; -import top.hcode.hoj.pojo.dto.TestJudgeReq; -import top.hcode.hoj.pojo.dto.TestJudgeRes; -import top.hcode.hoj.pojo.entity.judge.Judge; -import top.hcode.hoj.pojo.entity.judge.JudgeCase; -import top.hcode.hoj.pojo.entity.problem.Problem; -import top.hcode.hoj.util.Constants; -import top.hcode.hoj.util.JudgeUtils; - -import javax.annotation.Resource; -import java.io.File; -import java.util.*; - -@Slf4j(topic = "hoj") -@Component -public class JudgeStrategy { - - @Resource - private JudgeEntityService judgeEntityService; - - @Resource - private ProblemTestCaseUtils problemTestCaseUtils; - - @Resource - private JudgeCaseEntityService JudgeCaseEntityService; - - @Resource - private JudgeRun judgeRun; - - public HashMap judge(Problem problem, Judge judge) { - - HashMap result = new HashMap<>(); - // 编译好的临时代码文件id - String userFileId = null; - try { - // 对用户源代码进行编译 获取tmpfs中的fileId - Constants.CompileConfig compileConfig = Constants.CompileConfig.getCompilerByLanguage(judge.getLanguage()); - // 有的语言可能不支持编译, 目前有js、php不支持编译 - if (compileConfig != null) { - userFileId = Compiler.compile(compileConfig, - judge.getCode(), - judge.getLanguage(), - JudgeUtils.getProblemExtraFileMap(problem, "user")); - } - // 测试数据文件所在文件夹 - String testCasesDir = Constants.JudgeDir.TEST_CASE_DIR.getContent() + File.separator + "problem_" + problem.getId(); - // 从文件中加载测试数据json - JSONObject testCasesInfo = problemTestCaseUtils.loadTestCaseInfo(problem.getId(), testCasesDir, problem.getCaseVersion(), - problem.getJudgeMode()); - - // 检查是否为spj或者interactive,同时是否有对应编译完成的文件,若不存在,就先编译生成该文件,同时也要检查版本 - boolean isOk = checkOrCompileExtraProgram(problem); - if (!isOk) { - result.put("code", Constants.Judge.STATUS_SYSTEM_ERROR.getStatus()); - result.put("errMsg", "The special judge or interactive program code does not exist."); - result.put("time", 0); - result.put("memory", 0); - return result; - } - - // 更新状态为评测数据中 - UpdateWrapper judgeUpdateWrapper = new UpdateWrapper<>(); - judgeUpdateWrapper.set("status", Constants.Judge.STATUS_JUDGING.getStatus()) - .eq("submit_id", judge.getSubmitId()); - judgeEntityService.update(judgeUpdateWrapper); - // 开始测试每个测试点 - List allCaseResultList = judgeRun.judgeAllCase(judge.getSubmitId(), - problem, - judge.getLanguage(), - testCasesDir, - testCasesInfo, - userFileId, - judge.getCode(), - false); - - // 对全部测试点结果进行评判,获取最终评判结果 - return getJudgeInfo(allCaseResultList, problem, judge); - } catch (SystemError systemError) { - result.put("code", Constants.Judge.STATUS_SYSTEM_ERROR.getStatus()); - result.put("errMsg", "Oops, something has gone wrong with the judgeServer. Please report this to administrator."); - result.put("time", 0); - result.put("memory", 0); - log.error("[Judge] [System Error] Submit Id:[{}] Problem Id:[{}], Error:[{}]", - judge.getSubmitId(), - problem.getId(), - systemError.toString()); - } catch (SubmitError submitError) { - result.put("code", Constants.Judge.STATUS_SUBMITTED_FAILED.getStatus()); - result.put("errMsg", mergeNonEmptyStrings(submitError.getMessage(), submitError.getStdout(), submitError.getStderr())); - result.put("time", 0); - result.put("memory", 0); - log.error("[Judge] [Submit Error] Submit Id:[{}] Problem Id:[{}], Error:[{}]", - judge.getSubmitId(), - problem.getId(), - submitError.toString()); - } catch (CompileError compileError) { - result.put("code", Constants.Judge.STATUS_COMPILE_ERROR.getStatus()); - result.put("errMsg", mergeNonEmptyStrings(compileError.getStdout(), compileError.getStderr())); - result.put("time", 0); - result.put("memory", 0); - } catch (Exception e) { - result.put("code", Constants.Judge.STATUS_SYSTEM_ERROR.getStatus()); - result.put("errMsg", "Oops, something has gone wrong with the judgeServer. Please report this to administrator."); - result.put("time", 0); - result.put("memory", 0); - log.error("[Judge] [System Runtime Error] Submit Id:[{}] Problem Id:[{}], Error:[{}]", - judge.getSubmitId(), - problem.getId(), - e.toString()); - } finally { - - // 删除tmpfs内存中的用户代码可执行文件 - if (!StringUtils.isEmpty(userFileId)) { - SandboxRun.delFile(userFileId); - } - } - return result; - } - - public TestJudgeRes testJudge(TestJudgeReq testJudgeReq) { - // 编译好的临时代码文件id - String userFileId = null; - try { - // 对源代码进行编译 获取tmpfs中的fileId - Constants.CompileConfig compileConfig = Constants.CompileConfig.getCompilerByLanguage(testJudgeReq.getLanguage()); - // 有的语言可能不支持编译,目前有js、php不支持编译,需要提供源代码 - if (compileConfig != null) { - userFileId = Compiler.compile(compileConfig, - testJudgeReq.getCode(), - testJudgeReq.getLanguage(), - testJudgeReq.getExtraFile()); - } - return judgeRun.testJudgeCase(userFileId, testJudgeReq); - } catch (SystemError systemError) { - log.error("[Test Judge] [System Error] [{}]", systemError.toString()); - return TestJudgeRes.builder() - .memory(0L) - .time(0L) - .status(Constants.Judge.STATUS_COMPILE_ERROR.getStatus()) - .stderr("Oops, something has gone wrong with the judgeServer. Please report this to administrator.") - .build(); - } catch (SubmitError submitError) { - log.error("[Test Judge] [Submit Error] [{}]", submitError.toString()); - return TestJudgeRes.builder() - .memory(0L) - .time(0L) - .status(Constants.Judge.STATUS_SUBMITTED_FAILED.getStatus()) - .stderr(mergeNonEmptyStrings(submitError.getMessage(), submitError.getStdout(), submitError.getStderr())) - .build(); - } catch (CompileError compileError) { - return TestJudgeRes.builder() - .memory(0L) - .time(0L) - .status(Constants.Judge.STATUS_COMPILE_ERROR.getStatus()) - .stderr(mergeNonEmptyStrings(compileError.getStdout(), compileError.getStderr())) - .build(); - } catch (Exception e) { - log.error("[Test Judge] [Error] [{}]", e.toString()); - return TestJudgeRes.builder() - .memory(0L) - .time(0L) - .status(Constants.Judge.STATUS_COMPILE_ERROR.getStatus()) - .stderr("Oops, something has gone wrong with the judgeServer. Please report this to administrator.") - .build(); - } finally { - // 删除tmpfs内存中的用户代码可执行文件 - if (!StringUtils.isEmpty(userFileId)) { - SandboxRun.delFile(userFileId); - } - } - } - - private Boolean checkOrCompileExtraProgram(Problem problem) throws CompileError, SystemError { - - Constants.JudgeMode judgeMode = Constants.JudgeMode.getJudgeMode(problem.getJudgeMode()); - - String currentVersion = problem.getCaseVersion(); - - Constants.CompileConfig compiler; - - String programFilePath; - - String programVersionPath; - - switch (judgeMode) { - case DEFAULT: - return true; - case SPJ: - compiler = Constants.CompileConfig.getCompilerByLanguage("SPJ-" + problem.getSpjLanguage()); - - programFilePath = Constants.JudgeDir.SPJ_WORKPLACE_DIR.getContent() + File.separator + - problem.getId() + File.separator + compiler.getExeName(); - - programVersionPath = Constants.JudgeDir.SPJ_WORKPLACE_DIR.getContent() + File.separator + - problem.getId() + File.separator + "version"; - - // 如果不存在该已经编译好的程序,则需要再次进行编译 - if (!FileUtil.exist(programFilePath) || !FileUtil.exist(programVersionPath)) { - boolean isCompileSpjOk = Compiler.compileSpj(problem.getSpjCode(), problem.getId(), problem.getSpjLanguage(), - JudgeUtils.getProblemExtraFileMap(problem, "judge")); - - FileWriter fileWriter = new FileWriter(programVersionPath); - fileWriter.write(currentVersion); - return isCompileSpjOk; - } - - FileReader spjVersionReader = new FileReader(programVersionPath); - String recordSpjVersion = spjVersionReader.readString(); - - // 版本变动也需要重新编译 - if (!currentVersion.equals(recordSpjVersion)) { - boolean isCompileSpjOk = Compiler.compileSpj(problem.getSpjCode(), problem.getId(), problem.getSpjLanguage(), - JudgeUtils.getProblemExtraFileMap(problem, "judge")); - FileWriter fileWriter = new FileWriter(programVersionPath); - fileWriter.write(currentVersion); - return isCompileSpjOk; - } - - break; - case INTERACTIVE: - compiler = Constants.CompileConfig.getCompilerByLanguage("INTERACTIVE-" + problem.getSpjLanguage()); - programFilePath = Constants.JudgeDir.INTERACTIVE_WORKPLACE_DIR.getContent() + File.separator + - problem.getId() + File.separator + compiler.getExeName(); - - programVersionPath = Constants.JudgeDir.INTERACTIVE_WORKPLACE_DIR.getContent() + File.separator + - problem.getId() + File.separator + "version"; - - // 如果不存在该已经编译好的程序,则需要再次进行编译 版本变动也需要重新编译 - if (!FileUtil.exist(programFilePath) || !FileUtil.exist(programVersionPath)) { - boolean isCompileInteractive = Compiler.compileInteractive(problem.getSpjCode(), problem.getId(), problem.getSpjLanguage(), - JudgeUtils.getProblemExtraFileMap(problem, "judge")); - FileWriter fileWriter = new FileWriter(programVersionPath); - fileWriter.write(currentVersion); - return isCompileInteractive; - } - - FileReader interactiveVersionFileReader = new FileReader(programVersionPath); - String recordInteractiveVersion = interactiveVersionFileReader.readString(); - - // 版本变动也需要重新编译 - if (!currentVersion.equals(recordInteractiveVersion)) { - boolean isCompileInteractive = Compiler.compileSpj(problem.getSpjCode(), problem.getId(), problem.getSpjLanguage(), - JudgeUtils.getProblemExtraFileMap(problem, "judge")); - - FileWriter fileWriter = new FileWriter(programVersionPath); - fileWriter.write(currentVersion); - - return isCompileInteractive; - } - - break; - default: - throw new RuntimeException("The problem mode is error:" + judgeMode); - } - - return true; - } - - // 获取判题的运行时间,运行空间,OI得分 - public HashMap computeResultInfo(List allTestCaseResultList, Boolean isACM, - Integer errorCaseNum, Integer totalScore, Integer problemDiffculty) { - HashMap result = new HashMap<>(); - // 用时和内存占用保存为多个测试点中最长的 - allTestCaseResultList.stream().max(Comparator.comparing(t -> t.getTime())) - .ifPresent(t -> result.put("time", t.getTime())); - - allTestCaseResultList.stream().max(Comparator.comparing(t -> t.getMemory())) - .ifPresent(t -> result.put("memory", t.getMemory())); - - // OI题目计算得分 - if (!isACM) { - // 全对的直接用总分*0.1+2*题目难度 - if (errorCaseNum == 0) { - int oiRankScore = (int) Math.round(totalScore * 0.1 + 2 * problemDiffculty); - result.put("score", totalScore); - result.put("oiRankScore", oiRankScore); - } else { - int sumScore = 0; - for (JudgeCase testcaseResult : allTestCaseResultList) { - sumScore += testcaseResult.getScore(); - } - //测试点总得分*0.1+2*题目难度*(测试点总得分/题目总分) - int oiRankScore = (int) Math.round(sumScore * 0.1 + 2 * problemDiffculty * (sumScore * 1.0 / totalScore)); - result.put("score", sumScore); - result.put("oiRankScore", oiRankScore); - } - } - return result; - } - - // 进行最终测试结果的判断(除编译失败外的评测状态码和时间,空间,OI题目的得分) - public HashMap getJudgeInfo(List testCaseResultList, Problem problem, Judge judge) { - - boolean isACM = Objects.equals(problem.getType(), Constants.Contest.TYPE_ACM.getCode()); - - List errorTestCaseList = new LinkedList<>(); - - List allCaseResList = new LinkedList<>(); - - // 记录所有测试点的结果 - testCaseResultList.forEach(jsonObject -> { - Integer time = jsonObject.getLong("time").intValue(); - Integer memory = jsonObject.getLong("memory").intValue(); - Integer status = jsonObject.getInt("status"); - - Long caseId = jsonObject.getLong("caseId", null); - String inputFileName = jsonObject.getStr("inputFileName"); - String outputFileName = jsonObject.getStr("outputFileName"); - String msg = jsonObject.getStr("errMsg"); - JudgeCase judgeCase = new JudgeCase(); - judgeCase.setTime(time).setMemory(memory) - .setStatus(status) - .setInputData(inputFileName) - .setOutputData(outputFileName) - .setPid(problem.getId()) - .setUid(judge.getUid()) - .setCaseId(caseId) - .setSubmitId(judge.getSubmitId()); - - if (!StringUtils.isEmpty(msg) && !Objects.equals(status, Constants.Judge.STATUS_COMPILE_ERROR.getStatus())) { - judgeCase.setUserOutput(msg); - } - - if (isACM) { - if (!Objects.equals(status, Constants.Judge.STATUS_ACCEPTED.getStatus())) { - errorTestCaseList.add(jsonObject); - } - } else { - int oiScore = jsonObject.getInt("score"); - if (Objects.equals(status, Constants.Judge.STATUS_ACCEPTED.getStatus())) { - judgeCase.setScore(oiScore); - } else if (Objects.equals(status, Constants.Judge.STATUS_PARTIAL_ACCEPTED.getStatus())) { - errorTestCaseList.add(jsonObject); - Double percentage = jsonObject.getDouble("percentage"); - if (percentage != null) { - int score = (int) Math.floor(percentage * oiScore); - judgeCase.setScore(score); - } else { - judgeCase.setScore(0); - } - } else { - errorTestCaseList.add(jsonObject); - judgeCase.setScore(0); - } - } - - allCaseResList.add(judgeCase); - }); - - // 更新到数据库 - boolean addCaseRes = JudgeCaseEntityService.saveBatch(allCaseResList); - if (!addCaseRes) { - log.error("题号为:" + problem.getId() + ",提交id为:" + judge.getSubmitId() + "的各个测试数据点的结果更新到数据库操作失败"); - } - - // 获取判题的运行时间,运行空间,OI得分 - HashMap result = computeResultInfo(allCaseResList, isACM, errorTestCaseList.size(), - problem.getIoScore(), problem.getDifficulty()); - - // 如果该题为ACM类型的题目,多个测试点全部正确则AC,否则取第一个错误的测试点的状态 - // 如果该题为OI类型的题目, 若多个测试点全部正确则AC,若全部错误则取第一个错误测试点状态,否则为部分正确 - if (errorTestCaseList.size() == 0) { // 全部测试点正确,则为AC - result.put("code", Constants.Judge.STATUS_ACCEPTED.getStatus()); - } else if (isACM || errorTestCaseList.size() == testCaseResultList.size()) { - result.put("code", errorTestCaseList.get(0).getInt("status")); - result.put("errMsg", errorTestCaseList.get(0).getStr("errMsg", "")); - } else { - result.put("code", Constants.Judge.STATUS_PARTIAL_ACCEPTED.getStatus()); - } - return result; - } - - - private String getUserFileName(String language) { - switch (language) { - case "PHP": - return "main.php"; - case "JavaScript Node": - case "JavaScript V8": - return "main.js"; - } - return "main"; - } - - public String mergeNonEmptyStrings(String... strings) { - StringBuffer sb = new StringBuffer(); - for (String str : strings) { - if (!StringUtils.isEmpty(str)) { - sb.append(str.substring(0, Math.min(1024 * 1024, str.length()))).append("\n"); - } - } - return sb.toString(); - } - -} diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/ProblemTestCaseUtils.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/ProblemTestCaseUtils.java deleted file mode 100644 index e285489..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/ProblemTestCaseUtils.java +++ /dev/null @@ -1,212 +0,0 @@ -package top.hcode.hoj.judge; - -import cn.hutool.core.io.FileUtil; -import cn.hutool.core.io.file.FileReader; -import cn.hutool.core.io.file.FileWriter; -import cn.hutool.core.util.CharsetUtil; -import cn.hutool.json.JSONArray; -import cn.hutool.json.JSONObject; -import cn.hutool.json.JSONUtil; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; -import org.springframework.util.DigestUtils; -import org.springframework.util.StringUtils; -import top.hcode.hoj.common.exception.SystemError; -import top.hcode.hoj.dao.ProblemCaseEntityService; -import top.hcode.hoj.pojo.entity.problem.ProblemCase; -import top.hcode.hoj.util.Constants; - -import java.io.File; -import java.io.UnsupportedEncodingException; -import java.nio.charset.StandardCharsets; -import java.util.HashMap; -import java.util.LinkedList; -import java.util.List; - -/** - * @Author: Himit_ZH - * @Date: 2021/4/16 13:21 - * @Description: 判题流程解耦重构2.0,该类只负责题目测试数据的检查与初始化 - */ -@Component -public class ProblemTestCaseUtils { - - @Autowired - private ProblemCaseEntityService problemCaseEntityService; - - // 本地无文件初始化测试数据,写成json文件 - public JSONObject initTestCase(List> testCases, - Long problemId, - String version, - String mode) throws SystemError { - - if (testCases == null || testCases.size() == 0) { - throw new SystemError("题号为:" + problemId + "的评测数据为空!", null, "The test cases does not exist."); - } - - JSONObject result = new JSONObject(); - result.set("mode", mode); - result.set("version", version); - result.set("testCasesSize", testCases.size()); - - JSONArray testCaseList = new JSONArray(testCases.size()); - - String testCasesDir = Constants.JudgeDir.TEST_CASE_DIR.getContent() + "/problem_" + problemId; - - // 无论有没有测试数据,一旦执行该函数,一律清空,重新生成该题目对应的测试数据文件 - - FileUtil.del(testCasesDir); - for (int index = 0; index < testCases.size(); index++) { - JSONObject jsonObject = new JSONObject(); - String inputName = (index + 1) + ".in"; - jsonObject.set("caseId", testCases.get(index).get("caseId")); - jsonObject.set("score", testCases.get(index).getOrDefault("score", null)); - jsonObject.set("inputName", inputName); - // 生成对应文件 - FileWriter infileWriter = new FileWriter(testCasesDir + "/" + inputName, CharsetUtil.UTF_8); - // 将该测试数据的输入写入到文件 - infileWriter.write((String) testCases.get(index).get("input")); - - String outputName = (index + 1) + ".out"; - jsonObject.set("outputName", outputName); - // 生成对应文件 - String outputData = (String) testCases.get(index).get("output"); - FileWriter outFile = new FileWriter(testCasesDir + "/" + outputName, CharsetUtil.UTF_8); - outFile.write(outputData); - - // spj或interactive是根据特判程序输出判断结果,所以无需初始化测试数据 - if (Constants.JudgeMode.DEFAULT.getMode().equals(mode)) { - // 原数据MD5 - jsonObject.set("outputMd5", DigestUtils.md5DigestAsHex(outputData.getBytes(StandardCharsets.UTF_8))); - // 原数据大小 - jsonObject.set("outputSize", outputData.getBytes(StandardCharsets.UTF_8).length); - // 去掉全部空格的MD5,用来判断pe - jsonObject.set("allStrippedOutputMd5", DigestUtils.md5DigestAsHex(outputData.replaceAll("\\s+", "").getBytes(StandardCharsets.UTF_8))); - // 默认去掉文末空格的MD5 - jsonObject.set("EOFStrippedOutputMd5", DigestUtils.md5DigestAsHex(rtrim(outputData).getBytes(StandardCharsets.UTF_8))); - } - - testCaseList.add(jsonObject); - } - - result.set("testCases", testCaseList); - - FileWriter infoFile = new FileWriter(testCasesDir + File.separator + "info", CharsetUtil.UTF_8); - // 写入记录文件 - infoFile.write(JSONUtil.toJsonStr(result)); - return result; - } - - // 本地有文件,进行数据初始化 生成json文件 - public JSONObject initLocalTestCase(String mode, - String version, - String testCasesDir, - List problemCaseList) { - - JSONObject result = new JSONObject(); - result.set("mode", mode); - result.set("version", version); - result.set("testCasesSize", problemCaseList.size()); - result.set("testCases", new JSONArray()); - - - for (ProblemCase problemCase : problemCaseList) { - JSONObject jsonObject = new JSONObject(); - jsonObject.set("caseId", problemCase.getId()); - jsonObject.set("score", problemCase.getScore()); - jsonObject.set("inputName", problemCase.getInput()); - jsonObject.set("outputName", problemCase.getOutput()); - // 读取输出文件 - FileReader readFile = new FileReader(testCasesDir + File.separator + problemCase.getOutput(), CharsetUtil.UTF_8); - String output = readFile.readString().replaceAll("\r\n", "\n"); - - // spj或interactive是根据特判程序输出判断结果,所以无需初始化测试数据 - if (Constants.JudgeMode.DEFAULT.getMode().equals(mode)) { - // 原数据MD5 - jsonObject.set("outputMd5", DigestUtils.md5DigestAsHex(output.getBytes(StandardCharsets.UTF_8))); - // 原数据大小 - jsonObject.set("outputSize", output.getBytes(StandardCharsets.UTF_8).length); - // 去掉全部空格的MD5,用来判断pe - jsonObject.set("allStrippedOutputMd5", DigestUtils.md5DigestAsHex(output.replaceAll("\\s+", "").getBytes(StandardCharsets.UTF_8))); - // 默认去掉文末空格的MD5 - jsonObject.set("EOFStrippedOutputMd5", DigestUtils.md5DigestAsHex(rtrim(output).getBytes(StandardCharsets.UTF_8))); - } - - ((JSONArray) result.get("testCases")).put(jsonObject); - } - - FileWriter infoFile = new FileWriter(testCasesDir + File.separator + "info", CharsetUtil.UTF_8); - // 写入记录文件 - infoFile.write(JSONUtil.toJsonStr(result)); - - return result; - } - - - // 获取指定题目的info数据 - public JSONObject loadTestCaseInfo(Long problemId, String testCasesDir, String version, String mode) throws SystemError { - if (FileUtil.exist(testCasesDir + File.separator + "info")) { - FileReader fileReader = new FileReader(testCasesDir + File.separator + "info", CharsetUtil.UTF_8); - String infoStr = fileReader.readString(); - JSONObject testcaseInfo = JSONUtil.parseObj(infoStr); - // 测试样例被改动需要重新生成 - if (!testcaseInfo.getStr("version", null).equals(version)) { - return tryInitTestCaseInfo(testCasesDir, problemId, version, mode); - } - return testcaseInfo; - } else { - return tryInitTestCaseInfo(testCasesDir, problemId, version, mode); - } - } - - // 若没有测试数据,则尝试从数据库获取并且初始化到本地,如果数据库中该题目测试数据为空,rsync同步也出了问题,则直接判系统错误 - public JSONObject tryInitTestCaseInfo(String testCasesDir, Long problemId, String version, String mode) throws SystemError { - - QueryWrapper queryWrapper = new QueryWrapper<>(); - queryWrapper.eq("pid", problemId); - List problemCases = problemCaseEntityService.list(queryWrapper); - - if (problemCases.size() == 0) { // 数据库也为空的话 - throw new SystemError("problemID:[" + problemId + "] test case has not found.", null, null); - } - - // 可能是zip上传记录的是文件名, - if (StringUtils.isEmpty(problemCases.get(0).getInput()) - || StringUtils.isEmpty(problemCases.get(0).getOutput()) - || (problemCases.get(0).getInput().endsWith(".in") - && (problemCases.get(0).getOutput().endsWith(".out") - || problemCases.get(0).getOutput().endsWith(".ans")))) { - - if (FileUtil.isEmpty(new File(testCasesDir))) { //如果本地对应文件夹也为空,说明文件丢失了 - throw new SystemError("problemID:[" + problemId + "] test case has not found.", null, null); - } else { - return initLocalTestCase(mode, version, testCasesDir, problemCases); - } - } else { - - List> testCases = new LinkedList<>(); - for (ProblemCase problemCase : problemCases) { - HashMap tmp = new HashMap<>(); - tmp.put("input", problemCase.getInput()); - tmp.put("output", problemCase.getOutput()); - tmp.put("caseId", problemCase.getId()); - tmp.put("score", problemCase.getScore()); - testCases.add(tmp); - } - - return initTestCase(testCases, problemId, version, mode); - } - } - - // 去除每行末尾的空白符 - public static String rtrim(String value) { - if (value == null) return null; - StringBuilder sb = new StringBuilder(); - String[] strArr = value.split("\n"); - for (String str : strArr) { - sb.append(str.replaceAll("\\s+$", "")).append("\n"); - } - return sb.toString().replaceAll("\\s+$", ""); - } -} \ No newline at end of file diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/SandboxRun.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/SandboxRun.java deleted file mode 100644 index bad9f9d..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/SandboxRun.java +++ /dev/null @@ -1,844 +0,0 @@ -package top.hcode.hoj.judge; - -import cn.hutool.json.JSONArray; -import cn.hutool.json.JSONObject; - -import cn.hutool.json.JSONUtil; -import lombok.extern.slf4j.Slf4j; -import org.springframework.http.HttpEntity; -import org.springframework.http.HttpHeaders; -import org.springframework.http.MediaType; -import org.springframework.http.ResponseEntity; -import org.springframework.http.client.SimpleClientHttpRequestFactory; -import org.springframework.util.StringUtils; -import org.springframework.web.client.RestClientResponseException; -import org.springframework.web.client.RestTemplate; -import top.hcode.hoj.common.exception.SystemError; -import top.hcode.hoj.util.Constants; - -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * @Author: Himit_ZH - * @Date: 2021/1/23 13:44 - * @Description: - */ - -/** - * args: string[]; // command line argument - * env?: string[]; // environment - *

- * // specifies file input / pipe collector for program file descriptors - * files?: (LocalFile | MemoryFile | PreparedFile | Pipe | null)[]; - * tty?: boolean; // enables tty on the input and output pipes (should have just one input & one output) - * // Notice: must have TERM environment variables (e.g. TERM=xterm) - *

- * // limitations - * cpuLimit?: number; // ns - * realCpuLimit?: number; // deprecated: use clock limit instead (still working) - * clockLimit?: number; // ns - * memoryLimit?: number; // byte - * stackLimit?: number; // byte (N/A on windows, macOS cannot set over 32M) - * procLimit?: number; - *

- * // copy the correspond file to the container dst path - * copyIn?: {[dst:string]:LocalFile | MemoryFile | PreparedFile}; - *

- * // copy out specifies files need to be copied out from the container after execution - * copyOut?: string[]; - * // similar to copyOut but stores file in executor service and returns fileId, later download through /file/:fileId - * copyOutCached?: string[]; - * // specifies the directory to dump container /w content - * copyOutDir: string - * // specifies the max file size to copy out - * copyOutMax: number; // byte - */ - -@Slf4j(topic = "hoj") -public class SandboxRun { - - private static final RestTemplate restTemplate; - - // 单例模式 - private static final SandboxRun instance = new SandboxRun(); - - private static final String SANDBOX_BASE_URL = "http://localhost:5050"; - - public static final HashMap RESULT_MAP_STATUS = new HashMap<>(); - - private static final int maxProcessNumber = 128; - - private static final int TIME_LIMIT_MS = 16000; - - private static final int MEMORY_LIMIT_MB = 512; - - private static final int STACK_LIMIT_MB = 256; - - private static final int STDIO_SIZE_MB = 32; - - private SandboxRun() { - - } - - static { - SimpleClientHttpRequestFactory requestFactory = new SimpleClientHttpRequestFactory(); - requestFactory.setConnectTimeout(20000); - requestFactory.setReadTimeout(180000); - restTemplate = new RestTemplate(requestFactory); - } - - static { - RESULT_MAP_STATUS.put("Time Limit Exceeded", Constants.Judge.STATUS_TIME_LIMIT_EXCEEDED.getStatus()); - RESULT_MAP_STATUS.put("Memory Limit Exceeded", Constants.Judge.STATUS_MEMORY_LIMIT_EXCEEDED.getStatus()); - RESULT_MAP_STATUS.put("Output Limit Exceeded", Constants.Judge.STATUS_RUNTIME_ERROR.getStatus()); - RESULT_MAP_STATUS.put("Accepted", Constants.Judge.STATUS_ACCEPTED.getStatus()); - RESULT_MAP_STATUS.put("Nonzero Exit Status", Constants.Judge.STATUS_RUNTIME_ERROR.getStatus()); - RESULT_MAP_STATUS.put("Internal Error", Constants.Judge.STATUS_SYSTEM_ERROR.getStatus()); - RESULT_MAP_STATUS.put("File Error", Constants.Judge.STATUS_SYSTEM_ERROR.getStatus()); - RESULT_MAP_STATUS.put("Signalled", Constants.Judge.STATUS_RUNTIME_ERROR.getStatus()); - } - - public static RestTemplate getRestTemplate() { - return restTemplate; - } - - public static String getSandboxBaseUrl() { - return SANDBOX_BASE_URL; - } - - public static final List signals = Arrays.asList( - "", // 0 - "Hangup", // 1 - "Interrupt", // 2 - "Quit", // 3 - "Illegal instruction", // 4 - "Trace/breakpoint trap", // 5 - "Aborted", // 6 - "Bus error", // 7 - "Floating point exception", // 8 - "Killed", // 9 - "User defined signal 1", // 10 - "Segmentation fault", // 11 - "User defined signal 2", // 12 - "Broken pipe", // 13 - "Alarm clock", // 14 - "Terminated", // 15 - "Stack fault", // 16 - "Child exited", // 17 - "Continued", // 18 - "Stopped (signal)", // 19 - "Stopped", // 20 - "Stopped (tty input)", // 21 - "Stopped (tty output)", // 22 - "Urgent I/O condition", // 23 - "CPU time limit exceeded", // 24 - "File size limit exceeded", // 25 - "Virtual timer expired", // 26 - "Profiling timer expired", // 27 - "Window changed", // 28 - "I/O possible", // 29 - "Power failure", // 30 - "Bad system call" // 31 - ); - - public JSONArray run(String uri, JSONObject param) throws SystemError { - HttpHeaders headers = new HttpHeaders(); - headers.setContentType(MediaType.APPLICATION_JSON); - HttpEntity request = new HttpEntity<>(JSONUtil.toJsonStr(param), headers); - ResponseEntity postForEntity; - try { - postForEntity = restTemplate.postForEntity(SANDBOX_BASE_URL + uri, request, String.class); - return JSONUtil.parseArray(postForEntity.getBody()); - } catch (RestClientResponseException ex) { - if (ex.getRawStatusCode() != 200) { - throw new SystemError("Cannot connect to sandbox service.", null, ex.getResponseBodyAsString()); - } - } catch (Exception e) { - throw new SystemError("Call SandBox Error.", null, e.getMessage()); - } - return null; - } - - public static void delFile(String fileId) { - - try { - restTemplate.delete(SANDBOX_BASE_URL + "/file/{0}", fileId); - } catch (RestClientResponseException ex) { - if (ex.getRawStatusCode() != 200) { - log.error("安全沙箱判题的删除内存中的文件缓存操作异常----------------->{}", ex.getResponseBodyAsString()); - } - } - - } - - /** - * "files": [{ - * "content": "" - * }, { - * "name": "stdout", - * "max": 1024 * 1024 * 32 - * }, { - * "name": "stderr", - * "max": 1024 * 1024 * 32 - * }] - */ - private static final JSONArray COMPILE_FILES = new JSONArray(); - - static { - JSONObject content = new JSONObject(); - content.set("content", ""); - - JSONObject stdout = new JSONObject(); - stdout.set("name", "stdout"); - stdout.set("max", 1024 * 1024 * STDIO_SIZE_MB); - - JSONObject stderr = new JSONObject(); - stderr.set("name", "stderr"); - stderr.set("max", 1024 * 1024 * STDIO_SIZE_MB); - COMPILE_FILES.put(content); - COMPILE_FILES.put(stdout); - COMPILE_FILES.put(stderr); - } - - /** - * @param maxCpuTime 最大编译的cpu时间 ms - * @param maxRealTime 最大编译的真实时间 ms - * @param maxMemory 最大编译的空间 b - * @param maxStack 最大编译的栈空间 b - * @param srcName 编译的源文件名字 - * @param exeName 编译生成的exe文件名字 - * @param args 编译的cmd参数 - * @param envs 编译的环境变量 - * @param code 编译的源代码 - * @param extraFiles 编译所需的额外文件 key:文件名,value:文件内容 - * @param needCopyOutCached 是否需要生成用户程序的缓存文件,即生成用户程序id - * @param needCopyOutExe 是否需要生成编译后的用户程序exe文件 - * @param copyOutDir 生成编译后的用户程序exe文件的指定路径 - * @MethodName compile - * @Description 编译运行 - * @Return - * @Since 2022/1/3 - */ - public static JSONArray compile(Long maxCpuTime, - Long maxRealTime, - Long maxMemory, - Long maxStack, - String srcName, - String exeName, - List args, - List envs, - String code, - HashMap extraFiles, - Boolean needCopyOutCached, - Boolean needCopyOutExe, - String copyOutDir) throws SystemError { - JSONObject cmd = new JSONObject(); - cmd.set("args", args); - cmd.set("env", envs); - cmd.set("files", COMPILE_FILES); - // ms-->ns - cmd.set("cpuLimit", maxCpuTime * 1000 * 1000L); - cmd.set("clockLimit", maxRealTime * 1000 * 1000L); - // byte - cmd.set("memoryLimit", maxMemory); - cmd.set("procLimit", maxProcessNumber); - cmd.set("stackLimit", maxStack); - - JSONObject fileContent = new JSONObject(); - fileContent.set("content", code); - - JSONObject copyIn = new JSONObject(); - copyIn.set(srcName, fileContent); - - if (extraFiles != null) { - for (Map.Entry entry : extraFiles.entrySet()) { - if (!StringUtils.isEmpty(entry.getKey()) && !StringUtils.isEmpty(entry.getValue())) { - JSONObject content = new JSONObject(); - content.set("content", entry.getValue()); - copyIn.set(entry.getKey(), content); - } - } - } - - cmd.set("copyIn", copyIn); - cmd.set("copyOut", new JSONArray().put("stdout").put("stderr")); - - if (needCopyOutCached) { - cmd.set("copyOutCached", new JSONArray().put(exeName)); - } - - if (needCopyOutExe) { - cmd.set("copyOutDir", copyOutDir); - } - - JSONObject param = new JSONObject(); - param.set("cmd", new JSONArray().put(cmd)); - - JSONArray result = instance.run("/run", param); - JSONObject tmp = (JSONObject) result.get(0); - ((JSONObject) result.get(0)).set("status", RESULT_MAP_STATUS.get(tmp.getStr("status"))); - return result; - } - - - /** - * @param args 普通评测运行cmd的命令参数 - * @param envs 普通评测运行的环境变量 - * @param testCasePath 题目数据的输入文件路径 - * @param testCaseContent 题目数据的输入数据(与testCasePath二者选一) - * @param maxTime 评测的最大限制时间 ms - * @param maxOutputSize 评测的最大输出大小 kb - * @param maxStack 评测的最大限制栈空间 mb - * @param exeName 评测的用户程序名称 - * @param fileId 评测的用户程序文件id - * @param fileContent 评测的用户程序文件内容,如果userFileId存在则为null - * @MethodName testCase - * @Description 普通评测 - * @Return JSONArray - * @Since 2022/1/3 - */ - public static JSONArray testCase(List args, - List envs, - String testCasePath, - String testCaseContent, - Long maxTime, - Long maxMemory, - Long maxOutputSize, - Integer maxStack, - String exeName, - String fileId, - String fileContent) throws SystemError { - - JSONObject cmd = new JSONObject(); - cmd.set("args", args); - cmd.set("env", envs); - - JSONArray files = new JSONArray(); - JSONObject content = new JSONObject(); - if (StringUtils.isEmpty(testCasePath)) { - content.set("content", testCaseContent); - } else { - content.set("src", testCasePath); - } - - JSONObject stdout = new JSONObject(); - stdout.set("name", "stdout"); - stdout.set("max", maxOutputSize); - - JSONObject stderr = new JSONObject(); - stderr.set("name", "stderr"); - stderr.set("max", 1024 * 1024 * 16); - files.put(content); - files.put(stdout); - files.put(stderr); - - cmd.set("files", files); - - // ms-->ns - cmd.set("cpuLimit", maxTime * 1000 * 1000L); - cmd.set("clockLimit", maxTime * 1000 * 1000L * 3); - // byte - if (maxMemory >= MEMORY_LIMIT_MB) { - cmd.set("memoryLimit", (maxMemory + 100) * 1024 * 1024L); - } else { - cmd.set("memoryLimit", MEMORY_LIMIT_MB * 1024 * 1024L); - } - cmd.set("procLimit", maxProcessNumber); - cmd.set("stackLimit", maxStack * 1024 * 1024L); - - JSONObject exeFile = new JSONObject(); - if (!StringUtils.isEmpty(fileId)) { - exeFile.set("fileId", fileId); - } else { - exeFile.set("content", fileContent); - } - JSONObject copyIn = new JSONObject(); - copyIn.set(exeName, exeFile); - - cmd.set("copyIn", copyIn); - cmd.set("copyOut", new JSONArray().put("stdout").put("stderr")); - - JSONObject param = new JSONObject(); - param.set("cmd", new JSONArray().put(cmd)); - - // 调用判题安全沙箱 - JSONArray result = instance.run("/run", param); - - JSONObject tmp = (JSONObject) result.get(0); - ((JSONObject) result.get(0)).set("status", RESULT_MAP_STATUS.get(tmp.getStr("status"))); - return result; - } - - - /** - * @param args 特殊判题的运行cmd命令参数 - * @param envs 特殊判题的运行环境变量 - * @param userOutputFilePath 用户程序输出文件的路径 - * @param userOutputFileName 用户程序输出文件的名字 - * @param testCaseInputFilePath 题目数据的输入文件的路径 - * @param testCaseInputFileName 题目数据的输入文件的名字 - * @param testCaseOutputFilePath 题目数据的输出文件的路径 - * @param testCaseOutputFileName 题目数据的输出文件的路径 - * @param spjExeSrc 特殊判题的exe文件的路径 - * @param spjExeName 特殊判题的exe文件的名字 - * @MethodName spjCheckResult - * @Description 特殊判题的评测 - * @Return JSONArray - * @Since 2022/1/3 - */ - public static JSONArray spjCheckResult(List args, - List envs, - String userOutputFilePath, - String userOutputFileName, - String testCaseInputFilePath, - String testCaseInputFileName, - String testCaseOutputFilePath, - String testCaseOutputFileName, - String spjExeSrc, - String spjExeName) throws SystemError { - - JSONObject cmd = new JSONObject(); - cmd.set("args", args); - cmd.set("env", envs); - - JSONArray outFiles = new JSONArray(); - - JSONObject content = new JSONObject(); - content.set("content", ""); - - JSONObject outStdout = new JSONObject(); - outStdout.set("name", "stdout"); - outStdout.set("max", 1024 * 1024 * 16); - - JSONObject outStderr = new JSONObject(); - outStderr.set("name", "stderr"); - outStderr.set("max", 1024 * 1024 * 16); - - outFiles.put(content); - outFiles.put(outStdout); - outFiles.put(outStderr); - cmd.set("files", outFiles); - - // ms-->ns - cmd.set("cpuLimit", TIME_LIMIT_MS * 1000 * 1000L); - cmd.set("clockLimit", TIME_LIMIT_MS * 1000 * 1000L * 3); - // byte - cmd.set("memoryLimit", MEMORY_LIMIT_MB * 1024 * 1024L); - cmd.set("procLimit", maxProcessNumber); - cmd.set("stackLimit", STACK_LIMIT_MB * 1024 * 1024L); - - - JSONObject spjExeFile = new JSONObject(); - spjExeFile.set("src", spjExeSrc); - - JSONObject useOutputFileSrc = new JSONObject(); - useOutputFileSrc.set("src", userOutputFilePath); - - JSONObject stdInputFileSrc = new JSONObject(); - stdInputFileSrc.set("src", testCaseInputFilePath); - - JSONObject stdOutFileSrc = new JSONObject(); - stdOutFileSrc.set("src", testCaseOutputFilePath); - - JSONObject spjCopyIn = new JSONObject(); - - spjCopyIn.set(spjExeName, spjExeFile); - spjCopyIn.set(userOutputFileName, useOutputFileSrc); - spjCopyIn.set(testCaseInputFileName, stdInputFileSrc); - spjCopyIn.set(testCaseOutputFileName, stdOutFileSrc); - - - cmd.set("copyIn", spjCopyIn); - cmd.set("copyOut", new JSONArray().put("stdout").put("stderr")); - - JSONObject param = new JSONObject(); - - param.set("cmd", new JSONArray().put(cmd)); - - // 调用判题安全沙箱 - JSONArray result = instance.run("/run", param); - - JSONObject tmp = (JSONObject) result.get(0); - ((JSONObject) result.get(0)).set("status", RESULT_MAP_STATUS.get(tmp.getStr("status"))); - return result; - } - - - /** - * @param args cmd的命令参数 评测运行的命令 - * @param envs 测评的环境变量 - * @param userExeName 用户程序的名字 - * @param userFileId 用户程序在编译后返回的id,主要是对应内存中已编译后的文件 - * @param userFileContent 用户程序文件的内容,如果userFileId存在则为null - * @param userMaxTime 用户程序的最大测评时间 ms - * @param userMaxStack 用户程序的最大测评栈空间 mb - * @param testCaseInputPath 题目数据的输入文件路径 - * @param testCaseInputFileName 题目数据的输入文件名字 - * @param testCaseOutputFilePath 题目数据的输出文件路径 - * @param testCaseOutputFileName 题目数据的输出文件名字 - * @param userOutputFileName 用户程序的输出文件名字 - * @param interactArgs 交互程序运行的cmd命令参数 - * @param interactEnvs 交互程序运行的环境变量 - * @param interactExeSrc 交互程序的exe文件路径 - * @param interactExeName 交互程序的exe文件名字 - * @MethodName interactTestCase - * @Description 交互评测 - * @Return JSONArray - * @Since 2022/1/3 - */ - public static JSONArray interactTestCase(List args, - List envs, - String userExeName, - String userFileId, - String userFileContent, - Long userMaxTime, - Long userMaxMemory, - Integer userMaxStack, - String testCaseInputPath, - String testCaseInputFileName, - String testCaseOutputFilePath, - String testCaseOutputFileName, - String userOutputFileName, - List interactArgs, - List interactEnvs, - String interactExeSrc, - String interactExeName) throws SystemError { - - /** - * 注意:用户源代码需要先编译,若是通过编译需要先将文件存入内存,再利用管道判题,同时特殊判题程序必须已编译且存在(否则判题失败,系统错误)! - */ - - JSONObject pipeInputCmd = new JSONObject(); - pipeInputCmd.set("args", args); - pipeInputCmd.set("env", envs); - - JSONArray files = new JSONArray(); - - JSONObject stderr = new JSONObject(); - stderr.set("name", "stderr"); - stderr.set("max", 1024 * 1024 * STDIO_SIZE_MB); - - files.put(new JSONObject()); - files.put(new JSONObject()); - files.put(stderr); - - String inTmp = files.toString().replace("{}", "null"); - pipeInputCmd.set("files", JSONUtil.parseArray(inTmp, false)); - - // ms-->ns - pipeInputCmd.set("cpuLimit", userMaxTime * 1000 * 1000L); - pipeInputCmd.set("clockLimit", userMaxTime * 1000 * 1000L * 3); - - // byte - - pipeInputCmd.set("memoryLimit", (userMaxMemory + 100) * 1024 * 1024L); - pipeInputCmd.set("procLimit", maxProcessNumber); - pipeInputCmd.set("stackLimit", userMaxStack * 1024 * 1024L); - - JSONObject exeFile = new JSONObject(); - if (!StringUtils.isEmpty(userFileId)) { - exeFile.set("fileId", userFileId); - } else { - exeFile.set("content", userFileContent); - } - JSONObject copyIn = new JSONObject(); - copyIn.set(userExeName, exeFile); - - pipeInputCmd.set("copyIn", copyIn); - pipeInputCmd.set("copyOut", new JSONArray()); - - - // 管道输出,用户程序输出数据经过特殊判题程序后,得到的最终输出结果。 - JSONObject pipeOutputCmd = new JSONObject(); - pipeOutputCmd.set("args", interactArgs); - pipeOutputCmd.set("env", interactEnvs); - - JSONArray outFiles = new JSONArray(); - - - JSONObject outStderr = new JSONObject(); - outStderr.set("name", "stderr"); - outStderr.set("max", 1024 * 1024 * STDIO_SIZE_MB); - outFiles.put(new JSONObject()); - outFiles.put(new JSONObject()); - outFiles.put(outStderr); - String outTmp = outFiles.toString().replace("{}", "null"); - pipeOutputCmd.set("files", JSONUtil.parseArray(outTmp, false)); - - // ms-->ns - pipeOutputCmd.set("cpuLimit", userMaxTime * 1000 * 1000L * 2); - pipeOutputCmd.set("clockLimit", userMaxTime * 1000 * 1000L * 3 * 2); - // byte - pipeOutputCmd.set("memoryLimit", (userMaxMemory + 100) * 1024 * 1024L * 2); - pipeOutputCmd.set("procLimit", maxProcessNumber); - pipeOutputCmd.set("stackLimit", STACK_LIMIT_MB * 1024 * 1024L); - - JSONObject spjExeFile = new JSONObject(); - spjExeFile.set("src", interactExeSrc); - - JSONObject stdInputFileSrc = new JSONObject(); - stdInputFileSrc.set("src", testCaseInputPath); - - JSONObject stdOutFileSrc = new JSONObject(); - stdOutFileSrc.set("src", testCaseOutputFilePath); - - JSONObject interactiveCopyIn = new JSONObject(); - interactiveCopyIn.set(interactExeName, spjExeFile); - interactiveCopyIn.set(testCaseInputFileName, stdInputFileSrc); - interactiveCopyIn.set(testCaseOutputFileName, stdOutFileSrc); - - - pipeOutputCmd.set("copyIn", interactiveCopyIn); - pipeOutputCmd.set("copyOut", new JSONArray().put(userOutputFileName)); - - JSONArray cmdList = new JSONArray(); - cmdList.put(pipeInputCmd); - cmdList.put(pipeOutputCmd); - - JSONObject param = new JSONObject(); - // 添加cmd指令 - param.set("cmd", cmdList); - - // 添加管道映射 - JSONArray pipeMapping = new JSONArray(); - // 用户程序 - JSONObject user = new JSONObject(); - - JSONObject userIn = new JSONObject(); - userIn.set("index", 0); - userIn.set("fd", 1); - - JSONObject userOut = new JSONObject(); - userOut.set("index", 1); - userOut.set("fd", 0); - - user.set("in", userIn); - user.set("out", userOut); - user.set("max", STDIO_SIZE_MB * 1024 * 1024); - user.set("proxy", true); - user.set("name", "stdout"); - - // 评测程序 - JSONObject judge = new JSONObject(); - - JSONObject judgeIn = new JSONObject(); - judgeIn.set("index", 1); - judgeIn.set("fd", 1); - - JSONObject judgeOut = new JSONObject(); - judgeOut.set("index", 0); - judgeOut.set("fd", 0); - - judge.set("in", judgeIn); - judge.set("out", judgeOut); - judge.set("max", STDIO_SIZE_MB * 1024 * 1024); - judge.set("proxy", true); - judge.set("name", "stdout"); - - - // 添加到管道映射列表 - pipeMapping.add(user); - pipeMapping.add(judge); - - param.set("pipeMapping", pipeMapping); - - // 调用判题安全沙箱 - JSONArray result = instance.run("/run", param); - JSONObject userRes = (JSONObject) result.get(0); - JSONObject interactiveRes = (JSONObject) result.get(1); - userRes.set("status", RESULT_MAP_STATUS.get(userRes.getStr("status"))); - interactiveRes.set("status", RESULT_MAP_STATUS.get(interactiveRes.getStr("status"))); - return result; - } - -} - /* - 1. compile - Json Request Body - { - "cmd": [{ - "args": ["/usr/bin/g++", "a.cc", "-o", "a"], - "env": ["PATH=/usr/bin:/bin"], - "files": [{ - "content": "" - }, { - "name": "stdout", - "max": 10240 - }, { - "name": "stderr", - "max": 10240 - }], - "cpuLimit": 10000000000, - "memoryLimit": 104857600, - "procLimit": 50, - "copyIn": { - "a.cc": { - "content": "#include \nusing namespace std;\nint main() {\nint a, b;\ncin >> a >> b;\ncout << a + b << endl;\n}" - } - }, - "copyOut": ["stdout", "stderr"], - "copyOutCached": ["a.cc", "a"], - "copyOutDir": "1" - }] - } - - Json Response Data - - [ - { - "status": "Accepted", - "exitStatus": 0, - "time": 303225231, - "memory": 32243712, - "runTime": 524177700, - "files": { - "stderr": "", - "stdout": "" - }, - "fileIds": { - "a": "5LWIZAA45JHX4Y4Z", - "a.cc": "NOHPGGDTYQUFRSLJ" - } - } - ] - 2.test case - - Json Request Body - { - "cmd": [{ - "args": ["a"], - "env": ["PATH=/usr/bin:/bin","LANG=en_US.UTF-8","LC_ALL=en_US.UTF-8","LANGUAGE=en_US:en"], - "files": [{ - "src": "/judge/test_case/problem_1010/1.in" - }, { - "name": "stdout", - "max": 10240 - }, { - "name": "stderr", - "max": 10240 - }], - "cpuLimit": 10000000000, - "realCpuLimit":30000000000, - "stackLimit":134217728, - "memoryLimit": 104811111, - "procLimit": 50, - "copyIn": { - "a":{"fileId":"WDQL5TNLRRVB2KAP"} - }, - "copyOut": ["stdout", "stderr"] - }] - } - - Json Response Data - [{ - "status": "Accepted", - "exitStatus": 0, - "time": 3171607, - "memory": 475136, - "runTime": 110396333, - "files": { - "stderr": "", - "stdout": "23\n" - } - }] - - 3. Interactive - - { - "pipeMapping": [ - { - "in": { - "max": 16777216, - "index": 0, - "fd": 1 - }, - "out": { - "index": 1, - "fd": 0 - } - } - ], - "cmd": [ - { - "stackLimit": 134217728, - "cpuLimit": 3000000000, - "realCpuLimit": 9000000000, - "clockLimit": 64, - "env": [ - "LANG=en_US.UTF-8", - "LANGUAGE=en_US:en", - "LC_ALL=en_US.UTF-8", - "PYTHONIOENCODING=utf-8" - ], - "copyOut": [ - "stderr" - ], - "args": [ - "/usr/bin/python3", - "main" - ], - "files": [ - { - "src": "/judge/test_case/problem_1002/5.in" - }, - null, - { - "max": 16777216, - "name": "stderr" - } - ], - "memoryLimit": 536870912, - "copyIn": { - "main": { - "fileId": "CGTRDEMKW5VAYN6O" - } - } - }, - { - "stackLimit": 134217728, - "cpuLimit": 8000000000, - "clockLimit": 24000000000, - "env": [ - "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", - "LANG=en_US.UTF-8", - "LANGUAGE=en_US:en", - "LC_ALL=en_US.UTF-8" - ], - "copyOut": [ - "stdout", - "stderr" - ], - "args": [ - "/w/spj", - "/w/tmp" - ], - "files": [ - null, - { - "max": 16777216, - "name": "stdout" - }, - { - "max": 16777216, - "name": "stderr" - } - ], - "memoryLimit": 536870912, - "copyIn": { - "spj": { - "src": "/judge/spj/1002/spj" - }, - "tmp": { - "src": "/judge/test_case/problem_1002/5.out" - } - }, - "procLimit": 64 - } - ] -} - - - */ diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/entity/JudgeDTO.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/entity/JudgeDTO.java deleted file mode 100644 index 1054297..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/entity/JudgeDTO.java +++ /dev/null @@ -1,53 +0,0 @@ -package top.hcode.hoj.judge.entity; - -import lombok.Builder; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -import java.io.Serializable; - -/** - * @Author: Himit_ZH - * @Date: 2022/1/2 20:58 - * @Description: 评测题目的传输类 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@Accessors(chain = true) -@Builder -public class JudgeDTO implements Serializable { - - private static final long serialVersionUID = 666L; - - /** - * 当前题目评测点的的编号 - */ - private Integer testCaseId; - - /** - * 当前题目评测点的输入文件的绝对路径 - */ - private String testCaseInputPath; - - /** - * 当前题目评测点的输入内容 - */ - private String testCaseInputContent; - - /** - * 当前题目评测点的输出文件的绝对路径 - */ - private String testCaseOutputPath; - - /** - * 当前题目评测点的标准输出内容(目前只用于testJudge) - */ - private String testCaseOutputContent; - - /** - * 当前题目评测点的输出字符大小限制 kb - */ - private Long maxOutputSize; - -} \ No newline at end of file diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/entity/JudgeGlobalDTO.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/entity/JudgeGlobalDTO.java deleted file mode 100644 index ea36432..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/entity/JudgeGlobalDTO.java +++ /dev/null @@ -1,107 +0,0 @@ -package top.hcode.hoj.judge.entity; - -import cn.hutool.json.JSONObject; -import lombok.Builder; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; -import top.hcode.hoj.util.Constants; - -import java.io.Serializable; -import java.util.HashMap; - -/** - * @Author: Himit_ZH - * @Date: 2022/1/3 11:53 - * @Description: 一次评测全局通用的传输实体类 - */ - -@Data -@EqualsAndHashCode(callSuper = false) -@Accessors(chain = true) -@Builder -public class JudgeGlobalDTO implements Serializable { - - private static final long serialVersionUID = 888L; - - /** - * 当前评测题目的id - */ - private Long problemId; - - /** - * 当前评测题目的模式 - */ - private Constants.JudgeMode judgeMode; - - /** - * 用户程序在沙盒编译后对应内存文件的id,运行时需要传入 - */ - private String userFileId; - - /** - * 用户程序代码文件的内容 - */ - private String userFileContent; - - /** - * 整个评测的工作目录 - */ - private String runDir; - - /** - * 判题沙盒评测程序的最大实际时间,一般为题目最大限制时间+200ms - */ - private Long testTime; - - /** - * 当前题目评测的最大时间限制 ms - */ - private Long maxTime; - - /** - * 当前题目评测的最大空间限制 mb - */ - private Long maxMemory; - - /** - * 当前题目评测的最大栈空间限制 mb - */ - private Integer maxStack; - - /** - * 评测数据json内容 - */ - private JSONObject testCaseInfo; - - /** - * 交互程序或特判程序所需的额外文件 key:文件名,value:文件路径 - */ - private HashMap judgeExtraFiles; - - /** - * 普通评测的命令配置 - */ - Constants.RunConfig runConfig; - - /** - * 特殊判题的命令配置 - */ - Constants.RunConfig spjRunConfig; - - /** - * 交互判题的命令配置 - */ - Constants.RunConfig interactiveRunConfig; - - /** - * 是否需要生成用户程序输出的文件 - */ - private Boolean needUserOutputFile; - - /** - * 是否需要自动移除评测数据的行末空格 - */ - private Boolean removeEOLBlank; - -} \ No newline at end of file diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/entity/SandBoxRes.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/entity/SandBoxRes.java deleted file mode 100644 index 24bfb0d..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/entity/SandBoxRes.java +++ /dev/null @@ -1,49 +0,0 @@ -package top.hcode.hoj.judge.entity; - -import lombok.Builder; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.ToString; -import lombok.experimental.Accessors; - -/** - * @Author: Himit_ZH - * @Date: 2022/1/3 15:27 - * @Description: 单个测评结果实体类 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@Accessors(chain = true) -@Builder -public class SandBoxRes { - /** - * 单个程序的状态码 - */ - private Integer status; - - /** - * 单个程序的退出码 - */ - private Integer exitCode; - - /** - * 单个程序的运行所耗空间 kb - */ - private Long memory; - - /** - * 单个程序的运行所耗时间 ms - */ - private Long time; - - /** - * 单个程序的标准输出 - */ - private String stdout; - - /** - * 单个程序的错误信息 - */ - private String stderr; - -} \ No newline at end of file diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/DefaultJudge.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/DefaultJudge.java deleted file mode 100644 index d23ee2a..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/DefaultJudge.java +++ /dev/null @@ -1,129 +0,0 @@ -package top.hcode.hoj.judge.task; - -import cn.hutool.json.JSONArray; -import cn.hutool.json.JSONObject; -import org.springframework.stereotype.Component; -import org.springframework.util.DigestUtils; -import org.springframework.util.StringUtils; -import top.hcode.hoj.common.exception.SystemError; -import top.hcode.hoj.judge.AbstractJudge; -import top.hcode.hoj.judge.SandboxRun; -import top.hcode.hoj.judge.entity.JudgeDTO; -import top.hcode.hoj.judge.entity.JudgeGlobalDTO; -import top.hcode.hoj.judge.entity.SandBoxRes; -import top.hcode.hoj.util.Constants; - -import java.nio.charset.StandardCharsets; - -/** - * @Author: Himit_ZH - * @Date: 2022/1/2 21:18 - * @Description: 普通评测 - */ -@Component -public class DefaultJudge extends AbstractJudge { - @Override - public JSONArray judgeCase(JudgeDTO judgeDTO, JudgeGlobalDTO judgeGlobalDTO) throws SystemError { - Constants.RunConfig runConfig = judgeGlobalDTO.getRunConfig(); - // 调用安全沙箱使用测试点对程序进行测试 - return SandboxRun.testCase( - parseRunCommand(runConfig.getCommand(), runConfig, null, null, null), - runConfig.getEnvs(), - judgeDTO.getTestCaseInputPath(), - judgeDTO.getTestCaseInputContent(), - judgeGlobalDTO.getTestTime(), - judgeGlobalDTO.getMaxMemory(), - judgeDTO.getMaxOutputSize(), - judgeGlobalDTO.getMaxStack(), - runConfig.getExeName(), - judgeGlobalDTO.getUserFileId(), - judgeGlobalDTO.getUserFileContent()); - } - - @Override - public JSONObject checkResult(SandBoxRes sandBoxRes, JudgeDTO judgeDTO, JudgeGlobalDTO judgeGlobalDTO) { - - JSONObject result = new JSONObject(); - - StringBuilder errMsg = new StringBuilder(); - // 如果测试跑题无异常 - if (sandBoxRes.getStatus().equals(Constants.Judge.STATUS_ACCEPTED.getStatus())) { - - // 对结果的时间损耗和空间损耗与题目限制做比较,判断是否mle和tle - if (sandBoxRes.getTime() > judgeGlobalDTO.getMaxTime()) { - result.set("status", Constants.Judge.STATUS_TIME_LIMIT_EXCEEDED.getStatus()); - } else if (sandBoxRes.getMemory() > judgeGlobalDTO.getMaxMemory() * 1024) { - result.set("status", Constants.Judge.STATUS_MEMORY_LIMIT_EXCEEDED.getStatus()); - } else { - // 与原测试数据输出的md5进行对比 AC或者是WA - JSONObject testcaseInfo = (JSONObject) ((JSONArray) judgeGlobalDTO.getTestCaseInfo().get("testCases")).get(judgeDTO.getTestCaseId() - 1); - result.set("status", compareOutput(sandBoxRes.getStdout(), judgeGlobalDTO.getRemoveEOLBlank(), testcaseInfo)); - } - } else if (sandBoxRes.getStatus().equals(Constants.Judge.STATUS_TIME_LIMIT_EXCEEDED.getStatus())) { - result.set("status", Constants.Judge.STATUS_TIME_LIMIT_EXCEEDED.getStatus()); - } else if (sandBoxRes.getExitCode() != 0) { - result.set("status", Constants.Judge.STATUS_RUNTIME_ERROR.getStatus()); - if (sandBoxRes.getExitCode() < 32) { - errMsg.append(String.format("The program return exit status code: %s (%s)\n", sandBoxRes.getExitCode(), SandboxRun.signals.get(sandBoxRes.getExitCode()))); - } else { - errMsg.append(String.format("The program return exit status code: %s\n", sandBoxRes.getExitCode())); - } - } else { - result.set("status", sandBoxRes.getStatus()); - } - - // b - result.set("memory", sandBoxRes.getMemory()); - // ns->ms - result.set("time", sandBoxRes.getTime()); - -// if (!StringUtils.isEmpty(sandBoxRes.getStdout())) { -// // 对于当前测试样例,用户程序的输出对应生成的文件 -// FileWriter stdWriter = new FileWriter(judgeGlobalDTO.getRunDir() + "/" + judgeDTO.getTestCaseId() + ".out"); -// stdWriter.write(sandBoxRes.getStdout()); -// } - - // 记录该测试点的错误信息 - if (!StringUtils.isEmpty(errMsg.toString())) { - String str = errMsg.toString(); - result.set("errMsg", str.substring(0, Math.min(1024 * 1024, str.length()))); - } - - if (judgeGlobalDTO.getNeedUserOutputFile()) { // 如果需要获取用户对于该题目的输出 - result.set("output", sandBoxRes.getStdout()); - } - - return result; - } - - @Override - public JSONObject checkMultipleResult(SandBoxRes userSandBoxRes, SandBoxRes interactiveSandBoxRes, JudgeDTO judgeDTO, JudgeGlobalDTO judgeGlobalDTO) { - return null; - } - - // 根据评测结果与用户程序输出的字符串MD5进行对比 - private Integer compareOutput(String userOutput, Boolean isRemoveEOLBlank, JSONObject testcaseInfo) { - - // 如果当前题目选择默认去掉字符串末位空格 - if (isRemoveEOLBlank) { - String userOutputMd5 = DigestUtils.md5DigestAsHex(rtrim(userOutput).getBytes(StandardCharsets.UTF_8)); - if (userOutputMd5.equals(testcaseInfo.getStr("EOFStrippedOutputMd5"))) { - return Constants.Judge.STATUS_ACCEPTED.getStatus(); - } - } else { // 不选择默认去掉文末空格 与原数据进行对比 - String userOutputMd5 = DigestUtils.md5DigestAsHex(userOutput.getBytes(StandardCharsets.UTF_8)); - if (userOutputMd5.equals(testcaseInfo.getStr("outputMd5"))) { - return Constants.Judge.STATUS_ACCEPTED.getStatus(); - } - } - // 如果不AC,进行PE判断,否则为WA - String userOutputMd5 = DigestUtils.md5DigestAsHex(userOutput.replaceAll("\\s+", "").getBytes(StandardCharsets.UTF_8)); - if (userOutputMd5.equals(testcaseInfo.getStr("allStrippedOutputMd5"))) { - return Constants.Judge.STATUS_PRESENTATION_ERROR.getStatus(); - } else { - return Constants.Judge.STATUS_WRONG_ANSWER.getStatus(); - } - } - - -} \ No newline at end of file diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/InteractiveJudge.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/InteractiveJudge.java deleted file mode 100644 index 984d2c6..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/InteractiveJudge.java +++ /dev/null @@ -1,176 +0,0 @@ -package top.hcode.hoj.judge.task; - -import cn.hutool.core.util.NumberUtil; -import cn.hutool.json.JSONArray; -import cn.hutool.json.JSONObject; -import org.springframework.stereotype.Component; -import org.springframework.util.StringUtils; -import top.hcode.hoj.common.exception.SystemError; -import top.hcode.hoj.judge.AbstractJudge; -import top.hcode.hoj.judge.SandboxRun; -import top.hcode.hoj.judge.entity.JudgeDTO; -import top.hcode.hoj.judge.entity.JudgeGlobalDTO; -import top.hcode.hoj.judge.entity.SandBoxRes; -import top.hcode.hoj.util.Constants; - -import java.io.File; - -/** - * @Author: Himit_ZH - * @Date: 2022/1/2 23:24 - * @Description: 交互评测 - */ -@Component -public class InteractiveJudge extends AbstractJudge { - - @Override - public JSONArray judgeCase(JudgeDTO judgeDTO, JudgeGlobalDTO judgeGlobalDTO) throws SystemError { - - Constants.RunConfig runConfig = judgeGlobalDTO.getRunConfig(); - Constants.RunConfig interactiveRunConfig = judgeGlobalDTO.getInteractiveRunConfig(); - - // 交互程序的路径 - String interactiveExeSrc = Constants.JudgeDir.INTERACTIVE_WORKPLACE_DIR.getContent() - + File.separator + judgeGlobalDTO.getProblemId() + File.separator + interactiveRunConfig.getExeName(); - - String testCaseInputFileName = judgeGlobalDTO.getProblemId() + "_input"; - String testCaseOutputFileName = judgeGlobalDTO.getProblemId() + "_output"; - - String userOutputFileName = judgeGlobalDTO.getProblemId() + "_user_output"; - - return SandboxRun.interactTestCase( - parseRunCommand(runConfig.getCommand(), runConfig, null, null, null), - runConfig.getEnvs(), - runConfig.getExeName(), - judgeGlobalDTO.getUserFileId(), - judgeGlobalDTO.getUserFileContent(), - judgeGlobalDTO.getTestTime(), - judgeGlobalDTO.getMaxMemory(), - judgeGlobalDTO.getMaxStack(), - judgeDTO.getTestCaseInputPath(), - testCaseInputFileName, - judgeDTO.getTestCaseOutputPath(), - testCaseOutputFileName, - userOutputFileName, - parseRunCommand(interactiveRunConfig.getCommand(), interactiveRunConfig, testCaseInputFileName, userOutputFileName, testCaseOutputFileName), - interactiveRunConfig.getEnvs(), - interactiveExeSrc, - interactiveRunConfig.getExeName()); - } - - @Override - public JSONObject checkResult(SandBoxRes sandBoxRes, JudgeDTO judgeDTO, JudgeGlobalDTO judgeGlobalDTO) throws SystemError { - return null; - } - - @Override - public JSONObject checkMultipleResult(SandBoxRes userSandBoxRes, SandBoxRes interactiveSandBoxRes, JudgeDTO judgeDTO, JudgeGlobalDTO judgeGlobalDTO) { - - JSONObject result = new JSONObject(); - - // 记录错误信息 - StringBuilder errMsg = new StringBuilder(); - - int userExitCode = userSandBoxRes.getExitCode(); - result.set("status", userSandBoxRes.getStatus()); - // 如果运行超过题目限制时间,直接TLE - if (userSandBoxRes.getTime() > judgeGlobalDTO.getMaxTime()) { - result.set("status", Constants.Judge.STATUS_TIME_LIMIT_EXCEEDED.getStatus()); - } else if (userSandBoxRes.getMemory() > judgeGlobalDTO.getMaxMemory() * 1024) { // 如果运行超过题目限制空间,直接MLE - result.set("status", Constants.Judge.STATUS_MEMORY_LIMIT_EXCEEDED.getStatus()); - } else if ((userExitCode != 0 && userExitCode != 13) || (userExitCode == 13 && interactiveSandBoxRes.getExitCode() == 0)) { - // Broken Pipe - result.set("status", Constants.Judge.STATUS_RUNTIME_ERROR.getStatus()); - if (userExitCode < 32) { - errMsg.append(String.format("The program return exit status code: %s (%s)\n", userExitCode, SandboxRun.signals.get(userExitCode))); - } else { - errMsg.append(String.format("The program return exit status code: %s\n", userExitCode)); - } - } else { - // 根据交互程序的退出状态码及输出进行判断 - JSONObject interactiveCheckRes = checkInteractiveRes(interactiveSandBoxRes); - int code = interactiveCheckRes.getInt("code"); - if (code == SPJ_WA) { - result.set("status", Constants.Judge.STATUS_WRONG_ANSWER.getStatus()); - } else if (code == SPJ_AC) { - result.set("status", Constants.Judge.STATUS_ACCEPTED.getStatus()); - } else if (code == SPJ_PE) { - result.set("status", Constants.Judge.STATUS_PRESENTATION_ERROR.getStatus()); - } else if (code == SPJ_PC) { - result.set("status", Constants.Judge.STATUS_PARTIAL_ACCEPTED.getStatus()); - result.set("percentage", interactiveCheckRes.getDouble("percentage")); - } else { - result.set("status", Constants.Judge.STATUS_SYSTEM_ERROR.getStatus()); - } - - String spjErrMsg = interactiveCheckRes.getStr("errMsg"); - if (!StringUtils.isEmpty(spjErrMsg)) { - errMsg.append(spjErrMsg).append(" "); - } - if (interactiveSandBoxRes.getExitCode() != 0 && !StringUtils.isEmpty(interactiveSandBoxRes.getStderr())) { - errMsg.append(String.format("Interactive program exited with code: %s", interactiveSandBoxRes.getExitCode())); - } - } - // kb - result.set("memory", userSandBoxRes.getMemory()); - // ms - result.set("time", userSandBoxRes.getTime()); - - // 记录该测试点的错误信息 - if (!StringUtils.isEmpty(errMsg.toString())) { - String str = errMsg.toString(); - result.set("errMsg", str.substring(0, Math.min(1024 * 1024, str.length()))); - } - - return result; - } - - - private JSONObject checkInteractiveRes(SandBoxRes interactiveSandBoxRes) { - - JSONObject result = new JSONObject(); - - int exitCode = interactiveSandBoxRes.getExitCode(); - - // 获取跑题用户输出或错误输出 - if (!StringUtils.isEmpty(interactiveSandBoxRes.getStderr())) { - result.set("errMsg", interactiveSandBoxRes.getStderr()); - } - - // 如果程序无异常 - if (interactiveSandBoxRes.getStatus().equals(Constants.Judge.STATUS_ACCEPTED.getStatus())) { - if (exitCode == Constants.Judge.STATUS_ACCEPTED.getStatus()) { - result.set("code", SPJ_AC); - } else { - result.set("code", exitCode); - } - } else if (interactiveSandBoxRes.getStatus().equals(Constants.Judge.STATUS_RUNTIME_ERROR.getStatus())) { - if (exitCode == SPJ_WA || exitCode == SPJ_ERROR || exitCode == SPJ_AC || exitCode == SPJ_PE) { - result.set("code", exitCode); - }else if (exitCode == SPJ_PC) { - result.set("code", exitCode); - String stdout = interactiveSandBoxRes.getStdout(); - if (NumberUtil.isNumber(stdout)) { - double percentage = 0.0; - percentage = Double.parseDouble(stdout) / 100; - if (percentage == 1) { - result.set("code", SPJ_AC); - } else { - result.set("percentage", percentage); - } - } - } else { - if (!StringUtils.isEmpty(interactiveSandBoxRes.getStderr())) { - // 适配testlib.h 根据错误信息前缀判断 - return parseTestLibErr(interactiveSandBoxRes.getStderr()); - } else { - result.set("code", SPJ_ERROR); - } - } - } else { - result.set("code", SPJ_ERROR); - } - return result; - } - -} \ No newline at end of file diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/SpecialJudge.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/SpecialJudge.java deleted file mode 100644 index bf4dd6f..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/SpecialJudge.java +++ /dev/null @@ -1,213 +0,0 @@ -package top.hcode.hoj.judge.task; - -import cn.hutool.core.io.FileUtil; -import cn.hutool.core.io.file.FileWriter; -import cn.hutool.core.util.NumberUtil; -import cn.hutool.json.JSONArray; -import cn.hutool.json.JSONObject; -import org.springframework.stereotype.Component; -import org.springframework.util.StringUtils; -import top.hcode.hoj.common.exception.SystemError; -import top.hcode.hoj.judge.AbstractJudge; -import top.hcode.hoj.judge.SandboxRun; -import top.hcode.hoj.judge.entity.JudgeDTO; -import top.hcode.hoj.judge.entity.JudgeGlobalDTO; -import top.hcode.hoj.judge.entity.SandBoxRes; -import top.hcode.hoj.util.Constants; - -import java.io.File; - -/** - * @Author: Himit_ZH - * @Date: 2022/1/2 22:23 - * @Description: 特殊判题 支持testlib - */ - -@Component -public class SpecialJudge extends AbstractJudge { - @Override - public JSONArray judgeCase(JudgeDTO judgeDTO, JudgeGlobalDTO judgeGlobalDTO) throws SystemError { - Constants.RunConfig runConfig = judgeGlobalDTO.getRunConfig(); - // 调用安全沙箱使用测试点对程序进行测试 - return SandboxRun.testCase( - parseRunCommand(runConfig.getCommand(), runConfig, null, null, null), - runConfig.getEnvs(), - judgeDTO.getTestCaseInputPath(), - null, - judgeGlobalDTO.getTestTime(), - judgeGlobalDTO.getMaxMemory(), - judgeDTO.getMaxOutputSize(), - judgeGlobalDTO.getMaxStack(), - runConfig.getExeName(), - judgeGlobalDTO.getUserFileId(), - judgeGlobalDTO.getUserFileContent()); - } - - - @Override - public JSONObject checkMultipleResult(SandBoxRes userSandBoxRes, SandBoxRes interactiveSandBoxRes, JudgeDTO judgeDTO, JudgeGlobalDTO judgeGlobalDTO) { - return null; - } - - @Override - public JSONObject checkResult(SandBoxRes sandBoxRes, JudgeDTO judgeDTO, JudgeGlobalDTO judgeGlobalDTO) throws SystemError { - - JSONObject result = new JSONObject(); - StringBuilder errMsg = new StringBuilder(); - // 如果测试跑题无异常 - if (sandBoxRes.getStatus().equals(Constants.Judge.STATUS_ACCEPTED.getStatus())) { - - // 对结果的时间损耗和空间损耗与题目限制做比较,判断是否mle和tle - if (sandBoxRes.getTime() > judgeGlobalDTO.getMaxTime()) { - result.set("status", Constants.Judge.STATUS_TIME_LIMIT_EXCEEDED.getStatus()); - } else if (sandBoxRes.getMemory() > judgeGlobalDTO.getMaxMemory() * 1024) { - result.set("status", Constants.Judge.STATUS_MEMORY_LIMIT_EXCEEDED.getStatus()); - } else { - - // 对于当前测试样例,用户程序的输出对应生成的文件 - String userOutputFilePath = judgeGlobalDTO.getRunDir() + File.separator + judgeDTO.getTestCaseId() + ".out"; - FileWriter stdWriter = new FileWriter(userOutputFilePath); - stdWriter.write(sandBoxRes.getStdout()); - - Constants.RunConfig spjRunConfig = judgeGlobalDTO.getSpjRunConfig(); - - // 特判程序的路径 - String spjExeSrc = Constants.JudgeDir.SPJ_WORKPLACE_DIR.getContent() + File.separator - + judgeGlobalDTO.getProblemId() + File.separator + spjRunConfig.getExeName(); - - String userOutputFileName = judgeGlobalDTO.getProblemId() + "_user_output"; - String testCaseInputFileName = judgeGlobalDTO.getProblemId() + "_input"; - String testCaseOutputFileName = judgeGlobalDTO.getProblemId() + "_output"; - // 进行spj程序运行比对 - JSONObject spjResult = spjRunAndCheckResult(userOutputFilePath, - userOutputFileName, - judgeDTO.getTestCaseInputPath(), - testCaseInputFileName, - judgeDTO.getTestCaseOutputPath(), - testCaseOutputFileName, - spjExeSrc, - spjRunConfig); - - // 删除用户输出文件 - FileUtil.del(userOutputFilePath); - - int code = spjResult.getInt("code"); - if (code == SPJ_WA) { - result.set("status", Constants.Judge.STATUS_WRONG_ANSWER.getStatus()); - } else if (code == SPJ_AC) { - result.set("status", Constants.Judge.STATUS_ACCEPTED.getStatus()); - } else if (code == SPJ_PE) { - result.set("status", Constants.Judge.STATUS_PRESENTATION_ERROR.getStatus()); - } else if (code == SPJ_PC) { - result.set("status", Constants.Judge.STATUS_PARTIAL_ACCEPTED.getStatus()); - result.set("percentage", spjResult.getDouble("percentage")); - } else { - result.set("status", Constants.Judge.STATUS_SYSTEM_ERROR.getStatus()); - } - - String spjErrMsg = spjResult.getStr("errMsg"); - if (!StringUtils.isEmpty(spjErrMsg)) { - errMsg.append(spjErrMsg).append(" "); - } - - } - } else if (sandBoxRes.getStatus().equals(Constants.Judge.STATUS_TIME_LIMIT_EXCEEDED.getStatus())) { - result.set("status", Constants.Judge.STATUS_TIME_LIMIT_EXCEEDED.getStatus()); - } else if (sandBoxRes.getExitCode() != 0) { - result.set("status", Constants.Judge.STATUS_RUNTIME_ERROR.getStatus()); - if (sandBoxRes.getExitCode() < 32) { - errMsg.append(String.format("The program return exit status code: %s (%s)\n", sandBoxRes.getExitCode(), SandboxRun.signals.get(sandBoxRes.getExitCode()))); - } else { - errMsg.append(String.format("The program return exit status code: %s\n", sandBoxRes.getExitCode())); - } - } else { - result.set("status", sandBoxRes.getStatus()); - } - - // b - result.set("memory", sandBoxRes.getMemory()); - // ns->ms - result.set("time", sandBoxRes.getTime()); - - // 记录该测试点的错误信息 - if (!StringUtils.isEmpty(errMsg.toString())) { - String str = errMsg.toString(); - result.set("errMsg", str.substring(0, Math.min(1024 * 1024, str.length()))); - } - - return result; - } - - - private JSONObject spjRunAndCheckResult(String userOutputFilePath, - String userOutputFileName, - String testCaseInputFilePath, - String testCaseInputFileName, - String testCaseOutputFilePath, - String testCaseOutputFileName, - String spjExeSrc, - Constants.RunConfig spjRunConfig) throws SystemError { - - // 调用安全沙箱运行spj程序 - JSONArray spjJudgeResultList = SandboxRun.spjCheckResult( - parseRunCommand(spjRunConfig.getCommand(), spjRunConfig, testCaseInputFileName, userOutputFileName, testCaseOutputFileName), - spjRunConfig.getEnvs(), - userOutputFilePath, - userOutputFileName, - testCaseInputFilePath, - testCaseInputFileName, - testCaseOutputFilePath, - testCaseOutputFileName, - spjExeSrc, - spjRunConfig.getExeName()); - - JSONObject result = new JSONObject(); - - JSONObject spjJudgeResult = (JSONObject) spjJudgeResultList.get(0); - - // 获取跑题用户输出或错误输出 - String spjErrOut = ((JSONObject) spjJudgeResult.get("files")).getStr("stderr"); - String spjStdOut = ((JSONObject) spjJudgeResult.get("files")).getStr("stdout"); - - if (!StringUtils.isEmpty(spjErrOut)) { - result.set("errMsg", spjErrOut); - } - - // 退出状态码 - int exitCode = spjJudgeResult.getInt("exitStatus"); - // 如果测试跑题无异常 - if (spjJudgeResult.getInt("status").intValue() == Constants.Judge.STATUS_ACCEPTED.getStatus()) { - if (exitCode == Constants.Judge.STATUS_ACCEPTED.getStatus()) { - result.set("code", SPJ_AC); - } else { - result.set("code", exitCode); - } - } else if (spjJudgeResult.getInt("status").intValue() == Constants.Judge.STATUS_RUNTIME_ERROR.getStatus()) { - if (exitCode == SPJ_WA || exitCode == SPJ_ERROR || exitCode == SPJ_AC || exitCode == SPJ_PE) { - result.set("code", exitCode); - } else if (exitCode == SPJ_PC) { - result.set("code", exitCode); - if (NumberUtil.isNumber(spjStdOut)) { - double percentage = 0.0; - percentage = Double.parseDouble(spjStdOut) / 100; - if (percentage == 1) { - result.set("code", SPJ_AC); - } else { - result.set("percentage", percentage); - } - } - } else { - if (!StringUtils.isEmpty(spjErrOut)) { - // 适配testlib.h 根据错误信息前缀判断 - return parseTestLibErr(spjErrOut); - } else { - result.set("code", SPJ_ERROR); - } - } - } else { - result.set("code", SPJ_ERROR); - } - - return result; - } -} \ No newline at end of file diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/TestJudge.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/TestJudge.java deleted file mode 100644 index 7550baa..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/judge/task/TestJudge.java +++ /dev/null @@ -1,115 +0,0 @@ -package top.hcode.hoj.judge.task; - -import cn.hutool.json.JSONArray; -import cn.hutool.json.JSONObject; -import org.springframework.stereotype.Component; -import org.springframework.util.StringUtils; -import top.hcode.hoj.common.exception.SystemError; -import top.hcode.hoj.judge.AbstractJudge; -import top.hcode.hoj.judge.SandboxRun; -import top.hcode.hoj.judge.entity.JudgeDTO; -import top.hcode.hoj.judge.entity.JudgeGlobalDTO; -import top.hcode.hoj.judge.entity.SandBoxRes; -import top.hcode.hoj.util.Constants; - -import java.util.Objects; - -/** - * @Author Himit_ZH - * @Date 2022/5/26 - * @Description: 在线自测 - */ -@Component -public class TestJudge extends AbstractJudge { - @Override - public JSONArray judgeCase(JudgeDTO judgeDTO, JudgeGlobalDTO judgeGlobalDTO) throws SystemError { - Constants.RunConfig runConfig = judgeGlobalDTO.getRunConfig(); - // 调用安全沙箱使用测试点对程序进行测试 - return SandboxRun.testCase( - parseRunCommand(runConfig.getCommand(), runConfig, null, null, null), - runConfig.getEnvs(), - judgeDTO.getTestCaseInputPath(), - judgeDTO.getTestCaseInputContent(), - judgeGlobalDTO.getTestTime(), - judgeGlobalDTO.getMaxMemory(), - judgeDTO.getMaxOutputSize(), - judgeGlobalDTO.getMaxStack(), - runConfig.getExeName(), - judgeGlobalDTO.getUserFileId(), - judgeGlobalDTO.getUserFileContent()); - } - - @Override - public JSONObject checkResult(SandBoxRes sandBoxRes, JudgeDTO judgeDTO, JudgeGlobalDTO judgeGlobalDTO) throws SystemError { - JSONObject result = new JSONObject(); - StringBuilder errMsg = new StringBuilder(); - // 如果测试跑题无异常 - if (sandBoxRes.getStatus().equals(Constants.Judge.STATUS_ACCEPTED.getStatus())) { - // 对结果的时间损耗和空间损耗与题目限制做比较,判断是否mle和tle - if (sandBoxRes.getTime() > judgeGlobalDTO.getMaxTime()) { - result.set("status", Constants.Judge.STATUS_TIME_LIMIT_EXCEEDED.getStatus()); - } else if (sandBoxRes.getMemory() > judgeGlobalDTO.getMaxMemory() * 1024) { - result.set("status", Constants.Judge.STATUS_MEMORY_LIMIT_EXCEEDED.getStatus()); - } else { - if (judgeDTO.getTestCaseOutputContent() != null) { - if (judgeGlobalDTO.getRemoveEOLBlank() != null && judgeGlobalDTO.getRemoveEOLBlank()) { - String stdOut = rtrim(sandBoxRes.getStdout()); - String testCaseOutput = rtrim(judgeDTO.getTestCaseOutputContent()); - if (Objects.equals(stdOut, testCaseOutput)) { - result.set("status", Constants.Judge.STATUS_ACCEPTED.getStatus()); - } else { - result.set("status", Constants.Judge.STATUS_WRONG_ANSWER.getStatus()); - } - } else { - if (Objects.equals(sandBoxRes.getStdout(), judgeDTO.getTestCaseOutputContent())) { - result.set("status", Constants.Judge.STATUS_ACCEPTED.getStatus()); - } else { - result.set("status", Constants.Judge.STATUS_WRONG_ANSWER.getStatus()); - } - } - } else { - result.set("status", Constants.Judge.STATUS_ACCEPTED.getStatus()); - } - } - } else if (sandBoxRes.getStatus().equals(Constants.Judge.STATUS_TIME_LIMIT_EXCEEDED.getStatus())) { - result.set("status", Constants.Judge.STATUS_TIME_LIMIT_EXCEEDED.getStatus()); - } else if (sandBoxRes.getExitCode() != 0) { - result.set("status", Constants.Judge.STATUS_RUNTIME_ERROR.getStatus()); - if (sandBoxRes.getExitCode() < 32) { - errMsg.append(String.format("ExitCode: %s (%s)\n", sandBoxRes.getExitCode(), SandboxRun.signals.get(sandBoxRes.getExitCode()))); - } else { - errMsg.append(String.format("ExitCode: %s\n", sandBoxRes.getExitCode())); - } - } else { - result.set("status", sandBoxRes.getStatus()); - } - - // b - result.set("memory", sandBoxRes.getMemory()); - // ns->ms - result.set("time", sandBoxRes.getTime()); - - if (!StringUtils.isEmpty(sandBoxRes.getStderr())) { - errMsg.append(sandBoxRes.getStderr()); - } - - // 记录该测试点的错误信息 - if (!StringUtils.isEmpty(errMsg.toString())) { - String str = errMsg.toString(); - result.set("errMsg", str.substring(0, Math.min(1024 * 1024, str.length()))); - } - - // 记录该测试点的运行输出 - if (!StringUtils.isEmpty(sandBoxRes.getStdout()) && sandBoxRes.getStdout().length() > 1000) { - result.set("output", sandBoxRes.getStdout().substring(0, 1000) + "..."); - } else { - result.set("output", sandBoxRes.getStdout()); - } - return result; - } - - @Override - public JSONObject checkMultipleResult(SandBoxRes userSandBoxRes, SandBoxRes interactiveSandBoxRes, JudgeDTO judgeDTO, JudgeGlobalDTO judgeGlobalDTO) { - return null; - } -} diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/mapper/ContestMapper.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/mapper/ContestMapper.java deleted file mode 100644 index 47b26e5..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/mapper/ContestMapper.java +++ /dev/null @@ -1,21 +0,0 @@ -package top.hcode.hoj.mapper; - - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import org.apache.ibatis.annotations.Mapper; -import org.springframework.stereotype.Repository; -import top.hcode.hoj.pojo.entity.contest.Contest; - -/** - *

- * Mapper 接口 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -@Mapper -@Repository -public interface ContestMapper extends BaseMapper { - -} diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/mapper/ContestRecordMapper.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/mapper/ContestRecordMapper.java deleted file mode 100644 index 18bf9eb..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/mapper/ContestRecordMapper.java +++ /dev/null @@ -1,21 +0,0 @@ -package top.hcode.hoj.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import org.apache.ibatis.annotations.Mapper; -import org.springframework.stereotype.Repository; -import top.hcode.hoj.pojo.entity.contest.ContestRecord; - - -/** - *

- * Mapper 接口 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -@Mapper -@Repository -public interface ContestRecordMapper extends BaseMapper { - -} diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/mapper/JudgeCaseMapper.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/mapper/JudgeCaseMapper.java deleted file mode 100644 index c9e15bf..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/mapper/JudgeCaseMapper.java +++ /dev/null @@ -1,20 +0,0 @@ -package top.hcode.hoj.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import org.apache.ibatis.annotations.Mapper; -import org.springframework.stereotype.Repository; -import top.hcode.hoj.pojo.entity.judge.JudgeCase; - -/** - *

- * Mapper 接口 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -@Mapper -@Repository -public interface JudgeCaseMapper extends BaseMapper { - -} diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/mapper/JudgeMapper.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/mapper/JudgeMapper.java deleted file mode 100644 index 2246994..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/mapper/JudgeMapper.java +++ /dev/null @@ -1,21 +0,0 @@ -package top.hcode.hoj.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import org.apache.ibatis.annotations.Mapper; -import org.springframework.stereotype.Repository; -import top.hcode.hoj.pojo.entity.judge.Judge; - - -/** - *

- * Mapper 接口 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -@Mapper -@Repository -public interface JudgeMapper extends BaseMapper { - -} diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/mapper/JudgeServerMapper.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/mapper/JudgeServerMapper.java deleted file mode 100644 index f0d9cc9..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/mapper/JudgeServerMapper.java +++ /dev/null @@ -1,11 +0,0 @@ -package top.hcode.hoj.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import org.apache.ibatis.annotations.Mapper; -import org.springframework.stereotype.Repository; -import top.hcode.hoj.pojo.entity.judge.JudgeServer; - -@Mapper -@Repository -public interface JudgeServerMapper extends BaseMapper { -} diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/mapper/ProblemCaseMapper.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/mapper/ProblemCaseMapper.java deleted file mode 100644 index 1cb38b6..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/mapper/ProblemCaseMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package top.hcode.hoj.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import org.apache.ibatis.annotations.Mapper; -import org.springframework.stereotype.Repository; -import top.hcode.hoj.pojo.entity.problem.ProblemCase; - -/** - * @Author: Himit_ZH - * @Date: 2020/12/14 19:57 - * @Description: - */ -@Mapper -@Repository -public interface ProblemCaseMapper extends BaseMapper { -} \ No newline at end of file diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/mapper/ProblemCountMapper.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/mapper/ProblemCountMapper.java deleted file mode 100644 index b6f21dd..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/mapper/ProblemCountMapper.java +++ /dev/null @@ -1,20 +0,0 @@ -package top.hcode.hoj.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import org.apache.ibatis.annotations.Mapper; -import org.springframework.stereotype.Repository; -import top.hcode.hoj.pojo.entity.problem.ProblemCount; - -/** - *

- * Mapper 接口 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -@Mapper -@Repository -public interface ProblemCountMapper extends BaseMapper { - -} diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/mapper/ProblemMapper.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/mapper/ProblemMapper.java deleted file mode 100644 index 37f7337..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/mapper/ProblemMapper.java +++ /dev/null @@ -1,21 +0,0 @@ -package top.hcode.hoj.mapper; - - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import org.apache.ibatis.annotations.Mapper; -import org.springframework.stereotype.Repository; -import top.hcode.hoj.pojo.entity.problem.Problem; - -/** - *

- * Mapper 接口 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -@Mapper -@Repository -public interface ProblemMapper extends BaseMapper { - -} diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/mapper/RemoteJudgeAccountMapper.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/mapper/RemoteJudgeAccountMapper.java deleted file mode 100644 index d253286..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/mapper/RemoteJudgeAccountMapper.java +++ /dev/null @@ -1,11 +0,0 @@ -package top.hcode.hoj.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import org.apache.ibatis.annotations.Mapper; -import org.springframework.stereotype.Repository; -import top.hcode.hoj.pojo.entity.judge.RemoteJudgeAccount; - -@Mapper -@Repository -public interface RemoteJudgeAccountMapper extends BaseMapper { -} diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/mapper/UserAcproblemMapper.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/mapper/UserAcproblemMapper.java deleted file mode 100644 index c60fac6..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/mapper/UserAcproblemMapper.java +++ /dev/null @@ -1,21 +0,0 @@ -package top.hcode.hoj.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import org.apache.ibatis.annotations.Mapper; -import org.springframework.stereotype.Repository; -import top.hcode.hoj.pojo.entity.user.UserAcproblem; - - -/** - *

- * Mapper 接口 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -@Mapper -@Repository -public interface UserAcproblemMapper extends BaseMapper { - -} diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/mapper/UserRecordMapper.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/mapper/UserRecordMapper.java deleted file mode 100644 index aec98eb..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/mapper/UserRecordMapper.java +++ /dev/null @@ -1,21 +0,0 @@ -package top.hcode.hoj.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import org.apache.ibatis.annotations.Mapper; -import org.springframework.stereotype.Repository; -import top.hcode.hoj.pojo.entity.user.UserRecord; - - -/** - *

- * Mapper 接口 - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -@Mapper -@Repository -public interface UserRecordMapper extends BaseMapper { - -} diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/mapper/xml/JudgeCaseMapper.xml b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/mapper/xml/JudgeCaseMapper.xml deleted file mode 100644 index 0e8c289..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/mapper/xml/JudgeCaseMapper.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/mapper/xml/JudgeMapper.xml b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/mapper/xml/JudgeMapper.xml deleted file mode 100644 index 1df713c..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/mapper/xml/JudgeMapper.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/remoteJudge/RemoteJudgeContext.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/remoteJudge/RemoteJudgeContext.java deleted file mode 100644 index cd7ec18..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/remoteJudge/RemoteJudgeContext.java +++ /dev/null @@ -1,116 +0,0 @@ -package top.hcode.hoj.remoteJudge; - -import cn.hutool.core.util.NumberUtil; -import cn.hutool.core.util.ReUtil; -import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; -import lombok.extern.slf4j.Slf4j; -import org.springframework.scheduling.annotation.Async; -import org.springframework.stereotype.Service; -import top.hcode.hoj.dao.JudgeEntityService; -import top.hcode.hoj.pojo.dto.ToJudgeDTO; -import top.hcode.hoj.pojo.entity.judge.Judge; -import top.hcode.hoj.remoteJudge.entity.RemoteJudgeDTO; -import top.hcode.hoj.remoteJudge.task.RemoteJudgeFactory; -import top.hcode.hoj.remoteJudge.task.RemoteJudgeStrategy; -import top.hcode.hoj.util.Constants; - -import javax.annotation.Resource; - -/** - * @Author: Himit_ZH - * @Date: 2022/1/29 13:17 - * @Description: - */ -@Service -@Slf4j(topic = "hoj") -public class RemoteJudgeContext { - - @Resource - private RemoteJudgeToSubmit remoteJudgeToSubmit; - - @Resource - private RemoteJudgeGetResult remoteJudgeGetResult; - - @Resource - private JudgeEntityService judgeEntityService; - - public static final boolean openCodeforcesFixServer = false; - - @Async - public void judge(ToJudgeDTO toJudgeDTO) { - String[] source = toJudgeDTO.getRemoteJudgeProblem().split("-"); - String remoteOj = source[0]; - String remoteProblemId = source[1]; - - RemoteJudgeDTO remoteJudgeDTO = RemoteJudgeDTO.builder() - .judgeId(toJudgeDTO.getJudge().getSubmitId()) - .uid(toJudgeDTO.getJudge().getUid()) - .cid(toJudgeDTO.getJudge().getCid()) - .pid(toJudgeDTO.getJudge().getPid()) - .gid(toJudgeDTO.getJudge().getGid()) - .username(toJudgeDTO.getUsername()) - .password(toJudgeDTO.getPassword()) - .oj(remoteOj) - .completeProblemId(remoteProblemId) - .userCode(toJudgeDTO.getJudge().getCode()) - .language(toJudgeDTO.getJudge().getLanguage()) - .serverIp(toJudgeDTO.getJudgeServerIp()) - .serverPort(toJudgeDTO.getJudgeServerPort()) - .submitId(toJudgeDTO.getJudge().getVjudgeSubmitId()) - .build(); - - initProblemId(remoteJudgeDTO); - - Boolean isHasSubmitIdRemoteReJudge = toJudgeDTO.getIsHasSubmitIdRemoteReJudge(); - - RemoteJudgeStrategy remoteJudgeStrategy = buildJudgeStrategy(remoteJudgeDTO); - if (remoteJudgeStrategy != null) { - if (isHasSubmitIdRemoteReJudge != null && isHasSubmitIdRemoteReJudge) { - // 拥有远程oj的submitId远程判题的重判 - remoteJudgeGetResult.process(remoteJudgeStrategy); - } else { - // 调用远程判题 - boolean isSubmitOk = remoteJudgeToSubmit.process(remoteJudgeStrategy); - if (isSubmitOk) { - remoteJudgeGetResult.process(remoteJudgeStrategy); - } - } - } - } - - private void initProblemId(RemoteJudgeDTO remoteJudgeDTO){ - switch (remoteJudgeDTO.getOj()){ - case "GYM": - case "CF": - if (NumberUtil.isInteger(remoteJudgeDTO.getCompleteProblemId())) { - remoteJudgeDTO.setContestId(ReUtil.get("([0-9]+)[0-9]{2}", remoteJudgeDTO.getCompleteProblemId(), 1)); - remoteJudgeDTO.setProblemNum(ReUtil.get("[0-9]+([0-9]{2})", remoteJudgeDTO.getCompleteProblemId(), 1)); - } else { - remoteJudgeDTO.setContestId(ReUtil.get("([0-9]+)[A-Z]{1}[0-9]{0,1}", remoteJudgeDTO.getCompleteProblemId(), 1)); - remoteJudgeDTO.setProblemNum(ReUtil.get("[0-9]+([A-Z]{1}[0-9]{0,1})", remoteJudgeDTO.getCompleteProblemId(), 1)); - } - break; - case "AC": - String[] arr = remoteJudgeDTO.getCompleteProblemId().split("_"); - remoteJudgeDTO.setContestId(arr[0]); - remoteJudgeDTO.setProblemNum(arr[1]); - break; - } - } - - private RemoteJudgeStrategy buildJudgeStrategy(RemoteJudgeDTO remoteJudgeDTO) { - RemoteJudgeStrategy remoteJudgeStrategy = RemoteJudgeFactory.selectJudge(remoteJudgeDTO.getOj()); - if (remoteJudgeStrategy == null) { - // 更新此次提交状态为系统失败! - UpdateWrapper judgeUpdateWrapper = new UpdateWrapper<>(); - judgeUpdateWrapper.set("status", Constants.Judge.STATUS_SYSTEM_ERROR.getStatus()) - .set("error_message", "The judge server does not support this oj:" + remoteJudgeDTO.getOj()) - .eq("submit_id", remoteJudgeDTO.getJudgeId()); - judgeEntityService.update(judgeUpdateWrapper); - return null; - } - remoteJudgeStrategy.setRemoteJudgeDTO(remoteJudgeDTO); - return remoteJudgeStrategy; - } - -} \ No newline at end of file diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/remoteJudge/RemoteJudgeGetResult.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/remoteJudge/RemoteJudgeGetResult.java deleted file mode 100644 index 3338d42..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/remoteJudge/RemoteJudgeGetResult.java +++ /dev/null @@ -1,196 +0,0 @@ -package top.hcode.hoj.remoteJudge; - -import cn.hutool.core.lang.UUID; -import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; -import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; -import org.springframework.util.CollectionUtils; -import top.hcode.hoj.dao.JudgeCaseEntityService; -import top.hcode.hoj.dao.JudgeEntityService; -import top.hcode.hoj.judge.JudgeContext; -import top.hcode.hoj.pojo.entity.judge.Judge; -import top.hcode.hoj.remoteJudge.entity.RemoteJudgeDTO; -import top.hcode.hoj.remoteJudge.entity.RemoteJudgeRes; -import top.hcode.hoj.remoteJudge.task.RemoteJudgeStrategy; -import top.hcode.hoj.service.RemoteJudgeService; -import top.hcode.hoj.util.Constants; - -import javax.annotation.Resource; -import java.util.Map; -import java.util.Objects; -import java.util.concurrent.*; -import java.util.concurrent.atomic.AtomicInteger; - - -@Slf4j(topic = "hoj") -@Component -public class RemoteJudgeGetResult { - - @Autowired - private JudgeEntityService judgeEntityService; - - @Autowired - private JudgeContext judgeContext; - - @Autowired - private RemoteJudgeService remoteJudgeService; - - @Resource - private JudgeCaseEntityService judgeCaseEntityService; - - private final static ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(Runtime.getRuntime().availableProcessors() * 2); - - private final static Map futureTaskMap = new ConcurrentHashMap<>(Runtime.getRuntime().availableProcessors() * 2); - - public void process(RemoteJudgeStrategy remoteJudgeStrategy) { - - RemoteJudgeDTO remoteJudgeDTO = remoteJudgeStrategy.getRemoteJudgeDTO(); - String key = UUID.randomUUID().toString() + remoteJudgeDTO.getSubmitId(); - AtomicInteger count = new AtomicInteger(0); - Runnable getResultTask = new Runnable() { - @Override - public void run() { - - if (count.get() >= 60) { // 超过60次失败则判为提交失败 - // 更新此次提交状态为提交失败! - UpdateWrapper judgeUpdateWrapper = new UpdateWrapper<>(); - judgeUpdateWrapper.set("status", Constants.Judge.STATUS_SUBMITTED_FAILED.getStatus()) - .set("error_message", "Waiting for remote judge result exceeds the maximum number of times, please try submitting again!") - .eq("submit_id", remoteJudgeDTO.getJudgeId()); - judgeEntityService.update(judgeUpdateWrapper); - - log.error("[{}] Get Result Failed!", remoteJudgeDTO.getOj()); - changeRemoteJudgeLock(remoteJudgeDTO.getOj(), - remoteJudgeDTO.getUsername(), - remoteJudgeDTO.getServerIp(), - remoteJudgeDTO.getServerPort(), - remoteJudgeDTO.getSubmitId()); - - Future future = futureTaskMap.get(key); - if (future != null) { - boolean isCanceled = future.cancel(true); - if (isCanceled) { - futureTaskMap.remove(key); - } - } - return; - } - - count.getAndIncrement(); - - RemoteJudgeRes remoteJudgeRes; - try { - remoteJudgeRes = remoteJudgeStrategy.result(); - } catch (Exception e) { - if (count.get() == 60) { - log.error("The Error of getting the `remote judge` result:", e); - } - return; - } - - // 保留各个测试点的结果数据 - if (!CollectionUtils.isEmpty(remoteJudgeRes.getJudgeCaseList())) { - judgeCaseEntityService.saveBatch(remoteJudgeRes.getJudgeCaseList()); - } - - Integer status = remoteJudgeRes.getStatus(); - if (status.intValue() != Constants.Judge.STATUS_PENDING.getStatus() && - status.intValue() != Constants.Judge.STATUS_JUDGING.getStatus() && - status.intValue() != Constants.Judge.STATUS_COMPILING.getStatus()) { - log.info("[{}] Get Result Successfully! Status:[{}]", remoteJudgeDTO.getOj(), status); - - changeRemoteJudgeLock(remoteJudgeDTO.getOj(), - remoteJudgeDTO.getUsername(), - remoteJudgeDTO.getServerIp(), - remoteJudgeDTO.getServerPort(), - remoteJudgeDTO.getSubmitId()); - - Integer time = remoteJudgeRes.getTime(); - Integer memory = remoteJudgeRes.getMemory(); - String errorInfo = remoteJudgeRes.getErrorInfo(); - Judge finalJudgeRes = new Judge(); - - finalJudgeRes.setSubmitId(remoteJudgeDTO.getJudgeId()) - .setStatus(status) - .setTime(time) - .setMemory(memory); - - if (status.intValue() == Constants.Judge.STATUS_COMPILE_ERROR.getStatus()) { - finalJudgeRes.setErrorMessage(errorInfo); - } else if (status.intValue() == Constants.Judge.STATUS_SYSTEM_ERROR.getStatus()) { - finalJudgeRes.setErrorMessage("There is something wrong with the " + remoteJudgeDTO.getOj() + ", please try again later"); - } - - // 如果是比赛题目,需要特别适配OI比赛的得分 除AC给100 其它结果给0分 - if (remoteJudgeDTO.getCid() != 0) { - int score = 0; - - if (Objects.equals(finalJudgeRes.getStatus(), Constants.Judge.STATUS_ACCEPTED.getStatus())) { - score = 100; - } - - finalJudgeRes.setScore(score); - // 写回数据库 - judgeEntityService.updateById(finalJudgeRes); - // 同步其它表 - judgeContext.updateOtherTable(remoteJudgeDTO.getJudgeId(), - status, - remoteJudgeDTO.getCid(), - remoteJudgeDTO.getUid(), - remoteJudgeDTO.getPid(), - remoteJudgeDTO.getGid(), - score, - finalJudgeRes.getTime()); - - } else { - judgeEntityService.updateById(finalJudgeRes); - // 同步其它表 - judgeContext.updateOtherTable(remoteJudgeDTO.getJudgeId(), - status, - remoteJudgeDTO.getCid(), - remoteJudgeDTO.getUid(), - remoteJudgeDTO.getPid(), - remoteJudgeDTO.getGid(), - null, - null); - } - - Future future = futureTaskMap.get(key); - if (future != null) { - future.cancel(true); - futureTaskMap.remove(key); - } - } else { - - Judge judge = new Judge(); - judge.setSubmitId(remoteJudgeDTO.getJudgeId()) - .setStatus(status); - // 写回数据库 - judgeEntityService.updateById(judge); - } - } - }; - ScheduledFuture beeperHandle = scheduler.scheduleWithFixedDelay( - getResultTask, 0, 2500, TimeUnit.MILLISECONDS); - futureTaskMap.put(key, beeperHandle); - } - - - private void changeRemoteJudgeLock(String remoteJudge, String username, String ip, Integer port, Long resultSubmitId) { - log.info("After Get Result,remote_judge:[{}],submit_id: [{}]! Begin to return the account to other task!", - remoteJudge, resultSubmitId); - // 将账号变为可用 - remoteJudgeService.changeAccountStatus(remoteJudge, username); - if (RemoteJudgeContext.openCodeforcesFixServer) { - if (remoteJudge.equals(Constants.RemoteJudge.GYM_JUDGE.getName()) - || remoteJudge.equals(Constants.RemoteJudge.CF_JUDGE.getName())) { - log.info("After Get Result,remote_judge:[{}],submit_id: [{}] !Begin to return the Server Status to other task!", - remoteJudge, resultSubmitId); - remoteJudgeService.changeServerSubmitCFStatus(ip, port); - } - } - } - - -} diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/remoteJudge/RemoteJudgeToSubmit.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/remoteJudge/RemoteJudgeToSubmit.java deleted file mode 100644 index c3da546..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/remoteJudge/RemoteJudgeToSubmit.java +++ /dev/null @@ -1,91 +0,0 @@ -package top.hcode.hoj.remoteJudge; - -import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; -import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.cloud.context.config.annotation.RefreshScope; -import org.springframework.stereotype.Component; -import top.hcode.hoj.dao.JudgeEntityService; -import top.hcode.hoj.judge.JudgeContext; -import top.hcode.hoj.pojo.entity.judge.Judge; -import top.hcode.hoj.remoteJudge.entity.RemoteJudgeDTO; -import top.hcode.hoj.remoteJudge.task.RemoteJudgeStrategy; -import top.hcode.hoj.service.RemoteJudgeService; -import top.hcode.hoj.util.Constants; - -@Component -@Slf4j(topic = "hoj") -@RefreshScope -public class RemoteJudgeToSubmit { - - @Autowired - private JudgeEntityService judgeEntityService; - - @Autowired - private RemoteJudgeService remoteJudgeService; - - @Autowired - private JudgeContext judgeContext; - - public boolean process(RemoteJudgeStrategy remoteJudgeStrategy) { - - RemoteJudgeDTO remoteJudgeDTO = remoteJudgeStrategy.getRemoteJudgeDTO(); - log.info("Ready Send Task to RemoteJudgeDTO => {}", remoteJudgeDTO); - - String errLog = null; - try { - remoteJudgeStrategy.submit(); - } catch (Exception e) { - log.error("Submit Failed! Error:", e); - errLog = e.getMessage(); - } - - Long submitId = remoteJudgeDTO.getSubmitId(); - // 提交失败 前端手动按按钮再次提交 修改状态 STATUS_SUBMITTED_FAILED - if (submitId == null || submitId == -1L) { - // 将使用的账号放回对应列表 - log.error("[{}] Submit Failed! Begin to return the account to other task!", remoteJudgeDTO.getOj()); - remoteJudgeService.changeAccountStatus(remoteJudgeDTO.getOj(), - remoteJudgeDTO.getUsername()); - - if (RemoteJudgeContext.openCodeforcesFixServer) { - if (remoteJudgeDTO.getOj().equals(Constants.RemoteJudge.GYM_JUDGE.getName()) - || remoteJudgeDTO.getOj().equals(Constants.RemoteJudge.CF_JUDGE.getName())) { - // 对CF特殊,归还判题机权限 - log.error("[{}] Submit Failed! Begin to return the Server Status to other task!", remoteJudgeDTO.getOj()); - remoteJudgeService.changeServerSubmitCFStatus(remoteJudgeDTO.getServerIp(), remoteJudgeDTO.getServerPort()); - } - } - - // 更新此次提交状态为提交失败! - UpdateWrapper judgeUpdateWrapper = new UpdateWrapper<>(); - judgeUpdateWrapper.set("status", Constants.Judge.STATUS_SUBMITTED_FAILED.getStatus()) - .set("error_message", errLog) - .eq("submit_id", remoteJudgeDTO.getJudgeId()); - judgeEntityService.update(judgeUpdateWrapper); - // 更新其它表 - judgeContext.updateOtherTable(remoteJudgeDTO.getSubmitId(), - Constants.Judge.STATUS_SYSTEM_ERROR.getStatus(), - remoteJudgeDTO.getCid(), - remoteJudgeDTO.getUid(), - remoteJudgeDTO.getPid(), - remoteJudgeDTO.getGid(), - null, - null); - return false; - } - - // 提交成功顺便更新状态为-->STATUS_PENDING 等待判题中... - judgeEntityService.updateById(new Judge() - .setSubmitId(remoteJudgeDTO.getJudgeId()) - .setStatus(Constants.Judge.STATUS_PENDING.getStatus()) - .setVjudgeSubmitId(submitId) - .setVjudgeUsername(remoteJudgeDTO.getUsername()) - .setVjudgePassword(remoteJudgeDTO.getPassword()) - ); - - log.info("[{}] Submit Successfully! The submit_id of remote judge is [{}]. Waiting the result of the task!", - submitId, remoteJudgeDTO.getOj()); - return true; - } -} diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/remoteJudge/entity/RemoteJudgeDTO.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/remoteJudge/entity/RemoteJudgeDTO.java deleted file mode 100644 index 8c881f7..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/remoteJudge/entity/RemoteJudgeDTO.java +++ /dev/null @@ -1,154 +0,0 @@ -package top.hcode.hoj.remoteJudge.entity; - -import lombok.Builder; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.ToString; -import lombok.experimental.Accessors; -import top.hcode.hoj.util.CodeForcesUtils; -import top.hcode.hoj.util.Constants; - -import java.io.Serializable; -import java.net.HttpCookie; -import java.util.List; - -/** - * @Author: Himit_ZH - * @Date: 2022/1/29 00:18 - * @Description: - */ -@Data -@EqualsAndHashCode(callSuper = false) -@Accessors(chain = true) -@Builder -@ToString -public class RemoteJudgeDTO implements Serializable { - private static final long serialVersionUID = 888L; - - /** - * 远程评测的oj - */ - private String oj; - - /** - * 远程评测的账号 - */ - private String username; - - /** - * 远程评测的密码 - */ - private String password; - - /** - * 远程评测的cookies - */ - private List cookies; - - public RemoteJudgeDTO setCookies(List cookies) { - if (cookies != null - && (Constants.RemoteJudge.CF_JUDGE.getName().equals(this.oj) - || Constants.RemoteJudge.GYM_JUDGE.getName().equals(this.oj))) { - HttpCookie rcpc = new HttpCookie("RCPC", CodeForcesUtils.getRCPC()); - rcpc.setVersion(0); - cookies.add(rcpc); - } - this.cookies = cookies; - return this; - } - - /** - * 远程测评的csrfToken - */ - private String csrfToken; - - /** - * 远程评测的完整题目id like CF:110C AtCoder: abc111_a - */ - private String completeProblemId; - - /** - * 远程评测的原题比赛id - */ - private String contestId; - - /** - * 远程测评的原题题号展示序号 - */ - private String problemNum; - - /** - * 远程测评的语言 - */ - private String language; - - /** - * 远程评测的用户代码 - */ - private String userCode; - - /** - * 远程评测的题目id - */ - private Long pid; - - /** - * 远程测评的用户id - */ - private String uid; - - /** - * 远程测评的比赛id - */ - private Long cid; - - /** - * 远程测评的团队id - */ - private Long gid; - - /** - * 远程测评的judge_id; - */ - private Long judgeId; - - /** - * 远程测评的提交id(远程oj的提交id) - */ - private Long submitId; - - /** - * 远程测评的测试数据的序号(codeforces) - */ - private Integer testcaseNum; - - /** - * 远程测评的当前已获得测试数据点最大运行时间ms - */ - private Integer maxTime; - - /** - * 远程测评的当前已获得测试数据点最大运行空间kb - */ - private Integer maxMemory; - - /** - * 远程测评的登录状态码 - */ - private Integer loginStatus; - - /** - * 远程测评的提交状态码 - */ - private Integer submitStatus; - - /** - * 当前评测的服务器ip - */ - private String serverIp; - - /** - * 当前评测的服务器端口号 - */ - private Integer serverPort; -} \ No newline at end of file diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/remoteJudge/entity/RemoteJudgeRes.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/remoteJudge/entity/RemoteJudgeRes.java deleted file mode 100644 index a56af0b..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/remoteJudge/entity/RemoteJudgeRes.java +++ /dev/null @@ -1,33 +0,0 @@ -package top.hcode.hoj.remoteJudge.entity; - -import lombok.Builder; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; -import top.hcode.hoj.pojo.entity.judge.JudgeCase; - -import java.io.Serializable; -import java.util.List; - -/** - * @Author: Himit_ZH - * @Date: 2022/1/29 11:25 - * @Description: - */ -@Data -@EqualsAndHashCode(callSuper = false) -@Accessors(chain = true) -@Builder -public class RemoteJudgeRes implements Serializable { - private static final long serialVersionUID = 999L; - - private Integer status; - - private Integer time; - - private Integer memory; - - private String errorInfo; - - private List judgeCaseList; -} \ No newline at end of file diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/remoteJudge/task/Impl/AtCoderJudge.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/remoteJudge/task/Impl/AtCoderJudge.java deleted file mode 100644 index d7b0eef..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/remoteJudge/task/Impl/AtCoderJudge.java +++ /dev/null @@ -1,259 +0,0 @@ -package top.hcode.hoj.remoteJudge.task.Impl; - -import cn.hutool.core.map.MapUtil; -import cn.hutool.core.util.ReUtil; -import cn.hutool.http.HtmlUtil; -import cn.hutool.http.HttpRequest; -import cn.hutool.http.HttpResponse; -import cn.hutool.http.HttpUtil; -import lombok.extern.slf4j.Slf4j; -import top.hcode.hoj.remoteJudge.entity.RemoteJudgeDTO; -import top.hcode.hoj.remoteJudge.entity.RemoteJudgeRes; -import top.hcode.hoj.remoteJudge.task.RemoteJudgeStrategy; -import top.hcode.hoj.util.Constants; - -import java.net.HttpCookie; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.concurrent.TimeUnit; - -/** - * @Author: Himit_ZH - * @Date: 2022/1/28 23:20 - * @Description: - */ -@Slf4j(topic = "hoj") -public class AtCoderJudge extends RemoteJudgeStrategy { - - public static final String HOST = "https://atcoder.jp"; - public static final String LOGIN_URL = "/login"; - public static final String SUBMIT_URL = "/contests/%s/submit"; - public static final String SUBMISSION_RESULT_URL = "/contests/%s/submissions/%s"; - - public static Map headers = MapUtil - .builder(new HashMap()) - .put("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36") - .map(); - - private static final Map statusMap = new HashMap() {{ - put("CE", Constants.Judge.STATUS_COMPILE_ERROR); - put("RE", Constants.Judge.STATUS_RUNTIME_ERROR); - put("QLE", Constants.Judge.STATUS_RUNTIME_ERROR); - put("OLE", Constants.Judge.STATUS_RUNTIME_ERROR); - put("IE", Constants.Judge.STATUS_RUNTIME_ERROR); - put("WA", Constants.Judge.STATUS_WRONG_ANSWER); - put("AC", Constants.Judge.STATUS_ACCEPTED); - put("TLE", Constants.Judge.STATUS_TIME_LIMIT_EXCEEDED); - put("MLE", Constants.Judge.STATUS_MEMORY_LIMIT_EXCEEDED); - put("WJ", Constants.Judge.STATUS_PENDING); - put("WR", Constants.Judge.STATUS_PENDING); // Waiting Rejudge - put("Judging", Constants.Judge.STATUS_JUDGING); // Waiting Rejudge - }}; - - private static final Map languageMap = new HashMap<>(); - - @Override - public void submit() { - login(); - RemoteJudgeDTO remoteJudgeDTO = getRemoteJudgeDTO(); - if (remoteJudgeDTO.getLoginStatus() != 302) { - log.error("Login to AtCoder failed, the response status:{},username:{},password:{}", - remoteJudgeDTO.getLoginStatus(), remoteJudgeDTO.getUsername(), remoteJudgeDTO.getPassword()); - throw new RuntimeException("[AtCoder] Failed to Login, the response status:" + remoteJudgeDTO.getLoginStatus()); - } - - HttpResponse response = trySubmit(); - - if (response.getStatus() == 200) { // 说明被限制提交频率了, - String timeStr = ReUtil.get("Wait for (\\d+) second to submit again.", response.body(), 1); - if (timeStr != null) { - int time = Integer.parseInt(timeStr); - try { - TimeUnit.SECONDS.sleep(time + 1); - } catch (InterruptedException e) { - e.printStackTrace(); - } - response = trySubmit(); - } - } - - if (response.getStatus() != 302) { - log.error("Submit to AtCoder failed, the response status:{}, It may be that the frequency of submission operation is too fast. Please try later", response.getStatus()); - throw new RuntimeException("[AtCoder] Failed to Submit, the response status:" + response.getStatus()); - } - - // 停留3秒钟后再获取id,之后归还账号,避免提交频率过快 - try { - TimeUnit.SECONDS.sleep(3); - } catch (InterruptedException e) { - e.printStackTrace(); - } - - Long maxRunId = getMaxRunId(remoteJudgeDTO.getUsername(), remoteJudgeDTO.getContestId(), remoteJudgeDTO.getCompleteProblemId()); - - remoteJudgeDTO.setCookies(remoteJudgeDTO.getCookies()) - .setSubmitId(maxRunId); - - } - - private HttpResponse trySubmit() { - RemoteJudgeDTO remoteJudgeDTO = getRemoteJudgeDTO(); - List cookies = remoteJudgeDTO.getCookies(); - String csrfToken = remoteJudgeDTO.getCsrfToken(); - - String submitUrl = HOST + String.format(SUBMIT_URL, remoteJudgeDTO.getContestId()); - HttpRequest request = HttpUtil.createPost(submitUrl); - HttpRequest httpRequest = request.form(MapUtil.builder(new HashMap()) - .put("data.TaskScreenName", remoteJudgeDTO.getCompleteProblemId()) - .put("data.LanguageId", getLanguage(remoteJudgeDTO.getLanguage())) - .put("sourceCode", remoteJudgeDTO.getUserCode()) - .put("csrf_token", csrfToken).map()); - httpRequest.cookie(cookies); - HttpResponse response = httpRequest.execute(); - remoteJudgeDTO.setSubmitStatus(response.getStatus()); - return response; - } - - @Override - public RemoteJudgeRes result() { - - RemoteJudgeDTO remoteJudgeDTO = getRemoteJudgeDTO(); - - String url = HOST + String.format(SUBMISSION_RESULT_URL, remoteJudgeDTO.getContestId(), remoteJudgeDTO.getSubmitId()); - String body = HttpUtil.get(url); - String status = ReUtil.get("Status[\\s\\S]*?([\\s\\S]*?)", body, 1); - Constants.Judge judgeStatus = statusMap.get(status); - if (judgeStatus == Constants.Judge.STATUS_JUDGING || judgeStatus == Constants.Judge.STATUS_PENDING) { - return RemoteJudgeRes.builder() - .status(judgeStatus.getStatus()) - .build(); - } - - String time = ReUtil.get("Exec Time[\\s\\S]*?([\\s\\S]*?) ms", body, 1); - String memory = ReUtil.get("Memory[\\s\\S]*?([\\s\\S]*?) KB", body, 1); - - RemoteJudgeRes remoteJudgeRes = RemoteJudgeRes.builder() - .status(judgeStatus.getStatus()) - .time(time == null ? null : Integer.parseInt(time)) - .memory(memory == null ? null : Integer.parseInt(memory)) - .build(); - if (judgeStatus == Constants.Judge.STATUS_COMPILE_ERROR) { - String CEInfo = ReUtil.get("

Compile Error

[\\s\\S]*?
([\\s\\S]*?)
", body, 1); - remoteJudgeRes.setErrorInfo(HtmlUtil.unescape(CEInfo)); - } - return remoteJudgeRes; - } - - @Override - public void login() { - // 清除当前线程的cookies缓存 - HttpRequest.getCookieManager().getCookieStore().removeAll(); - - RemoteJudgeDTO remoteJudgeDTO = getRemoteJudgeDTO(); - - String csrfToken = getCsrfToken(HOST + LOGIN_URL); - HttpRequest request = HttpUtil.createPost(HOST + LOGIN_URL); - request.addHeaders(headers); - HttpResponse response = request.form(MapUtil.builder(new HashMap()) - .put("username", remoteJudgeDTO.getUsername()) - .put("password", remoteJudgeDTO.getPassword()) - .put("csrf_token", csrfToken).map()).execute(); - - remoteJudgeDTO.setLoginStatus(response.getStatus()) - .setCookies(response.getCookies()) - .setCsrfToken(csrfToken); - } - - @Override - public String getLanguage(String language) { - return languageMap.get(language); - } - - private Long getMaxRunId(String username, String contestId, String problemId) { - // 清除当前线程的cookies缓存 - HttpRequest.getCookieManager().getCookieStore().removeAll(); - String url = HOST + String.format("/contests/%s/submissions?f.Task=%s&f.User=%s", contestId, problemId, username); - String body = HttpUtil.get(url); - String maxRunId = ReUtil.get("Detail", body, 1); - return maxRunId != null ? Long.parseLong(maxRunId) : -1L; - } - - private String getCsrfToken(String url) { - HttpRequest request = HttpUtil.createGet(url); - request.addHeaders(headers); - HttpResponse response = request.execute(); - String body = response.body(); - return ReUtil.get("var csrfToken = \"([\\s\\S]*?)\"", body, 1); - } - - static { - languageMap.put("C (GCC 9.2.1)", "4001"); - languageMap.put("C (Clang 10.0.0)", "4002"); - languageMap.put("C++ (GCC 9.2.1)", "4003"); - languageMap.put("C++ (Clang 10.0.0)", "4004"); - languageMap.put("Java (OpenJDK 11.0.6)", "4005"); - languageMap.put("Python (3.8.2)", "4006"); - languageMap.put("Bash (5.0.11)", "4007"); - languageMap.put("bc (1.07.1)", "4008"); - languageMap.put("Awk (GNU Awk 4.1.4)", "4009"); - languageMap.put("C# (.NET Core 3.1.201)", "4010"); - languageMap.put("C# (Mono-mcs 6.8.0.105)", "4011"); - languageMap.put("C# (Mono-csc 3.5.0)", "4012"); - languageMap.put("Clojure (1.10.1.536)", "4013"); - languageMap.put("Crystal (0.33.0)", "4014"); - languageMap.put("D (DMD 2.091.0)", "4015"); - languageMap.put("D (GDC 9.2.1)", "4016"); - languageMap.put("D (LDC 1.20.1)", "4017"); - languageMap.put("Dart (2.7.2)", "4018"); - languageMap.put("dc (1.4.1)", "4019"); - languageMap.put("Erlang (22.3)", "4020"); - languageMap.put("Elixir (1.10.2)", "4021"); - languageMap.put("F# (.NET Core 3.1.201)", "4022"); - languageMap.put("F# (Mono 10.2.3)", "4023"); - languageMap.put("Forth (gforth 0.7.3)", "4024"); - languageMap.put("Fortran (GNU Fortran 9.2.1)", "4025"); - languageMap.put("Go (1.14.1)", "4026"); - languageMap.put("Haskell (GHC 8.8.3)", "4027"); - languageMap.put("Haxe (4.0.3); js", "4028"); - languageMap.put("Haxe (4.0.3); Java", "4029"); - languageMap.put("JavaScript (Node.js 12.16.1)", "4030"); - languageMap.put("Julia (1.4.0)", "4031"); - languageMap.put("Kotlin (1.3.71)", "4032"); - languageMap.put("Lua (Lua 5.3.5)", "4033"); - languageMap.put("Lua (LuaJIT 2.1.0)", "4034"); - languageMap.put("Dash (0.5.8)", "4035"); - languageMap.put("Nim (1.0.6)", "4036"); - languageMap.put("Objective-C (Clang 10.0.0)", "4037"); - languageMap.put("Common Lisp (SBCL 2.0.3)", "4038"); - languageMap.put("OCaml (4.10.0)", "4039"); - languageMap.put("Octave (5.2.0)", "4040"); - languageMap.put("Pascal (FPC 3.0.4)", "4041"); - languageMap.put("Perl (5.26.1)", "4042"); - languageMap.put("Raku (Rakudo 2020.02.1)", "4043"); - languageMap.put("PHP (7.4.4)", "4044"); - languageMap.put("Prolog (SWI-Prolog 8.0.3)", "4045"); - languageMap.put("PyPy2 (7.3.0)", "4046"); - languageMap.put("PyPy3 (7.3.0)", "4047"); - languageMap.put("Racket (7.6)", "4048"); - languageMap.put("Ruby (2.7.1)", "4049"); - languageMap.put("Rust (1.42.0)", "4050"); - languageMap.put("Scala (2.13.1)", "4051"); - languageMap.put("Java (OpenJDK 1.8.0)", "4052"); - languageMap.put("Scheme (Gauche 0.9.9)", "4053"); - languageMap.put("Standard ML (MLton 20130715)", "4054"); - languageMap.put("Swift (5.2.1)", "4055"); - languageMap.put("Text (cat 8.28)", "4056"); - languageMap.put("TypeScript (3.8)", "4057"); - languageMap.put("Visual Basic (.NET Core 3.1.101)", "4058"); - languageMap.put("Zsh (5.4.2)", "4059"); - languageMap.put("COBOL - Fixed (OpenCOBOL 1.1.0)", "4060"); - languageMap.put("COBOL - Free (OpenCOBOL 1.1.0)", "4061"); - languageMap.put("Brainfuck (bf 20041219)", "4062"); - languageMap.put("Ada2012 (GNAT 9.2.1)", "4063"); - languageMap.put("Unlambda (2.0.0)", "4064"); - languageMap.put("Cython (0.29.16)", "4065"); - languageMap.put("Sed (4.4)", "4066"); - languageMap.put("Vim (8.2.0460)", "4067"); - } -} \ No newline at end of file diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/remoteJudge/task/Impl/CodeForcesJudge.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/remoteJudge/task/Impl/CodeForcesJudge.java deleted file mode 100644 index 5cbd0ac..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/remoteJudge/task/Impl/CodeForcesJudge.java +++ /dev/null @@ -1,500 +0,0 @@ -package top.hcode.hoj.remoteJudge.task.Impl; - -import cn.hutool.core.date.DateUtil; -import cn.hutool.core.map.MapUtil; -import cn.hutool.core.util.ReUtil; -import cn.hutool.http.HttpRequest; -import cn.hutool.http.HttpResponse; -import cn.hutool.http.HttpUtil; -import cn.hutool.http.Method; -import cn.hutool.json.JSONException; -import cn.hutool.json.JSONObject; -import cn.hutool.json.JSONUtil; -import lombok.extern.slf4j.Slf4j; -import org.apache.http.HttpStatus; -import org.springframework.util.StringUtils; -import top.hcode.hoj.pojo.entity.judge.JudgeCase; -import top.hcode.hoj.remoteJudge.entity.RemoteJudgeDTO; -import top.hcode.hoj.remoteJudge.entity.RemoteJudgeRes; -import top.hcode.hoj.remoteJudge.task.RemoteJudgeStrategy; -import top.hcode.hoj.util.CodeForcesUtils; -import top.hcode.hoj.util.Constants; - -import java.util.*; -import java.util.concurrent.TimeUnit; - -@Slf4j(topic = "hoj") -public class CodeForcesJudge extends RemoteJudgeStrategy { - - - public static final String IMAGE_HOST = "https://codeforces.com"; - public static final String HOST = "https://codeforces.com"; - public static final String LOGIN_URL = "/enter"; - public static final String SUBMIT_URL = "/contest/%s/submit"; - public static final String SUBMISSION_RESULT_URL = "/api/user.status?handle=%s&from=1&count=%s"; - public static final String CE_INFO_URL = "/data/submitSource"; - public static final String MY_SUBMISSION = "/problemset/status?my=on"; - public static final String SUBMISSION_BY_USERNAME = "/submissions/%s"; - - protected static final Map statusMap = new HashMap() {{ - put("FAILED", Constants.Judge.STATUS_SUBMITTED_FAILED); - put("OK", Constants.Judge.STATUS_ACCEPTED); - put("PARTIAL", Constants.Judge.STATUS_PARTIAL_ACCEPTED); - put("COMPILATION_ERROR", Constants.Judge.STATUS_COMPILE_ERROR); - put("RUNTIME_ERROR", Constants.Judge.STATUS_RUNTIME_ERROR); - put("WRONG_ANSWER", Constants.Judge.STATUS_WRONG_ANSWER); - put("PRESENTATION_ERROR", Constants.Judge.STATUS_PRESENTATION_ERROR); - put("TIME_LIMIT_EXCEEDED", Constants.Judge.STATUS_TIME_LIMIT_EXCEEDED); - put("MEMORY_LIMIT_EXCEEDED", Constants.Judge.STATUS_MEMORY_LIMIT_EXCEEDED); - put("IDLENESS_LIMIT_EXCEEDED", Constants.Judge.STATUS_RUNTIME_ERROR); - put("SECURITY_VIOLATED", Constants.Judge.STATUS_RUNTIME_ERROR); - put("CRASHED", Constants.Judge.STATUS_SYSTEM_ERROR); - put("INPUT_PREPARATION_CRASHED", Constants.Judge.STATUS_SYSTEM_ERROR); - put("CHALLENGED", Constants.Judge.STATUS_SYSTEM_ERROR); - put("SKIPPED", Constants.Judge.STATUS_SYSTEM_ERROR); - put("TESTING", Constants.Judge.STATUS_JUDGING); - put("REJECTED", Constants.Judge.STATUS_SYSTEM_ERROR); - put("RUNNING & JUDGING", Constants.Judge.STATUS_JUDGING); - }}; - - @Override - public void submit() { - - RemoteJudgeDTO remoteJudgeDTO = getRemoteJudgeDTO(); - - if (remoteJudgeDTO.getCompleteProblemId() == null || remoteJudgeDTO.getUserCode() == null) { - return; - } - - HttpRequest httpRequest = HttpUtil.createGet(IMAGE_HOST); - httpRequest.setConnectionTimeout(60000); - httpRequest.setReadTimeout(60000); - httpRequest.header("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.101 Safari/537.36 Edg/91.0.864.48"); - httpRequest.header("cookie", "RCPC=" + CodeForcesUtils.getRCPC()); - HttpResponse httpResponse = httpRequest.execute(); - String homePage = httpResponse.body(); - - if (homePage.contains("Redirecting... Please, wait.")) { - List list = ReUtil.findAll("[a-z0-9]+[a-z0-9]{31}", homePage, 0, new ArrayList<>()); - CodeForcesUtils.updateRCPC(list); - httpRequest.removeHeader("cookie"); - httpRequest.header("cookie", "RCPC=" + CodeForcesUtils.getRCPC()); - httpResponse = httpRequest.execute(); - homePage = httpResponse.body(); - } - - if (!homePage.contains("/logout\">") || !homePage.contains(" json; - try { - json = JSONUtil.parseObj(httpResponse.body()); - } catch (JSONException e) { - // 接口限制,导致返回数据非json,此处替换成页面解析 - return getMaxIdByParseHtml(); - } - List> results = (List>) json.get("result"); - for (Map result : results) { - Long runId = Long.valueOf(result.get("id").toString()); - long creationTimeSeconds = Long.parseLong(result.get("creationTimeSeconds").toString()); - if (creationTimeSeconds < nowTime && retryNum < 8) { - continue; - } - Map problem = (Map) result.get("problem"); - if (remoteJudgeDTO.getContestId().equals(problem.get("contestId").toString()) && - remoteJudgeDTO.getProblemNum().equals(problem.get("index").toString())) { - return runId; - } - } - } catch (Exception e) { - String log = String.format("[Codeforces] Failed to get run id for problem: [%s], error:%s", remoteJudgeDTO.getCompleteProblemId(), e.toString()); - throw new RuntimeException(log); - } - } - retryNum++; - } - return -1L; - } - - - // CF的这个接口有每两秒的访问限制,所以需要加锁,保证只有一次查询 - public static synchronized HttpResponse getMaxIdForSubmissionResult(String username, Integer count) { - try { - TimeUnit.SECONDS.sleep(3); - } catch (InterruptedException e) { - e.printStackTrace(); - } - String url = HOST + String.format(SUBMISSION_RESULT_URL, username, count); - return HttpUtil.createGet(url) - .timeout(30000) - .execute(); - } - - public Long getMaxIdByParseHtml() { - // 清除当前线程的cookies缓存 - HttpRequest.getCookieManager().getCookieStore().removeAll(); - RemoteJudgeDTO remoteJudgeDTO = getRemoteJudgeDTO(); - String url = HOST + String.format(SUBMISSION_BY_USERNAME, remoteJudgeDTO.getUsername()); - HttpRequest request = HttpUtil.createGet(url); - request.cookie(remoteJudgeDTO.getCookies()); - HttpResponse response = request.execute(); - String csrfToken = ReUtil.get("data-csrf='(\\w+)'", response.body(), 1); - remoteJudgeDTO.setCsrfToken(csrfToken); - String maxRunIdStr = ReUtil.get("data-submission-id=\"(\\d+)\"", response.body(), 1); - if (StringUtils.isEmpty(maxRunIdStr)) { - log.error("[Codeforces] Failed to parse submission html:{}", response.body()); - String log = String.format("[Codeforces] Failed to parse html to get run id for problem: [%s]", remoteJudgeDTO.getCompleteProblemId()); - throw new RuntimeException(log); - } else { - return Long.valueOf(maxRunIdStr); - } - } - - @Override - public RemoteJudgeRes result() { - // 清除当前线程的cookies缓存 - HttpRequest.getCookieManager().getCookieStore().removeAll(); - - RemoteJudgeDTO remoteJudgeDTO = getRemoteJudgeDTO(); - if (remoteJudgeDTO.getCookies() == null) { - login(); - } - String csrfToken; - if (StringUtils.isEmpty(remoteJudgeDTO.getCsrfToken())) { - HttpRequest homeRequest = HttpUtil.createGet(HOST + MY_SUBMISSION); - homeRequest.cookie(remoteJudgeDTO.getCookies()); - HttpResponse homeResponse = homeRequest.execute(); - csrfToken = ReUtil.get("data-csrf='(\\w+)'", homeResponse.body(), 1); - } else { - csrfToken = remoteJudgeDTO.getCsrfToken(); - } - HttpRequest httpRequest = HttpUtil.createPost(HOST + CE_INFO_URL) - .cookie(remoteJudgeDTO.getCookies()) - .timeout(30000); - httpRequest.form(MapUtil - .builder(new HashMap()) - .put("csrf_token", csrfToken) - .put("submissionId", remoteJudgeDTO.getSubmitId()).map()); - - HttpResponse httpResponse = httpRequest.execute(); - - RemoteJudgeRes remoteJudgeRes = RemoteJudgeRes.builder() - .status(Constants.Judge.STATUS_JUDGING.getStatus()) - .build(); - - if (httpResponse.getStatus() == 200) { - JSONObject submissionInfoJson = JSONUtil.parseObj(httpResponse.body()); - String compilationError = submissionInfoJson.getStr("compilationError"); - if ("true".equals(compilationError)) { - remoteJudgeRes - .setMemory(0) - .setTime(0) - .setStatus(Constants.Judge.STATUS_COMPILE_ERROR.getStatus()); - String CEMsg = submissionInfoJson.getStr("checkerStdoutAndStderr#1"); - if (StringUtils.isEmpty(CEMsg)) { - remoteJudgeRes.setErrorInfo("Oops! Because Codeforces does not provide compilation details, it is unable to provide the reason for compilation failure!"); - } else { - remoteJudgeRes.setErrorInfo(CEMsg); - } - return remoteJudgeRes; - } - Integer testcaseNum = remoteJudgeDTO.getTestcaseNum(); - Integer maxTime = remoteJudgeDTO.getMaxTime(); - Integer maxMemory = remoteJudgeDTO.getMaxMemory(); - if (testcaseNum == null) { - testcaseNum = 1; - maxTime = 0; - maxMemory = 0; - } - List judgeCaseList = new ArrayList<>(); - String testCountStr = submissionInfoJson.getStr("testCount"); - int testCount = Integer.parseInt(testCountStr); - for (; testcaseNum <= testCount; testcaseNum++) { - String verdict = submissionInfoJson.getStr("verdict#" + testcaseNum); - if (StringUtils.isEmpty(verdict)) { - continue; - } - Constants.Judge judgeRes = statusMap.get(verdict); - Integer time = Integer.parseInt(submissionInfoJson.getStr("timeConsumed#" + testcaseNum)); - Integer memory = Integer.parseInt(submissionInfoJson.getStr("memoryConsumed#" + testcaseNum)) / 1024; - String msg = submissionInfoJson.getStr("checkerStdoutAndStderr#" + testcaseNum); - judgeCaseList.add(new JudgeCase() - .setSubmitId(remoteJudgeDTO.getJudgeId()) - .setPid(remoteJudgeDTO.getPid()) - .setUid(remoteJudgeDTO.getUid()) - .setTime(time) - .setMemory(memory) - .setStatus(judgeRes.getStatus()) - .setUserOutput(msg)); - if (time > maxTime) { - maxTime = time; - } - if (memory > maxMemory) { - maxMemory = memory; - } - } - - remoteJudgeDTO.setTestcaseNum(testcaseNum); - remoteJudgeDTO.setMaxMemory(maxMemory); - remoteJudgeDTO.setMaxTime(maxTime); - remoteJudgeRes.setJudgeCaseList(judgeCaseList); - if ("true".equals(submissionInfoJson.getStr("waiting"))) { - return remoteJudgeRes; - } - Constants.Judge finalJudgeRes = statusMap.get(submissionInfoJson.getStr("verdict#" + testCount)); - remoteJudgeRes.setStatus(finalJudgeRes.getStatus()) - .setTime(maxTime) - .setMemory(maxMemory); - return remoteJudgeRes; - } else { - remoteJudgeRes.setStatus(Constants.Judge.STATUS_SYSTEM_ERROR.getStatus()) - .setMemory(0) - .setTime(0) - .setErrorInfo("Oops! Error in obtaining the judging result. The status code returned by the interface is " + httpResponse.getStatus() + "."); - return remoteJudgeRes; - } - } - - public HashMap getCsrfToken(String url, boolean needTTA) { - RemoteJudgeDTO remoteJudgeDTO = getRemoteJudgeDTO(); - HttpRequest request = HttpUtil.createGet(url); - if (remoteJudgeDTO.getCookies() == null) { - request.header("cookie", "RCPC=" + CodeForcesUtils.getRCPC()); - } else { - request.cookie(remoteJudgeDTO.getCookies()); - } - - HttpResponse response = request.execute(); - String body = response.body(); - if (body.contains("Redirecting... Please, wait.")) { - List list = ReUtil.findAll("[a-z0-9]+[a-z0-9]{31}", body, 0, new ArrayList<>()); - CodeForcesUtils.updateRCPC(list); - request.removeHeader("cookie"); - request.header("cookie", "RCPC=" + CodeForcesUtils.getRCPC()); - response = request.execute(); - body = response.body(); - } - - remoteJudgeDTO.setCookies(response.getCookies()); - HashMap res = new HashMap<>(); - String ftaa = response.getCookieValue("70a7c28f3de"); - res.put("ftaa", ftaa); - - String bfaa = ReUtil.get("_bfaa = \"(.{32})\"", body, 1); - if (StringUtils.isEmpty(bfaa)) { - bfaa = response.getCookieValue("raa"); - if (StringUtils.isEmpty(bfaa)) { - bfaa = response.getCookieValue("bfaa"); - } - } - res.put("bfaa", bfaa); - - String csrfToken = ReUtil.get("data-csrf='(\\w+)'", body, 1); - res.put("csrf_token", csrfToken); - - if (needTTA) { - String _39ce7 = response.getCookieValue("39ce7"); - int _tta = 0; - for (int c = 0; c < _39ce7.length(); c++) { - _tta = (_tta + (c + 1) * (c + 2) * _39ce7.charAt(c)) % 1009; - if (c % 3 == 0) - _tta++; - if (c % 2 == 0) - _tta *= 2; - if (c > 0) - _tta -= (_39ce7.charAt(c / 2) / 2) * (_tta % 5); - while (_tta < 0) - _tta += 1009; - while (_tta >= 1009) - _tta -= 1009; - } - res.put("_tta", _tta); - } - return res; - } - - @Override - public void login() { - // 清除当前线程的cookies缓存 - HttpRequest.getCookieManager().getCookieStore().removeAll(); - RemoteJudgeDTO remoteJudgeDTO = getRemoteJudgeDTO(); - HashMap keyMap = getCsrfToken(IMAGE_HOST + LOGIN_URL, false); - - HttpRequest httpRequest = new HttpRequest(IMAGE_HOST + LOGIN_URL); - httpRequest.setConnectionTimeout(60000); - httpRequest.setReadTimeout(60000); - httpRequest.setMethod(Method.POST); - httpRequest.cookie(remoteJudgeDTO.getCookies()); - HashMap hashMap = new HashMap<>(); - hashMap.put("csrf_token", keyMap.get("csrf_token")); - hashMap.put("action", "enter"); - hashMap.put("ftaa", keyMap.get("ftaa")); - hashMap.put("bfaa", keyMap.get("bfaa")); - hashMap.put("handleOrEmail", remoteJudgeDTO.getUsername()); - hashMap.put("password", remoteJudgeDTO.getPassword()); - hashMap.put("remember", "on"); - httpRequest.form(hashMap); - HttpResponse response = httpRequest.execute(); - remoteJudgeDTO.setCookies(response.getCookies()); - remoteJudgeDTO.setLoginStatus(response.getStatus()); - } - - protected String getSubmitUrl(String contestNum) { - return IMAGE_HOST + String.format(SUBMIT_URL, contestNum); - } - - public void submitCode(RemoteJudgeDTO remoteJudgeDTO) { - HashMap keyMap = getCsrfToken(getSubmitUrl(remoteJudgeDTO.getContestId()), true); - HashMap paramMap = new HashMap<>(); - paramMap.put("csrf_token", keyMap.get("csrf_token")); - paramMap.put("_tta", keyMap.get("_tta")); - paramMap.put("bfaa", keyMap.get("bfaa")); - paramMap.put("ftaa", keyMap.get("ftaa")); - paramMap.put("action", "submitSolutionFormSubmitted"); - paramMap.put("submittedProblemIndex", remoteJudgeDTO.getProblemNum()); - paramMap.put("contestId", remoteJudgeDTO.getContestId()); - paramMap.put("programTypeId", getLanguage(remoteJudgeDTO.getLanguage())); - paramMap.put("tabsize", 4); - paramMap.put("source", remoteJudgeDTO.getUserCode() + getRandomBlankString()); - paramMap.put("sourceCodeConfirmed", true); - paramMap.put("doNotShowWarningAgain", "on"); - HttpRequest request = HttpUtil.createPost(getSubmitUrl(remoteJudgeDTO.getContestId()) + "?csrf_token=" + keyMap.get("csrf_token")); - request.setConnectionTimeout(60000); - request.setReadTimeout(60000); - request.form(paramMap); - request.cookie(remoteJudgeDTO.getCookies()); - request.header("user-agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36"); - HttpResponse response = request.execute(); - remoteJudgeDTO.setSubmitStatus(response.getStatus()); - if (response.getStatus() != HttpStatus.SC_MOVED_TEMPORARILY) { - if (response.body().contains("error for__programTypeId")) { - String log = String.format("Codeforces[%s] [%s]:Failed to submit code, caused by `Language Rejected`", remoteJudgeDTO.getContestId(), remoteJudgeDTO.getProblemNum()); - throw new RuntimeException(log); - } - if (response.body().contains("error for__source")) { - String log = String.format("Codeforces[%s] [%s]:Failed to submit code, caused by `Source Code Error`", remoteJudgeDTO.getContestId(), remoteJudgeDTO.getProblemNum()); - throw new RuntimeException(log); - } - } - } - - @Override - public String getLanguage(String language) { - if (language.startsWith("GNU GCC C11")) { - return "43"; - } else if (language.startsWith("Clang++17 Diagnostics")) { - return "52"; - } else if (language.startsWith("GNU G++11")) { - return "50"; - } else if (language.startsWith("GNU G++14")) { - return "50"; - } else if (language.startsWith("GNU G++17")) { - return "54"; - } else if (language.startsWith("GNU G++20")) { - return "73"; - } else if (language.startsWith("Microsoft Visual C++ 2017")) { - return "59"; - } else if (language.startsWith("C# 8, .NET Core")) { - return "65"; - } else if (language.startsWith("C# Mono")) { - return "9"; - } else if (language.startsWith("D DMD32")) { - return "28"; - } else if (language.startsWith("Go")) { - return "32"; - } else if (language.startsWith("Haskell GHC")) { - return "12"; - } else if (language.startsWith("Java 11")) { - return "60"; - } else if (language.startsWith("Java 1.8")) { - return "36"; - } else if (language.startsWith("Kotlin")) { - return "48"; - } else if (language.startsWith("OCaml")) { - return "19"; - } else if (language.startsWith("Delphi")) { - return "3"; - } else if (language.startsWith("Free Pascal")) { - return "4"; - } else if (language.startsWith("PascalABC.NET")) { - return "51"; - } else if (language.startsWith("Perl")) { - return "13"; - } else if (language.startsWith("PHP")) { - return "6"; - } else if (language.startsWith("Python 2")) { - return "7"; - } else if (language.startsWith("Python 3")) { - return "31"; - } else if (language.startsWith("PyPy 2")) { - return "40"; - } else if (language.startsWith("PyPy 3")) { - return "41"; - } else if (language.startsWith("Ruby")) { - return "67"; - } else if (language.startsWith("Rust")) { - return "49"; - } else if (language.startsWith("Scala")) { - return "20"; - } else if (language.startsWith("JavaScript")) { - return "34"; - } else if (language.startsWith("Node.js")) { - return "55"; - } else { - return null; - } - } - - protected String getRandomBlankString() { - StringBuilder string = new StringBuilder("\n"); - int random = new Random().nextInt(Integer.MAX_VALUE); - while (random > 0) { - string.append(random % 2 == 0 ? ' ' : '\t'); - random /= 2; - } - return string.toString(); - } - -} diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/remoteJudge/task/Impl/GYMJudge.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/remoteJudge/task/Impl/GYMJudge.java deleted file mode 100644 index ee3174e..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/remoteJudge/task/Impl/GYMJudge.java +++ /dev/null @@ -1,102 +0,0 @@ -package top.hcode.hoj.remoteJudge.task.Impl; - - -import cn.hutool.core.map.MapUtil; -import cn.hutool.core.text.UnicodeUtil; -import cn.hutool.core.util.ReUtil; -import cn.hutool.http.HttpRequest; -import cn.hutool.http.HttpResponse; -import cn.hutool.http.HttpUtil; -import cn.hutool.json.JSONArray; -import cn.hutool.json.JSONObject; -import cn.hutool.json.JSONUtil; -import top.hcode.hoj.remoteJudge.entity.RemoteJudgeDTO; -import top.hcode.hoj.remoteJudge.entity.RemoteJudgeRes; -import top.hcode.hoj.util.Constants; - -import java.util.HashMap; - -/** - * @Author: Himit_ZH - * @Date: 2021/11/6 11:17 - * @Description: - */ -public class GYMJudge extends CodeForcesJudge { - - private final static String JUDGE_PROTOCOL = "/data/judgeProtocol"; - - @Override - protected String getSubmitUrl(String contestNum) { - return IMAGE_HOST + "/gym/" + contestNum + "/submit"; - } - - @Override - public RemoteJudgeRes result() { - return getNotTestCaseDetailResult(); - } - - private RemoteJudgeRes getNotTestCaseDetailResult() { - HttpRequest.getCookieManager().getCookieStore().removeAll(); - - RemoteJudgeDTO remoteJudgeDTO = getRemoteJudgeDTO(); - Long submitId = remoteJudgeDTO.getSubmitId(); - - RemoteJudgeRes remoteJudgeRes = RemoteJudgeRes.builder() - .status(Constants.Judge.STATUS_JUDGING.getStatus()) - .build(); - - String url = HOST + String.format(SUBMISSION_RESULT_URL, remoteJudgeDTO.getUsername(), 30); - HttpResponse response = HttpUtil.createGet(url) - .timeout(30000) - .execute(); - - if (response.getStatus() == 200) { - JSONObject jsonObject = JSONUtil.parseObj(response.body()); - JSONArray results = (JSONArray) jsonObject.get("result"); - for (Object tmp : results) { - JSONObject result = (JSONObject) tmp; - long runId = Long.parseLong(result.get("id").toString()); - if (runId == submitId) { - String verdict = (String) result.get("verdict"); - Constants.Judge statusType = statusMap.get(verdict); - if (statusType == Constants.Judge.STATUS_JUDGING) { - return remoteJudgeRes; - } - remoteJudgeRes.setTime(result.getInt("timeConsumedMillis")); - Integer memoryConsumedBytes = result.getInt("memoryConsumedBytes"); - if (memoryConsumedBytes != 0) { - remoteJudgeRes.setMemory(memoryConsumedBytes / 1024); - } else { - remoteJudgeRes.setMemory(0); - } - remoteJudgeRes.setStatus(statusType.getStatus()); - if (statusType == Constants.Judge.STATUS_COMPILE_ERROR) { - if (remoteJudgeDTO.getCookies() == null) { - login(); - } - HttpRequest homeRequest = HttpUtil.createGet(HOST + MY_SUBMISSION); - homeRequest.cookie(remoteJudgeDTO.getCookies()); - HttpResponse homeResponse = homeRequest.execute(); - String csrfToken = ReUtil.get("data-csrf='(\\w+)'", homeResponse.body(), 1); - - HttpRequest CEINFORequest = HttpUtil.createPost(HOST + JUDGE_PROTOCOL) - .cookie(remoteJudgeDTO.getCookies()) - .timeout(30000); - - CEINFORequest.form(MapUtil - .builder(new HashMap()) - .put("csrf_token", csrfToken) - .put("submissionId", remoteJudgeDTO.getSubmitId()).map()); - - HttpResponse CEINFOResp = CEINFORequest.execute(); - String CEInfo = UnicodeUtil.toString(CEINFOResp.body()).replaceAll("(\\\\r)?\\\\n", "\n") - .replaceAll("\\\\\\\\", "\\\\"); - remoteJudgeRes.setErrorInfo(CEInfo); - } - } - } - } - return remoteJudgeRes; - } - -} \ No newline at end of file diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/remoteJudge/task/Impl/HDUJudge.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/remoteJudge/task/Impl/HDUJudge.java deleted file mode 100644 index 54a68fb..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/remoteJudge/task/Impl/HDUJudge.java +++ /dev/null @@ -1,219 +0,0 @@ -package top.hcode.hoj.remoteJudge.task.Impl; - -import cn.hutool.core.codec.Base64; -import cn.hutool.core.map.MapUtil; -import cn.hutool.core.util.ReUtil; -import cn.hutool.http.*; -import lombok.extern.slf4j.Slf4j; -import org.jsoup.helper.Validate; -import top.hcode.hoj.remoteJudge.entity.RemoteJudgeDTO; -import top.hcode.hoj.remoteJudge.entity.RemoteJudgeRes; -import top.hcode.hoj.remoteJudge.task.RemoteJudgeStrategy; -import top.hcode.hoj.util.Constants; - -import java.net.HttpCookie; -import java.net.URLEncoder; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Random; -import java.util.concurrent.TimeUnit; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -@Slf4j(topic = "hoj") -public class HDUJudge extends RemoteJudgeStrategy { - public static final String HOST = "http://acm.hdu.edu.cn"; - public static final String LOGIN_URL = "/userloginex.php?action=login"; - public static final String SUBMIT_URL = "/submit.php?action=submit"; - public static final String STATUS_URL = "/status.php?user=%s&pid=%s"; - public static final String QUERY_URL = "/status.php?first=%d"; - public static final String ERROR_URL = "/viewerror.php?rid=%d"; - public static Map headers = MapUtil - .builder(new HashMap()) - .put("Host", "acm.hdu.edu.cn") - .put("origin", "https://acm.hdu.edu.cn") - .put("referer", "https://acm.hdu.edu.cn") - .put("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36") - .map(); - - @Override - public void submit() { - - RemoteJudgeDTO remoteJudgeDTO = getRemoteJudgeDTO(); - - if (remoteJudgeDTO.getCompleteProblemId() == null || remoteJudgeDTO.getUserCode() == null) { - return; - } - - login(); - - List cookies = remoteJudgeDTO.getCookies(); - - HttpRequest request = HttpUtil.createPost(HOST + SUBMIT_URL) - .addHeaders(headers) - .form(MapUtil - .builder(new HashMap()) - .put("check", "0") - .put("language", getLanguage(remoteJudgeDTO.getLanguage())) - .put("problemid", remoteJudgeDTO.getCompleteProblemId()) - .put("_usercode", Base64.encode(URLEncoder.encode(remoteJudgeDTO.getUserCode() + getRandomBlankString()))) - .map()) - .cookie(cookies); - - HttpResponse response = request.execute(); - remoteJudgeDTO.setSubmitStatus(response.getStatus()); - // 提交频率限制了 等待5秒再次提交 - if (response.getStatus() == 200 && response.body() != null && response.body().contains("Please don't re-submit")) { - try { - TimeUnit.SECONDS.sleep(5); - } catch (InterruptedException e) { - e.printStackTrace(); - } - response = request.execute(); - remoteJudgeDTO.setSubmitStatus(response.getStatus()); - if (response.getStatus() != 302) { - String log = String.format("[HDU] [%s]: Failed to submit code, the http response status is [%s].", remoteJudgeDTO.getCompleteProblemId(), response.getStatus()); - throw new RuntimeException(log); - } - } else if (response.getStatus() != 302) { - String log = String.format("[HDU] [%s]: Failed to submit code, the http response status is [%s].", remoteJudgeDTO.getCompleteProblemId(), response.getStatus()); - throw new RuntimeException(log); - } - // 获取提交的题目id - Long maxRunId = getMaxRunId(remoteJudgeDTO.getUsername(), remoteJudgeDTO.getCompleteProblemId()); - if (maxRunId == -1L) { // 等待2s再次查询,如果还是失败,则表明提交失败了 - try { - TimeUnit.SECONDS.sleep(2); - } catch (InterruptedException e) { - e.printStackTrace(); - } - maxRunId = getMaxRunId(remoteJudgeDTO.getUsername(), remoteJudgeDTO.getCompleteProblemId()); - } - remoteJudgeDTO.setCookies(cookies) - .setSubmitId(maxRunId); - } - - @Override - public RemoteJudgeRes result() { - RemoteJudgeDTO remoteJudgeDTO = getRemoteJudgeDTO(); - String url = HOST + String.format(QUERY_URL, remoteJudgeDTO.getSubmitId()); - HttpRequest request = HttpUtil.createGet(url) - .cookie(remoteJudgeDTO.getCookies()) - .addHeaders(headers); - HttpResponse response = request.execute(); - // 1提交时间 2结果 3执行时间 4执行空间 5代码长度 - // 一般情况下 代码长度和提交时间不需要,想要也行,自行添加 - Pattern pattern = Pattern.compile(">" + remoteJudgeDTO.getSubmitId() + "[\\s\\S]*?([\\s\\S]*?)[\\s\\S]*?(\\d*?)MS(\\d*?)K"); - Matcher matcher = pattern.matcher(response.body()); - // 找到时 - Validate.isTrue(matcher.find()); - String rawStatus = matcher.group(1).replaceAll("<[\\s\\S]*?>", "").trim(); - Constants.Judge judgeStatus = statusTypeMap.getOrDefault(rawStatus, Constants.Judge.STATUS_PENDING); - - RemoteJudgeRes remoteJudgeRes = RemoteJudgeRes.builder() - .status(judgeStatus.getStatus()) - .build(); - - if (judgeStatus == Constants.Judge.STATUS_PENDING) { - return remoteJudgeRes; - } - - - // 获取其他信息 - String executionTime = matcher.group(2); - remoteJudgeRes.setTime(Integer.parseInt(executionTime)); - String executionMemory = matcher.group(3); - remoteJudgeRes.setMemory(Integer.parseInt(executionMemory)); - - // 如果CE了,则还需要获得错误信息 - if (judgeStatus == Constants.Judge.STATUS_COMPILE_ERROR) { - request.setUrl(HOST + String.format(ERROR_URL, remoteJudgeDTO.getSubmitId())); - String CEHtml = request.execute().body(); - String compilationErrorInfo = ReUtil.get("
([\\s\\S]*?)
", CEHtml, 1); - remoteJudgeRes.setErrorInfo(HtmlUtil.unescape(compilationErrorInfo)); - } - return remoteJudgeRes; - } - - - @Override - public void login() { - // 清除当前线程的cookies缓存 - HttpRequest.getCookieManager().getCookieStore().removeAll(); - RemoteJudgeDTO remoteJudgeDTO = getRemoteJudgeDTO(); - HttpRequest request = HttpUtil.createPost(HOST + LOGIN_URL).addHeaders(headers); - HttpResponse response = request.form(MapUtil - .builder(new HashMap()) - .put("username", remoteJudgeDTO.getUsername()) - .put("login", "Sign In") - .put("userpass", remoteJudgeDTO.getPassword()).map()) - .execute(); - if (response.getStatus() != 302) { - throw new RuntimeException("[HDU] Failed to login! The possible cause is connection failure, and the returned status code is " + response.getStatus()); - } - remoteJudgeDTO.setLoginStatus(response.getStatus()); - remoteJudgeDTO.setCookies(response.getCookies()); - } - - - @Override - public String getLanguage(String language) { - switch (language) { - case "G++": - return "0"; - case "GCC": - return "1"; - case "C++": - return "2"; - case "C": - return "3"; - case "Pascal": - return "4"; - case "Java": - return "5"; - case "C#": - return "6"; - default: - // TODO 抛出没有这个语言的异常 - return null; - } - } - - - public Long getMaxRunId(String userName, String problemId) { - String url = HOST + String.format(STATUS_URL, userName, problemId); - HttpResponse response = HttpUtil.createGet(url).addHeaders(headers).execute(); - String maxRunId = ReUtil.get("(\\d+)", response.body(), 1); - return maxRunId != null ? Long.parseLong(maxRunId) : -1L; - } - - - // TODO 添加结果对应的状态 - private static final Map statusTypeMap = new HashMap() { - { - put("Submitted", Constants.Judge.STATUS_PENDING); - put("Accepted", Constants.Judge.STATUS_ACCEPTED); - put("Wrong Answer", Constants.Judge.STATUS_WRONG_ANSWER); - put("Compilation Error", Constants.Judge.STATUS_COMPILE_ERROR); - put("Queuing", Constants.Judge.STATUS_PENDING); - put("Running", Constants.Judge.STATUS_JUDGING); - put("Compiling", Constants.Judge.STATUS_COMPILING); - put("Runtime Error", Constants.Judge.STATUS_RUNTIME_ERROR); - put("Time Limit Exceeded", Constants.Judge.STATUS_TIME_LIMIT_EXCEEDED); - put("Memory Limit Exceeded", Constants.Judge.STATUS_MEMORY_LIMIT_EXCEEDED); - put("Output Limit Exceeded", Constants.Judge.STATUS_RUNTIME_ERROR); - put("Presentation Error", Constants.Judge.STATUS_PRESENTATION_ERROR); - } - }; - - protected String getRandomBlankString() { - StringBuilder string = new StringBuilder("\n"); - int random = new Random().nextInt(Integer.MAX_VALUE); - while (random > 0) { - string.append(random % 2 == 0 ? ' ' : '\t'); - random /= 2; - } - return string.toString(); - } -} diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/remoteJudge/task/Impl/POJJudge.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/remoteJudge/task/Impl/POJJudge.java deleted file mode 100644 index c60ad00..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/remoteJudge/task/Impl/POJJudge.java +++ /dev/null @@ -1,222 +0,0 @@ -package top.hcode.hoj.remoteJudge.task.Impl; - -import cn.hutool.core.codec.Base64; -import cn.hutool.core.map.MapUtil; -import cn.hutool.core.util.ReUtil; -import cn.hutool.http.*; -import lombok.extern.slf4j.Slf4j; -import org.springframework.util.CollectionUtils; -import top.hcode.hoj.remoteJudge.entity.RemoteJudgeDTO; -import top.hcode.hoj.remoteJudge.entity.RemoteJudgeRes; -import top.hcode.hoj.remoteJudge.task.RemoteJudgeStrategy; -import top.hcode.hoj.util.Constants; - -import java.net.HttpCookie; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Random; -import java.util.concurrent.TimeUnit; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -/** - * @Author: Himit_ZH - * @Date: 2021/6/24 21:19 - * @Description: - */ -@Slf4j(topic = "hoj") -public class POJJudge extends RemoteJudgeStrategy { - public static final String HOST = "http://poj.org"; - public static final String LOGIN_URL = "/login"; - public static final String SUBMIT_URL = "/submit"; - public static final String STATUS_URL = "/status?user_id=%s&problem_id=%s"; - public static final String QUERY_URL = "/showsource?solution_id=%s"; - public static final String ERROR_URL = "/showcompileinfo?solution_id=%s"; - public static Map headers = MapUtil - .builder(new HashMap()) - .put("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36") - .map(); - - @Override - public void submit() { - - RemoteJudgeDTO remoteJudgeDTO = getRemoteJudgeDTO(); - - if (remoteJudgeDTO.getCompleteProblemId() == null || remoteJudgeDTO.getUserCode() == null) { - return; - } - - login(); - - List cookies = remoteJudgeDTO.getCookies(); - - HttpRequest request = HttpUtil.createPost(HOST + SUBMIT_URL) - .addHeaders(headers) - .cookie(cookies); - - HttpResponse response = request.form(MapUtil.builder(new HashMap()) - .put("language", getLanguage(remoteJudgeDTO.getLanguage())) - .put("submit", "Submit") - .put("problem_id", remoteJudgeDTO.getCompleteProblemId()) - .put("source", Base64.encode(remoteJudgeDTO.getUserCode() + getRandomBlankString())) - .put("encoded", 1).map()) - .execute(); - remoteJudgeDTO.setSubmitStatus(response.getStatus()); - if (response.getStatus() != 302 && response.getStatus() != 200) { - String log = String.format("[POJ] [%s]: Failed to submit code, the http response status is [%s].", remoteJudgeDTO.getCompleteProblemId(), response.getStatus()); - throw new RuntimeException(log); - } - // 下面的请求都是GET - request.setMethod(Method.GET); - // 获取提交的题目id - Long maxRunId = getMaxRunId(request, remoteJudgeDTO.getUsername(), remoteJudgeDTO.getCompleteProblemId()); - - if (maxRunId == -1L) { // 等待2s再次查询,如果还是失败,则表明提交失败了 - try { - TimeUnit.SECONDS.sleep(2); - } catch (InterruptedException e) { - e.printStackTrace(); - } - maxRunId = getMaxRunId(request, remoteJudgeDTO.getUsername(), remoteJudgeDTO.getCompleteProblemId()); - } - - remoteJudgeDTO.setCookies(cookies) - .setSubmitId(maxRunId); - } - - @Override - public RemoteJudgeRes result() { - - RemoteJudgeDTO remoteJudgeDTO = getRemoteJudgeDTO(); - List cookies = remoteJudgeDTO.getCookies(); - Long submitId = remoteJudgeDTO.getSubmitId(); - - if (CollectionUtils.isEmpty(cookies)) { - login(); - cookies = remoteJudgeDTO.getCookies(); - } - String url = HOST + String.format(QUERY_URL, submitId); - HttpRequest request = HttpUtil.createGet(url) - .cookie(cookies) - .addHeaders(headers); - - HttpResponse response = request.execute(); - - if (!response.body().contains("Result:")) { - log.error(submitId + " error:{}", response.body()); - } - - String statusStr = ReUtil.get("Result:(.+?)", response.body(), 1) - .replaceAll("<.*?>", "") - .trim(); - - Constants.Judge judgeStatus = statusMap.get(statusStr); - - if (judgeStatus == null) { - return RemoteJudgeRes.builder() - .status(Constants.Judge.STATUS_PENDING.getStatus()) - .build(); - } - - RemoteJudgeRes remoteJudgeRes = RemoteJudgeRes.builder() - .status(judgeStatus.getStatus()) - .build(); - - // 如果CE了,需要获得错误信息 - if (judgeStatus == Constants.Judge.STATUS_COMPILE_ERROR) { - request.setUrl(HOST + String.format(ERROR_URL, submitId)); - String CEHtml = request.execute().body(); - String compilationErrorInfo = ReUtil.get("
([\\s\\S]*?)
", CEHtml, 1); - remoteJudgeRes.setErrorInfo(HtmlUtil.unescape(compilationErrorInfo)); - } else { - // 如果不是CE,获取其他信息 - String executionMemory = ReUtil.get("Memory: ([-\\d]+)", response.body(), 1); - remoteJudgeRes.setMemory(executionMemory == null ? null : Integer.parseInt(executionMemory)); - String executionTime = ReUtil.get("Time: ([-\\d]+)", response.body(), 1); - remoteJudgeRes.setTime(executionTime == null ? null : Integer.parseInt(executionTime)); - } - return remoteJudgeRes; - } - - - @Override - public void login() { - // 清除当前线程的cookies缓存 - HttpRequest.getCookieManager().getCookieStore().removeAll(); - - RemoteJudgeDTO remoteJudgeDTO = getRemoteJudgeDTO(); - - HttpRequest request = HttpUtil.createPost(HOST + LOGIN_URL); - HttpResponse response = request.form(MapUtil.builder(new HashMap()) - .put("user_id1", remoteJudgeDTO.getUsername()) - .put("B1", "login") - .put("url", ".") - .put("password1", remoteJudgeDTO.getPassword()).map()).execute(); - - if (response.getStatus() != 302) { - throw new RuntimeException("[POJ] Failed to login! The possible cause is connection failure, and the returned status code is " + response.getStatus()); - } - remoteJudgeDTO.setCookies(response.getCookies()) - .setLoginStatus(response.getStatus()); - } - - @Override - public String getLanguage(String language) { - switch (language) { - case "G++": - return "0"; - case "GCC": - return "1"; - case "Java": - return "2"; - case "Pascal": - return "3"; - case "C++": - return "4"; - case "C": - return "5"; - case "Fortran": - return "6"; - default: - // TODO 抛出没有这个语言的异常 - return null; - } - } - - - public Long getMaxRunId(HttpRequest request, String userName, String problemId) { - String url = String.format(STATUS_URL, userName, problemId); - request.setUrl(HOST + url); - String html = request.execute().body(); - Matcher matcher = Pattern.compile("(\\d+)").matcher(html); - return matcher.find() ? Long.parseLong(matcher.group(1)) : -1L; - } - - - // TODO 添加结果对应的状态 - private static final Map statusMap = new HashMap() { - { - put("Compiling", Constants.Judge.STATUS_COMPILING); - put("Accepted", Constants.Judge.STATUS_ACCEPTED); - put("Running & Judging", Constants.Judge.STATUS_JUDGING); - put("Presentation Error", Constants.Judge.STATUS_PRESENTATION_ERROR); - put("Time Limit Exceeded", Constants.Judge.STATUS_TIME_LIMIT_EXCEEDED); - put("Memory Limit Exceeded", Constants.Judge.STATUS_MEMORY_LIMIT_EXCEEDED); - put("Wrong Answer", Constants.Judge.STATUS_WRONG_ANSWER); - put("Runtime Error", Constants.Judge.STATUS_RUNTIME_ERROR); - put("Output Limit Exceeded", Constants.Judge.STATUS_RUNTIME_ERROR); - put("Compile Error", Constants.Judge.STATUS_COMPILE_ERROR); - } - }; - - protected String getRandomBlankString() { - StringBuilder string = new StringBuilder("\n"); - int random = new Random().nextInt(Integer.MAX_VALUE); - while (random > 0) { - string.append(random % 2 == 0 ? ' ' : '\t'); - random /= 2; - } - return string.toString(); - } -} \ No newline at end of file diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/remoteJudge/task/Impl/SPOJJudge.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/remoteJudge/task/Impl/SPOJJudge.java deleted file mode 100644 index e13e2ca..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/remoteJudge/task/Impl/SPOJJudge.java +++ /dev/null @@ -1,256 +0,0 @@ -package top.hcode.hoj.remoteJudge.task.Impl; - -import cn.hutool.core.map.MapUtil; -import cn.hutool.core.util.ReUtil; -import cn.hutool.http.HttpRequest; -import cn.hutool.http.HttpResponse; -import cn.hutool.http.HttpUtil; -import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang.Validate; -import top.hcode.hoj.remoteJudge.entity.RemoteJudgeDTO; -import top.hcode.hoj.remoteJudge.entity.RemoteJudgeRes; -import top.hcode.hoj.remoteJudge.task.RemoteJudgeStrategy; -import top.hcode.hoj.util.Constants; - -import java.net.HttpCookie; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -/** - * @Author: Himit_ZH - * @Date: 2022/1/27 23:19 - * @Description: - */ -@Slf4j(topic = "hoj") -public class SPOJJudge extends RemoteJudgeStrategy { - - public static final String HOST = "https://www.spoj.com"; - public static final String LOGIN_URL = "/login/"; - public static final String SUBMIT_URL = "/submit/complete/"; - public static final String SUBMISSION_RESULT_URL = "/status/ajax=1,ajaxdiff=1"; - public static final String CE_INFO_URL = "/error/%s"; - - private static final Map statusMap = new HashMap() {{ - put("11", Constants.Judge.STATUS_COMPILE_ERROR); - put("12", Constants.Judge.STATUS_RUNTIME_ERROR); - put("13", Constants.Judge.STATUS_TIME_LIMIT_EXCEEDED); - put("14", Constants.Judge.STATUS_WRONG_ANSWER); - put("15", Constants.Judge.STATUS_ACCEPTED); - }}; - - private static final Map languageMap = new HashMap<>(); - - - @Override - public void submit() { - RemoteJudgeDTO remoteJudgeDTO = getRemoteJudgeDTO(); - if (remoteJudgeDTO.getCompleteProblemId() == null || remoteJudgeDTO.getUserCode() == null) { - return; - } - login(); - - List cookies = remoteJudgeDTO.getCookies(); - - HttpRequest request = HttpUtil.createPost(HOST + SUBMIT_URL) - .cookie(cookies); - - HttpResponse response = request.form(MapUtil - .builder(new HashMap()) - .put("lang", getLanguage(remoteJudgeDTO.getLanguage())) - .put("problemcode", remoteJudgeDTO.getCompleteProblemId()) - .put("file", remoteJudgeDTO.getUserCode()) - .map()) - .execute(); - remoteJudgeDTO.setSubmitStatus(response.getStatus()); - if (response.body().contains("submit in this language for this problem")) { - throw new RuntimeException("Language Error"); - } else if (response.body().contains("Wrong problem code!")) { - throw new RuntimeException("Wrong problem code!"); - } else if (response.body().contains("solution is too long")) { - throw new RuntimeException("Code Length Exceeded"); - } - - String runId = ReUtil.get("name=\"newSubmissionId\" value=\"(\\d+)\"", response.body(), 1); - if (runId == null) { - remoteJudgeDTO.setSubmitId(-1L); - } else { - remoteJudgeDTO.setSubmitId(Long.parseLong(runId)); - } - } - - @Override - public RemoteJudgeRes result() { - RemoteJudgeDTO remoteJudgeDTO = getRemoteJudgeDTO(); - List cookies = remoteJudgeDTO.getCookies(); - Long submitId = remoteJudgeDTO.getSubmitId(); - - String url = HOST + SUBMISSION_RESULT_URL; - HttpResponse response = HttpUtil.createPost(url) - .cookie(cookies) - .form(MapUtil.builder(new HashMap()) - .put("ids", submitId).map()) - .execute(); - - String html = response.body(); - html = html.replaceAll("\\\\[nt]", "").replaceAll(">(run|edit|ideone it)<", "><") - .replaceAll("<.*?>", "").replace(" ", "") - .replaceAll("\n","") - .trim(); - - - Pattern pattern = Pattern.compile("\"status_description\":\"[\\s\\S]*?\", \"id\":" + submitId + - ", \"status\":([\\s\\S]*?),\"time\":\"([\\s\\S]*?)\",\"mem\":\"([\\s\\S]*?)\",\"final\":\"([\\s\\S]*?)\""); - Matcher matcher = pattern.matcher(html); - Validate.isTrue(matcher.find()); - - String finalTag = matcher.group(4).trim(); - if (!"1".equals(finalTag)) { - return RemoteJudgeRes.builder() - .status(Constants.Judge.STATUS_PENDING.getStatus()) - .build(); - } - - String rawStatus = matcher.group(1).trim(); - String rawTime = matcher.group(2).trim(); - String rawMemory = matcher.group(3).trim(); - - Constants.Judge judgeResult = statusMap.get(rawStatus); - - RemoteJudgeRes remoteJudgeRes = RemoteJudgeRes.builder() - .status(judgeResult.getStatus()) - .build(); - - if (!rawMemory.equals("-")) { - int mul = matcher.group(3).contains("M") ? 1024 : 1; - int memory = (int) (0.5 + mul * Double.parseDouble(rawMemory.replaceAll("[Mk]", "").trim())); - remoteJudgeRes.setMemory(memory); - } - if (!rawTime.equals("-")) { - int time = (int) (0.5 + 1000 * Double.parseDouble(rawTime)); - remoteJudgeRes.setTime(time); - } - if (judgeResult.equals(Constants.Judge.STATUS_COMPILE_ERROR)) { - String errorInfoUrl = HOST + String.format(CE_INFO_URL, submitId); - HttpRequest request = HttpUtil.createGet(errorInfoUrl); - html = request.cookie(cookies).execute().body(); - String errorInfo = ReUtil.get("
([\\s\\S]*?)
", html, 1); - remoteJudgeRes.setErrorInfo(errorInfo); - } - return remoteJudgeRes; - } - - @Override - public void login() { - // 清除当前线程的cookies缓存 - HttpRequest.getCookieManager().getCookieStore().removeAll(); - - RemoteJudgeDTO remoteJudgeDTO = getRemoteJudgeDTO(); - HttpRequest request = HttpUtil.createPost(HOST + LOGIN_URL); - HttpResponse response = request.form(MapUtil.builder(new HashMap()) - .put("login_user", remoteJudgeDTO.getUsername()) - .put("autologin", "1") - .put("submit", "Log In") - .put("password", remoteJudgeDTO.getPassword()).map()).execute(); - remoteJudgeDTO.setLoginStatus(response.getStatus()) - .setCookies(response.getCookies()); - } - - @Override - public String getLanguage(String language) { - if (language.equals("Perl (perl 2018.12)")) { - return languageMap.get(language); - } - String key = language.substring(0, language.lastIndexOf(" ")).trim(); - return languageMap.get(key); - } - - - static { - languageMap.put("Ada95 (gnat", "7"); - languageMap.put("Assembler 32 (gcc", "45"); - languageMap.put("Assembler 32 (nasm", "13"); - languageMap.put("Assembler 64 (nasm)", "42"); - languageMap.put("AWK (gawk", "104"); - languageMap.put("AWK (mawk", "105"); - languageMap.put("Bash (bash", "28"); - languageMap.put("BC (bc", "110"); - languageMap.put("Brainf**k (bff", "12"); - languageMap.put("C (clang", "81"); - languageMap.put("C (gcc", "11"); - languageMap.put("C# (gmcs", "27"); - languageMap.put("C++ (g++", "41"); - languageMap.put("C++ (gcc", "1"); - languageMap.put("C++14 (gcc", "44"); - languageMap.put("C++14 (clang", "82"); - languageMap.put("C99 (gcc", "34"); - languageMap.put("Clips (clips", "14"); - languageMap.put("Clojure (clojure", "111"); - languageMap.put("Cobol (gnucobol", "118"); - languageMap.put("CoffeeScript (coffee", "91"); - languageMap.put("Common Lisp (sbcl", "31"); - languageMap.put("Common Lisp (clisp", "32"); - languageMap.put("D (dmd", "102"); - languageMap.put("D (ldc", "84"); - languageMap.put("D (gdc", "20"); - languageMap.put("Dart (dart", "48"); - languageMap.put("Elixir (elixir", "96"); - languageMap.put("Erlang (erl", "36"); - languageMap.put("F# (mono", "124"); - languageMap.put("Fantom (fantom", "92"); - languageMap.put("Forth (gforth", "107"); - languageMap.put("Fortran (gfortran", "5"); - languageMap.put("Go (go", "114"); - languageMap.put("Gosu (gosu", "98"); - languageMap.put("Groovy (groovy", "121"); - languageMap.put("Haskell (ghc", "21"); - languageMap.put("Icon (iconc", "16"); - languageMap.put("Intercal (ick", "9"); - languageMap.put("JAR (JavaSE", "24"); - languageMap.put("Java (HotSpot", "10"); - languageMap.put("JavaScript (rhino", "35"); - languageMap.put("JavaScript (SMonkey", "112"); - languageMap.put("Kotlin (kotlin", "47"); - languageMap.put("Lua (luac", "26"); - languageMap.put("Nemerle (ncc", "30"); - languageMap.put("Nice (nicec", "25"); - languageMap.put("Nim (nim", "122"); - languageMap.put("Node.js (node", "56"); - languageMap.put("Objective-C (gcc", "43"); - languageMap.put("Objective-C (clang", "83"); - languageMap.put("Ocaml (ocamlopt", "8"); - languageMap.put("Octave (octave", "127"); - languageMap.put("Pascal (gpc", "2"); - languageMap.put("Pascal (fpc", "22"); - languageMap.put("Perl (perl 2018.12)", "54"); - languageMap.put("Perl (perl", "3"); - languageMap.put("PHP (php", "29"); - languageMap.put("Pico Lisp (pico", "94"); - languageMap.put("Pike (pike", "19"); - languageMap.put("Prolog (swi", "15"); - languageMap.put("Prolog (gprolog", "108"); - languageMap.put("Python (cpython", "4"); - languageMap.put("Python (PyPy", "99"); - languageMap.put("Python 3 (python", "116"); - languageMap.put("Python 3 nbc (python", "126"); - languageMap.put("R (R", "117"); - languageMap.put("Racket (racket", "95"); - languageMap.put("Ruby (ruby", "17"); - languageMap.put("Rust (rust", "93"); - languageMap.put("Scala (scala", "39"); - languageMap.put("Scheme (stalin", "18"); - languageMap.put("Scheme (guile", "33"); - languageMap.put("Scheme (chicken", "97"); - languageMap.put("Sed (sed", "46"); - languageMap.put("Smalltalk (gst", "23"); - languageMap.put("SQLite (sqlite", "40"); - languageMap.put("Swift (swift", "85"); - languageMap.put("TCL (tcl", "38"); - languageMap.put("Text (plain", "62"); - languageMap.put("Unlambda (unlambda", "115"); - languageMap.put("VB.net (mono", "50"); - languageMap.put("Whitespace (wspace", "6"); - } -} \ No newline at end of file diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/remoteJudge/task/RemoteJudgeFactory.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/remoteJudge/task/RemoteJudgeFactory.java deleted file mode 100644 index e8f33f5..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/remoteJudge/task/RemoteJudgeFactory.java +++ /dev/null @@ -1,27 +0,0 @@ -package top.hcode.hoj.remoteJudge.task; - -import top.hcode.hoj.remoteJudge.task.Impl.*; -import top.hcode.hoj.util.Constants; - -public class RemoteJudgeFactory { - - public static RemoteJudgeStrategy selectJudge(String judgeName) { - Constants.RemoteJudge remoteJudge = Constants.RemoteJudge.getTypeByName(judgeName); - switch (remoteJudge) { - case HDU_JUDGE: - return new HDUJudge(); - case CF_JUDGE: - return new CodeForcesJudge(); - case POJ_JUDGE: - return new POJJudge(); - case GYM_JUDGE: - return new GYMJudge(); - case SPOJ_JUDGE: - return new SPOJJudge(); - case ATCODER_JUDGE: - return new AtCoderJudge(); - default: - return null; - } - } -} diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/remoteJudge/task/RemoteJudgeStrategy.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/remoteJudge/task/RemoteJudgeStrategy.java deleted file mode 100644 index 87f1a72..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/remoteJudge/task/RemoteJudgeStrategy.java +++ /dev/null @@ -1,26 +0,0 @@ -package top.hcode.hoj.remoteJudge.task; - -import lombok.Getter; -import lombok.Setter; -import top.hcode.hoj.remoteJudge.entity.RemoteJudgeDTO; -import top.hcode.hoj.remoteJudge.entity.RemoteJudgeRes; - - -/** - * 远程评测抽象类 - */ -public abstract class RemoteJudgeStrategy { - - @Setter - @Getter - private RemoteJudgeDTO remoteJudgeDTO; - - public abstract void submit(); - - public abstract RemoteJudgeRes result(); - - public abstract void login(); - - public abstract String getLanguage(String language); - -} diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/service/JudgeService.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/service/JudgeService.java deleted file mode 100644 index 16d12aa..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/service/JudgeService.java +++ /dev/null @@ -1,23 +0,0 @@ -package top.hcode.hoj.service; - -import top.hcode.hoj.common.exception.SystemError; -import top.hcode.hoj.pojo.dto.TestJudgeReq; -import top.hcode.hoj.pojo.dto.TestJudgeRes; -import top.hcode.hoj.pojo.entity.judge.Judge; -import top.hcode.hoj.pojo.dto.ToJudgeDTO; - -import java.util.HashMap; - -public interface JudgeService { - - public void judge(Judge judge); - - public TestJudgeRes testJudge(TestJudgeReq testJudgeReq); - - public void remoteJudge(ToJudgeDTO toJudgeDTO); - - public Boolean compileSpj(String code, Long pid, String spjLanguage, HashMap extraFiles) throws SystemError; - - public Boolean compileInteractive(String code, Long pid, String interactiveLanguage, HashMap extraFiles) throws SystemError; - -} diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/service/RemoteJudgeService.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/service/RemoteJudgeService.java deleted file mode 100644 index e357229..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/service/RemoteJudgeService.java +++ /dev/null @@ -1,8 +0,0 @@ -package top.hcode.hoj.service; - -public interface RemoteJudgeService { - - public void changeAccountStatus(String remoteJudge, String username); - - public void changeServerSubmitCFStatus(String ip, Integer port); -} diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/service/SystemConfigService.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/service/SystemConfigService.java deleted file mode 100644 index 6e3305d..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/service/SystemConfigService.java +++ /dev/null @@ -1,7 +0,0 @@ -package top.hcode.hoj.service; - -import java.util.HashMap; - -public interface SystemConfigService { - public HashMap getSystemConfig(); -} diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/service/impl/JudgeServiceImpl.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/service/impl/JudgeServiceImpl.java deleted file mode 100644 index 1415d07..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/service/impl/JudgeServiceImpl.java +++ /dev/null @@ -1,150 +0,0 @@ -package top.hcode.hoj.service.impl; - -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.cloud.context.config.annotation.RefreshScope; -import org.springframework.stereotype.Service; -import top.hcode.hoj.common.exception.SystemError; -import top.hcode.hoj.dao.JudgeEntityService; -import top.hcode.hoj.dao.ProblemEntityService; -import top.hcode.hoj.judge.JudgeContext; -import top.hcode.hoj.pojo.dto.TestJudgeReq; -import top.hcode.hoj.pojo.dto.TestJudgeRes; -import top.hcode.hoj.pojo.dto.ToJudgeDTO; -import top.hcode.hoj.pojo.entity.judge.Judge; -import top.hcode.hoj.pojo.entity.problem.Problem; -import top.hcode.hoj.remoteJudge.RemoteJudgeContext; -import top.hcode.hoj.service.JudgeService; -import top.hcode.hoj.util.Constants; - -import javax.annotation.Resource; -import java.util.HashMap; -import java.util.Objects; - -/** - * @Author: Himit_ZH - * @Date: 2022/3/12 15:54 - * @Description: - */ -@Service -@RefreshScope -public class JudgeServiceImpl implements JudgeService { - - @Value("${hoj-judge-server.name}") - private String name; - - @Resource - private JudgeEntityService judgeEntityService; - - @Resource - private ProblemEntityService problemEntityService; - - @Resource - private JudgeContext judgeContext; - - @Autowired - private RemoteJudgeContext remoteJudgeContext; - - @Override - public void judge(Judge judge) { - // 标志该判题过程进入编译阶段 - // 写入当前判题服务的名字 - UpdateWrapper judgeUpdateWrapper = new UpdateWrapper<>(); - judgeUpdateWrapper.set("status", Constants.Judge.STATUS_COMPILING.getStatus()) - .set("judger", name) - .eq("submit_id", judge.getSubmitId()) - .ne("status", Constants.Judge.STATUS_CANCELLED.getStatus()); - boolean isUpdatedOk = judgeEntityService.update(judgeUpdateWrapper); - - // 没更新成功,则可能表示该评测被取消 或者 judge记录被删除了,则结束评测 - if (!isUpdatedOk){ - judgeContext.updateOtherTable(judge.getSubmitId(), - Constants.Judge.STATUS_CANCELLED.getStatus(), - judge.getCid(), - judge.getUid(), - judge.getPid(), - judge.getGid(), - null, - null); - return; - } - - // 进行判题操作 - QueryWrapper problemQueryWrapper = new QueryWrapper<>(); - problemQueryWrapper.select("id", - "type", - "io_score", - "difficulty", - "judge_mode", - "time_limit", - "memory_limit", - "stack_limit", - "user_extra_file", - "judge_extra_file", - "case_version", - "spj_code", - "spj_language", - "problem_id", - "is_remove_end_blank") - .eq("id", judge.getPid()); - Problem problem = problemEntityService.getOne(problemQueryWrapper); - Judge finalJudgeRes = judgeContext.Judge(problem, judge); - - // 更新该次提交 - judgeEntityService.updateById(finalJudgeRes); - - if (!Objects.equals(finalJudgeRes.getStatus(), Constants.Judge.STATUS_SUBMITTED_FAILED.getStatus())) { - // 更新其它表 - judgeContext.updateOtherTable(finalJudgeRes.getSubmitId(), - finalJudgeRes.getStatus(), - judge.getCid(), - judge.getUid(), - judge.getPid(), - judge.getGid(), - finalJudgeRes.getScore(), - finalJudgeRes.getTime()); - } - } - - @Override - public TestJudgeRes testJudge(TestJudgeReq testJudgeReq) { - return judgeContext.testJudge(testJudgeReq); - } - - - @Override - public void remoteJudge(ToJudgeDTO toJudgeDTO) { - Judge judge = toJudgeDTO.getJudge(); - UpdateWrapper judgeUpdateWrapper = new UpdateWrapper<>(); - judgeUpdateWrapper.set("status", Constants.Judge.STATUS_PENDING.getStatus()) - .set("judger", name) - .eq("submit_id", judge.getSubmitId()) - .ne("status", Constants.Judge.STATUS_CANCELLED.getStatus()); - boolean isUpdatedOk = judgeEntityService.update(judgeUpdateWrapper); - // 没更新成功,则可能表示该评测被取消 或者 judge记录被删除了,则结束评测 - if (!isUpdatedOk){ - judgeContext.updateOtherTable(judge.getSubmitId(), - Constants.Judge.STATUS_CANCELLED.getStatus(), - judge.getCid(), - judge.getUid(), - judge.getPid(), - judge.getGid(), - null, - null); - return; - } - remoteJudgeContext.judge(toJudgeDTO); - } - - @Override - public Boolean compileSpj(String code, Long pid, String spjLanguage, HashMap extraFiles) throws SystemError { - return judgeContext.compileSpj(code, pid, spjLanguage, extraFiles); - } - - @Override - public Boolean compileInteractive(String code, Long pid, String interactiveLanguage, HashMap extraFiles) throws SystemError { - return judgeContext.compileInteractive(code, pid, interactiveLanguage, extraFiles); - } -} \ No newline at end of file diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/service/impl/RemoteJudgeServiceImpl.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/service/impl/RemoteJudgeServiceImpl.java deleted file mode 100644 index 70a3443..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/service/impl/RemoteJudgeServiceImpl.java +++ /dev/null @@ -1,110 +0,0 @@ -package top.hcode.hoj.service.impl; - -import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; -import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import org.springframework.util.StringUtils; -import top.hcode.hoj.pojo.entity.judge.JudgeServer; -import top.hcode.hoj.pojo.entity.judge.RemoteJudgeAccount; -import top.hcode.hoj.dao.JudgeServerEntityService; -import top.hcode.hoj.dao.RemoteJudgeAccountEntityService; -import top.hcode.hoj.service.RemoteJudgeService; - -/** - * @Author: Himit_ZH - * @Date: 2021/12/7 23:57 - * @Description: - */ -@Service -@Slf4j(topic = "hoj") -public class RemoteJudgeServiceImpl implements RemoteJudgeService { - - @Autowired - private RemoteJudgeAccountEntityService remoteJudgeAccountEntityService; - - @Autowired - private JudgeServerEntityService judgeServerEntityService; - - @Override - public void changeAccountStatus(String remoteJudge, String username) { - - UpdateWrapper remoteJudgeAccountUpdateWrapper = new UpdateWrapper<>(); - remoteJudgeAccountUpdateWrapper.set("status", true) - .eq("username", username); - if (remoteJudge.equals("GYM")) { - remoteJudge = "CF"; - } - remoteJudgeAccountUpdateWrapper.eq("oj", remoteJudge); - - boolean isOk = remoteJudgeAccountEntityService.update(remoteJudgeAccountUpdateWrapper); - - if (!isOk) { // 重试8次 - tryAgainUpdateAccount(remoteJudgeAccountUpdateWrapper, remoteJudge, username); - } - } - - private void tryAgainUpdateAccount(UpdateWrapper updateWrapper, String remoteJudge, String username) { - boolean retryable; - int attemptNumber = 0; - do { - boolean success = remoteJudgeAccountEntityService.update(updateWrapper); - if (success) { - return; - } else { - attemptNumber++; - retryable = attemptNumber < 8; - if (attemptNumber == 8) { - log.error("Remote Judge:Change Account status to `true` Failed ----------->{}", "oj:" + remoteJudge + ",username:" + username); - break; - } - try { - Thread.sleep(300); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - } while (retryable); - } - - @Override - public void changeServerSubmitCFStatus(String ip, Integer port) { - - if (StringUtils.isEmpty(ip) || port == null) { - return; - } - UpdateWrapper judgeServerUpdateWrapper = new UpdateWrapper<>(); - judgeServerUpdateWrapper.set("cf_submittable", true) - .eq("ip", ip) - .eq("is_remote", true) - .eq("port", port); - boolean isOk = judgeServerEntityService.update(judgeServerUpdateWrapper); - - if (!isOk) { // 重试8次 - tryAgainUpdateServer(judgeServerUpdateWrapper, ip, port); - } - } - - private void tryAgainUpdateServer(UpdateWrapper updateWrapper, String ip, Integer port) { - boolean retryable; - int attemptNumber = 0; - do { - boolean success = judgeServerEntityService.update(updateWrapper); - if (success) { - return; - } else { - attemptNumber++; - retryable = attemptNumber < 8; - if (attemptNumber == 8) { - log.error("Remote Judge:Change CF Judge Server Status to `true` Failed! =======>{}", "ip:" + ip + ",port:" + port); - break; - } - try { - Thread.sleep(300); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - } while (retryable); - } -} \ No newline at end of file diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/service/impl/SystemConfigServiceImpl.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/service/impl/SystemConfigServiceImpl.java deleted file mode 100644 index 61b2e2a..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/service/impl/SystemConfigServiceImpl.java +++ /dev/null @@ -1,35 +0,0 @@ -package top.hcode.hoj.service.impl; - - -import cn.hutool.system.oshi.OshiUtil; -import org.springframework.stereotype.Service; -import top.hcode.hoj.service.SystemConfigService; - -import java.util.HashMap; - -/** - * @Author: Himit_ZH - * @Date: 2020/12/3 20:15 - * @Description: - */ -@Service -public class SystemConfigServiceImpl implements SystemConfigService { - - public HashMap getSystemConfig() { - HashMap result = new HashMap(); - int cpuCores = Runtime.getRuntime().availableProcessors(); // cpu核数 - double cpuLoad = 100 - OshiUtil.getCpuInfo().getFree(); - String percentCpuLoad = String.format("%.2f", cpuLoad) + "%"; // cpu使用率 - - double totalVirtualMemory = OshiUtil.getMemory().getTotal(); // 总内存 - double freePhysicalMemorySize = OshiUtil.getMemory().getAvailable(); // 空闲内存 - double value = freePhysicalMemorySize / totalVirtualMemory; - String percentMemoryLoad = String.format("%.2f", (1 - value) * 100) + "%"; // 内存使用率 - - result.put("cpuCores", cpuCores); - result.put("percentCpuLoad", percentCpuLoad); - result.put("percentMemoryLoad", percentMemoryLoad); - return result; - } - -} \ No newline at end of file diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/util/CodeForcesUtils.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/util/CodeForcesUtils.java deleted file mode 100644 index efbe6b7..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/util/CodeForcesUtils.java +++ /dev/null @@ -1,38 +0,0 @@ -package top.hcode.hoj.util; - -import cn.hutool.core.io.resource.ResourceUtil; -import lombok.extern.slf4j.Slf4j; - -import javax.script.*; -import java.util.List; - -@Slf4j(topic = "hoj") -public class CodeForcesUtils { - private static String RCPC; - - public static String getRCPC() { - return RCPC; - } - - public static void updateRCPC(List list) { - - ScriptEngine se = new ScriptEngineManager().getEngineByName("javascript"); - Bindings bindings = se.createBindings(); - bindings.put("string", 4); - se.setBindings(bindings, ScriptContext.ENGINE_SCOPE); - - String file = ResourceUtil.readUtf8Str("CodeForcesAES.js"); - try { - se.eval(file); - // 是否可调用 - if (se instanceof Invocable) { - Invocable in = (Invocable) se; - RCPC = (String) in.invokeFunction("getRCPC", list.get(0), list.get(1), list.get(2)); - } - } catch (ScriptException e) { - log.error("CodeForcesUtils.updateRCPC throw ScriptException", e); - } catch (NoSuchMethodException e) { - log.error("CodeForcesUtils.updateRCPC throw NoSuchMethodException", e); - } - } -} diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/util/Constants.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/util/Constants.java deleted file mode 100644 index 2fecf0d..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/util/Constants.java +++ /dev/null @@ -1,402 +0,0 @@ -package top.hcode.hoj.util; - - -import java.util.*; - -/** - * @Author: Himit_ZH - * @Date: 2021/1/1 13:00 - * @Description: 常量枚举类 - */ -public class Constants { - /** - * @Description 提交评测结果的状态码 - * @Since 2021/1/1 - */ - public enum Judge { - // 提交失败 - STATUS_NOT_SUBMITTED(-10, "Not Submitted"), - STATUS_CANCELLED(-4, "Cancelled"), - STATUS_PRESENTATION_ERROR(-3, "Presentation Error"), - STATUS_COMPILE_ERROR(-2, "Compile Error"), - STATUS_WRONG_ANSWER(-1, "Wrong Answer"), - STATUS_ACCEPTED(0, "Accepted"), - STATUS_TIME_LIMIT_EXCEEDED(1, "Time Limit Exceeded"), - STATUS_MEMORY_LIMIT_EXCEEDED(2, "Memory Limit Exceeded"), - STATUS_RUNTIME_ERROR(3, "Runtime Error"), - STATUS_SYSTEM_ERROR(4, "System Error"), - STATUS_PENDING(5, "Pending"), - STATUS_COMPILING(6, "Compiling"), - // 正在等待结果 - STATUS_JUDGING(7, "Judging"), - STATUS_PARTIAL_ACCEPTED(8, "Partial Accepted"), - STATUS_SUBMITTING(9, "Submitting"), - STATUS_SUBMITTED_FAILED(10, "Submitted Failed"), - STATUS_NULL(15, "No Status"); - - private final Integer status; - private final String name; - - private Judge(Integer status, String name) { - this.status = status; - this.name = name; - } - - public Integer getStatus() { - return status; - } - - public String getName() { - return name; - } - - public static Judge getTypeByStatus(int status) { - for (Judge judge : Judge.values()) { - if (judge.getStatus() == status) { - return judge; - } - } - return STATUS_NULL; - } - } - - - public enum RemoteJudge { - - - HDU_JUDGE("HDU"), - - CF_JUDGE("CF"), - - GYM_JUDGE("GYM"), - - POJ_JUDGE("POJ"), - - SPOJ_JUDGE("SPOJ"), - - ATCODER_JUDGE("AC"), - - HDU_REMOTE_JUDGE_ACCOUNT("Hdu Remote Judge Account"), - - CF_REMOTE_JUDGE_ACCOUNT("Codeforces Remote Judge Account"); - - private final String name; - - RemoteJudge(String remoteJudgeName) { - this.name = remoteJudgeName; - } - - public static RemoteJudge getTypeByName(String judgeName) { - if (judgeName == null) return null; - for (RemoteJudge remoteJudge : RemoteJudge.values()) { - if (remoteJudge.getName().equals(judgeName)) { - return remoteJudge; - } - } - return null; - } - - public static String getListNameByOJName(String judgeName) { - if (judgeName == null) return null; - switch (judgeName) { - case "HDU": - return RemoteJudge.HDU_REMOTE_JUDGE_ACCOUNT.getName(); - case "CF": - return RemoteJudge.CF_REMOTE_JUDGE_ACCOUNT.getName(); - } - return null; - } - - public String getName() { - return name; - } - } - - - public enum JudgeMode { - TEST("test"), - DEFAULT("default"), - SPJ("spj"), - INTERACTIVE("interactive"); - - private final String mode; - - JudgeMode(String mode) { - this.mode = mode; - } - - public String getMode() { - return mode; - } - - public static JudgeMode getJudgeMode(String mode) { - for (JudgeMode judgeMode : JudgeMode.values()) { - if (judgeMode.getMode().equals(mode)) { - return judgeMode; - } - } - return null; - } - } - - public enum JudgeDir { - - RUN_WORKPLACE_DIR("/judge/run"), - - TEST_CASE_DIR("/judge/test_case"), - - SPJ_WORKPLACE_DIR("/judge/spj"), - - INTERACTIVE_WORKPLACE_DIR("/judge/interactive"), - - TMPFS_DIR("/w"); - - - private final String content; - - JudgeDir(String content) { - this.content = content; - } - - public String getContent() { - return content; - } - } - - public static List defaultEnv = Arrays.asList( - "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", - "LANG=en_US.UTF-8", - "LC_ALL=en_US.UTF-8", - "LANGUAGE=en_US:en", - "HOME=/w"); - - public static List python3Env = Arrays.asList("LANG=en_US.UTF-8", - "LANGUAGE=en_US:en", "LC_ALL=en_US.UTF-8", "PYTHONIOENCODING=utf-8"); - - public static List golangEnv = Arrays.asList("GODEBUG=madvdontneed=1", - "GOCACHE=off", "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", - "LANG=en_US.UTF-8", "LANGUAGE=en_US:en", "LC_ALL=en_US.UTF-8"); - - /* - {0} --> tmpfs_dir - {1} --> srcName - {2} --> exeName - */ - public enum CompileConfig { - C("C", "main.c", "main", 3000L, 10000L, 256 * 1024 * 1024L, "/usr/bin/gcc -DONLINE_JUDGE -w -fmax-errors=1 -std=c11 {1} -lm -o {2}", defaultEnv), - - CWithO2("C With O2", "main.c", "main", 3000L, 10000L, 256 * 1024 * 1024L, "/usr/bin/gcc -DONLINE_JUDGE -O2 -w -fmax-errors=1 -std=c11 {1} -lm -o {2}", defaultEnv), - - CPP("C++", "main.cpp", "main", 10000L, 20000L, 512 * 1024 * 1024L, "/usr/bin/g++ -DONLINE_JUDGE -w -fmax-errors=1 -std=c++14 {1} -lm -o {2}", defaultEnv), - - CPPWithO2("C++ With O2", "main.cpp", "main", 10000L, 20000L, 512 * 1024 * 1024L, "/usr/bin/g++ -DONLINE_JUDGE -O2 -w -fmax-errors=1 -std=c++14 {1} -lm -o {2}", defaultEnv), - - JAVA("Java", "Main.java", "Main.jar", 10000L, 20000L, 512 * 1024 * 1024L, "/bin/bash -c \"javac -encoding utf-8 {1} && jar -cvf {2} *.class\"", defaultEnv), - - PYTHON2("Python2", "main.py", "main.pyc", 3000L, 10000L, 128 * 1024 * 1024L, "/usr/bin/python -m py_compile ./{1}", defaultEnv), - - PYTHON3("Python3", "main.py", "__pycache__/main.cpython-37.pyc", 3000L, 10000L, 128 * 1024 * 1024L, "/usr/bin/python3.7 -m py_compile ./{1}", defaultEnv), - - GOLANG("Golang", "main.go", "main", 3000L, 5000L, 512 * 1024 * 1024L, "/usr/bin/go build -o {2} {1}", defaultEnv), - - CS("C#", "Main.cs", "main", 5000L, 10000L, 512 * 1024 * 1024L, "/usr/bin/mcs -optimize+ -out:{0}/{2} {0}/{1}", defaultEnv), - - PyPy2("PyPy2", "main.py", "__pycache__/main.pypy-73.pyc", 3000L, 10000L, 256 * 1024 * 1024L, "/usr/bin/pypy -m py_compile {0}/{1}", defaultEnv), - - PyPy3("PyPy3", "main.py", "__pycache__/main.pypy38.pyc", 3000L, 10000L, 256 * 1024 * 1024L, "/usr/bin/pypy3 -m py_compile {0}/{1}", defaultEnv), - - SPJ_C("SPJ-C", "spj.c", "spj", 3000L, 5000L, 512 * 1024 * 1024L, "/usr/bin/gcc -DONLINE_JUDGE -O2 -w -fmax-errors=3 -std=c99 {1} -lm -o {2}", defaultEnv), - - SPJ_CPP("SPJ-C++", "spj.cpp", "spj", 10000L, 20000L, 512 * 1024 * 1024L, "/usr/bin/g++ -DONLINE_JUDGE -O2 -w -fmax-errors=3 -std=c++14 {1} -lm -o {2}", defaultEnv), - - INTERACTIVE_C("INTERACTIVE-C", "interactive.c", "interactive", 3000L, 5000L, 512 * 1024 * 1024L, "/usr/bin/gcc -DONLINE_JUDGE -O2 -w -fmax-errors=3 -std=c99 {1} -lm -o {2}", defaultEnv), - - INTERACTIVE_CPP("INTERACTIVE-C++", "interactive.cpp", "interactive", 10000L, 20000L, 512 * 1024 * 1024L, "/usr/bin/g++ -DONLINE_JUDGE -O2 -w -fmax-errors=3 -std=c++14 {1} -lm -o {2}", defaultEnv); - - private final String language; - private final String srcName; - private final String exeName; - private final Long maxCpuTime; - private final Long maxRealTime; - private final Long maxMemory; - private final String command; - private final List envs; - - CompileConfig(String language, String srcName, String exeName, Long maxCpuTime, Long maxRealTime, Long maxMemory, - String command, List envs) { - this.language = language; - this.srcName = srcName; - this.exeName = exeName; - this.maxCpuTime = maxCpuTime; - this.maxRealTime = maxRealTime; - this.maxMemory = maxMemory; - this.command = command; - this.envs = envs; - } - - public String getLanguage() { - return language; - } - - public String getSrcName() { - return srcName; - } - - public String getExeName() { - return exeName; - } - - public Long getMaxCpuTime() { - return maxCpuTime; - } - - public Long getMaxRealTime() { - return maxRealTime; - } - - public Long getMaxMemory() { - return maxMemory; - } - - public String getCommand() { - return command; - } - - public List getEnvs() { - return envs; - } - - public static CompileConfig getCompilerByLanguage(String language) { - for (CompileConfig compileConfig : CompileConfig.values()) { - if (compileConfig.getLanguage().equals(language)) { - return compileConfig; - } - } - return null; - } - } - - - /* - {0} --> tmpfs_dir - {1} --> exeName (user or spj) - {2} --> The test case standard input file name of question - {3} --> The user's program output file name of question - {4} --> The test case standard output file name of question - */ - public enum RunConfig { - C("C", "{0}/{1}", "main", defaultEnv), - - CWithO2("C With O2", "{0}/{1}", "main", defaultEnv), - - CPP("C++", "{0}/{1}", "main", defaultEnv), - - CPPWithO2("C++ With O2", "{0}/{1}", "main", defaultEnv), - - JAVA("Java", "/usr/bin/java -Dfile.encoding=UTF-8 -cp {0}/{1} Main", "Main.jar", defaultEnv), - - PYTHON2("Python2", "/usr/bin/python {1}", "main", defaultEnv), - - PYTHON3("Python3", "/usr/bin/python3.7 {1}", "main", python3Env), - - GOLANG("Golang", "{0}/{1}", "main", golangEnv), - - CS("C#", "/usr/bin/mono {0}/{1}", "main", defaultEnv), - - PyPy2("PyPy2", "/usr/bin/pypy {1}", "main.pyc", defaultEnv), - - PyPy3("PyPy3", "/usr/bin/pypy3 {1}", "main.pyc", python3Env), - - PHP("PHP", "/usr/bin/php {1}", "main.php", defaultEnv), - - JS_NODE("JavaScript Node", "/usr/bin/node {1}", "main.js", defaultEnv), - - JS_V8("JavaScript V8", "/usr/bin/jsv8/d8 {1}", "main.js", defaultEnv), - - SPJ_C("SPJ-C", "{0}/{1} {2} {3} {4}", "spj", defaultEnv), - - SPJ_CPP("SPJ-C++", "{0}/{1} {2} {3} {4}", "spj", defaultEnv), - - INTERACTIVE_C("INTERACTIVE-C", "{0}/{1} {2} {3} {4}", "interactive", defaultEnv), - - INTERACTIVE_CPP("INTERACTIVE-C++", "{0}/{1} {2} {3} {4}", "interactive", defaultEnv); - - private final String language; - private final String command; - private final String exeName; - private final List envs; - - RunConfig(String language, String command, String exeName, List envs) { - this.language = language; - this.command = command; - this.exeName = exeName; - this.envs = envs; - } - - public String getLanguage() { - return language; - } - - public String getCommand() { - return command; - } - - public String getExeName() { - return exeName; - } - - public List getEnvs() { - return envs; - } - - public static RunConfig getRunnerByLanguage(String language) { - for (RunConfig runConfig : RunConfig.values()) { - if (runConfig.getLanguage().equals(language)) { - return runConfig; - } - } - return null; - } - - } - - - /** - * @Description 比赛相关的常量 - * @Since 2021/1/7 - */ - public enum Contest { - TYPE_ACM(0, "ACM"), - TYPE_OI(1, "OI"), - - STATUS_SCHEDULED(-1, "Scheduled"), - STATUS_RUNNING(0, "Running"), - STATUS_ENDED(1, "Ended"), - - AUTH_PUBLIC(0, "Public"), - AUTH_PRIVATE(1, "Private"), - AUTH_PROTECT(2, "Protect"), - - RECORD_NOT_AC_PENALTY(-1, "未AC通过算罚时"), - RECORD_NOT_AC_NOT_PENALTY(0, "未AC通过不罚时"), - RECORD_AC(1, "AC通过"); - - private final Integer code; - private final String name; - - Contest(Integer code, String name) { - this.code = code; - this.name = name; - } - - public Integer getCode() { - return code; - } - - public String getName() { - return name; - } - } - - -} \ No newline at end of file diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/util/IpUtils.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/util/IpUtils.java deleted file mode 100644 index 50c43a7..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/util/IpUtils.java +++ /dev/null @@ -1,88 +0,0 @@ -package top.hcode.hoj.util; - -import lombok.extern.slf4j.Slf4j; - -import javax.servlet.http.HttpServletRequest; -import java.net.*; -import java.util.Enumeration; - -/** - * @Author: Himit_ZH - * @Date: 2020/10/30 11:12 - * @Description: - */ -@Slf4j -public class IpUtils { - public static String getUserIpAddr(HttpServletRequest request) { - String ipAddress = null; - try { - ipAddress = request.getHeader("x-forwarded-for"); - if (ipAddress == null || ipAddress.length() == 0 || "unknown".equalsIgnoreCase(ipAddress)) { - ipAddress = request.getHeader("Proxy-Client-IP"); - } - if (ipAddress == null || ipAddress.length() == 0 || "unknown".equalsIgnoreCase(ipAddress)) { - ipAddress = request.getHeader("WL-Proxy-Client-IP"); - } - if (ipAddress == null || ipAddress.length() == 0 || "unknown".equalsIgnoreCase(ipAddress)) { - ipAddress = request.getRemoteAddr(); - if (ipAddress.equals("127.0.0.1")) { - // 根据网卡取本机配置的IP - try { - ipAddress = InetAddress.getLocalHost().getHostAddress(); - } catch (UnknownHostException e) { - log.error("用户ip获取异常------->{}", e.getMessage()); - } - } - } - // 通过多个代理的情况,第一个IP为客户端真实IP,多个IP按照','分割 - if (ipAddress != null) { - if (ipAddress.contains(",")) { - return ipAddress.split(",")[0]; - } else { - return ipAddress; - } - } else { - return ""; - } - } catch (Exception e) { - log.error("用户ip获取异常------->{}", e.getMessage()); - return ""; - } - } - - public static String getServiceIp(){ - InetAddress address = null; - try { - address = InetAddress.getLocalHost(); - } catch (UnknownHostException e) { - log.error("本地ip获取异常---------->{}", e.getMessage()); - } - return address.getHostAddress(); //返回IP地址 - } - - public static String getLocalIpv4Address() { - Enumeration ifaces = null; - try { - ifaces = NetworkInterface.getNetworkInterfaces(); - } catch (SocketException e) { - log.error("本地ipv4获取异常---------->{}", e.getMessage()); - } - String siteLocalAddress = null; - while (ifaces.hasMoreElements()) { - NetworkInterface iface = ifaces.nextElement(); - Enumeration addresses = iface.getInetAddresses(); - while (addresses.hasMoreElements()) { - InetAddress addr = addresses.nextElement(); - String hostAddress = addr.getHostAddress(); - if (addr instanceof Inet4Address) { - if (addr.isSiteLocalAddress()) { - siteLocalAddress = hostAddress; - } else { - return hostAddress; - } - } - } - } - return siteLocalAddress == null ? "" : siteLocalAddress; - } -} \ No newline at end of file diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/util/JsoupUtils.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/util/JsoupUtils.java deleted file mode 100644 index 723e233..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/util/JsoupUtils.java +++ /dev/null @@ -1,62 +0,0 @@ -package top.hcode.hoj.util; - -import org.jsoup.Connection; -import org.jsoup.Jsoup; -import org.jsoup.nodes.Document; -import org.jsoup.nodes.Entities; - -import java.io.IOException; -import java.util.Map; - -public class JsoupUtils { - - /** - * 获取连接 - * - * @param url api网址 - * @param headers 用户头 - * @return 返回一个object - * @throws IOException - */ - public static Connection getConnectionFromUrl(String url, Map headers, Map cookies) throws IOException { - Connection connection = Jsoup.connect(url); - // 设置用户代理 - connection.userAgent("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36"); - headers.put("Accept-Language", "en-GB,en;q=0.8"); - // 设置超时时间40秒 - connection.timeout(40000); - connection.ignoreContentType(true); - // 设置cookie,保存信息 - if (cookies != null) - connection.cookies(cookies); - // 设置请求头 - connection.headers(headers); - return connection; - } - - public static Connection.Response postResponse(Connection connection, Map postData) throws IOException { - connection.data(postData); - return connection.method(Connection.Method.POST).execute(); - } - - public static Connection.Response getResponse(Connection connection, Map getData) throws IOException { - //添加参数 - if (getData != null) { - connection.data(getData); - } - return connection.method(Connection.Method.GET).execute(); - } - - public static Document getDocument(Connection connection, Map getData) throws IOException { - //添加参数 - if (getData != null) { - connection.data(getData); - } - Document document = connection.get(); - document.outputSettings().escapeMode(Entities.EscapeMode.xhtml); - document.outputSettings().prettyPrint(false); - return document; - } - - -} diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/util/JudgeUtils.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/util/JudgeUtils.java deleted file mode 100644 index 7a3402f..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/util/JudgeUtils.java +++ /dev/null @@ -1,91 +0,0 @@ -package top.hcode.hoj.util; - -import cn.hutool.json.JSONUtil; -import org.springframework.util.StringUtils; -import top.hcode.hoj.pojo.entity.problem.Problem; - -import java.util.*; - -/** - * @Author: Himit_ZH - * @Date: 2021/11/24 19:16 - * @Description: - */ -public class JudgeUtils { - - @SuppressWarnings("All") - public static HashMap getProblemExtraFileMap(Problem problem, String type) { - if ("user".equals(type)) { - if (!StringUtils.isEmpty(problem.getUserExtraFile())) { - return (HashMap) JSONUtil.toBean(problem.getUserExtraFile(), Map.class); - } - } else if ("judge".equals(type)) { - if (!StringUtils.isEmpty(problem.getJudgeExtraFile())) { - return (HashMap) JSONUtil.toBean(problem.getJudgeExtraFile(), Map.class); - } - } - return null; - } - - public static List translateCommandline(String toProcess) { - if (toProcess != null && !toProcess.isEmpty()) { - int state = 0; - StringTokenizer tok = new StringTokenizer(toProcess, "\"' ", true); - List result = new ArrayList<>(); - StringBuilder current = new StringBuilder(); - boolean lastTokenHasBeenQuoted = false; - - while (true) { - while (tok.hasMoreTokens()) { - String nextTok = tok.nextToken(); - switch (state) { - case 1: - if ("'".equals(nextTok)) { - lastTokenHasBeenQuoted = true; - state = 0; - } else { - current.append(nextTok); - } - continue; - case 2: - if ("\"".equals(nextTok)) { - lastTokenHasBeenQuoted = true; - state = 0; - } else { - current.append(nextTok); - } - continue; - } - - if ("'".equals(nextTok)) { - state = 1; - } else if ("\"".equals(nextTok)) { - state = 2; - } else if (" ".equals(nextTok)) { - if (lastTokenHasBeenQuoted || current.length() > 0) { - result.add(current.toString()); - current.setLength(0); - } - } else { - current.append(nextTok); - } - - lastTokenHasBeenQuoted = false; - } - - if (lastTokenHasBeenQuoted || current.length() > 0) { - result.add(current.toString()); - } - - if (state != 1 && state != 2) { - return result; - } - - throw new RuntimeException("unbalanced quotes in " + toProcess); - } - } else { - return new ArrayList<>(); - } - } - -} \ No newline at end of file diff --git a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/util/ThreadPoolUtils.java b/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/util/ThreadPoolUtils.java deleted file mode 100644 index 1b5ace6..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/util/ThreadPoolUtils.java +++ /dev/null @@ -1,40 +0,0 @@ -package top.hcode.hoj.util; - -import java.util.concurrent.*; - -/** - * @Author: Himit_ZH - * @Date: 2021/12/21 12:06 - * @Description: - */ -public class ThreadPoolUtils { - - private static ExecutorService executorService; - - private static final int cpuNum = Runtime.getRuntime().availableProcessors(); - - private ThreadPoolUtils() { - //手动创建线程池. - executorService = new ThreadPoolExecutor( - cpuNum, // 核心线程数 - cpuNum + 1, // 最大线程数。最多几个线程并发。 - 3,//当非核心线程无任务时,几秒后结束该线程 - TimeUnit.SECONDS,// 结束线程时间单位 - new LinkedBlockingDeque<>(200 * cpuNum), //阻塞队列,限制等候线程数 - Executors.defaultThreadFactory(), - new ThreadPoolExecutor.DiscardOldestPolicy());//队列满了,尝试去和最早的竞争,也不会抛出异常! - } - - private static class PluginConfigHolder { - private final static ThreadPoolUtils INSTANCE = new ThreadPoolUtils(); - } - - public static ThreadPoolUtils getInstance() { - return PluginConfigHolder.INSTANCE; - } - - public ExecutorService getThreadPool() { - return executorService; - } - -} \ No newline at end of file diff --git a/src/hoj-springboot/JudgeServer/src/main/resources/CodeForcesAES.js b/src/hoj-springboot/JudgeServer/src/main/resources/CodeForcesAES.js deleted file mode 100644 index b27e347..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/resources/CodeForcesAES.js +++ /dev/null @@ -1,722 +0,0 @@ -function getRCPC(a, b, c) { - a = toNumbers(a); - b = toNumbers(b); - c = toNumbers(c); - return toHex(slowAES.decrypt(c, 2, a, b)); -} - -function toNumbers(d) { - var e = []; - d.replace(/(..)/g, function(d) { - e.push(parseInt(d, 16)) - }); - return e -} - -function toHex() { - for (var d = [], d = 1 == arguments.length && arguments[0].constructor == Array ? arguments[0] : arguments, e = "", f = 0; f < d.length; f++) e += (16 > d[f] ? "0" : "") + d[f].toString(16); - return e.toLowerCase() -} - -var slowAES = { - /* - * START AES SECTION - */ - aes: { - // structure of valid key sizes - keySize: { - SIZE_128: 16, - SIZE_192: 24, - SIZE_256: 32 - }, - - // Rijndael S-box - sbox: [ - 0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76, - 0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0, 0xad, 0xd4, 0xa2, 0xaf, 0x9c, 0xa4, 0x72, 0xc0, - 0xb7, 0xfd, 0x93, 0x26, 0x36, 0x3f, 0xf7, 0xcc, 0x34, 0xa5, 0xe5, 0xf1, 0x71, 0xd8, 0x31, 0x15, - 0x04, 0xc7, 0x23, 0xc3, 0x18, 0x96, 0x05, 0x9a, 0x07, 0x12, 0x80, 0xe2, 0xeb, 0x27, 0xb2, 0x75, - 0x09, 0x83, 0x2c, 0x1a, 0x1b, 0x6e, 0x5a, 0xa0, 0x52, 0x3b, 0xd6, 0xb3, 0x29, 0xe3, 0x2f, 0x84, - 0x53, 0xd1, 0x00, 0xed, 0x20, 0xfc, 0xb1, 0x5b, 0x6a, 0xcb, 0xbe, 0x39, 0x4a, 0x4c, 0x58, 0xcf, - 0xd0, 0xef, 0xaa, 0xfb, 0x43, 0x4d, 0x33, 0x85, 0x45, 0xf9, 0x02, 0x7f, 0x50, 0x3c, 0x9f, 0xa8, - 0x51, 0xa3, 0x40, 0x8f, 0x92, 0x9d, 0x38, 0xf5, 0xbc, 0xb6, 0xda, 0x21, 0x10, 0xff, 0xf3, 0xd2, - 0xcd, 0x0c, 0x13, 0xec, 0x5f, 0x97, 0x44, 0x17, 0xc4, 0xa7, 0x7e, 0x3d, 0x64, 0x5d, 0x19, 0x73, - 0x60, 0x81, 0x4f, 0xdc, 0x22, 0x2a, 0x90, 0x88, 0x46, 0xee, 0xb8, 0x14, 0xde, 0x5e, 0x0b, 0xdb, - 0xe0, 0x32, 0x3a, 0x0a, 0x49, 0x06, 0x24, 0x5c, 0xc2, 0xd3, 0xac, 0x62, 0x91, 0x95, 0xe4, 0x79, - 0xe7, 0xc8, 0x37, 0x6d, 0x8d, 0xd5, 0x4e, 0xa9, 0x6c, 0x56, 0xf4, 0xea, 0x65, 0x7a, 0xae, 0x08, - 0xba, 0x78, 0x25, 0x2e, 0x1c, 0xa6, 0xb4, 0xc6, 0xe8, 0xdd, 0x74, 0x1f, 0x4b, 0xbd, 0x8b, 0x8a, - 0x70, 0x3e, 0xb5, 0x66, 0x48, 0x03, 0xf6, 0x0e, 0x61, 0x35, 0x57, 0xb9, 0x86, 0xc1, 0x1d, 0x9e, - 0xe1, 0xf8, 0x98, 0x11, 0x69, 0xd9, 0x8e, 0x94, 0x9b, 0x1e, 0x87, 0xe9, 0xce, 0x55, 0x28, 0xdf, - 0x8c, 0xa1, 0x89, 0x0d, 0xbf, 0xe6, 0x42, 0x68, 0x41, 0x99, 0x2d, 0x0f, 0xb0, 0x54, 0xbb, 0x16 - ], - - // Rijndael Inverted S-box - rsbox: [0x52, 0x09, 0x6a, 0xd5, 0x30, 0x36, 0xa5, 0x38, 0xbf, 0x40, 0xa3, 0x9e, 0x81, 0xf3, 0xd7, 0xfb, 0x7c, 0xe3, 0x39, 0x82, 0x9b, 0x2f, 0xff, 0x87, 0x34, 0x8e, 0x43, 0x44, 0xc4, 0xde, 0xe9, 0xcb, 0x54, 0x7b, 0x94, 0x32, 0xa6, 0xc2, 0x23, 0x3d, 0xee, 0x4c, 0x95, 0x0b, 0x42, 0xfa, 0xc3, 0x4e, 0x08, 0x2e, 0xa1, 0x66, 0x28, 0xd9, 0x24, 0xb2, 0x76, 0x5b, 0xa2, 0x49, 0x6d, 0x8b, 0xd1, 0x25, 0x72, 0xf8, 0xf6, 0x64, 0x86, 0x68, 0x98, 0x16, 0xd4, 0xa4, 0x5c, 0xcc, 0x5d, 0x65, 0xb6, 0x92, 0x6c, 0x70, 0x48, 0x50, 0xfd, 0xed, 0xb9, 0xda, 0x5e, 0x15, 0x46, 0x57, 0xa7, 0x8d, 0x9d, 0x84, 0x90, 0xd8, 0xab, 0x00, 0x8c, 0xbc, 0xd3, 0x0a, 0xf7, 0xe4, 0x58, 0x05, 0xb8, 0xb3, 0x45, 0x06, 0xd0, 0x2c, 0x1e, 0x8f, 0xca, 0x3f, 0x0f, 0x02, 0xc1, 0xaf, 0xbd, 0x03, 0x01, 0x13, 0x8a, 0x6b, 0x3a, 0x91, 0x11, 0x41, 0x4f, 0x67, 0xdc, 0xea, 0x97, 0xf2, 0xcf, 0xce, 0xf0, 0xb4, 0xe6, 0x73, 0x96, 0xac, 0x74, 0x22, 0xe7, 0xad, 0x35, 0x85, 0xe2, 0xf9, 0x37, 0xe8, 0x1c, 0x75, 0xdf, 0x6e, 0x47, 0xf1, 0x1a, 0x71, 0x1d, 0x29, 0xc5, 0x89, 0x6f, 0xb7, 0x62, 0x0e, 0xaa, 0x18, 0xbe, 0x1b, 0xfc, 0x56, 0x3e, 0x4b, 0xc6, 0xd2, 0x79, 0x20, 0x9a, 0xdb, 0xc0, 0xfe, 0x78, 0xcd, 0x5a, 0xf4, 0x1f, 0xdd, 0xa8, 0x33, 0x88, 0x07, 0xc7, 0x31, 0xb1, 0x12, 0x10, 0x59, 0x27, 0x80, 0xec, 0x5f, 0x60, 0x51, 0x7f, 0xa9, 0x19, 0xb5, 0x4a, 0x0d, 0x2d, 0xe5, 0x7a, 0x9f, 0x93, 0xc9, 0x9c, 0xef, 0xa0, 0xe0, 0x3b, 0x4d, 0xae, 0x2a, 0xf5, 0xb0, 0xc8, 0xeb, 0xbb, 0x3c, 0x83, 0x53, 0x99, 0x61, 0x17, 0x2b, 0x04, 0x7e, 0xba, 0x77, 0xd6, 0x26, 0xe1, 0x69, 0x14, 0x63, 0x55, 0x21, 0x0c, 0x7d], - - /* rotate the word eight bits to the left */ - rotate: function(word) { - var c = word[0]; - for (var i = 0; i < 3; i++) - word[i] = word[i + 1]; - word[3] = c; - - return word; - }, - - // Rijndael Rcon - Rcon: [ - 0x8d, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, - 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, - 0x7d, 0xfa, 0xef, 0xc5, 0x91, 0x39, 0x72, 0xe4, 0xd3, 0xbd, 0x61, 0xc2, 0x9f, - 0x25, 0x4a, 0x94, 0x33, 0x66, 0xcc, 0x83, 0x1d, 0x3a, 0x74, 0xe8, 0xcb, 0x8d, - 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, 0xab, - 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d, - 0xfa, 0xef, 0xc5, 0x91, 0x39, 0x72, 0xe4, 0xd3, 0xbd, 0x61, 0xc2, 0x9f, 0x25, - 0x4a, 0x94, 0x33, 0x66, 0xcc, 0x83, 0x1d, 0x3a, 0x74, 0xe8, 0xcb, 0x8d, 0x01, - 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d, - 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, - 0xef, 0xc5, 0x91, 0x39, 0x72, 0xe4, 0xd3, 0xbd, 0x61, 0xc2, 0x9f, 0x25, 0x4a, - 0x94, 0x33, 0x66, 0xcc, 0x83, 0x1d, 0x3a, 0x74, 0xe8, 0xcb, 0x8d, 0x01, 0x02, - 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d, 0x9a, - 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, - 0xc5, 0x91, 0x39, 0x72, 0xe4, 0xd3, 0xbd, 0x61, 0xc2, 0x9f, 0x25, 0x4a, 0x94, - 0x33, 0x66, 0xcc, 0x83, 0x1d, 0x3a, 0x74, 0xe8, 0xcb, 0x8d, 0x01, 0x02, 0x04, - 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d, 0x9a, 0x2f, - 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5, - 0x91, 0x39, 0x72, 0xe4, 0xd3, 0xbd, 0x61, 0xc2, 0x9f, 0x25, 0x4a, 0x94, 0x33, - 0x66, 0xcc, 0x83, 0x1d, 0x3a, 0x74, 0xe8, 0xcb - ], - - G2X: [ - 0x00, 0x02, 0x04, 0x06, 0x08, 0x0a, 0x0c, 0x0e, 0x10, 0x12, 0x14, 0x16, - 0x18, 0x1a, 0x1c, 0x1e, 0x20, 0x22, 0x24, 0x26, 0x28, 0x2a, 0x2c, 0x2e, - 0x30, 0x32, 0x34, 0x36, 0x38, 0x3a, 0x3c, 0x3e, 0x40, 0x42, 0x44, 0x46, - 0x48, 0x4a, 0x4c, 0x4e, 0x50, 0x52, 0x54, 0x56, 0x58, 0x5a, 0x5c, 0x5e, - 0x60, 0x62, 0x64, 0x66, 0x68, 0x6a, 0x6c, 0x6e, 0x70, 0x72, 0x74, 0x76, - 0x78, 0x7a, 0x7c, 0x7e, 0x80, 0x82, 0x84, 0x86, 0x88, 0x8a, 0x8c, 0x8e, - 0x90, 0x92, 0x94, 0x96, 0x98, 0x9a, 0x9c, 0x9e, 0xa0, 0xa2, 0xa4, 0xa6, - 0xa8, 0xaa, 0xac, 0xae, 0xb0, 0xb2, 0xb4, 0xb6, 0xb8, 0xba, 0xbc, 0xbe, - 0xc0, 0xc2, 0xc4, 0xc6, 0xc8, 0xca, 0xcc, 0xce, 0xd0, 0xd2, 0xd4, 0xd6, - 0xd8, 0xda, 0xdc, 0xde, 0xe0, 0xe2, 0xe4, 0xe6, 0xe8, 0xea, 0xec, 0xee, - 0xf0, 0xf2, 0xf4, 0xf6, 0xf8, 0xfa, 0xfc, 0xfe, 0x1b, 0x19, 0x1f, 0x1d, - 0x13, 0x11, 0x17, 0x15, 0x0b, 0x09, 0x0f, 0x0d, 0x03, 0x01, 0x07, 0x05, - 0x3b, 0x39, 0x3f, 0x3d, 0x33, 0x31, 0x37, 0x35, 0x2b, 0x29, 0x2f, 0x2d, - 0x23, 0x21, 0x27, 0x25, 0x5b, 0x59, 0x5f, 0x5d, 0x53, 0x51, 0x57, 0x55, - 0x4b, 0x49, 0x4f, 0x4d, 0x43, 0x41, 0x47, 0x45, 0x7b, 0x79, 0x7f, 0x7d, - 0x73, 0x71, 0x77, 0x75, 0x6b, 0x69, 0x6f, 0x6d, 0x63, 0x61, 0x67, 0x65, - 0x9b, 0x99, 0x9f, 0x9d, 0x93, 0x91, 0x97, 0x95, 0x8b, 0x89, 0x8f, 0x8d, - 0x83, 0x81, 0x87, 0x85, 0xbb, 0xb9, 0xbf, 0xbd, 0xb3, 0xb1, 0xb7, 0xb5, - 0xab, 0xa9, 0xaf, 0xad, 0xa3, 0xa1, 0xa7, 0xa5, 0xdb, 0xd9, 0xdf, 0xdd, - 0xd3, 0xd1, 0xd7, 0xd5, 0xcb, 0xc9, 0xcf, 0xcd, 0xc3, 0xc1, 0xc7, 0xc5, - 0xfb, 0xf9, 0xff, 0xfd, 0xf3, 0xf1, 0xf7, 0xf5, 0xeb, 0xe9, 0xef, 0xed, - 0xe3, 0xe1, 0xe7, 0xe5 - ], - - G3X: [ - 0x00, 0x03, 0x06, 0x05, 0x0c, 0x0f, 0x0a, 0x09, 0x18, 0x1b, 0x1e, 0x1d, - 0x14, 0x17, 0x12, 0x11, 0x30, 0x33, 0x36, 0x35, 0x3c, 0x3f, 0x3a, 0x39, - 0x28, 0x2b, 0x2e, 0x2d, 0x24, 0x27, 0x22, 0x21, 0x60, 0x63, 0x66, 0x65, - 0x6c, 0x6f, 0x6a, 0x69, 0x78, 0x7b, 0x7e, 0x7d, 0x74, 0x77, 0x72, 0x71, - 0x50, 0x53, 0x56, 0x55, 0x5c, 0x5f, 0x5a, 0x59, 0x48, 0x4b, 0x4e, 0x4d, - 0x44, 0x47, 0x42, 0x41, 0xc0, 0xc3, 0xc6, 0xc5, 0xcc, 0xcf, 0xca, 0xc9, - 0xd8, 0xdb, 0xde, 0xdd, 0xd4, 0xd7, 0xd2, 0xd1, 0xf0, 0xf3, 0xf6, 0xf5, - 0xfc, 0xff, 0xfa, 0xf9, 0xe8, 0xeb, 0xee, 0xed, 0xe4, 0xe7, 0xe2, 0xe1, - 0xa0, 0xa3, 0xa6, 0xa5, 0xac, 0xaf, 0xaa, 0xa9, 0xb8, 0xbb, 0xbe, 0xbd, - 0xb4, 0xb7, 0xb2, 0xb1, 0x90, 0x93, 0x96, 0x95, 0x9c, 0x9f, 0x9a, 0x99, - 0x88, 0x8b, 0x8e, 0x8d, 0x84, 0x87, 0x82, 0x81, 0x9b, 0x98, 0x9d, 0x9e, - 0x97, 0x94, 0x91, 0x92, 0x83, 0x80, 0x85, 0x86, 0x8f, 0x8c, 0x89, 0x8a, - 0xab, 0xa8, 0xad, 0xae, 0xa7, 0xa4, 0xa1, 0xa2, 0xb3, 0xb0, 0xb5, 0xb6, - 0xbf, 0xbc, 0xb9, 0xba, 0xfb, 0xf8, 0xfd, 0xfe, 0xf7, 0xf4, 0xf1, 0xf2, - 0xe3, 0xe0, 0xe5, 0xe6, 0xef, 0xec, 0xe9, 0xea, 0xcb, 0xc8, 0xcd, 0xce, - 0xc7, 0xc4, 0xc1, 0xc2, 0xd3, 0xd0, 0xd5, 0xd6, 0xdf, 0xdc, 0xd9, 0xda, - 0x5b, 0x58, 0x5d, 0x5e, 0x57, 0x54, 0x51, 0x52, 0x43, 0x40, 0x45, 0x46, - 0x4f, 0x4c, 0x49, 0x4a, 0x6b, 0x68, 0x6d, 0x6e, 0x67, 0x64, 0x61, 0x62, - 0x73, 0x70, 0x75, 0x76, 0x7f, 0x7c, 0x79, 0x7a, 0x3b, 0x38, 0x3d, 0x3e, - 0x37, 0x34, 0x31, 0x32, 0x23, 0x20, 0x25, 0x26, 0x2f, 0x2c, 0x29, 0x2a, - 0x0b, 0x08, 0x0d, 0x0e, 0x07, 0x04, 0x01, 0x02, 0x13, 0x10, 0x15, 0x16, - 0x1f, 0x1c, 0x19, 0x1a - ], - - G9X: [ - 0x00, 0x09, 0x12, 0x1b, 0x24, 0x2d, 0x36, 0x3f, 0x48, 0x41, 0x5a, 0x53, - 0x6c, 0x65, 0x7e, 0x77, 0x90, 0x99, 0x82, 0x8b, 0xb4, 0xbd, 0xa6, 0xaf, - 0xd8, 0xd1, 0xca, 0xc3, 0xfc, 0xf5, 0xee, 0xe7, 0x3b, 0x32, 0x29, 0x20, - 0x1f, 0x16, 0x0d, 0x04, 0x73, 0x7a, 0x61, 0x68, 0x57, 0x5e, 0x45, 0x4c, - 0xab, 0xa2, 0xb9, 0xb0, 0x8f, 0x86, 0x9d, 0x94, 0xe3, 0xea, 0xf1, 0xf8, - 0xc7, 0xce, 0xd5, 0xdc, 0x76, 0x7f, 0x64, 0x6d, 0x52, 0x5b, 0x40, 0x49, - 0x3e, 0x37, 0x2c, 0x25, 0x1a, 0x13, 0x08, 0x01, 0xe6, 0xef, 0xf4, 0xfd, - 0xc2, 0xcb, 0xd0, 0xd9, 0xae, 0xa7, 0xbc, 0xb5, 0x8a, 0x83, 0x98, 0x91, - 0x4d, 0x44, 0x5f, 0x56, 0x69, 0x60, 0x7b, 0x72, 0x05, 0x0c, 0x17, 0x1e, - 0x21, 0x28, 0x33, 0x3a, 0xdd, 0xd4, 0xcf, 0xc6, 0xf9, 0xf0, 0xeb, 0xe2, - 0x95, 0x9c, 0x87, 0x8e, 0xb1, 0xb8, 0xa3, 0xaa, 0xec, 0xe5, 0xfe, 0xf7, - 0xc8, 0xc1, 0xda, 0xd3, 0xa4, 0xad, 0xb6, 0xbf, 0x80, 0x89, 0x92, 0x9b, - 0x7c, 0x75, 0x6e, 0x67, 0x58, 0x51, 0x4a, 0x43, 0x34, 0x3d, 0x26, 0x2f, - 0x10, 0x19, 0x02, 0x0b, 0xd7, 0xde, 0xc5, 0xcc, 0xf3, 0xfa, 0xe1, 0xe8, - 0x9f, 0x96, 0x8d, 0x84, 0xbb, 0xb2, 0xa9, 0xa0, 0x47, 0x4e, 0x55, 0x5c, - 0x63, 0x6a, 0x71, 0x78, 0x0f, 0x06, 0x1d, 0x14, 0x2b, 0x22, 0x39, 0x30, - 0x9a, 0x93, 0x88, 0x81, 0xbe, 0xb7, 0xac, 0xa5, 0xd2, 0xdb, 0xc0, 0xc9, - 0xf6, 0xff, 0xe4, 0xed, 0x0a, 0x03, 0x18, 0x11, 0x2e, 0x27, 0x3c, 0x35, - 0x42, 0x4b, 0x50, 0x59, 0x66, 0x6f, 0x74, 0x7d, 0xa1, 0xa8, 0xb3, 0xba, - 0x85, 0x8c, 0x97, 0x9e, 0xe9, 0xe0, 0xfb, 0xf2, 0xcd, 0xc4, 0xdf, 0xd6, - 0x31, 0x38, 0x23, 0x2a, 0x15, 0x1c, 0x07, 0x0e, 0x79, 0x70, 0x6b, 0x62, - 0x5d, 0x54, 0x4f, 0x46 - ], - - GBX: [ - 0x00, 0x0b, 0x16, 0x1d, 0x2c, 0x27, 0x3a, 0x31, 0x58, 0x53, 0x4e, 0x45, - 0x74, 0x7f, 0x62, 0x69, 0xb0, 0xbb, 0xa6, 0xad, 0x9c, 0x97, 0x8a, 0x81, - 0xe8, 0xe3, 0xfe, 0xf5, 0xc4, 0xcf, 0xd2, 0xd9, 0x7b, 0x70, 0x6d, 0x66, - 0x57, 0x5c, 0x41, 0x4a, 0x23, 0x28, 0x35, 0x3e, 0x0f, 0x04, 0x19, 0x12, - 0xcb, 0xc0, 0xdd, 0xd6, 0xe7, 0xec, 0xf1, 0xfa, 0x93, 0x98, 0x85, 0x8e, - 0xbf, 0xb4, 0xa9, 0xa2, 0xf6, 0xfd, 0xe0, 0xeb, 0xda, 0xd1, 0xcc, 0xc7, - 0xae, 0xa5, 0xb8, 0xb3, 0x82, 0x89, 0x94, 0x9f, 0x46, 0x4d, 0x50, 0x5b, - 0x6a, 0x61, 0x7c, 0x77, 0x1e, 0x15, 0x08, 0x03, 0x32, 0x39, 0x24, 0x2f, - 0x8d, 0x86, 0x9b, 0x90, 0xa1, 0xaa, 0xb7, 0xbc, 0xd5, 0xde, 0xc3, 0xc8, - 0xf9, 0xf2, 0xef, 0xe4, 0x3d, 0x36, 0x2b, 0x20, 0x11, 0x1a, 0x07, 0x0c, - 0x65, 0x6e, 0x73, 0x78, 0x49, 0x42, 0x5f, 0x54, 0xf7, 0xfc, 0xe1, 0xea, - 0xdb, 0xd0, 0xcd, 0xc6, 0xaf, 0xa4, 0xb9, 0xb2, 0x83, 0x88, 0x95, 0x9e, - 0x47, 0x4c, 0x51, 0x5a, 0x6b, 0x60, 0x7d, 0x76, 0x1f, 0x14, 0x09, 0x02, - 0x33, 0x38, 0x25, 0x2e, 0x8c, 0x87, 0x9a, 0x91, 0xa0, 0xab, 0xb6, 0xbd, - 0xd4, 0xdf, 0xc2, 0xc9, 0xf8, 0xf3, 0xee, 0xe5, 0x3c, 0x37, 0x2a, 0x21, - 0x10, 0x1b, 0x06, 0x0d, 0x64, 0x6f, 0x72, 0x79, 0x48, 0x43, 0x5e, 0x55, - 0x01, 0x0a, 0x17, 0x1c, 0x2d, 0x26, 0x3b, 0x30, 0x59, 0x52, 0x4f, 0x44, - 0x75, 0x7e, 0x63, 0x68, 0xb1, 0xba, 0xa7, 0xac, 0x9d, 0x96, 0x8b, 0x80, - 0xe9, 0xe2, 0xff, 0xf4, 0xc5, 0xce, 0xd3, 0xd8, 0x7a, 0x71, 0x6c, 0x67, - 0x56, 0x5d, 0x40, 0x4b, 0x22, 0x29, 0x34, 0x3f, 0x0e, 0x05, 0x18, 0x13, - 0xca, 0xc1, 0xdc, 0xd7, 0xe6, 0xed, 0xf0, 0xfb, 0x92, 0x99, 0x84, 0x8f, - 0xbe, 0xb5, 0xa8, 0xa3 - ], - - GDX: [ - 0x00, 0x0d, 0x1a, 0x17, 0x34, 0x39, 0x2e, 0x23, 0x68, 0x65, 0x72, 0x7f, - 0x5c, 0x51, 0x46, 0x4b, 0xd0, 0xdd, 0xca, 0xc7, 0xe4, 0xe9, 0xfe, 0xf3, - 0xb8, 0xb5, 0xa2, 0xaf, 0x8c, 0x81, 0x96, 0x9b, 0xbb, 0xb6, 0xa1, 0xac, - 0x8f, 0x82, 0x95, 0x98, 0xd3, 0xde, 0xc9, 0xc4, 0xe7, 0xea, 0xfd, 0xf0, - 0x6b, 0x66, 0x71, 0x7c, 0x5f, 0x52, 0x45, 0x48, 0x03, 0x0e, 0x19, 0x14, - 0x37, 0x3a, 0x2d, 0x20, 0x6d, 0x60, 0x77, 0x7a, 0x59, 0x54, 0x43, 0x4e, - 0x05, 0x08, 0x1f, 0x12, 0x31, 0x3c, 0x2b, 0x26, 0xbd, 0xb0, 0xa7, 0xaa, - 0x89, 0x84, 0x93, 0x9e, 0xd5, 0xd8, 0xcf, 0xc2, 0xe1, 0xec, 0xfb, 0xf6, - 0xd6, 0xdb, 0xcc, 0xc1, 0xe2, 0xef, 0xf8, 0xf5, 0xbe, 0xb3, 0xa4, 0xa9, - 0x8a, 0x87, 0x90, 0x9d, 0x06, 0x0b, 0x1c, 0x11, 0x32, 0x3f, 0x28, 0x25, - 0x6e, 0x63, 0x74, 0x79, 0x5a, 0x57, 0x40, 0x4d, 0xda, 0xd7, 0xc0, 0xcd, - 0xee, 0xe3, 0xf4, 0xf9, 0xb2, 0xbf, 0xa8, 0xa5, 0x86, 0x8b, 0x9c, 0x91, - 0x0a, 0x07, 0x10, 0x1d, 0x3e, 0x33, 0x24, 0x29, 0x62, 0x6f, 0x78, 0x75, - 0x56, 0x5b, 0x4c, 0x41, 0x61, 0x6c, 0x7b, 0x76, 0x55, 0x58, 0x4f, 0x42, - 0x09, 0x04, 0x13, 0x1e, 0x3d, 0x30, 0x27, 0x2a, 0xb1, 0xbc, 0xab, 0xa6, - 0x85, 0x88, 0x9f, 0x92, 0xd9, 0xd4, 0xc3, 0xce, 0xed, 0xe0, 0xf7, 0xfa, - 0xb7, 0xba, 0xad, 0xa0, 0x83, 0x8e, 0x99, 0x94, 0xdf, 0xd2, 0xc5, 0xc8, - 0xeb, 0xe6, 0xf1, 0xfc, 0x67, 0x6a, 0x7d, 0x70, 0x53, 0x5e, 0x49, 0x44, - 0x0f, 0x02, 0x15, 0x18, 0x3b, 0x36, 0x21, 0x2c, 0x0c, 0x01, 0x16, 0x1b, - 0x38, 0x35, 0x22, 0x2f, 0x64, 0x69, 0x7e, 0x73, 0x50, 0x5d, 0x4a, 0x47, - 0xdc, 0xd1, 0xc6, 0xcb, 0xe8, 0xe5, 0xf2, 0xff, 0xb4, 0xb9, 0xae, 0xa3, - 0x80, 0x8d, 0x9a, 0x97 - ], - - GEX: [ - 0x00, 0x0e, 0x1c, 0x12, 0x38, 0x36, 0x24, 0x2a, 0x70, 0x7e, 0x6c, 0x62, - 0x48, 0x46, 0x54, 0x5a, 0xe0, 0xee, 0xfc, 0xf2, 0xd8, 0xd6, 0xc4, 0xca, - 0x90, 0x9e, 0x8c, 0x82, 0xa8, 0xa6, 0xb4, 0xba, 0xdb, 0xd5, 0xc7, 0xc9, - 0xe3, 0xed, 0xff, 0xf1, 0xab, 0xa5, 0xb7, 0xb9, 0x93, 0x9d, 0x8f, 0x81, - 0x3b, 0x35, 0x27, 0x29, 0x03, 0x0d, 0x1f, 0x11, 0x4b, 0x45, 0x57, 0x59, - 0x73, 0x7d, 0x6f, 0x61, 0xad, 0xa3, 0xb1, 0xbf, 0x95, 0x9b, 0x89, 0x87, - 0xdd, 0xd3, 0xc1, 0xcf, 0xe5, 0xeb, 0xf9, 0xf7, 0x4d, 0x43, 0x51, 0x5f, - 0x75, 0x7b, 0x69, 0x67, 0x3d, 0x33, 0x21, 0x2f, 0x05, 0x0b, 0x19, 0x17, - 0x76, 0x78, 0x6a, 0x64, 0x4e, 0x40, 0x52, 0x5c, 0x06, 0x08, 0x1a, 0x14, - 0x3e, 0x30, 0x22, 0x2c, 0x96, 0x98, 0x8a, 0x84, 0xae, 0xa0, 0xb2, 0xbc, - 0xe6, 0xe8, 0xfa, 0xf4, 0xde, 0xd0, 0xc2, 0xcc, 0x41, 0x4f, 0x5d, 0x53, - 0x79, 0x77, 0x65, 0x6b, 0x31, 0x3f, 0x2d, 0x23, 0x09, 0x07, 0x15, 0x1b, - 0xa1, 0xaf, 0xbd, 0xb3, 0x99, 0x97, 0x85, 0x8b, 0xd1, 0xdf, 0xcd, 0xc3, - 0xe9, 0xe7, 0xf5, 0xfb, 0x9a, 0x94, 0x86, 0x88, 0xa2, 0xac, 0xbe, 0xb0, - 0xea, 0xe4, 0xf6, 0xf8, 0xd2, 0xdc, 0xce, 0xc0, 0x7a, 0x74, 0x66, 0x68, - 0x42, 0x4c, 0x5e, 0x50, 0x0a, 0x04, 0x16, 0x18, 0x32, 0x3c, 0x2e, 0x20, - 0xec, 0xe2, 0xf0, 0xfe, 0xd4, 0xda, 0xc8, 0xc6, 0x9c, 0x92, 0x80, 0x8e, - 0xa4, 0xaa, 0xb8, 0xb6, 0x0c, 0x02, 0x10, 0x1e, 0x34, 0x3a, 0x28, 0x26, - 0x7c, 0x72, 0x60, 0x6e, 0x44, 0x4a, 0x58, 0x56, 0x37, 0x39, 0x2b, 0x25, - 0x0f, 0x01, 0x13, 0x1d, 0x47, 0x49, 0x5b, 0x55, 0x7f, 0x71, 0x63, 0x6d, - 0xd7, 0xd9, 0xcb, 0xc5, 0xef, 0xe1, 0xf3, 0xfd, 0xa7, 0xa9, 0xbb, 0xb5, - 0x9f, 0x91, 0x83, 0x8d - ], - - // Key Schedule Core - core: function(word, iteration) { - /* rotate the 32-bit word 8 bits to the left */ - word = this.rotate(word); - /* apply S-Box substitution on all 4 parts of the 32-bit word */ - for (var i = 0; i < 4; ++i) - word[i] = this.sbox[word[i]]; - /* XOR the output of the rcon operation with i to the first part (leftmost) only */ - word[0] = word[0] ^ this.Rcon[iteration]; - return word; - }, - - /* Rijndael's key expansion - * expands an 128,192,256 key into an 176,208,240 bytes key - * - * expandedKey is a pointer to an char array of large enough size - * key is a pointer to a non-expanded key - */ - expandKey: function(key, size) { - var expandedKeySize = (16 * (this.numberOfRounds(size) + 1)); - - /* current expanded keySize, in bytes */ - var currentSize = 0; - var rconIteration = 1; - var t = []; // temporary 4-byte variable - - var expandedKey = []; - for (var i = 0; i < expandedKeySize; i++) - expandedKey[i] = 0; - - /* set the 16,24,32 bytes of the expanded key to the input key */ - for (var j = 0; j < size; j++) - expandedKey[j] = key[j]; - currentSize += size; - - while (currentSize < expandedKeySize) { - /* assign the previous 4 bytes to the temporary value t */ - for (var k = 0; k < 4; k++) - t[k] = expandedKey[(currentSize - 4) + k]; - - /* every 16,24,32 bytes we apply the core schedule to t - * and increment rconIteration afterwards - */ - if (currentSize % size == 0) - t = this.core(t, rconIteration++); - - /* For 256-bit keys, we add an extra sbox to the calculation */ - if (size == this.keySize.SIZE_256 && ((currentSize % size) == 16)) - for (var l = 0; l < 4; l++) - t[l] = this.sbox[t[l]]; - - /* We XOR t with the four-byte block 16,24,32 bytes before the new expanded key. - * This becomes the next four bytes in the expanded key. - */ - for (var m = 0; m < 4; m++) { - expandedKey[currentSize] = expandedKey[currentSize - size] ^ t[m]; - currentSize++; - } - } - return expandedKey; - }, - - // Adds (XORs) the round key to the state - addRoundKey: function(state, roundKey) { - for (var i = 0; i < 16; i++) - state[i] ^= roundKey[i]; - return state; - }, - - // Creates a round key from the given expanded key and the - // position within the expanded key. - createRoundKey: function(expandedKey, roundKeyPointer) { - var roundKey = []; - for (var i = 0; i < 4; i++) - for (var j = 0; j < 4; j++) - roundKey[j * 4 + i] = expandedKey[roundKeyPointer + i * 4 + j]; - return roundKey; - }, - - /* substitute all the values from the state with the value in the SBox - * using the state value as index for the SBox - */ - subBytes: function(state, isInv) { - for (var i = 0; i < 16; i++) - state[i] = isInv ? this.rsbox[state[i]] : this.sbox[state[i]]; - return state; - }, - - /* iterate over the 4 rows and call shiftRow() with that row */ - shiftRows: function(state, isInv) { - for (var i = 0; i < 4; i++) - state = this.shiftRow(state, i * 4, i, isInv); - return state; - }, - - /* each iteration shifts the row to the left by 1 */ - shiftRow: function(state, statePointer, nbr, isInv) { - for (var i = 0; i < nbr; i++) { - if (isInv) { - var tmp = state[statePointer + 3]; - for (var j = 3; j > 0; j--) - state[statePointer + j] = state[statePointer + j - 1]; - state[statePointer] = tmp; - } else { - var tmp = state[statePointer]; - for (var j = 0; j < 3; j++) - state[statePointer + j] = state[statePointer + j + 1]; - state[statePointer + 3] = tmp; - } - } - return state; - }, - - // galois multiplication of 8 bit characters a and b - galois_multiplication: function(a, b) { - var p = 0; - for (var counter = 0; counter < 8; counter++) { - if ((b & 1) == 1) - p ^= a; - if (p > 0x100) p ^= 0x100; - var hi_bit_set = (a & 0x80); //keep p 8 bit - a <<= 1; - if (a > 0x100) a ^= 0x100; //keep a 8 bit - if (hi_bit_set == 0x80) - a ^= 0x1b; - if (a > 0x100) a ^= 0x100; //keep a 8 bit - b >>= 1; - if (b > 0x100) b ^= 0x100; //keep b 8 bit - } - return p; - }, - - // galois multipication of the 4x4 matrix - mixColumns: function(state, isInv) { - var column = []; - /* iterate over the 4 columns */ - for (var i = 0; i < 4; i++) { - /* construct one column by iterating over the 4 rows */ - for (var j = 0; j < 4; j++) - column[j] = state[(j * 4) + i]; - /* apply the mixColumn on one column */ - column = this.mixColumn(column, isInv); - /* put the values back into the state */ - for (var k = 0; k < 4; k++) - state[(k * 4) + i] = column[k]; - } - return state; - }, - - // galois multipication of 1 column of the 4x4 matrix - mixColumn: function(column, isInv) { - var mult = []; - if (isInv) - mult = [14, 9, 13, 11]; - else - mult = [2, 1, 1, 3]; - var cpy = []; - for (var i = 0; i < 4; i++) - cpy[i] = column[i]; - - column[0] = this.galois_multiplication(cpy[0], mult[0]) ^ - this.galois_multiplication(cpy[3], mult[1]) ^ - this.galois_multiplication(cpy[2], mult[2]) ^ - this.galois_multiplication(cpy[1], mult[3]); - column[1] = this.galois_multiplication(cpy[1], mult[0]) ^ - this.galois_multiplication(cpy[0], mult[1]) ^ - this.galois_multiplication(cpy[3], mult[2]) ^ - this.galois_multiplication(cpy[2], mult[3]); - column[2] = this.galois_multiplication(cpy[2], mult[0]) ^ - this.galois_multiplication(cpy[1], mult[1]) ^ - this.galois_multiplication(cpy[0], mult[2]) ^ - this.galois_multiplication(cpy[3], mult[3]); - column[3] = this.galois_multiplication(cpy[3], mult[0]) ^ - this.galois_multiplication(cpy[2], mult[1]) ^ - this.galois_multiplication(cpy[1], mult[2]) ^ - this.galois_multiplication(cpy[0], mult[3]); - return column; - }, - - // applies the 4 operations of the forward round in sequence - round: function(state, roundKey) { - state = this.subBytes(state, false); - state = this.shiftRows(state, false); - state = this.mixColumns(state, false); - state = this.addRoundKey(state, roundKey); - return state; - }, - - // applies the 4 operations of the inverse round in sequence - invRound: function(state, roundKey) { - state = this.shiftRows(state, true); - state = this.subBytes(state, true); - state = this.addRoundKey(state, roundKey); - state = this.mixColumns(state, true); - return state; - }, - - /* - * Perform the initial operations, the standard round, and the final operations - * of the forward aes, creating a round key for each round - */ - main: function(state, expandedKey, nbrRounds) { - state = this.addRoundKey(state, this.createRoundKey(expandedKey, 0)); - for (var i = 1; i < nbrRounds; i++) - state = this.round(state, this.createRoundKey(expandedKey, 16 * i)); - state = this.subBytes(state, false); - state = this.shiftRows(state, false); - state = this.addRoundKey(state, this.createRoundKey(expandedKey, 16 * nbrRounds)); - return state; - }, - - /* - * Perform the initial operations, the standard round, and the final operations - * of the inverse aes, creating a round key for each round - */ - invMain: function(state, expandedKey, nbrRounds) { - state = this.addRoundKey(state, this.createRoundKey(expandedKey, 16 * nbrRounds)); - for (var i = nbrRounds - 1; i > 0; i--) - state = this.invRound(state, this.createRoundKey(expandedKey, 16 * i)); - state = this.shiftRows(state, true); - state = this.subBytes(state, true); - state = this.addRoundKey(state, this.createRoundKey(expandedKey, 0)); - return state; - }, - - numberOfRounds: function(size) { - var nbrRounds; - switch (size) /* set the number of rounds */ { - case this.keySize.SIZE_128: - nbrRounds = 10; - break; - case this.keySize.SIZE_192: - nbrRounds = 12; - break; - case this.keySize.SIZE_256: - nbrRounds = 14; - break; - default: - return null; - break; - } - return nbrRounds; - }, - - // encrypts a 128 bit input block against the given key of size specified - encrypt: function(input, key, size) { - var output = []; - var block = []; /* the 128 bit block to encode */ - var nbrRounds = this.numberOfRounds(size); - /* Set the block values, for the block: - * a0,0 a0,1 a0,2 a0,3 - * a1,0 a1,1 a1,2 a1,3 - * a2,0 a2,1 a2,2 a2,3 - * a3,0 a3,1 a3,2 a3,3 - * the mapping order is a0,0 a1,0 a2,0 a3,0 a0,1 a1,1 ... a2,3 a3,3 - */ - for (var i = 0; i < 4; i++) /* iterate over the columns */ - for (var j = 0; j < 4; j++) /* iterate over the rows */ - block[(i + (j * 4))] = input[(i * 4) + j]; - - /* expand the key into an 176, 208, 240 bytes key */ - var expandedKey = this.expandKey(key, size); /* the expanded key */ - /* encrypt the block using the expandedKey */ - block = this.main(block, expandedKey, nbrRounds); - for (var k = 0; k < 4; k++) /* unmap the block again into the output */ - for (var l = 0; l < 4; l++) /* iterate over the rows */ - output[(k * 4) + l] = block[(k + (l * 4))]; - return output; - }, - - // decrypts a 128 bit input block against the given key of size specified - decrypt: function(input, key, size) { - var output = []; - var block = []; /* the 128 bit block to decode */ - var nbrRounds = this.numberOfRounds(size); - /* Set the block values, for the block: - * a0,0 a0,1 a0,2 a0,3 - * a1,0 a1,1 a1,2 a1,3 - * a2,0 a2,1 a2,2 a2,3 - * a3,0 a3,1 a3,2 a3,3 - * the mapping order is a0,0 a1,0 a2,0 a3,0 a0,1 a1,1 ... a2,3 a3,3 - */ - for (var i = 0; i < 4; i++) /* iterate over the columns */ - for (var j = 0; j < 4; j++) /* iterate over the rows */ - block[(i + (j * 4))] = input[(i * 4) + j]; - /* expand the key into an 176, 208, 240 bytes key */ - var expandedKey = this.expandKey(key, size); - /* decrypt the block using the expandedKey */ - block = this.invMain(block, expandedKey, nbrRounds); - for (var k = 0; k < 4; k++) /* unmap the block again into the output */ - for (var l = 0; l < 4; l++) /* iterate over the rows */ - output[(k * 4) + l] = block[(k + (l * 4))]; - return output; - } - }, - /* - * END AES SECTION - */ - - /* - * START MODE OF OPERATION SECTION - */ - //structure of supported modes of operation - modeOfOperation: { - OFB: 0, - CFB: 1, - CBC: 2 - }, - - // get a 16 byte block (aes operates on 128bits) - getBlock: function(bytesIn, start, end, mode) { - if (end - start > 16) - end = start + 16; - - return bytesIn.slice(start, end); - }, - - /* - * Mode of Operation Encryption - * bytesIn - Input String as array of bytes - * mode - mode of type modeOfOperation - * key - a number array of length 'size' - * size - the bit length of the key - * iv - the 128 bit number array Initialization Vector - */ - encrypt: function(bytesIn, mode, key, iv) { - var size = key.length; - if (iv.length % 16) { - throw 'iv length must be 128 bits.'; - } - // the AES input/output - var byteArray = []; - var input = []; - var output = []; - var ciphertext = []; - var cipherOut = []; - // char firstRound - var firstRound = true; - if (mode == this.modeOfOperation.CBC) - this.padBytesIn(bytesIn); - if (bytesIn !== null) { - for (var j = 0; j < Math.ceil(bytesIn.length / 16); j++) { - var start = j * 16; - var end = j * 16 + 16; - if (j * 16 + 16 > bytesIn.length) - end = bytesIn.length; - byteArray = this.getBlock(bytesIn, start, end, mode); - if (mode == this.modeOfOperation.CFB) { - if (firstRound) { - output = this.aes.encrypt(iv, key, size); - firstRound = false; - } else - output = this.aes.encrypt(input, key, size); - for (var i = 0; i < 16; i++) - ciphertext[i] = byteArray[i] ^ output[i]; - for (var k = 0; k < end - start; k++) - cipherOut.push(ciphertext[k]); - input = ciphertext; - } else if (mode == this.modeOfOperation.OFB) { - if (firstRound) { - output = this.aes.encrypt(iv, key, size); - firstRound = false; - } else - output = this.aes.encrypt(input, key, size); - for (var i = 0; i < 16; i++) - ciphertext[i] = byteArray[i] ^ output[i]; - for (var k = 0; k < end - start; k++) - cipherOut.push(ciphertext[k]); - input = output; - } else if (mode == this.modeOfOperation.CBC) { - for (var i = 0; i < 16; i++) - input[i] = byteArray[i] ^ ((firstRound) ? iv[i] : ciphertext[i]); - firstRound = false; - ciphertext = this.aes.encrypt(input, key, size); - // always 16 bytes because of the padding for CBC - for (var k = 0; k < 16; k++) - cipherOut.push(ciphertext[k]); - } - } - } - return cipherOut; - }, - - /* - * Mode of Operation Decryption - * cipherIn - Encrypted String as array of bytes - * originalsize - The unencrypted string length - required for CBC - * mode - mode of type modeOfOperation - * key - a number array of length 'size' - * size - the bit length of the key - * iv - the 128 bit number array Initialization Vector - */ - decrypt: function(cipherIn, mode, key, iv) { - var size = key.length; - if (iv.length % 16) { - throw 'iv length must be 128 bits.'; - } - // the AES input/output - var ciphertext = []; - var input = []; - var output = []; - var byteArray = []; - var bytesOut = []; - // char firstRound - var firstRound = true; - if (cipherIn !== null) { - for (var j = 0; j < Math.ceil(cipherIn.length / 16); j++) { - var start = j * 16; - var end = j * 16 + 16; - if (j * 16 + 16 > cipherIn.length) - end = cipherIn.length; - ciphertext = this.getBlock(cipherIn, start, end, mode); - if (mode == this.modeOfOperation.CFB) { - if (firstRound) { - output = this.aes.encrypt(iv, key, size); - firstRound = false; - } else - output = this.aes.encrypt(input, key, size); - for (i = 0; i < 16; i++) - byteArray[i] = output[i] ^ ciphertext[i]; - for (var k = 0; k < end - start; k++) - bytesOut.push(byteArray[k]); - input = ciphertext; - } else if (mode == this.modeOfOperation.OFB) { - if (firstRound) { - output = this.aes.encrypt(iv, key, size); - firstRound = false; - } else - output = this.aes.encrypt(input, key, size); - for (i = 0; i < 16; i++) - byteArray[i] = output[i] ^ ciphertext[i]; - for (var k = 0; k < end - start; k++) - bytesOut.push(byteArray[k]); - input = output; - } else if (mode == this.modeOfOperation.CBC) { - output = this.aes.decrypt(ciphertext, key, size); - for (i = 0; i < 16; i++) - byteArray[i] = ((firstRound) ? iv[i] : input[i]) ^ output[i]; - firstRound = false; - for (var k = 0; k < end - start; k++) - bytesOut.push(byteArray[k]); - input = ciphertext; - } - } - if (mode == this.modeOfOperation.CBC) - this.unpadBytesOut(bytesOut); - } - return bytesOut; - }, - padBytesIn: function(data) { - var len = data.length; - var padByte = 16 - (len % 16); - for (var i = 0; i < padByte; i++) { - data.push(padByte); - } - }, - unpadBytesOut: function(data) { - var padCount = 0; - var padByte = -1; - var blockSize = 16; - if (data.length > 16) { - for (var i = data.length - 1; i >= data.length - 1 - blockSize; i--) { - if (data[i] <= blockSize) { - if (padByte == -1) - padByte = data[i]; - if (data[i] != padByte) { - padCount = 0; - break; - } - padCount++; - } else - break; - if (padCount == padByte) - break; - } - if (padCount > 0) - data.splice(data.length - padCount, padCount); - } - } - /* - * END MODE OF OPERATION SECTION - */ -}; \ No newline at end of file diff --git a/src/hoj-springboot/JudgeServer/src/main/resources/application.yml b/src/hoj-springboot/JudgeServer/src/main/resources/application.yml deleted file mode 100644 index 9935898..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/resources/application.yml +++ /dev/null @@ -1,54 +0,0 @@ -spring: - profiles: prod - datasource: - username: ${hoj.db.username} - password: ${hoj.db.password} - url: jdbc:mysql://${hoj.db.public-host:172.20.0.3}:${hoj.db.public-port:3306}/${hoj.db.name:hoj}?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai&allowMultiQueries=true&rewriteBatchedStatements=true - driver-class-name: com.mysql.cj.jdbc.Driver - type: com.alibaba.druid.pool.DruidDataSource - initial-size: 10 # 初始化时建立物理连接的个数。初始化发生在显示调用init方法,或者第一次getConnection时 - min-idle: 20 # 最小连接池数量 - maxActive: 40 # 最大连接池数量 - maxWait: 60000 # 获取连接时最大等待时间,单位毫秒。配置了maxWait之后,缺省启用公平锁,并发效率会有所下降,如果需要可以通过配置 - timeBetweenEvictionRunsMillis: 60000 # 关闭空闲连接的检测时间间隔.Destroy线程会检测连接的间隔时间,如果连接空闲时间大于等于minEvictableIdleTimeMillis则关闭物理连接。 - minEvictableIdleTimeMillis: 300000 # 连接的最小生存时间.连接保持空闲而不被驱逐的最小时间 - validationQuery: SELECT 1 FROM DUAL # 验证数据库服务可用性的sql.用来检测连接是否有效的sql 因数据库方言而差, 例如 oracle 应该写成 SELECT 1 FROM DUAL - testWhileIdle: true # 申请连接时检测空闲时间,根据空闲时间再检测连接是否有效.建议配置为true,不影响性能,并且保证安全性。申请连接的时候检测,如果空闲时间大于timeBetweenEvictionRun - testOnBorrow: false # 申请连接时直接检测连接是否有效.申请连接时执行validationQuery检测连接是否有效,做了这个配置会降低性能。 - testOnReturn: false # 归还连接时检测连接是否有效.归还连接时执行validationQuery检测连接是否有效,做了这个配置会降低性能。 - poolPreparedStatements: true # 开启PSCache - maxPoolPreparedStatementPerConnectionSize: 20 #设置PSCache值 - connectionErrorRetryAttempts: 3 # 连接出错后再尝试连接三次 - breakAfterAcquireFailure: true # 数据库服务宕机自动重连机制 - timeBetweenConnectErrorMillis: 300000 # 连接出错后重试时间间隔 - asyncInit: true # 异步初始化策略 - remove-abandoned: true # 是否自动回收超时连接 - remove-abandoned-timeout: 1800 # 超时时间(以秒数为单位) - transaction-query-timeout: 10000 # 事务超时时间 - filters: stat,wall,log4j #数据库日志 - connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=500 - -mybatis-plus: - mapper-locations: classpath*:top/hcode/hoj/mapper/xml/**Mapper.xml - type-aliases-package: top.hcode.hoj.pojo.entity - # 关闭打印 mybatis-plus 的 LOGO - global-config: - banner: false - - -logging: - level: - com: - alibaba: - nacos: error - gargoylesoftware: off - root: error - config: classpath:logback-spring.xml - file: - path: /judge/log/judgeserver -# 暴露监控 -management: - endpoints: - web: - exposure: - include: info,health diff --git a/src/hoj-springboot/JudgeServer/src/main/resources/banner.txt b/src/hoj-springboot/JudgeServer/src/main/resources/banner.txt deleted file mode 100644 index d96c50e..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/resources/banner.txt +++ /dev/null @@ -1,21 +0,0 @@ -${AnsiColor.BRIGHT_YELLOW} - - ,--, ,----.. - ,--.'| ,----.. / / \ ,---, ,---,. - ,--, | : / / \ / . : .' .' `\ ,' .' | -,---.'| : '| : : . / ;. \,---.' \ ,---.' | -| | : _' |. | ;. /. ; / ` ;| | .`\ || | .' -: : |.' |. ; /--` ; | ; \ ; |: : | ' |: : |-, -| ' ' ; :; | ; | : | ; | '| ' ' ; :: | ;/| -' | .'. || : | . | ' ' ' :' | ; . || : .' -| | : | '. | '___ ' ; \; / || | : | '| | |-, -' : | : ;' ; : .'| \ \ ', / ' : | / ; ' : ;/| -| | ' ,/ ' | '/ : ; : / | | '` ,/ | | \ -; : ;--' | : / \ \ .' ; : .' | : .' -| ,/ \ \ .' `---` | ,.' | | ,' -'---' `---` '---' `----' - Hcode Online Judge(HOJ) - JudgeServer - @Author Himit_ZH - @Last Update 20220821 - ->Github<- https://www.github.com/HimitZH/HOJ - ->Gitee<- https://gitee.com/himitzh0730/hoj \ No newline at end of file diff --git a/src/hoj-springboot/JudgeServer/src/main/resources/bootstrap.yml b/src/hoj-springboot/JudgeServer/src/main/resources/bootstrap.yml deleted file mode 100644 index 44903cf..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/resources/bootstrap.yml +++ /dev/null @@ -1,35 +0,0 @@ -hoj-judge-server: - max-task-num: ${MAX_TASK_NUM:-1} # -1表示最大并行任务数为cpu核心数+1 - ip: ${JUDGE_SERVER_IP:127.0.0.1} # -1表示使用默认本地ipv4,若是部署其它服务器,务必使用公网ip - port: ${JUDGE_SERVER_PORT:8088} # 端口号 - name: ${JUDGE_SERVER_NAME:hoj-judger-1} # 判题机名字 唯一不可重复!!! - nacos-url: ${NACOS_URL:127.0.0.1:8848} # nacos地址 - remote-judge: - open: ${REMOTE_JUDGE_OPEN:true} # 当前判题服务器是否开启远程虚拟判题功能 - max-task-num: ${REMOTE_JUDGE_MAX_TASK_NUM:-1} # -1表示最大并行任务数为cpu核心数*2+1 -server: - port: ${hoj-judge-server.port} -spring: - profiles: - active: prod - application: - name: hoj-judgeserver - cloud: - nacos: - discovery: - username: ${NACOS_USERNAME:nacos} - password: ${NACOS_PASSWORD:nacos} - server-addr: ${hoj-judge-server.nacos-url} #配置Nacos地址 - config: - username: ${NACOS_USERNAME:nacos} - password: ${NACOS_PASSWORD:nacos} - server-addr: ${hoj-judge-server.nacos-url} #Nacos 作为配置中心地址 - file-extension: yml #指定yaml格式的配置 - group: DEFAULT_GROUP # 指定分组 - #namespace:命名空间ID 默认为public - prefix: hoj - url: http://${hoj-judge-server.nacos-url} - -# ${spring.application.name}-${spring.profile.active}.${spring.cloud.naces.config.file-extension} -# ${spring.cloud.nacos.config.prefix}-${spring.profile.active}.${spring.cloud.naces.config.file-extension} -# hoj-prod.yml diff --git a/src/hoj-springboot/JudgeServer/src/main/resources/logback-spring.xml b/src/hoj-springboot/JudgeServer/src/main/resources/logback-spring.xml deleted file mode 100644 index 8e6e394..0000000 --- a/src/hoj-springboot/JudgeServer/src/main/resources/logback-spring.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - - - hoj - - - - - %yellow(%d{yyyy-MM-dd HH:mm:ss}) %red([%thread]) %highlight(%-5level) %cyan(%logger{50}) - %magenta(%msg) %n - - UTF-8 - - - - - - - info - - DENY - - ACCEPT - - - - %d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{50} - %msg%n - - UTF-8 - - - - - ${logging.path}/hoj.info.%d{yyyy-MM-dd}.%i.log - - 7 - - 200MB - - 1GB - - - - - - error - - - - %d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{50} - %msg%n - - - - - - ${logging.path}/hoj.error.%d{yyyy-MM-dd}.%i.log - - 7 - - 200MB - - 1GB - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/hoj-springboot/JudgeServer/src/test/java/top/hcode/hoj/JudgeServerApplicationTests.java b/src/hoj-springboot/JudgeServer/src/test/java/top/hcode/hoj/JudgeServerApplicationTests.java deleted file mode 100644 index 97efcba..0000000 --- a/src/hoj-springboot/JudgeServer/src/test/java/top/hcode/hoj/JudgeServerApplicationTests.java +++ /dev/null @@ -1,9 +0,0 @@ -package top.hcode.hoj; - -import org.springframework.boot.test.context.SpringBootTest; - - -@SpringBootTest -public class JudgeServerApplicationTests { - -} diff --git a/src/hoj-springboot/JudgeServer/src/test/java/top/hcode/hoj/remoteJudge/task/Impl/CodeForcesJudgeTest.java b/src/hoj-springboot/JudgeServer/src/test/java/top/hcode/hoj/remoteJudge/task/Impl/CodeForcesJudgeTest.java deleted file mode 100644 index 38d3124..0000000 --- a/src/hoj-springboot/JudgeServer/src/test/java/top/hcode/hoj/remoteJudge/task/Impl/CodeForcesJudgeTest.java +++ /dev/null @@ -1,35 +0,0 @@ -package top.hcode.hoj.remoteJudge.task.Impl; - -import cn.hutool.core.map.MapUtil; -import org.jsoup.Connection; -import org.junit.jupiter.api.Test; -import top.hcode.hoj.util.JsoupUtils; - -import java.util.HashMap; -import java.util.Map; - -import static org.junit.jupiter.api.Assertions.*; - -class CodeForcesJudgeTest { - - @Test - void submit() { - } - - @Test - void result() { - } - - @Test - void getLoginCookie() throws Exception { - - } - - @Test - void getLanguage() { - } - - @Test - void getTokens() { - } -} \ No newline at end of file diff --git a/src/hoj-springboot/JudgeServer/src/test/java/top/hcode/hoj/remoteJudge/task/Impl/HDUJudgeTest.java b/src/hoj-springboot/JudgeServer/src/test/java/top/hcode/hoj/remoteJudge/task/Impl/HDUJudgeTest.java deleted file mode 100644 index 6f9b4d1..0000000 --- a/src/hoj-springboot/JudgeServer/src/test/java/top/hcode/hoj/remoteJudge/task/Impl/HDUJudgeTest.java +++ /dev/null @@ -1,18 +0,0 @@ -package top.hcode.hoj.remoteJudge.task.Impl; - - -import org.junit.jupiter.api.Test; - - -class HDUJudgeTest { - - - - @Test - void getLoginCookie() throws Exception { - - - } - - -} \ No newline at end of file diff --git a/src/hoj-springboot/JudgeServer/src/test/java/top/hcode/hoj/remoteJudge/test.html b/src/hoj-springboot/JudgeServer/src/test/java/top/hcode/hoj/remoteJudge/test.html deleted file mode 100644 index 4ab4c05..0000000 --- a/src/hoj-springboot/JudgeServer/src/test/java/top/hcode/hoj/remoteJudge/test.html +++ /dev/null @@ -1,3340 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Codeforces - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
- Please subscribe to the official Codeforces channel in Telegram via the link https://t.me/codeforces_official. - × -
- -
- -
- -
-
- - -
- - -
- By awoo, - history, - 44 hours ago, - translation, - In English - - - - -
-
-
-
- -
-

Hello Codeforces!

On Mar/18/2021 17:50 (Moscow time) Educational Codeforces Round 106 (Rated for Div. 2) will start.

Series of Educational Rounds continue being held as Harbour.Space University initiative! You can read the details about the cooperation between Harbour.Space University and Codeforces in the blog post.

This round will be rated for the participants with rating lower than 2100. It will be held on extended ICPC rules. The penalty for each incorrect submission until the submission with a full solution is 10 minutes. After the end of the contest you will have 12 hours to hack any solution you want. You will have access to copy any solution and test it locally.

You will be given 6 or 7 problems and 2 hours to solve them.

The problems were invented and prepared by Roman Roms Glazov, Adilbek adedalic Dalabaev, Vladimir vovuh Petrov, Ivan BledDest Androsov, Maksim Neon Mescheryakov and me. Also huge thanks to Mike MikeMirzayanov Mirzayanov for great systems Polygon and Codeforces.

Good luck to all the participants!

Our friends at Harbour.Space also have a message for you:

Codeforces and Harbour.Space

Dear Codeforces!

We are coming with another scholarship opportunity to share with you. This time, our scholarship is targeted towards the brightest women in the community.

As you might know, March is the month where the whole world celebrates women. At Harbour.Space we want to use this opportunity to encourage more women to join the tech world and challenge the gender-bias in this field.

We believe that gender equality in the workplace starts with gender equality in the classroom. For that reason, we are offering our Women in Tech Scholarship. The scholarship consists of:

  • 50% off the yearly tuition fee: covers around €29,000 for bachelors and €11,450 for masters.
  • 32% off the application fee: €85 instead of €125

You can find more information about the scholarship here.

MORE INFO→

Harbour.Space

Make sure to apply before March 31st to benefit from the scholarship and discount.

Don’t hesitate to share this opportunity with any bright women in your personal circle as well. A simple share can help us transform someone's life.

We are always happy to see Codeforce members join the Harbour.Space family.

Keep in touch and follow us on LinkedIn for more scholarship opportunities. And follow us on Instagram to stay in touch with our student life, events, and success stories from our students.

Good luck on your round, and see you next time!

Harbour.Space University

Read more »

-
- - - - - - - -
-
 
-
 
-
 
-
 
-
-
    -
  • Vote: I like it - - -
  • -
  • - - - +169 - -
  • -
  • Vote: I do not like it - - -
  • -
-
- - - - - -
- -
- -
-
- - - -
-
-
- - -
- - -
- By shishin, - history, - 5 days ago, - translation, - In English - - - - -
-
-
-
- -
-

Hello again, Codeforces!

Artyom123 and I are happy to invite you to Codeforces Round #708 (Div. 2), which will take place on Mar/17/2021 17:35 (Moscow time). This round will be rated for the participants with rating lower than 2100

These are some awesome people that we would like to thank:

You will have 2 hours to solve 5 problems (and 2 subtasks). This time the statements are not related to Valorant, but we still play it sometimes.

We hope that you will like all problems and you won't face any troubles during the contest. Good luck!

The scoring distribution: 500750(750 + 500)1750(1500 + 1500)

UPD: Editorial

Read more »

-
- -
- Announcement of Codeforces Round #708 (Div. 2) -
- - - - - -
-
 
-
 
-
 
-
 
-
-
    -
  • Vote: I like it - - -
  • -
  • - - - +741 - -
  • -
  • Vote: I do not like it - - -
  • -
-
- - - - - -
- -
- -
-
- - - -
-
-
- - -
- - -
- By MikeMirzayanov, - 5 days ago, - - In English - - - - -
-
-
-
- -
-

Hello, Codeforces!

I understand that 2021 has been going on for a long time, but here I have picked up a subset of some of the improvements that the Codeforces team made in 2020. Soon I will publish numbers (no, charts) with statistics for 2020. In the meantime, I bring to your attention a list of changes and improvements.

By the way, this is a decent list. This is about half to a quarter of all changes. It's just that other changes are more often somewhere in the internals of the system and are not visible to users. Please read this list. Each item is the effort of someone from the team. Thanks to geranazavr555, kuviman and cannor147 for their efforts. You've made our platform better! Well, by the way, I don't quit programming and many improvements were made by me.

The items on the list are written in a concise and informal form, many of the items I just copied from commit messages from git. If you want more details — ask in the comments, we will tell you! Of course, I forgot to include some improvements in the list.

Read more »

-
- - - - - -
- Tags - - codeforces, - - - 2020, - - - results - -
- -
-
 
-
 
-
 
-
 
-
-
    -
  • Vote: I like it - - -
  • -
  • - - - +1382 - -
  • -
  • Vote: I do not like it - - -
  • -
-
- - - - - -
- -
- -
-
- - - -
-
-
- - -
- - -
- By ch_egor, - 8 days ago, - translation, - In English - - - - -
-
-
-
- -
-

Hello!

Right now happens the first tour of the Open Olympiad in Informatics, and tomorrow will be the second one. This contest is prepared by Moscow Olympiad Scientific Committee that you may know by Moscow Team Olympiad, Moscow Olympiad for Young Students and Metropolises Olympiad (rounds 327, 342, 345, 376, 401, 433, 441, 466, 469, 507, 516, 541, 545, 567, 583, 594, 622, 626, 657, 680, 704).

Open Olympiad consists of the most interesting and hard problems that are proposed by a wide community of authors, so we decided to conduct a Codeforces regular round based on it, which will happen on Mar/13/2021 12:05 (Moscow time) and will be based on both days of the Olympiad. Each division will have 6 problems and 2 and a half hours to solve them.

We kindly ask all the community members that are going to participate in the competition to show sportsmanship by not trying to cheat in any manner, in particular, by trying to figure out problem statements from the onsite participants. If you end up knowing some of the problems of Moscow Open Olympiad (by participating in it, from some of the onsite contestants or in any other way), please do not participate in the round. We also ask onsite contestants to not discuss problems in public. Failure to comply with any of the rules above may result in a disqualification.

Problems of this competition were prepared by Akulyat, KiKoS, wrg0ababd, Nebuchadnezzar, biection, alexX512 isaf27, ismagilov.code, DebNatkh, Siberian, NiceClock guided by cdkrot, vintage_Vlad_Makeev, GlebsHP, Zlobober, meshanya, ch_egor, grphil, voidmax, Endagorion and Helen Andreeva.

Thanks to adedalic and KAN for the round coordination, statement translation and preparation of problems for the second division, and also thanks for MikeMirzayanov for systems Codeforces and Polygon, which was used to prepare problems of this olympiad.

Also thanks to 4qqqq and Aleks5d for providing an additional problems that helped to create (I hope) a balanced problem set for the round, and Um_nik for testing!

Good luck everybody!

Due to the official competition source codes of other participants will not be available for an hour after the end of the round.

UPD1:

Please do not discuss problems publicly until 12:30 UTC.

The scoring distribution for both divisions is not standard:

  • div1: 750 — 750 — 1500 — 2000 — 2500 — 3000
  • div2: 500 — 1000 — 1750 — 1750 — 2500 — 3000

UPD2: Editorial

UPD3: Winners!

Div. 1:

  1. tourist
  2. jiangly
  3. maroonrk
  4. ecnerwala
  5. Miracle03

Div. 2:

  1. wudi2016
  2. ShimaRin
  3. fengqiyuka
  4. gezlik
  5. b___

Read more »

-
- - - - - - - -
- Tags - - 707, - - - round - -
- -
-
 
-
 
-
 
-
 
-
-
    -
  • Vote: I like it - - -
  • -
  • - - - -661 - -
  • -
  • Vote: I do not like it - - -
  • -
-
- - - - - -
- -
- -
-
- - - -
-
-
- - -
- - -
- By Imakf, - history, - 10 days ago, - - In English - - - - -
-
-
-
- -
-

Hello, Codeforces!

Daniel_yuan, waaitg, smg23333 and I are glad to invite you to Codeforces Round #706 (Div. 1) and Codeforces Round #706 (Div. 2), which will take place on Mar/10/2021 15:05 (Moscow time). Note the unusual time of the round. In both divisions, you will be given 6 problems and 2 hours to solve them all.

We would like to thank:

Score distribution will be announced before the round.

Hope you all gain positive ratings $$$\Delta$$$ in this round!

UPD1: Score distribution is

Div. 2: $$$500-1000-1500-2000-2500-3000$$$

Div. 1: $$$500-1000-1500-2000-2500-3250$$$

UPD2: Editorial

UPD3: Congratulations to the winners:

Div 1:

  1. Radewoosh
  2. maroonrk
  3. tourist
  4. Um_nik
  5. Egor

Div 2:

  1. shikaichengwoerzi
  2. grey
  3. 2005lz
  4. sh_mug
  5. not_tehlka

Read more »

-
- -
- Announcement of Codeforces Round #706 (Div. 1) -
-
- Announcement of Codeforces Round #706 (Div. 2) -
- - - - - -
-
 
-
 
-
 
-
 
-
-
    -
  • Vote: I like it - - -
  • -
  • - - - +561 - -
  • -
  • Vote: I do not like it - - -
  • -
-
- - - - - -
- -
- -
-
- - - -
-
-
- - -
- - -
- By BledDest, - 2 weeks ago, - - In English - - - - -
-
-
-
- -
-

Hello, Codeforces!

First and foremost, we would like to say a massive thank you to everyone who entered and submitted their answers to the five Kotlin Heroes competitions which were held previously: Episode 1, Episode 2, Episode 3, Episode 4, and Episode 5: ICPC Round.

Ready to challenge yourself to do better? The Kotlin Heroes: Episode 6 competition will be hosted on the Codeforces platform on Mar/09/2021 17:35 (Moscow time). The contest will last 2 hours 30 minutes and will feature a set of problems from simple ones, designed to be solvable by anyone, to hard ones, to make it interesting for seasoned competitive programmers.

Prizes:

Top three winners will get prizes of $512, $256, and $128 respectively, top 50 will win a Kotlin Heroes t-shirt and an exclusive Kotlin sticker, competitors solving at least one problem will enter into a draw for one of 50 Kotlin Heroes t-shirts.

Registration is already open and available via the link. It will be available until the end of the round.

The round will again be held in accordance with a set of slightly modified ICPC rules:

  • The round is unrated.
  • The contest will have 9 problems of various levels of complexity.
  • You are only allowed to use Kotlin to solve these problems.
  • Participants are ranked according to the number of correctly solved problems. Ties are resolved based on the lowest total penalty time for all problems, which is computed as follows. For each solved problem, a penalty is set to the submission time of that problem (the time since the start of the contest). An extra penalty of 10 minutes is added for each failed submission on solved problems (i. e., if you never solve the problem, you will not be penalized for trying that problem). If two participants solved the same number of problems and scored the same penalty, then those of them who had previously made the last successful submission will be given an advantage in the distribution of prizes and gifts.

REGISTER →

If you are still new to Kotlin we have prepared a tutorial on competitive programming in Kotlin and Kotlin Heroes: Practice 6, where you can try to solve a few simple problems in Kotlin. The practice round is available by the link.

We wish you luck and hope you enjoy Kotlin.

Read more »

-
- -
- Announcement of Kotlin Heroes: Episode 6 -
-
- Announcement of Kotlin Heroes: Practice 6 -
- - - - - -
-
 
-
 
-
 
-
 
-
-
    -
  • Vote: I like it - - -
  • -
  • - - - +157 - -
  • -
  • Vote: I do not like it - - -
  • -
-
- - - - - -
- -
- -
-
- - - -
-
-
- - -
- - -
- By peltorator, - history, - 11 days ago, - translation, - In English - - - - -
-
-
-
- -
-

Hi!

I continue to make videos on algorithms. This time the topic is more basic. In this video, I talk about prefix sums and how they can help you to find sum on segments. You can also learn from this video how to easily generalize prefix sums for 2D, 3D, 4D, etc. cases. In addition, we'll also talk about a simple concept named difference array, which can easily help in some sorts of situations where it seems like you need some complex data structures. And in the end, we'll learn how to add constants, arithmetic progressions, and even quadratic functions to a segment of an array.

https://youtu.be/5iW84xlL0j0

The video is in Russian but English subtitles are available. I'd be glad if you watch the video and leave a comment below with your impressions, thoughts, and ideas for future videos. You may also want to text me on telegram: https://t.me/peltorator if you didn't understand something or you have any questions. I'll be glad to answer!

I'm sorry you need to watch it with subtitles but I'm gonna make an English channel soon. So stay tuned!

If you didn't see it already, I also have a video on disjoint sparse table: https://youtu.be/NbAtm1j5gVA.

Codeforces group with a contest: https://codeforces.com/group/1rv4rhCsHp/contests

My realizations:

1D prefix sums: https://pastebin.com/MjxG7y43

1D prefix sums with structures: https://pastebin.com/062t332c

2 methods for finding 2D prefix sums: https://pastebin.com/a09xCDGw https://pastebin.com/Yezy0Lkb

1D difference array: https://pastebin.com/fXpwTRiK

1D difference array with structures: https://pastebin.com/fbmveX6Q

Read more »

-
- - - - - -
- Tags - - youtube - -
- -
-
 
-
 
-
 
-
 
-
-
    -
  • Vote: I like it - - -
  • -
  • - - - +349 - -
  • -
  • Vote: I do not like it - - -
  • -
-
- - - - - -
- -
- -
-
- - - -
-
-
- - -
- - -
- By AlFlen, - 2 weeks ago, - translation, - In English - - - - -
-
-
-
- -
-

The future is bulletproof
The aftermath is secondary
It's time to do it now and do it loud!

Hello, Codeforces!

74TrAkToR and I are glad to invite you to our Codeforces Round #705 (Div. 2), which will be held at Mar/06/2021 17:05 (Moscow time). Notice the unusual time of the round. The round will be rated for all the participants with rating strictly less than 2100.

We have already held a round and we have worked on errors:

  • the statements will be short and clear
  • we tried to make pretests stronger
  • the editorial will be published shortly after the round ends

We would like to thank everyone who helped us a lot with round preparation.

You will be given 6 problems. You will have 2 hours 15 minutes to solve them.

UPD: Score distribution $$$750-1250-1750-2250-2750-3250$$$.

UPD2: Editorial

UPD3: Congratulations to the winners!

Div. 2:

  1. sawa855

  2. buihoatpt2k9

  3. Totiniii

  4. rainboy

  5. scli_kws

Div. 1 + Div. 2:

  1. neal

  2. BigBag

  3. fastmath

  4. Heltion

  5. tute7627

We wish everyone good luck!

Read more »

-
- -
- Announcement of Codeforces Round #705 (Div. 2) -
- - - - - -
-
 
-
 
-
 
-
 
-
-
    -
  • Vote: I like it - - -
  • -
  • - - - +676 - -
  • -
  • Vote: I do not like it - - -
  • -
-
- - - - - -
- -
- -
-
- - - -
-
-
- - -
- - -
- By awoo, - history, - 3 weeks ago, - translation, - In English - - - - -
-
-
-
- -
-

Hello Codeforces!

On Mar/02/2021 17:45 (Moscow time) Educational Codeforces Round 105 (Rated for Div. 2) will start.

Series of Educational Rounds continue being held as Harbour.Space University initiative! You can read the details about the cooperation between Harbour.Space University and Codeforces in the blog post.

This round will be rated for the participants with rating lower than 2100. It will be held on extended ICPC rules. The penalty for each incorrect submission until the submission with a full solution is 10 minutes. After the end of the contest you will have 12 hours to hack any solution you want. You will have access to copy any solution and test it locally.

You will be given 6 or 7 problems and 2 hours to solve them.

The problems were invented and prepared by Roman Roms Glazov, Adilbek adedalic Dalabaev, Vladimir vovuh Petrov, Ivan BledDest Androsov, Maksim Neon Mescheryakov and me. Also huge thanks to Mike MikeMirzayanov Mirzayanov for great systems Polygon and Codeforces.

Good luck to all the participants!

Our friends at Harbour.Space also have a message for you:

Codeforces and Harbour.Space

Amazing news once again, Codeforces!

We are especially glad to have a chance to share our scholarship opportunities more often!

This time we have partnered with OneRagtime again to open the door for an exciting career in technology for the most talented people in our network.

In partnership with OneRagtime, we are offering a full scholarship to study a Master’s in Computer Science at Harbour.Space while working as a Full Stack Developer at OneRagtime!

Scholarship Highlights:

Work in Europe’s most exciting tech cities

Scholarship value of up to €31,500

Competitive compensation for the internship at OneRagtime (€800 / month)

Opportunity to join OneRagtime full-time after graduation

Some of the advantages of working at OneRagtime:

  • International team
  • Fast-paced workplace
  • Be a part of the OneRagtime adventure!
  • Be fully immersed in the European tech ecosystem
  • Thrive within a Venture Capital that does things a little differently
  • Work in Europe’s most exciting tech cities

Codeforces and Harbour.Space

We have previously partnered with other companies like OneRagtime, Hansgrohe, Coherra, and Remy Robotics to empower young talents around the world and help them boost their tech career. We’ve already filled a few of the positions with OneRagtime including:

  • Full Stack Developer at OneRagtime awarded to Alejandro Martinez from Mexico
  • UI/UX designer at OneRagtime awarded to Davit Petriashvili from Georgia

We are always happy to see Codeforces members join the Harbour.Space family. Apply now to get a chance to learn from the best in the field and kickstart your career!

Keep in touch and follow us on LinkedIn for more scholarship opportunities. And follow us on Instagram to evidence student life, events, and success stories from our apprenticeship program students.

Good luck on your round, and see you next time!

Harbour.Space University

Congratulations to the winners:
Rank Competitor Problems Solved Penalty
1 antontrygubO_o 6 251
1 Pyqe 6 251
3 kefaa2 6 260
4 tute7627 6 272
5 Um_nik 6 288

Congratulations to the best hackers:
Rank Competitor Hack Count
1 noimi 11
2 neal 7
3 Origenes 6
4 Kregor 5:-2
5 chilliagon 5:-4
94 successful hacks and 293 unsuccessful hacks were made in total!

And finally people who were the first to solve each problem:
Problem Competitor Penalty
A noimi 0:01
B noimi 0:04
C wygzgyw 0:15
D conan1412yang99 0:16
E thenymphsofdelphi 0:15
F rainboy 0:35

UPD: Editorial is out

Read more »

-
- - - - - - - -
-
 
-
 
-
 
-
 
-
-
    -
  • Vote: I like it - - -
  • -
  • - - - +124 - -
  • -
  • Vote: I do not like it - - -
  • -
-
- - - - - -
- -
- -
-
- - - -
-
-
- - -
- - -
- By star_xingchen_c, - 3 weeks ago, - - In English - - - - -
-
-
-
- -
-

Hello Codeforces!

On Feb/28/2021 16:35 (Moscow time) we will host Codeforces Global Round 13.

It is the first round of a 2021 series of Codeforces Global Rounds. The rounds are open and rated for everybody.

The prizes for this round:

  • 30 best participants get a t-shirt.
  • 20 t-shirts are randomly distributed among those with ranks between 31 and 500, inclusive.

The prizes for the 6-round series in 2021:

  • In each round top-100 participants get points according to the table.
  • The final result for each participant is equal to the sum of points he gets in the four rounds he placed the highest.
  • The best 20 participants over all series get sweatshirts and place certificates.

Thanks to XTX, which in 2021 supported the global rounds initiative!

The problems were written and prepared by 3.141592653, Widowmaker, Ynoi, errorgorn, oolimry, star_xingchen_c, syksykCCC.

We would also like to thank:

You will have 3 hours to solve 9 problems. We encourage you to read all the problems and solve them all.

One of these problems is interactive, please see the guide of interactive problems if you are not familiar with it.

UPD1: Scoring distribution: 500-750-1000-1250-1750-2000-2250-3000-5000

UPD2: Tutorial published.

UPD3: System testing finished, congrats to the winners!

  1. maroonrk
  2. DmitryGrigorev
  3. Petr
  4. jiangly
  5. RALZH
  6. qazswedx2
  7. sunset
  8. ecnerwala
  9. lumibons
  10. p_b_p_b

Read more »

-
- -
- Announcement of Codeforces Global Round 13 -
- - - - - - -
-
 
-
 
-
 
-
 
-
-
    -
  • Vote: I like it - - -
  • -
  • - - - +1092 - -
  • -
  • Vote: I do not like it - - -
  • -
-
- - - - - -
- -
- -
-
- - - -
-
- - -
-
-
- - - - - - -
- - - - diff --git a/src/hoj-springboot/api/pom.xml b/src/hoj-springboot/api/pom.xml deleted file mode 100644 index 108deec..0000000 --- a/src/hoj-springboot/api/pom.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - hoj-springboot - top.hcode - 1.0-SNAPSHOT - - 4.0.0 - - api - - - - - org.apache.maven.plugins - maven-compiler-plugin - - 8 - 8 - - - - - - - - - io.springfox - springfox-swagger2 - 2.9.2 - - - io.springfox - springfox-swagger-ui - 2.9.2 - - - org.springframework.cloud - spring-cloud-starter-openfeign - - - com.baomidou - mybatis-plus-boot-starter - 3.2.0 - - - org.projectlombok - lombok - true - - - - - \ No newline at end of file diff --git a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/dto/CompileDTO.java b/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/dto/CompileDTO.java deleted file mode 100644 index 2c7b7c8..0000000 --- a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/dto/CompileDTO.java +++ /dev/null @@ -1,43 +0,0 @@ -package top.hcode.hoj.pojo.dto; - -import lombok.Data; - -import java.io.Serializable; -import java.util.HashMap; - - -/** - * @Author: Himit_ZH - * @Date: 2021/2/6 14:42 - * @Description: - */ -@Data -public class CompileDTO implements Serializable { - - private static final long serialVersionUID = 333L; - - /** - * 编译的源代码 - */ - private String code; - - /** - * 编译的源代码相关的题目id - */ - private Long pid; - - /** - * 编译的源代码所选语言 - */ - private String language; - - /** - * 调用判题机的凭证 - */ - private String token; - - /** - * 编译所需的额外文件,key:文件名,value:文件内容 - */ - private HashMap extraFiles; -} \ No newline at end of file diff --git a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/dto/TestJudgeReq.java b/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/dto/TestJudgeReq.java deleted file mode 100644 index 8fa6932..0000000 --- a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/dto/TestJudgeReq.java +++ /dev/null @@ -1,82 +0,0 @@ -package top.hcode.hoj.pojo.dto; - -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; -import lombok.experimental.Accessors; - -import java.io.Serializable; -import java.util.HashMap; - -/** - * @Author Himit_ZH - * @Date 2022/5/26 - */ -@Data -@Accessors(chain = true) -@AllArgsConstructor -@NoArgsConstructor -public class TestJudgeReq implements Serializable { - private static final long serialVersionUID = 666L; - - /** - * 调用评测验证的token - */ - private String token; - - /** - * 调用的唯一标识,用于返回结果识别 - */ - private String uniqueKey; - - /** - * 评测的代码 - */ - private String code; - - /** - * 评测的语言 - */ - private String language; - - /** - * 评测时允许调用的额外文件 - */ - private HashMap extraFile; - - /** - * 评测的最大时间限制 ms - */ - private Integer timeLimit; - - /** - * 评测的最大空间限制 mb - */ - private Integer memoryLimit; - - /** - * 评测的最大栈空间限制 mb - */ - private Integer stackLimit; - - /** - * 输入数据 - */ - private String testCaseInput; - - /** - * 期望输出 - */ - private String expectedOutput; - - /** - * 是否在对比testcaseOutput和expectedOutput去除每行末尾空白符 - */ - private Boolean isRemoveEndBlank; - - /** - * 原题的评测模式:default、spj、interactive - */ - private String problemJudgeMode; - -} diff --git a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/dto/TestJudgeRes.java b/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/dto/TestJudgeRes.java deleted file mode 100644 index 53e9af3..0000000 --- a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/dto/TestJudgeRes.java +++ /dev/null @@ -1,61 +0,0 @@ -package top.hcode.hoj.pojo.dto; - -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; - -import java.io.Serializable; - -/** - * @Author Himit_ZH - * @Date 2022/5/26 - */ -@Data -@Builder -@AllArgsConstructor -@NoArgsConstructor -public class TestJudgeRes implements Serializable { - - private static final long serialVersionUID = 888L; - - /** - * 评测结果状态码 - */ - private Integer status; - - /** - * 评测运行时间消耗 ms - */ - private Long time; - - /** - * 评测运行空间消耗 kb - */ - private Long memory; - - /** - * 输入 - */ - private String Input; - - /** - * 期望输出 - */ - private String expectedOutput; - - /** - * 运行标准输出 - */ - private String stdout; - - /** - * 运行错误输出 - */ - private String stderr; - - /** - * 原题的评测模式:default、spj、interactive - */ - private String problemJudgeMode; -} diff --git a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/dto/ToJudgeDTO.java b/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/dto/ToJudgeDTO.java deleted file mode 100644 index 6109799..0000000 --- a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/dto/ToJudgeDTO.java +++ /dev/null @@ -1,69 +0,0 @@ -package top.hcode.hoj.pojo.dto; - -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; -import top.hcode.hoj.pojo.entity.judge.Judge; - -import java.io.Serializable; - -/** - * @Author: Himit_ZH - * @Date: 2021/2/4 22:29 - * @Description: - */ -@Data -@EqualsAndHashCode(callSuper = false) -@Accessors(chain = true) -public class ToJudgeDTO implements Serializable { - - private static final long serialVersionUID = 999L; - - /** - * 判题数据实体类 - */ - private Judge judge; - - /** - * 调用评测验证的token - */ - private String token; - - /** - * 远程判题不为空,hoj判题为null,例如HDU-1000 - */ - private String remoteJudgeProblem; - - /** - * 是否为远程判题重判,仅限于已有远程OJ的提交id的重判 - */ - private Boolean isHasSubmitIdRemoteReJudge; - - /** - * 远程判题所用账号 - */ - private String username; - - /** - * 远程判题所用密码 - */ - private String password; - - /** - * 调用判题机的ip - */ - private String judgeServerIp; - - /** - * 调用判题机的port - */ - private Integer judgeServerPort; - - /** - * VJ判題辅助选择判题机序号使用 - */ - private Integer index; - - private Integer size; - -} \ No newline at end of file diff --git a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/common/Announcement.java b/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/common/Announcement.java deleted file mode 100644 index 0316a33..0000000 --- a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/common/Announcement.java +++ /dev/null @@ -1,50 +0,0 @@ -package top.hcode.hoj.pojo.entity.common; - -import com.baomidou.mybatisplus.annotation.FieldFill; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableId; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -import java.util.Date; - -/** - * @Author: Himit_ZH - * @Date: 2020/12/10 19:47 - * @Description: - */ -@Data -@EqualsAndHashCode(callSuper = false) -@Accessors(chain = true) -@ApiModel(value="Announcement对象", description="") -public class Announcement { - private static final long serialVersionUID = 1L; - - @TableId(value = "id", type = IdType.AUTO) - private Long id; - - @ApiModelProperty(value = "通知标题") - private String title; - - @ApiModelProperty(value = "通知内容") - private String content; - - @ApiModelProperty(value = "发布者id(必须为比赛创建者或者超级管理员才能)") - private String uid; - - @ApiModelProperty(value = "0可见,1不可见") - private int status; - - @ApiModelProperty(value = "团队ID") - private Long gid; - - @TableField(fill = FieldFill.INSERT) - private Date gmtCreate; - - @TableField(fill = FieldFill.INSERT_UPDATE) - private Date gmtModified; -} \ No newline at end of file diff --git a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/common/File.java b/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/common/File.java deleted file mode 100644 index 0f43d38..0000000 --- a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/common/File.java +++ /dev/null @@ -1,62 +0,0 @@ -package top.hcode.hoj.pojo.entity.common; - -import com.baomidou.mybatisplus.annotation.*; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -import java.util.Date; - -/** - * @Author: Himit_ZH - * @Date: 2021/1/11 13:58 - * @Description: - */ -@Data -@EqualsAndHashCode(callSuper = false) -@Accessors(chain = true) -@ApiModel(value="File对象", description="") -@TableName("`file`") -public class File { - private static final long serialVersionUID = 1L; - - @TableId(value = "id", type = IdType.AUTO) - private Long id; - - @ApiModelProperty(value = "用户id") - private String uid; - - @ApiModelProperty(value = "团队id") - private Long gid; - - @ApiModelProperty(value = "文件所属类型,例如avatar") - @TableField("`type`") - private String type; - - @ApiModelProperty(value = "文件名") - private String name; - - @ApiModelProperty(value = "文件后缀格式") - private String suffix; - - @ApiModelProperty(value = "文件所在文件夹的路径") - private String folderPath; - - @ApiModelProperty(value = "文件绝对路径") - private String filePath; - - @ApiModelProperty(value = "是否删除") - @TableField("`delete`") - private Boolean delete; - - @ApiModelProperty(value = "创建时间") - @TableField(fill = FieldFill.INSERT) - private Date gmtCreate; - - @ApiModelProperty(value = "修改时间") - @TableField(fill = FieldFill.INSERT_UPDATE) - private Date gmtModified; - -} \ No newline at end of file diff --git a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/contest/Contest.java b/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/contest/Contest.java deleted file mode 100644 index f59d54a..0000000 --- a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/contest/Contest.java +++ /dev/null @@ -1,118 +0,0 @@ -package top.hcode.hoj.pojo.entity.contest; - -import com.baomidou.mybatisplus.annotation.FieldFill; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableId; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -import java.io.Serializable; -import java.util.Date; - -/** - *

- * - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@Accessors(chain = true) -@ApiModel(value = "Contest对象", description = "") -public class Contest implements Serializable { - - private static final long serialVersionUID = 1L; - - @TableId(value = "id", type = IdType.AUTO) - @ApiModelProperty(value = "比赛id") - private Long id; - - @ApiModelProperty(value = "比赛创建者id") - private String uid; - - @ApiModelProperty(value = "比赛创建者的用户名") - private String author; - - @ApiModelProperty(value = "比赛标题") - private String title; - - @ApiModelProperty(value = "0为acm赛制,1为比分赛制") - private Integer type; - - @ApiModelProperty(value = "比赛说明") - private String description; - - @ApiModelProperty(value = "比赛来源,原创为0,克隆赛为比赛id") - private Integer source; - - @ApiModelProperty(value = "0为公开赛,1为私有赛(访问有密码),2为保护赛(提交有密码)") - private Integer auth; - - @ApiModelProperty(value = "比赛密码") - private String pwd; - - @ApiModelProperty(value = "开始时间") - private Date startTime; - - @ApiModelProperty(value = "结束时间") - private Date endTime; - - @ApiModelProperty(value = "比赛时长(s)") - private Long duration; - - @ApiModelProperty(value = "是否开启封榜") - private Boolean sealRank; - - @ApiModelProperty(value = "封榜起始时间,一直到比赛结束,不刷新榜单") - private Date sealRankTime; - - @ApiModelProperty(value = "比赛结束是否自动解除封榜,自动转换成真实榜单") - private Boolean autoRealRank; - - @ApiModelProperty(value = "-1为未开始,0为进行中,1为已结束") - private Integer status; - - @ApiModelProperty(value = "是否可见") - private Boolean visible; - - @ApiModelProperty(value = "是否打开打印功能") - private Boolean openPrint; - - @ApiModelProperty(value = "是否打开账号限制") - private Boolean openAccountLimit; - - @ApiModelProperty(value = "账号限制规则 **********") - private String accountLimitRule; - - @ApiModelProperty(value = "排行榜显示(username、nickname、realname)") - private String rankShowName; - - @ApiModelProperty(value = "打星用户列表 {\"star_account\":['a','b']}") - private String starAccount; - - @ApiModelProperty(value = "是否开放比赛榜单") - private Boolean openRank; - - @ApiModelProperty(value = "oi排行榜得分方式,Recent、Highest(最近一次提交、最高得分提交)") - private String oiRankScoreType; - - @ApiModelProperty(value = "是否为团队内比赛") - private Boolean isGroup; - - @ApiModelProperty(value = "团队ID") - private Long gid; - - @TableField(fill = FieldFill.INSERT) - private Date gmtCreate; - - @TableField(fill = FieldFill.INSERT_UPDATE) - private Date gmtModified; - - -} diff --git a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/contest/ContestAnnouncement.java b/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/contest/ContestAnnouncement.java deleted file mode 100644 index f06adb5..0000000 --- a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/contest/ContestAnnouncement.java +++ /dev/null @@ -1,48 +0,0 @@ -package top.hcode.hoj.pojo.entity.contest; - -import com.baomidou.mybatisplus.annotation.FieldFill; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableId; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -import java.io.Serializable; -import java.util.Date; - -/** - *

- * - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@Accessors(chain = true) -@ApiModel(value="ContestAnnouncement对象", description="") -public class ContestAnnouncement implements Serializable { - - private static final long serialVersionUID = 1L; - - @TableId(value = "id", type = IdType.AUTO) - private Long id; - - @ApiModelProperty(value = "公告id") - private Long aid; - - @ApiModelProperty(value = "比赛id") - private Long cid; - - @TableField(fill = FieldFill.INSERT) - private Date gmtCreate; - - @TableField(fill = FieldFill.INSERT_UPDATE) - private Date gmtModified; - - -} diff --git a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/contest/ContestExplanation.java b/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/contest/ContestExplanation.java deleted file mode 100644 index cb8b01d..0000000 --- a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/contest/ContestExplanation.java +++ /dev/null @@ -1,50 +0,0 @@ -package top.hcode.hoj.pojo.entity.contest; - -import com.baomidou.mybatisplus.annotation.FieldFill; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableId; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -import java.io.Serializable; -import java.util.Date; - -/** - *

- * - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@Accessors(chain = true) -@ApiModel(value="ContestExplanation对象", description="") -public class ContestExplanation implements Serializable { - - private static final long serialVersionUID = 1L; - - @TableId(value = "id", type = IdType.AUTO) - private Long id; - - private Long cid; - - @ApiModelProperty(value = "发布者(必须为比赛创建者或者超级管理员才能)") - private String uid; - - @ApiModelProperty(value = "内容(支持markdown)") - private String content; - - @TableField(fill = FieldFill.INSERT) - private Date gmtCreate; - - @TableField(fill = FieldFill.INSERT_UPDATE) - private Date gmtModified; - - -} diff --git a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/contest/ContestPrint.java b/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/contest/ContestPrint.java deleted file mode 100644 index b687ce7..0000000 --- a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/contest/ContestPrint.java +++ /dev/null @@ -1,50 +0,0 @@ -package top.hcode.hoj.pojo.entity.contest; - -import com.baomidou.mybatisplus.annotation.FieldFill; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableId; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -import java.util.Date; - -/** - * @Author: Himit_ZH - * @Date: 2021/9/19 21:00 - * @Description: - */ - -@Data -@EqualsAndHashCode(callSuper = false) -@Accessors(chain = true) -@ApiModel(value="ContestPrint", description="") -public class ContestPrint { - private static final long serialVersionUID = 1L; - - @TableId(value = "id", type = IdType.AUTO) - private Long id; - - private Long cid; - - @ApiModelProperty(value = "提交打印文本的用户") - private String username; - - @ApiModelProperty(value = "真实姓名") - private String realname; - - @ApiModelProperty(value = "内容") - private String content; - - @ApiModelProperty(value = "状态") - private Integer status; - - @TableField(fill = FieldFill.INSERT) - private Date gmtCreate; - - @TableField(fill = FieldFill.INSERT_UPDATE) - private Date gmtModified; -} \ No newline at end of file diff --git a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/contest/ContestProblem.java b/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/contest/ContestProblem.java deleted file mode 100644 index fc76b03..0000000 --- a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/contest/ContestProblem.java +++ /dev/null @@ -1,57 +0,0 @@ -package top.hcode.hoj.pojo.entity.contest; - -import com.baomidou.mybatisplus.annotation.FieldFill; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableId; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -import java.io.Serializable; -import java.util.Date; - -/** - *

- * - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@Accessors(chain = true) -@ApiModel(value="ContestProblem对象", description="") -public class ContestProblem implements Serializable { - - private static final long serialVersionUID = 1L; - - @TableId(value = "id", type = IdType.AUTO) - private Long id; - - @ApiModelProperty(value = "该题目在比赛中的顺序id") - private String displayId; - - @ApiModelProperty(value = "比赛id") - private Long cid; - - @ApiModelProperty(value = "题目id") - private Long pid; - - @ApiModelProperty(value = "该题目在比赛中的标题,默认为原名字") - private String displayTitle; - - @ApiModelProperty(value = "气球的颜色") - private String color; - - @TableField(fill = FieldFill.INSERT) - private Date gmtCreate; - - @TableField(fill = FieldFill.INSERT_UPDATE) - private Date gmtModified; - - -} diff --git a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/contest/ContestRecord.java b/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/contest/ContestRecord.java deleted file mode 100644 index 8d26c67..0000000 --- a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/contest/ContestRecord.java +++ /dev/null @@ -1,86 +0,0 @@ -package top.hcode.hoj.pojo.entity.contest; - -import com.baomidou.mybatisplus.annotation.FieldFill; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableId; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -import java.io.Serializable; -import java.util.Date; - -/** - *

- * - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@Accessors(chain = true) -@ApiModel(value="ContestRecord对象", description="") -public class ContestRecord implements Serializable { - - private static final long serialVersionUID = 1L; - - @TableId(value = "id", type = IdType.AUTO) - private Long id; - - @ApiModelProperty(value = "比赛id") - private Long cid; - - @ApiModelProperty(value = "用户id") - private String uid; - - @ApiModelProperty(value = "题目id") - private Long pid; - - @ApiModelProperty(value = "比赛中的题目id") - private Long cpid; - - @ApiModelProperty(value = "比赛中展示的id") - private String displayId; - - @ApiModelProperty(value = "提交id,用于可重判") - private Long submitId; - - @ApiModelProperty(value = "用户名") - private String username; - - @ApiModelProperty(value = "真实姓名(废弃)") - private String realname; - - @ApiModelProperty(value = "提交结果,0表示未AC通过不罚时,1表示AC通过,-1为未AC通过算罚时") - private Integer status; - - @ApiModelProperty(value = "具体提交时间") - private Date submitTime; - - @ApiModelProperty(value = "提交时间,为提交时间减去比赛时间") - private Long time; - - @ApiModelProperty(value = "OI比赛的得分") - private Integer score; - - @ApiModelProperty(value = "提交的程序运行耗时") - private Integer useTime; - - @ApiModelProperty(value = "是否为一血AC(废弃)") - private Boolean firstBlood; - - @ApiModelProperty(value = "AC是否已校验") - private Boolean checked; - - @TableField(fill = FieldFill.INSERT) - private Date gmtCreate; - - @TableField(fill = FieldFill.INSERT_UPDATE) - private Date gmtModified; - -} diff --git a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/contest/ContestRegister.java b/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/contest/ContestRegister.java deleted file mode 100644 index f5fe52f..0000000 --- a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/contest/ContestRegister.java +++ /dev/null @@ -1,51 +0,0 @@ -package top.hcode.hoj.pojo.entity.contest; - -import com.baomidou.mybatisplus.annotation.FieldFill; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableId; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -import java.io.Serializable; -import java.util.Date; - -/** - *

- * - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@Accessors(chain = true) -@ApiModel(value="ContestRegister对象", description="") -public class ContestRegister implements Serializable { - - private static final long serialVersionUID = 1L; - - @TableId(value = "id", type = IdType.AUTO) - private Long id; - - @ApiModelProperty(value = "比赛id") - private Long cid; - - @ApiModelProperty(value = "用户id") - private String uid; - - @ApiModelProperty(value = "默认为0表示正常,1为失效。") - private Integer status; - - @TableField(fill = FieldFill.INSERT) - private Date gmtCreate; - - @TableField(fill = FieldFill.INSERT_UPDATE) - private Date gmtModified; - - -} diff --git a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/contest/ContestScore.java b/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/contest/ContestScore.java deleted file mode 100644 index 63fdf67..0000000 --- a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/contest/ContestScore.java +++ /dev/null @@ -1,53 +0,0 @@ -package top.hcode.hoj.pojo.entity.contest; - -import com.baomidou.mybatisplus.annotation.FieldFill; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableId; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -import java.io.Serializable; -import java.util.Date; - -/** - *

- * - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@Accessors(chain = true) -@ApiModel(value="ContestScore对象", description="") -public class ContestScore implements Serializable { - - private static final long serialVersionUID = 1L; - - @TableId(value = "id", type = IdType.AUTO) - private Long id; - - private Long cid; - - @ApiModelProperty(value = "比赛前的score得分") - private Integer last; - - @ApiModelProperty(value = "Score比分变化") - private Integer change; - - @ApiModelProperty(value = "现在的score") - private Integer now; - - @TableField(fill = FieldFill.INSERT) - private Date gmtCreate; - - @TableField(fill = FieldFill.INSERT_UPDATE) - private Date gmtModified; - - -} diff --git a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/discussion/Comment.java b/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/discussion/Comment.java deleted file mode 100644 index e15fe4f..0000000 --- a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/discussion/Comment.java +++ /dev/null @@ -1,67 +0,0 @@ -package top.hcode.hoj.pojo.entity.discussion; - -import com.baomidou.mybatisplus.annotation.*; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -import java.io.Serializable; -import java.util.Date; - -/** - *

- * - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@Accessors(chain = true) -@ApiModel(value="Comment对象", description="") -public class Comment implements Serializable { - - private static final long serialVersionUID = 1L; - - @TableId(value = "id", type = IdType.AUTO) - private Integer id; - - @ApiModelProperty(value = "NULL表示无引用比赛") - private Long cid; - - @ApiModelProperty(value = "NULL表示无引用讨论") - private Integer did; - - @ApiModelProperty(value = "评论内容") - private String content; - - @ApiModelProperty(value = "评论者id") - private String fromUid; - - @ApiModelProperty(value = "评论者用户名") - private String fromName; - - @ApiModelProperty(value = "评论组头像地址") - private String fromAvatar; - - @ApiModelProperty(value = "评论者角色") - private String fromRole; - - @ApiModelProperty(value = "点赞数量") - private Integer likeNum; - - @ApiModelProperty(value = "是否封禁或删除 0正常,1封禁") - @TableLogic - private Integer status; - - @TableField(fill = FieldFill.INSERT) - private Date gmtCreate; - - @TableField(fill = FieldFill.INSERT_UPDATE) - private Date gmtModified; - - -} diff --git a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/discussion/CommentLike.java b/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/discussion/CommentLike.java deleted file mode 100644 index 015ca9a..0000000 --- a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/discussion/CommentLike.java +++ /dev/null @@ -1,42 +0,0 @@ -package top.hcode.hoj.pojo.entity.discussion; - -import com.baomidou.mybatisplus.annotation.FieldFill; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableId; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -import java.util.Date; - -/** - * @Author: Himit_ZH - * @Date: 2021/5/5 11:36 - * @Description: - */ -@Data -@EqualsAndHashCode(callSuper = false) -@Accessors(chain = true) -@ApiModel(value="CommentLike对象", description="") -public class CommentLike { - - private static final long serialVersionUID = 1L; - - @TableId(value = "id", type = IdType.AUTO) - private Integer id; - - @ApiModelProperty(value = "评论id") - private Integer cid; - - @ApiModelProperty(value = "用户id") - private String uid; - - @TableField(fill = FieldFill.INSERT) - private Date gmtCreate; - - @TableField(fill = FieldFill.INSERT_UPDATE) - private Date gmtModified; -} \ No newline at end of file diff --git a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/discussion/Discussion.java b/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/discussion/Discussion.java deleted file mode 100644 index a4149af..0000000 --- a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/discussion/Discussion.java +++ /dev/null @@ -1,78 +0,0 @@ -package top.hcode.hoj.pojo.entity.discussion; - -import com.baomidou.mybatisplus.annotation.*; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -import java.util.Date; - -/** - * @Author: Himit_ZH - * @Date: 2021/5/4 22:11 - * @Description: - */ -@Data -@EqualsAndHashCode(callSuper = false) -@Accessors(chain = true) -@ApiModel(value="Discussion对象", description="") -public class Discussion { - - private static final long serialVersionUID = 1L; - - @TableId(value = "id", type = IdType.AUTO) - private Integer id; - - @ApiModelProperty(value = "分类id") - private Integer categoryId; - - @ApiModelProperty(value = "讨论标题") - private String title; - - @ApiModelProperty(value = "讨论简介") - private String description; - - @ApiModelProperty(value = "讨论内容") - private String content; - - @ApiModelProperty(value = "题目关联 默认为null则不关联题目") - private String pid; - - @ApiModelProperty(value = "发表者id") - private String uid; - - @ApiModelProperty(value = "发表者用户名") - private String author; - - @ApiModelProperty(value = "发表者头像地址") - private String avatar; - - @ApiModelProperty(value = "发表者角色") - private String role; - - @ApiModelProperty(value = "浏览数量") - private Integer viewNum; - - @ApiModelProperty(value = "点赞数量") - private Integer likeNum; - - @ApiModelProperty(value = "评论数量,包括其评论及其回复数") - private Integer commentNum; - - @ApiModelProperty(value = "优先级,是否置顶") - private Boolean topPriority; - - @ApiModelProperty(value = "是否封禁或删除 0正常,1封禁") - private Integer status; - - @ApiModelProperty(value = "团队ID") - private Long gid; - - @TableField(fill = FieldFill.INSERT) - private Date gmtCreate; - - @TableField(fill = FieldFill.INSERT_UPDATE) - private Date gmtModified; -} \ No newline at end of file diff --git a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/discussion/DiscussionLike.java b/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/discussion/DiscussionLike.java deleted file mode 100644 index a13eadc..0000000 --- a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/discussion/DiscussionLike.java +++ /dev/null @@ -1,42 +0,0 @@ -package top.hcode.hoj.pojo.entity.discussion; - -import com.baomidou.mybatisplus.annotation.FieldFill; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableId; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -import java.util.Date; - -/** - * @Author: Himit_ZH - * @Date: 2021/5/5 11:36 - * @Description: - */ -@Data -@EqualsAndHashCode(callSuper = false) -@Accessors(chain = true) -@ApiModel(value="DiscussionLike对象", description="") -public class DiscussionLike { - - private static final long serialVersionUID = 1L; - - @TableId(value = "id", type = IdType.AUTO) - private Integer id; - - @ApiModelProperty(value = "讨论id") - private Integer did; - - @ApiModelProperty(value = "用户id") - private String uid; - - @TableField(fill = FieldFill.INSERT) - private Date gmtCreate; - - @TableField(fill = FieldFill.INSERT_UPDATE) - private Date gmtModified; -} \ No newline at end of file diff --git a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/discussion/DiscussionReport.java b/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/discussion/DiscussionReport.java deleted file mode 100644 index c27cbb3..0000000 --- a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/discussion/DiscussionReport.java +++ /dev/null @@ -1,47 +0,0 @@ -package top.hcode.hoj.pojo.entity.discussion; - -import com.baomidou.mybatisplus.annotation.FieldFill; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableId; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -import java.util.Date; - -/** - * @Author: Himit_ZH - * @Date: 2021/5/11 21:43 - * @Description: - */ -@Data -@EqualsAndHashCode(callSuper = false) -@Accessors(chain = true) -@ApiModel(value="DiscussionReport对象", description="") -public class DiscussionReport { - private static final long serialVersionUID = 1L; - - @TableId(value = "id", type = IdType.AUTO) - private Long id; - - @ApiModelProperty(value = "讨论id") - private Integer did; - - @ApiModelProperty(value = "举报者的用户名") - private String reporter; - - @ApiModelProperty(value = "举报内容") - private String content; - - @ApiModelProperty(value = "是否已读") - private Boolean status; - - @TableField(fill = FieldFill.INSERT) - private Date gmtCreate; - - @TableField(fill = FieldFill.INSERT_UPDATE) - private Date gmtModified; -} \ No newline at end of file diff --git a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/discussion/Reply.java b/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/discussion/Reply.java deleted file mode 100644 index 727715b..0000000 --- a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/discussion/Reply.java +++ /dev/null @@ -1,65 +0,0 @@ -package top.hcode.hoj.pojo.entity.discussion; - -import com.baomidou.mybatisplus.annotation.*; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -import java.util.Date; - -/** - * @Author: Himit_ZH - * @Date: 2021/5/5 19:03 - * @Description: - */ - -@Data -@EqualsAndHashCode(callSuper = false) -@Accessors(chain = true) -@ApiModel(value="Reply对象", description="") -public class Reply { - - private static final long serialVersionUID = 1L; - - @TableId(value = "id", type = IdType.AUTO) - private Integer id; - - @ApiModelProperty(value = "评论id") - private Integer commentId; - - @ApiModelProperty(value = "回复评论者id") - private String fromUid; - - @ApiModelProperty(value = "回复评论者用户名") - private String fromName; - - @ApiModelProperty(value = "回复评论者头像地址") - private String fromAvatar; - - @ApiModelProperty(value = "回复评论者角色") - private String fromRole; - - @ApiModelProperty(value = "被回复的用户id") - private String toUid; - - @ApiModelProperty(value = "被回复的用户名") - private String toName; - - @ApiModelProperty(value = "被回复的用户头像地址") - private String toAvatar; - - @ApiModelProperty(value = "回复的内容") - private String content; - - @ApiModelProperty(value = "是否封禁或删除 0正常,1封禁") - @TableLogic - private Integer status; - - @TableField(fill = FieldFill.INSERT) - private Date gmtCreate; - - @TableField(fill = FieldFill.INSERT_UPDATE) - private Date gmtModified; -} \ No newline at end of file diff --git a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/group/Group.java b/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/group/Group.java deleted file mode 100644 index e2e03c9..0000000 --- a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/group/Group.java +++ /dev/null @@ -1,68 +0,0 @@ -package top.hcode.hoj.pojo.entity.group; - -import com.baomidou.mybatisplus.annotation.*; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -import java.io.Serializable; -import java.util.Date; - -/** - * @Author: LengYun - * @Date: 2022/3/11 13:36 - * @Description: - */ -@Data -@EqualsAndHashCode(callSuper = false) -@Accessors(chain = true) -@ApiModel(value = "Group对象", description = "") -@TableName("`group`") -public class Group implements Serializable { - private static final long serialVersionUID = 1L; - - @TableId(value = "id", type = IdType.AUTO) - @ApiModelProperty(value = "团队id") - private Long id; - - @ApiModelProperty(value = "头像地址") - private String avatar; - - @ApiModelProperty(value = "团队名称") - private String name; - - @ApiModelProperty(value = "团队简称") - private String shortName; - - @ApiModelProperty(value = "团队简介") - private String brief; - - @ApiModelProperty(value = "团队介绍") - private String description; - - @ApiModelProperty(value = "团队拥有者的用户名") - private String owner; - - @ApiModelProperty(value = "团队拥有者的uuid") - private String uid; - - @ApiModelProperty(value = "1为公开团队,2为保护团队,3为私有团队") - private Integer auth; - - @ApiModelProperty(value = "团队是否可见") - private Boolean visible; - - @ApiModelProperty(value = "是否封禁或删除 0正常,1无效") - private Integer status; - - @ApiModelProperty(value = "团队邀请码") - private String code; - - @TableField(fill = FieldFill.INSERT) - private Date gmtCreate; - - @TableField(fill = FieldFill.INSERT_UPDATE) - private Date gmtModified; -} diff --git a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/group/GroupMember.java b/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/group/GroupMember.java deleted file mode 100644 index a3b7da1..0000000 --- a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/group/GroupMember.java +++ /dev/null @@ -1,49 +0,0 @@ -package top.hcode.hoj.pojo.entity.group; - -import com.baomidou.mybatisplus.annotation.FieldFill; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableId; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -import java.io.Serializable; -import java.util.Date; - -/** - * @Author: LengYun - * @Date: 2022/3/11 13:36 - * @Description: - */ -@Data -@EqualsAndHashCode(callSuper = false) -@Accessors(chain = true) -@ApiModel(value="GroupMember对象", description="") -public class GroupMember implements Serializable { - - private static final long serialVersionUID = 1L; - - @TableId(value = "id", type = IdType.AUTO) - private Long id; - - @ApiModelProperty(value = "团队id") - private Long gid; - - @ApiModelProperty(value = "用户id") - private String uid; - - @ApiModelProperty(value = "默认为1表示申请中,2为拒绝,3为普通成员,4为管理员,5为超级管理员") - private Integer auth; - - @ApiModelProperty(value = "申请理由") - private String reason; - - @TableField(fill = FieldFill.INSERT) - private Date gmtCreate; - - @TableField(fill = FieldFill.INSERT_UPDATE) - private Date gmtModified; -} diff --git a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/judge/Judge.java b/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/judge/Judge.java deleted file mode 100644 index 0a163ac..0000000 --- a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/judge/Judge.java +++ /dev/null @@ -1,120 +0,0 @@ -package top.hcode.hoj.pojo.entity.judge; - -import com.baomidou.mybatisplus.annotation.*; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -import java.io.Serializable; -import java.util.Date; - -/** - *

- * - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@Accessors(chain = true) -@ApiModel(value="Judge对象", description="") -public class Judge implements Serializable { - - private static final long serialVersionUID = 1L; - - @TableId(value = "submit_id", type = IdType.AUTO) - private Long submitId; - - @ApiModelProperty(value = "题目id") - private Long pid; - - @ApiModelProperty(value = "题目展示id") - private String displayPid; - - @ApiModelProperty(value = "用户id") - private String uid; - - @ApiModelProperty(value = "用户名") - private String username; - - @ApiModelProperty(value = "提交的时间") - private Date submitTime; - - @ApiModelProperty(value = "结果码具体参考文档") - @TableField(updateStrategy = FieldStrategy.IGNORED) - private Integer status; - - @ApiModelProperty(value = "0为仅自己可见,1为全部人可见。") - private Boolean share; - - @ApiModelProperty(value = "错误提醒(编译错误,或者vj提醒)") - @TableField(updateStrategy = FieldStrategy.IGNORED) - private String errorMessage; - - @ApiModelProperty(value = "运行时间(ms)") - @TableField(updateStrategy = FieldStrategy.IGNORED) - private Integer time; - - @ApiModelProperty(value = "运行内存(kb)") - @TableField(updateStrategy = FieldStrategy.IGNORED) - private Integer memory; - - @ApiModelProperty(value = "IO判题不为空") - @TableField(updateStrategy = FieldStrategy.IGNORED) - private Integer score; - - @ApiModelProperty(value = "代码长度") - private Integer length; - - @ApiModelProperty(value = "代码") - private String code; - - @ApiModelProperty(value = "代码语言") - private String language; - - @ApiModelProperty(value = "比赛id,非比赛提交默认为0") - private Long cid; - - @ApiModelProperty(value = "比赛中题目排序id,非比赛提交默认为0") - private Long cpid; - - @ApiModelProperty(value = "团队id,非团队内题目提交为null") - private Long gid; - - @ApiModelProperty(value = "判题机名称") - private String judger; - - @ApiModelProperty(value = "提交者所在ip") - private String ip; - - @ApiModelProperty(value = "废弃") - private Integer version; - - @ApiModelProperty(value = "该题在OI排行榜的分数") - @TableField(updateStrategy = FieldStrategy.IGNORED) - private Integer oiRankScore; - - @ApiModelProperty(value = "vjudge判题在其它oj的提交id") - private Long vjudgeSubmitId; - - @ApiModelProperty(value = "vjudge判题在其它oj的提交用户名") - private String vjudgeUsername; - - @ApiModelProperty(value = "vjudge判题在其它oj的提交账号密码") - private String vjudgePassword; - - @ApiModelProperty(value = "是否人工评测") - private Boolean isManual; - - @TableField(fill = FieldFill.INSERT) - private Date gmtCreate; - - @TableField(fill = FieldFill.INSERT_UPDATE) - private Date gmtModified; - - -} diff --git a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/judge/JudgeCase.java b/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/judge/JudgeCase.java deleted file mode 100644 index 3fb1014..0000000 --- a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/judge/JudgeCase.java +++ /dev/null @@ -1,74 +0,0 @@ -package top.hcode.hoj.pojo.entity.judge; - -import com.baomidou.mybatisplus.annotation.FieldFill; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableId; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -import java.io.Serializable; -import java.util.Date; - -/** - *

- * - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@Accessors(chain = true) -@ApiModel(value="JudgeCase对象", description="") -public class JudgeCase implements Serializable { - - private static final long serialVersionUID = 1L; - - @TableId(value = "id", type = IdType.AUTO) - private Long id; - - @ApiModelProperty(value = "题目id") - private Long pid; - - @ApiModelProperty(value = "判题id") - private Long submitId; - - @ApiModelProperty(value = "用户id") - private String uid; - - @ApiModelProperty(value = "测试样例id") - private Long caseId; - - @ApiModelProperty(value = "测试该样例所用时间ms") - private Integer time; - - @ApiModelProperty(value = "测试该样例所用空间KB") - private Integer memory; - - @ApiModelProperty(value = "IO得分") - private Integer score; - - @ApiModelProperty(value = "测试该样例结果状态码") - private Integer status; - - @ApiModelProperty(value = "样例输入,输入文件名") - private String inputData; - - @ApiModelProperty(value = "样例输出,输出文件名") - private String outputData; - - @ApiModelProperty(value = "用户样例输出,暂不使用,当前用于记录对单个测试点的输出或信息提示") - private String userOutput; - - @TableField(fill = FieldFill.INSERT) - private Date gmtCreate; - - @TableField(fill = FieldFill.INSERT_UPDATE) - private Date gmtModified; - -} diff --git a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/judge/JudgeServer.java b/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/judge/JudgeServer.java deleted file mode 100644 index 2b04207..0000000 --- a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/judge/JudgeServer.java +++ /dev/null @@ -1,63 +0,0 @@ -package top.hcode.hoj.pojo.entity.judge; - -import com.baomidou.mybatisplus.annotation.*; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -import java.util.Date; - -/** - * @Author: Himit_ZH - * @Date: 2021/4/15 11:08 - * @Description: - */ -@Data -@EqualsAndHashCode(callSuper = false) -@Accessors(chain = true) -@ApiModel(value = "JudgeServer对象", description = "判题服务器配置") -public class JudgeServer { - private static final long serialVersionUID = 1L; - - @TableId(value = "id", type = IdType.AUTO) - private Integer id; - - @ApiModelProperty(value = "判题服务名字") - private String name; - - @ApiModelProperty(value = "判题机ip") - private String ip; - - @ApiModelProperty(value = "判题机端口号") - private Integer port; - - @ApiModelProperty(value = "ip:port") - private String url; - - @ApiModelProperty(value = "判题机所在服务器cpu核心数") - private Integer cpuCore; - - @ApiModelProperty(value = "当前判题数") - private Integer taskNumber; - - @ApiModelProperty(value = "判题并发最大数") - private Integer maxTaskNumber; - - @ApiModelProperty(value = "0可用,1不可用") - private Integer status; - - @ApiModelProperty(value = "是否为远程判题vj") - private Boolean isRemote; - - @ApiModelProperty(value = "是否可提交CF") - private Boolean cfSubmittable; - - @TableField(fill = FieldFill.INSERT) - private Date gmtCreate; - - @TableField(fill = FieldFill.INSERT_UPDATE) - private Date gmtModified; - -} \ No newline at end of file diff --git a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/judge/RemoteJudgeAccount.java b/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/judge/RemoteJudgeAccount.java deleted file mode 100644 index b0cfb2c..0000000 --- a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/judge/RemoteJudgeAccount.java +++ /dev/null @@ -1,48 +0,0 @@ -package top.hcode.hoj.pojo.entity.judge; - -import com.baomidou.mybatisplus.annotation.*; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -import java.util.Date; - -/** - * @Author: Himit_ZH - * @Date: 2021/5/18 17:41 - * @Description: - */ - -@Data -@EqualsAndHashCode(callSuper = false) -@Accessors(chain = true) -@ApiModel(value = "RemoteJudgeAccount对象", description = "远程判题服务的账号") -public class RemoteJudgeAccount { - - @TableId(value = "id", type = IdType.AUTO) - private Integer id; - - @ApiModelProperty(value = "远程oj名字") - private String oj; - - @ApiModelProperty(value = "账号用户名") - private String username; - - @ApiModelProperty(value = "账号密码") - private String password; - - @ApiModelProperty(value = "是否可用") - private Boolean status; - - @ApiModelProperty(value = "废弃") - private Long version; - - @TableField(fill = FieldFill.INSERT) - private Date gmtCreate; - - @TableField(fill = FieldFill.INSERT_UPDATE) - private Date gmtModified; - -} \ No newline at end of file diff --git a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/msg/AdminSysNotice.java b/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/msg/AdminSysNotice.java deleted file mode 100644 index b1d785e..0000000 --- a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/msg/AdminSysNotice.java +++ /dev/null @@ -1,54 +0,0 @@ -package top.hcode.hoj.pojo.entity.msg; - -import com.baomidou.mybatisplus.annotation.FieldFill; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableId; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -import java.util.Date; - -/** - * @Author: Himit_ZH - * @Date: 2021/10/1 20:11 - * @Description: - */ -@Data -@EqualsAndHashCode(callSuper = false) -@Accessors(chain = true) -@ApiModel(value="AdminSysNotice", description="") -public class AdminSysNotice { - private static final long serialVersionUID = 1L; - - @TableId(value = "id", type = IdType.AUTO) - private Long id; - - @ApiModelProperty(value = "通知标题") - private String title; - - @ApiModelProperty(value = "通知内容") - private String content; - - @ApiModelProperty(value = "发给哪些用户类型,例如全部用户All,指定单个用户Single,管理员Admin") - private String type; - - @ApiModelProperty(value = "是否已被拉取过,如果已经拉取过,就无需再次拉取") - private Boolean state; - - @ApiModelProperty(value = "接受通知的用户的id,如果type为single,那么recipient 为该用户的id;否则recipient为null") - private String recipientId; - - @ApiModelProperty(value = "发布通知的管理员id") - private String adminId; - - @TableField(fill = FieldFill.INSERT) - private Date gmtCreate; - - @TableField(fill = FieldFill.INSERT_UPDATE) - private Date gmtModified; - -} \ No newline at end of file diff --git a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/msg/MsgRemind.java b/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/msg/MsgRemind.java deleted file mode 100644 index 2a3778e..0000000 --- a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/msg/MsgRemind.java +++ /dev/null @@ -1,68 +0,0 @@ -package top.hcode.hoj.pojo.entity.msg; - -import com.baomidou.mybatisplus.annotation.FieldFill; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableId; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -import java.util.Date; - -/** - * @Author: Himit_ZH - * @Date: 2021/10/1 20:21 - * @Description: - */ - -@Data -@EqualsAndHashCode(callSuper = false) -@Accessors(chain = true) -@ApiModel(value="MsgRemind", description="") -public class MsgRemind { - - private static final long serialVersionUID = 1L; - - @TableId(value = "id", type = IdType.AUTO) - private Long id; - - @ApiModelProperty(value = "动作类型,如点赞讨论帖Like_Post、点赞评论Like_Discuss、评论Discuss、回复Reply等") - private String action; - - @ApiModelProperty(value = "消息来源id,讨论id或比赛id") - private Integer sourceId; - - @ApiModelProperty(value = "事件源类型:'Discussion'、'Contest'等") - private String sourceType; - - @ApiModelProperty(value = "事件源的内容,比如回复的内容,回复的评论等等,不超过250字符,超过使用...") - private String sourceContent; - - @ApiModelProperty(value = "事件引用上一级评论或回复id") - private Integer quoteId; - - @ApiModelProperty(value = "事件引用上一级的类型:Comment、Reply") - private String quoteType; - - @ApiModelProperty(value = "事件所发生的地点链接 url") - private String url; - - @ApiModelProperty(value = "接受通知的用户的id") - private String recipientId; - - @ApiModelProperty(value = "动作执行者的id") - private String senderId; - - @ApiModelProperty(value = "是否已读") - private Boolean state; - - @TableField(fill = FieldFill.INSERT) - private Date gmtCreate; - - @TableField(fill = FieldFill.INSERT_UPDATE) - private Date gmtModified; - -} \ No newline at end of file diff --git a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/msg/UserSysNotice.java b/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/msg/UserSysNotice.java deleted file mode 100644 index 75f7a82..0000000 --- a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/msg/UserSysNotice.java +++ /dev/null @@ -1,48 +0,0 @@ -package top.hcode.hoj.pojo.entity.msg; - -import com.baomidou.mybatisplus.annotation.FieldFill; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableId; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -import java.util.Date; - -/** - * @Author: Himit_ZH - * @Date: 2021/10/1 20:18 - * @Description: - */ -@Data -@EqualsAndHashCode(callSuper = false) -@Accessors(chain = true) -@ApiModel(value="UserSysNotice", description="") -public class UserSysNotice { - private static final long serialVersionUID = 1L; - - @TableId(value = "id", type = IdType.AUTO) - private Long id; - - @ApiModelProperty(value = "系统通知的id") - private Long sysNoticeId; - - @ApiModelProperty(value = "接受通知的用户的id") - private String recipientId; - - @ApiModelProperty(value = "消息类型,系统通知Sys、我的信息Mine") - private String type; - - @ApiModelProperty(value = "是否已读") - private Boolean state; - - @TableField(fill = FieldFill.INSERT) - private Date gmtCreate; - - @TableField(fill = FieldFill.INSERT_UPDATE) - private Date gmtModified; - -} \ No newline at end of file diff --git a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/problem/Category.java b/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/problem/Category.java deleted file mode 100644 index 9315cc9..0000000 --- a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/problem/Category.java +++ /dev/null @@ -1,38 +0,0 @@ -package top.hcode.hoj.pojo.entity.problem; - -import com.baomidou.mybatisplus.annotation.FieldFill; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableId; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -import java.util.Date; - -/** - * @Author: Himit_ZH - * @Date: 2021/5/4 22:09 - * @Description: - */ -@Data -@EqualsAndHashCode(callSuper = false) -@Accessors(chain = true) -@ApiModel(value="Category对象", description="") -public class Category { - private static final long serialVersionUID = 1L; - - @TableId(value = "id", type = IdType.AUTO) - private Long id; - - @ApiModelProperty(value = "分类名字") - private String name; - - @TableField(fill = FieldFill.INSERT) - private Date gmtCreate; - - @TableField(fill = FieldFill.INSERT_UPDATE) - private Date gmtModified; -} \ No newline at end of file diff --git a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/problem/CodeTemplate.java b/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/problem/CodeTemplate.java deleted file mode 100644 index 703aaf0..0000000 --- a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/problem/CodeTemplate.java +++ /dev/null @@ -1,47 +0,0 @@ -package top.hcode.hoj.pojo.entity.problem; - -import com.baomidou.mybatisplus.annotation.FieldFill; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableId; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -import java.util.Date; - -/** - * @Author: Himit_ZH - * @Date: 2021/4/23 18:31 - * @Description: - */ -@Data -@EqualsAndHashCode(callSuper = false) -@Accessors(chain = true) -@ApiModel(value="CodeTemplate", description="") -public class CodeTemplate { - private static final long serialVersionUID = 1L; - - @TableId(value = "id", type = IdType.AUTO) - private Integer id; - - @ApiModelProperty(value = "题目id") - private Long pid; - - @ApiModelProperty(value = "语言id") - private Long lid; - - @ApiModelProperty(value = "代码") - private String code; - - @ApiModelProperty(value = "是否启用") - private Boolean status; - - @TableField(fill = FieldFill.INSERT) - private Date gmtCreate; - - @TableField(fill = FieldFill.INSERT_UPDATE) - private Date gmtModified; -} \ No newline at end of file diff --git a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/problem/Language.java b/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/problem/Language.java deleted file mode 100644 index 0e54f51..0000000 --- a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/problem/Language.java +++ /dev/null @@ -1,59 +0,0 @@ -package top.hcode.hoj.pojo.entity.problem; - -import com.baomidou.mybatisplus.annotation.FieldFill; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableId; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -import java.util.Date; - -/** - * @Author: Himit_ZH - * @Date: 2020/12/12 23:14 - * @Description: - */ -@Data -@EqualsAndHashCode(callSuper = false) -@Accessors(chain = true) -@ApiModel(value="Language对象", description="") -public class Language { - private static final long serialVersionUID = 1L; - - @TableId(value = "id", type = IdType.AUTO) - private Long id; - - @ApiModelProperty(value = "语言类型") - private String contentType; - - @ApiModelProperty(value = "语言描述") - private String description; - - @ApiModelProperty(value = "语言名字") - private String name; - - @ApiModelProperty(value = "编译指令") - private String compileCommand; - - @ApiModelProperty(value = "A+B模板") - private String template; - - @ApiModelProperty(value = "语言默认代码模板") - private String codeTemplate; - - @ApiModelProperty(value = "是否可作为特殊判题的一种语言") - private Boolean isSpj; - - @ApiModelProperty(value = "该语言属于哪个oj,自身oj用ME") - private String oj; - - @TableField(fill = FieldFill.INSERT) - private Date gmtCreate; - - @TableField(fill = FieldFill.INSERT_UPDATE) - private Date gmtModified; -} \ No newline at end of file diff --git a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/problem/Problem.java b/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/problem/Problem.java deleted file mode 100644 index 005d9cc..0000000 --- a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/problem/Problem.java +++ /dev/null @@ -1,136 +0,0 @@ -package top.hcode.hoj.pojo.entity.problem; - -import com.baomidou.mybatisplus.annotation.*; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -import java.io.Serializable; -import java.util.Date; - -/** - *

- * - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@Accessors(chain = true) -@ApiModel(value="Problem对象", description="") -public class Problem implements Serializable { - - private static final long serialVersionUID = 1L; - - @TableId(value = "id", type = IdType.AUTO) - private Long id; - - @ApiModelProperty(value = "题目的自定义ID 例如(HOJ-1000)") - private String problemId; - - @ApiModelProperty(value = "题目") - private String title; - - @ApiModelProperty(value = "作者") - private String author; - - @ApiModelProperty(value = "0为ACM,1为OI") - private Integer type; - - @ApiModelProperty(value = "default,spj,interactive") - private String judgeMode; - - @ApiModelProperty(value = "单位ms") - private Integer timeLimit; - - @ApiModelProperty(value = "单位mb") - private Integer memoryLimit; - - @ApiModelProperty(value = "单位mb") - private Integer stackLimit; - - @ApiModelProperty(value = "描述") - private String description; - - @ApiModelProperty(value = "输入描述") - private String input; - - @ApiModelProperty(value = "输出描述") - private String output; - - @ApiModelProperty(value = "题面样例") - private String examples; - - @ApiModelProperty(value = "是否为vj判题") - private Boolean isRemote; - - @ApiModelProperty(value = "题目来源(vj判题时例如HDU-1000的链接)") - private String source; - - @ApiModelProperty(value = "题目难度") - private Integer difficulty; - - @ApiModelProperty(value = "备注,提醒") - private String hint; - - @ApiModelProperty(value = "默认为1公开,2为私有,3为比赛中") - private Integer auth; - - @ApiModelProperty(value = "当该题目为oi题目时的分数") - private Integer ioScore; - - @ApiModelProperty(value = "该题目对应的相关提交代码,用户是否可用分享") - private Boolean codeShare; - - @ApiModelProperty(value = "特判程序或交互程序的代码") - @TableField(value="spj_code",updateStrategy = FieldStrategy.IGNORED) - private String spjCode; - - @ApiModelProperty(value = "特判程序或交互程序的语言") - @TableField(value="spj_language",updateStrategy = FieldStrategy.IGNORED) - private String spjLanguage; - - @ApiModelProperty(value = "特判程序或交互程序的额外文件 json key:name value:content") - @TableField(value="user_extra_file",updateStrategy = FieldStrategy.IGNORED) - private String userExtraFile; - - @ApiModelProperty(value = "特判程序或交互程序的额外文件 json key:name value:content") - @TableField(value="judge_extra_file",updateStrategy = FieldStrategy.IGNORED) - private String judgeExtraFile; - - @ApiModelProperty(value = "是否默认去除用户代码的每行末尾空白符") - private Boolean isRemoveEndBlank; - - @ApiModelProperty(value = "是否默认开启该题目的测试样例结果查看") - private Boolean openCaseResult; - - @ApiModelProperty(value = "题目测试数据是否是上传的") - private Boolean isUploadCase; - - @ApiModelProperty(value = "题目测试数据的版本号") - private String caseVersion; - - @ApiModelProperty(value = "修改题目的管理员用户名") - private String modifiedUser; - - @ApiModelProperty(value = "是否为团队内的题目") - private Boolean isGroup; - - @ApiModelProperty(value = "团队ID") - private Long gid; - - @ApiModelProperty(value = "申请公开的进度:null为未申请,1为申请中,2为申请通过,3为申请拒绝") - private Integer applyPublicProgress; - - @TableField(fill = FieldFill.INSERT) - private Date gmtCreate; - - @TableField(fill = FieldFill.INSERT_UPDATE) - private Date gmtModified; - - -} diff --git a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/problem/ProblemCase.java b/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/problem/ProblemCase.java deleted file mode 100644 index ae65fbc..0000000 --- a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/problem/ProblemCase.java +++ /dev/null @@ -1,50 +0,0 @@ -package top.hcode.hoj.pojo.entity.problem; - -import com.baomidou.mybatisplus.annotation.FieldFill; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableId; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -import java.util.Date; - -/** - * @Author: Himit_ZH - * @Date: 2020/11/28 13:37 - * @Description: - */ -@Data -@EqualsAndHashCode(callSuper = false) -@Accessors(chain = true) -@ApiModel(value="Case对象", description="题目测试样例") -public class ProblemCase { - private static final long serialVersionUID = 1L; - - @TableId(value = "id", type = IdType.AUTO) - private Long id; - - @ApiModelProperty(value = "题目id") - private Long pid; - - @ApiModelProperty(value = "测试样例的输入") - private String input; - - @ApiModelProperty(value = "测试样例的输出") - private String output; - - @ApiModelProperty(value = "该测试样例的IO得分") - private Integer score; - - @ApiModelProperty(value = "0可用,1不可用") - private Integer status; - - @TableField(fill = FieldFill.INSERT) - private Date gmtCreate; - - @TableField(fill = FieldFill.INSERT_UPDATE) - private Date gmtModified; -} \ No newline at end of file diff --git a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/problem/ProblemCount.java b/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/problem/ProblemCount.java deleted file mode 100644 index 0e28ded..0000000 --- a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/problem/ProblemCount.java +++ /dev/null @@ -1,70 +0,0 @@ -package top.hcode.hoj.pojo.entity.problem; - -import com.baomidou.mybatisplus.annotation.*; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -import java.io.Serializable; -import java.util.Date; - -/** - *

- * - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@Accessors(chain = true) -@ApiModel(value="ProblemCount对象", description="") -public class ProblemCount implements Serializable { - - private static final long serialVersionUID = 1L; - - @TableId(value = "pid", type = IdType.ID_WORKER) - private Long pid; - - private Integer total; - - private Integer ac; - - @ApiModelProperty(value = "空间超限") - private Integer mle; - - @ApiModelProperty(value = "时间超限") - private Integer tle; - - @ApiModelProperty(value = "运行错误") - private Integer re; - - @ApiModelProperty(value = "格式错误") - private Integer pe; - - @ApiModelProperty(value = "编译错误") - private Integer ce; - - @ApiModelProperty(value = "答案错误") - private Integer wa; - - @ApiModelProperty(value = "系统错误") - private Integer se; - - @ApiModelProperty(value = "部分通过,OI题目") - private Integer pa; - - @Version - private Long version; - - @TableField(fill = FieldFill.INSERT) - private Date gmtCreate; - - @TableField(fill = FieldFill.INSERT_UPDATE) - private Date gmtModified; - - -} diff --git a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/problem/ProblemLanguage.java b/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/problem/ProblemLanguage.java deleted file mode 100644 index 74f024c..0000000 --- a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/problem/ProblemLanguage.java +++ /dev/null @@ -1,38 +0,0 @@ -package top.hcode.hoj.pojo.entity.problem; - -import com.baomidou.mybatisplus.annotation.FieldFill; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableId; -import io.swagger.annotations.ApiModel; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -import java.util.Date; - -/** - * @Author: Himit_ZH - * @Date: 2020/12/13 00:00 - * @Description: - */ -@Data -@EqualsAndHashCode(callSuper = false) -@Accessors(chain = true) -@ApiModel(value="ProblemLanguage对象", description="") -public class ProblemLanguage { - private static final long serialVersionUID = 1L; - - @TableId(value = "id", type = IdType.AUTO) - private Long id; - - private Long pid; - - private Long lid; - - @TableField(fill = FieldFill.INSERT) - private Date gmtCreate; - - @TableField(fill = FieldFill.INSERT_UPDATE) - private Date gmtModified; -} \ No newline at end of file diff --git a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/problem/ProblemTag.java b/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/problem/ProblemTag.java deleted file mode 100644 index 7a49341..0000000 --- a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/problem/ProblemTag.java +++ /dev/null @@ -1,38 +0,0 @@ -package top.hcode.hoj.pojo.entity.problem; - -import com.baomidou.mybatisplus.annotation.FieldFill; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableId; -import io.swagger.annotations.ApiModel; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -import java.util.Date; - -/** - * @Author: Himit_ZH - * @Date: 2020/11/8 16:03 - * @Description: - */ -@Data -@EqualsAndHashCode(callSuper = false) -@Accessors(chain = true) -@ApiModel(value="ProblemTag对象", description="") -public class ProblemTag { - private static final long serialVersionUID = 1L; - - @TableId(value = "id", type = IdType.AUTO) - private Long id; - - private Long pid; - - private Long tid; - - @TableField(fill = FieldFill.INSERT) - private Date gmtCreate; - - @TableField(fill = FieldFill.INSERT_UPDATE) - private Date gmtModified; -} \ No newline at end of file diff --git a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/problem/Tag.java b/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/problem/Tag.java deleted file mode 100644 index d87af5d..0000000 --- a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/problem/Tag.java +++ /dev/null @@ -1,55 +0,0 @@ -package top.hcode.hoj.pojo.entity.problem; - -import com.baomidou.mybatisplus.annotation.*; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -import java.io.Serializable; -import java.util.Date; - -/** - *

- * - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@Accessors(chain = true) -@ApiModel(value="Tag对象", description="") -public class Tag implements Serializable { - - private static final long serialVersionUID = 1L; - - @TableId(value = "id", type = IdType.AUTO) - private Long id; - - @ApiModelProperty(value = "标签名字") - private String name; - - @ApiModelProperty(value = "标签颜色") - private String color; - - @ApiModelProperty(value = "标签所属oj") - private String oj; - - @ApiModelProperty(value = "团队ID") - private Long gid; - - @ApiModelProperty(value = "标签分类ID") - @TableField(updateStrategy = FieldStrategy.IGNORED) - private Long tcid; - - @TableField(fill = FieldFill.INSERT) - private Date gmtCreate; - - @TableField(fill = FieldFill.INSERT_UPDATE) - private Date gmtModified; - - -} diff --git a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/problem/TagClassification.java b/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/problem/TagClassification.java deleted file mode 100644 index a9a1b03..0000000 --- a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/problem/TagClassification.java +++ /dev/null @@ -1,45 +0,0 @@ -package top.hcode.hoj.pojo.entity.problem; - -import com.baomidou.mybatisplus.annotation.FieldFill; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableId; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -import java.util.Date; - -/** - * @Author Himit_ZH - * @Date 2022/8/3 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@Accessors(chain = true) -@ApiModel(value="TagClassification对象", description="标签分类") -public class TagClassification { - - private static final long serialVersionUID = 1L; - - @TableId(value = "id", type = IdType.AUTO) - private Long id; - - @ApiModelProperty(value = "标签分类名字") - private String name; - - @ApiModelProperty(value = "标签分类所属oj") - private String oj; - - @ApiModelProperty(value = "标签分类优先级 越小越高") - @TableField("`rank`") - private Integer rank; - - @TableField(fill = FieldFill.INSERT) - private Date gmtCreate; - - @TableField(fill = FieldFill.INSERT_UPDATE) - private Date gmtModified; -} diff --git a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/training/MappingTrainingCategory.java b/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/training/MappingTrainingCategory.java deleted file mode 100644 index 4c73eb4..0000000 --- a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/training/MappingTrainingCategory.java +++ /dev/null @@ -1,43 +0,0 @@ -package top.hcode.hoj.pojo.entity.training; - -import com.baomidou.mybatisplus.annotation.FieldFill; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableId; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -import java.io.Serializable; -import java.util.Date; - -/** - * @Author: Himit_ZH - * @Date: 2021/11/19 21:58 - * @Description: - */ -@Data -@EqualsAndHashCode(callSuper = false) -@Accessors(chain = true) -@ApiModel(value="MappingTrainingCategory对象", description="") -public class MappingTrainingCategory implements Serializable { - - private static final long serialVersionUID = 1L; - - @TableId(value = "id", type = IdType.AUTO) - private Long id; - - @ApiModelProperty(value = "训练id") - private Long tid; - - @ApiModelProperty(value = "训练分类id(TrainingCategory)") - private Long cid; - - @TableField(fill = FieldFill.INSERT) - private Date gmtCreate; - - @TableField(fill = FieldFill.INSERT_UPDATE) - private Date gmtModified; -} \ No newline at end of file diff --git a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/training/Training.java b/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/training/Training.java deleted file mode 100644 index 60120cf..0000000 --- a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/training/Training.java +++ /dev/null @@ -1,68 +0,0 @@ -package top.hcode.hoj.pojo.entity.training; - -import com.baomidou.mybatisplus.annotation.FieldFill; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableId; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -import java.io.Serializable; -import java.util.Date; - -/** - * @Author: Himit_ZH - * @Date: 2021/11/19 21:37 - * @Description: - */ - -@Data -@EqualsAndHashCode(callSuper = false) -@Accessors(chain = true) -@ApiModel(value = "Training对象", description = "训练题单实体") -public class Training implements Serializable { - - private static final long serialVersionUID = 1L; - - @TableId(value = "id", type = IdType.AUTO) - @ApiModelProperty(value = "主键id") - private Long id; - - @ApiModelProperty(value = "训练题单标题") - private String title; - - @ApiModelProperty(value = "训练题单简介") - private String description; - - @ApiModelProperty(value = "训练题单创建者用户名") - private String author; - - @ApiModelProperty(value = "训练题单权限类型:Public、Private") - private String auth; - - @ApiModelProperty(value = "训练题单权限为Private时的密码") - private String privatePwd; - - @ApiModelProperty(value = "是否可用") - private Boolean status; - - @ApiModelProperty(value = "编号,升序排序") - @TableField("`rank`") - private Integer rank; - - @ApiModelProperty(value = "是否为团队内的训练") - private Boolean isGroup; - - @ApiModelProperty(value = "团队ID") - private Long gid; - - @TableField(fill = FieldFill.INSERT) - private Date gmtCreate; - - @TableField(fill = FieldFill.INSERT_UPDATE) - private Date gmtModified; - -} \ No newline at end of file diff --git a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/training/TrainingCategory.java b/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/training/TrainingCategory.java deleted file mode 100644 index 5a9ce9f..0000000 --- a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/training/TrainingCategory.java +++ /dev/null @@ -1,47 +0,0 @@ -package top.hcode.hoj.pojo.entity.training; - -import com.baomidou.mybatisplus.annotation.FieldFill; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableId; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -import java.io.Serializable; -import java.util.Date; - -/** - * @Author: Himit_ZH - * @Date: 2021/11/19 21:56 - * @Description: - */ - -@Data -@EqualsAndHashCode(callSuper = false) -@Accessors(chain = true) -@ApiModel(value="TrainingCategory对象", description="") -public class TrainingCategory implements Serializable { - - private static final long serialVersionUID = 1L; - - @TableId(value = "id", type = IdType.AUTO) - private Long id; - - @ApiModelProperty(value = "训练题单专用分类名字") - private String name; - - @ApiModelProperty(value = "训练题单专用分类背景颜色") - private String color; - - @ApiModelProperty(value = "团队ID") - private Long gid; - - @TableField(fill = FieldFill.INSERT) - private Date gmtCreate; - - @TableField(fill = FieldFill.INSERT_UPDATE) - private Date gmtModified; -} \ No newline at end of file diff --git a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/training/TrainingProblem.java b/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/training/TrainingProblem.java deleted file mode 100644 index 1420c28..0000000 --- a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/training/TrainingProblem.java +++ /dev/null @@ -1,51 +0,0 @@ -package top.hcode.hoj.pojo.entity.training; - -import com.baomidou.mybatisplus.annotation.FieldFill; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableId; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -import java.io.Serializable; -import java.util.Date; - -/** - * @Author: Himit_ZH - * @Date: 2021/11/19 21:50 - * @Description: - */ - -@Data -@EqualsAndHashCode(callSuper = false) -@Accessors(chain = true) -@ApiModel(value="TrainingProblem对象", description="") -public class TrainingProblem implements Serializable { - - private static final long serialVersionUID = 1L; - - @TableId(value = "id", type = IdType.AUTO) - private Long id; - - @ApiModelProperty(value = "训练id") - private Long tid; - - @ApiModelProperty(value = "题目源id") - private Long pid; - - @ApiModelProperty(value = "题目展示id") - private String displayId; - - @ApiModelProperty(value = "排序用") - @TableField("`rank`") - private Integer rank; - - @TableField(fill = FieldFill.INSERT) - private Date gmtCreate; - - @TableField(fill = FieldFill.INSERT_UPDATE) - private Date gmtModified; -} \ No newline at end of file diff --git a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/training/TrainingRecord.java b/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/training/TrainingRecord.java deleted file mode 100644 index e00d44b..0000000 --- a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/training/TrainingRecord.java +++ /dev/null @@ -1,53 +0,0 @@ -package top.hcode.hoj.pojo.entity.training; - -import com.baomidou.mybatisplus.annotation.FieldFill; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableId; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -import java.io.Serializable; -import java.util.Date; - -/** - * @Author: Himit_ZH - * @Date: 2021/11/19 21:52 - * @Description: - */ - -@Data -@EqualsAndHashCode(callSuper = false) -@Accessors(chain = true) -@ApiModel(value="TrainingRecord对象", description="") -public class TrainingRecord implements Serializable { - - private static final long serialVersionUID = 1L; - - @TableId(value = "id", type = IdType.AUTO) - private Long id; - - @ApiModelProperty(value = "训练id") - private Long tid; - - @ApiModelProperty(value = "训练题目id") - private Long tpid; - - @ApiModelProperty(value = "用户id") - private String uid; - - @ApiModelProperty(value = "题目id") - private Long pid; - - @ApiModelProperty(value = "提交id") - private Long submitId; - - @TableField(fill = FieldFill.INSERT) - private Date gmtCreate; - - @TableField(fill = FieldFill.INSERT_UPDATE) - private Date gmtModified; -} \ No newline at end of file diff --git a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/training/TrainingRegister.java b/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/training/TrainingRegister.java deleted file mode 100644 index c164b8d..0000000 --- a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/training/TrainingRegister.java +++ /dev/null @@ -1,46 +0,0 @@ -package top.hcode.hoj.pojo.entity.training; - -import com.baomidou.mybatisplus.annotation.FieldFill; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableId; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -import java.io.Serializable; -import java.util.Date; - -/** - * @Author: Himit_ZH - * @Date: 2021/11/19 21:48 - * @Description: - */ -@Data -@EqualsAndHashCode(callSuper = false) -@Accessors(chain = true) -@ApiModel(value="TrainingRegister对象", description="") -public class TrainingRegister implements Serializable { - - private static final long serialVersionUID = 1L; - - @TableId(value = "id", type = IdType.AUTO) - private Long id; - - @ApiModelProperty(value = "训练id") - private Long tid; - - @ApiModelProperty(value = "用户id") - private String uid; - - @ApiModelProperty(value = "是否可用") - private Boolean status; - - @TableField(fill = FieldFill.INSERT) - private Date gmtCreate; - - @TableField(fill = FieldFill.INSERT_UPDATE) - private Date gmtModified; -} \ No newline at end of file diff --git a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/user/Auth.java b/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/user/Auth.java deleted file mode 100644 index 9e97ef9..0000000 --- a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/user/Auth.java +++ /dev/null @@ -1,51 +0,0 @@ -package top.hcode.hoj.pojo.entity.user; - -import com.baomidou.mybatisplus.annotation.FieldFill; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableId; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -import java.io.Serializable; -import java.util.Date; - -/** - *

- * - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@Accessors(chain = true) -@ApiModel(value="Auth对象", description="") -public class Auth implements Serializable { - - private static final long serialVersionUID = 1L; - - @TableId(value = "id", type = IdType.AUTO) - private Long id; - - @ApiModelProperty(value = "权限名称") - private String name; - - @ApiModelProperty(value = "权限字符串") - private String permission; - - @ApiModelProperty(value = "0可用,1不可用") - private Integer status; - - @TableField(fill = FieldFill.INSERT) - private Date gmtCreate; - - @TableField(fill = FieldFill.INSERT_UPDATE) - private Date gmtModified; - - -} diff --git a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/user/Role.java b/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/user/Role.java deleted file mode 100644 index 975c2fd..0000000 --- a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/user/Role.java +++ /dev/null @@ -1,53 +0,0 @@ -package top.hcode.hoj.pojo.entity.user; - -import com.baomidou.mybatisplus.annotation.FieldFill; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableId; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -import java.io.Serializable; -import java.util.Date; - -/** - *

- * - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@Accessors(chain = true) -@ApiModel(value="Role对象", description="") -public class Role implements Serializable { - - private static final long serialVersionUID = 1L; - - @TableId(value = "id", type = IdType.ID_WORKER) - private Long id; - - @ApiModelProperty(value = "角色") - private String role; - - @ApiModelProperty(value = "描述") - private String description; - - @ApiModelProperty(value = "默认0可用,1不可用") - private Integer status; - - @ApiModelProperty(value = "创建时间") - @TableField(fill = FieldFill.INSERT) - private Date gmtCreate; - - @ApiModelProperty(value = "修改时间") - @TableField(fill = FieldFill.INSERT_UPDATE) - private Date gmtModified; - - -} diff --git a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/user/RoleAuth.java b/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/user/RoleAuth.java deleted file mode 100644 index e807aee..0000000 --- a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/user/RoleAuth.java +++ /dev/null @@ -1,40 +0,0 @@ -package top.hcode.hoj.pojo.entity.user; - -import com.baomidou.mybatisplus.annotation.FieldFill; -import com.baomidou.mybatisplus.annotation.TableField; -import io.swagger.annotations.ApiModel; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -import java.io.Serializable; -import java.util.Date; - -/** - *

- * - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@Accessors(chain = true) -@ApiModel(value="RoleAuth对象", description="") -public class RoleAuth implements Serializable { - - private static final long serialVersionUID = 1L; - - private Long authId; - - private Long roleId; - - @TableField(fill = FieldFill.INSERT) - private Date gmtCreate; - - @TableField(fill = FieldFill.INSERT_UPDATE) - private Date gmtModified; - - -} diff --git a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/user/Session.java b/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/user/Session.java deleted file mode 100644 index 738de70..0000000 --- a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/user/Session.java +++ /dev/null @@ -1,41 +0,0 @@ -package top.hcode.hoj.pojo.entity.user; - -import com.baomidou.mybatisplus.annotation.FieldFill; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableId; -import io.swagger.annotations.ApiModel; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -import java.util.Date; - -/** - * @Author: Himit_ZH - * @Date: 2020/12/3 22:41 - * @Description: - */ -@Data -@EqualsAndHashCode(callSuper = false) -@Accessors(chain = true) -@ApiModel(value="session对象", description="") -public class Session { - - private static final long serialVersionUID = 1L; - - @TableId(value = "id", type = IdType.AUTO) - private Long id; - - private String uid; - - private String userAgent; - - private String ip; - - @TableField(fill = FieldFill.INSERT) - private Date gmtCreate; - - @TableField(fill = FieldFill.INSERT_UPDATE) - private Date gmtModified; -} \ No newline at end of file diff --git a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/user/UserAcproblem.java b/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/user/UserAcproblem.java deleted file mode 100644 index eced4d8..0000000 --- a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/user/UserAcproblem.java +++ /dev/null @@ -1,51 +0,0 @@ -package top.hcode.hoj.pojo.entity.user; - -import com.baomidou.mybatisplus.annotation.FieldFill; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableId; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -import java.io.Serializable; -import java.util.Date; - -/** - *

- * - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@Accessors(chain = true) -@ApiModel(value="UserAcproblem对象", description="") -public class UserAcproblem implements Serializable { - - private static final long serialVersionUID = 1L; - - @TableId(value = "id", type = IdType.AUTO) - private Long id; - - @ApiModelProperty(value = "用户id") - private String uid; - - @ApiModelProperty(value = "ac的题目id") - private Long pid; - - @ApiModelProperty(value = "提交的id") - private Long submitId; - - @TableField(fill = FieldFill.INSERT) - private Date gmtCreate; - - @TableField(fill = FieldFill.INSERT_UPDATE) - private Date gmtModified; - - -} diff --git a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/user/UserInfo.java b/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/user/UserInfo.java deleted file mode 100644 index 36c0b13..0000000 --- a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/user/UserInfo.java +++ /dev/null @@ -1,103 +0,0 @@ -package top.hcode.hoj.pojo.entity.user; - -import com.baomidou.mybatisplus.annotation.*; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -import java.io.Serializable; -import java.util.Date; - -/** - *

- * - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@Accessors(chain = true) -@ApiModel(value="UserInfo对象", description="") -public class UserInfo implements Serializable { - - private static final long serialVersionUID = 1L; - - @TableId(value = "uuid",type =IdType.UUID) - private String uuid; - - @ApiModelProperty(value = "用户名") - private String username; - - @ApiModelProperty(value = "密码") - private String password; - - @TableField(updateStrategy = FieldStrategy.IGNORED) - @ApiModelProperty(value = "昵称") - private String nickname; - - @TableField(updateStrategy = FieldStrategy.IGNORED) - @ApiModelProperty(value = "学校") - private String school; - - @TableField(updateStrategy = FieldStrategy.IGNORED) - @ApiModelProperty(value = "专业") - private String course; - - @TableField(updateStrategy = FieldStrategy.IGNORED) - @ApiModelProperty(value = "学号") - private String number; - - @TableField(updateStrategy = FieldStrategy.IGNORED) - @ApiModelProperty(value = "性别") - private String gender; - - @TableField(updateStrategy = FieldStrategy.IGNORED) - @ApiModelProperty(value = "真实姓名") - private String realname; - - @TableField(updateStrategy = FieldStrategy.IGNORED) - @ApiModelProperty(value = "cf的username") - private String cfUsername; - - @TableField(updateStrategy = FieldStrategy.IGNORED) - @ApiModelProperty(value = "github地址") - private String github; - - @TableField(updateStrategy = FieldStrategy.IGNORED) - @ApiModelProperty(value = "博客地址") - private String blog; - - @TableField(updateStrategy = FieldStrategy.IGNORED) - @ApiModelProperty(value = "邮箱") - private String email; - - @ApiModelProperty(value = "头像地址") - private String avatar; - - @TableField(updateStrategy = FieldStrategy.IGNORED) - @ApiModelProperty(value = "个性介绍") - private String signature; - - @ApiModelProperty(value = "头衔、称号") - private String titleName; - - @ApiModelProperty(value = "头衔、称号的颜色") - private String titleColor; - - @ApiModelProperty(value = "0可用,-1不可用") - private int status; - - @ApiModelProperty(value = "创建时间") - @TableField(fill = FieldFill.INSERT) - private Date gmtCreate; - - @ApiModelProperty(value = "修改时间") - @TableField(fill = FieldFill.INSERT_UPDATE) - private Date gmtModified; - - -} diff --git a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/user/UserRecord.java b/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/user/UserRecord.java deleted file mode 100644 index 83f4c11..0000000 --- a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/user/UserRecord.java +++ /dev/null @@ -1,45 +0,0 @@ -package top.hcode.hoj.pojo.entity.user; - -import com.baomidou.mybatisplus.annotation.*; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -import java.io.Serializable; -import java.util.Date; - -/** - *

- * - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@Accessors(chain = true) -@ApiModel(value="UserRecord对象", description="") -public class UserRecord implements Serializable { - - private static final long serialVersionUID = 1L; - - @TableId(value = "id", type = IdType.AUTO) - private Long id; - - @ApiModelProperty(value = "用户id") - private String uid; - - @ApiModelProperty(value = "cf得分") - @TableField("rating") - private Integer rating; - - @TableField(fill = FieldFill.INSERT) - private Date gmtCreate; - - @TableField(fill = FieldFill.INSERT_UPDATE) - private Date gmtModified; - -} diff --git a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/user/UserRole.java b/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/user/UserRole.java deleted file mode 100644 index 9e12d23..0000000 --- a/src/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/user/UserRole.java +++ /dev/null @@ -1,45 +0,0 @@ -package top.hcode.hoj.pojo.entity.user; - -import com.baomidou.mybatisplus.annotation.FieldFill; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableId; -import io.swagger.annotations.ApiModel; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -import java.io.Serializable; -import java.util.Date; - -/** - *

- * - *

- * - * @author Himit_ZH - * @since 2020-10-23 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@Accessors(chain = true) -@ApiModel(value="UserRole对象", description="") -public class UserRole implements Serializable { - - private static final long serialVersionUID = 1L; - - @TableId(value = "id", type = IdType.AUTO) - private Long id; - - private String uid; - - private Long roleId; - - @TableField(fill = FieldFill.INSERT) - private Date gmtCreate; - - @TableField(fill = FieldFill.INSERT_UPDATE) - private Date gmtModified; - - -} diff --git a/src/hoj-springboot/pom.xml b/src/hoj-springboot/pom.xml deleted file mode 100644 index c5c78bb..0000000 --- a/src/hoj-springboot/pom.xml +++ /dev/null @@ -1,126 +0,0 @@ - - - 4.0.0 - - top.hcode - hoj-springboot - 1.0-SNAPSHOT - - api - DataBackup - JudgeServer - - pom - - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.10.1 - - 8 - 8 - UTF-8 - - - - org.apache.maven.plugins - maven-surefire-plugin - 3.0.0-M6 - - true - UTF-8 - - - - - - - - UTF-8 - 8 - 8 - 4.12 - 1.16.10 - 1.2.17 - 8.0.19 - 1.1.20 - 2.1.1 - - - - - - org.springframework.cloud - spring-cloud-dependencies - Hoxton.SR1 - pom - import - - - - com.alibaba.cloud - spring-cloud-alibaba-dependencies - 2.2.1.RELEASE - pom - import - - - - org.springframework.boot - spring-boot-dependencies - 2.2.6.RELEASE - pom - import - - - - mysql - mysql-connector-java - ${mysql.version} - - - com.alibaba - druid - ${druid.version} - - - - com.baomidou - mybatis-plus-boot-starter - 3.2.0 - - - org.crazycake - shiro-redis-spring-boot-starter - 3.2.1 - - - - log4j - log4j - ${log4j.version} - - - ch.qos.logback - logback-core - 1.2.3 - - - - junit - junit - ${junit.version} - - - - org.projectlombok - lombok - ${lombok.version} - - - - \ No newline at end of file diff --git a/src/hoj-vue/.gitignore b/src/hoj-vue/.gitignore deleted file mode 100644 index 403adbc..0000000 --- a/src/hoj-vue/.gitignore +++ /dev/null @@ -1,23 +0,0 @@ -.DS_Store -node_modules -/dist - - -# local env files -.env.local -.env.*.local - -# Log files -npm-debug.log* -yarn-debug.log* -yarn-error.log* -pnpm-debug.log* - -# Editor directories and files -.idea -.vscode -*.suo -*.ntvs* -*.njsproj -*.sln -*.sw? diff --git a/src/hoj-vue/README.md b/src/hoj-vue/README.md deleted file mode 100644 index b3d6185..0000000 --- a/src/hoj-vue/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# hoj-vue-pc - -## Project setup -``` -npm install -``` - -### Compiles and hot-reloads for development -``` -npm run serve -``` - -### Compiles and minifies for production -``` -npm run build -``` - -### Customize configuration -See [Configuration Reference](https://cli.vuejs.org/config/). diff --git a/src/hoj-vue/babel.config.js b/src/hoj-vue/babel.config.js deleted file mode 100644 index e955840..0000000 --- a/src/hoj-vue/babel.config.js +++ /dev/null @@ -1,5 +0,0 @@ -module.exports = { - presets: [ - '@vue/cli-plugin-babel/preset' - ] -} diff --git a/src/hoj-vue/package-lock.json b/src/hoj-vue/package-lock.json deleted file mode 100644 index 23c4519..0000000 --- a/src/hoj-vue/package-lock.json +++ /dev/null @@ -1,25960 +0,0 @@ -{ - "name": "hoj-vue", - "version": "0.1.0", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "name": "hoj-vue", - "version": "0.1.0", - "dependencies": { - "@iktakahiro/markdown-it-katex": "^4.0.1", - "axios": "^0.21.0", - "browser-detect": "^0.2.28", - "compression-webpack-plugin": "^5.0.1", - "core-js": "^3.6.5", - "echarts": "^4.9.0", - "element-ui": "^2.15.3", - "font-awesome": "^4.7.0", - "highlight.js": "^10.3.2", - "jquery": "^3.5.1", - "mavon-editor": "2.9.1", - "moment": "^2.29.1", - "muse-ui": "^3.0.2", - "nprogress": "^0.2.0", - "papaparse": "^5.3.0", - "vue": "^2.6.11", - "vue-avatar": "^2.3.3", - "vue-calendar-heatmap": "^0.8.4", - "vue-clipboard2": "^0.3.1", - "vue-codemirror-lite": "^1.0.4", - "vue-cropper": "^0.5.5", - "vue-dompurify-html": "^2.5.0", - "vue-echarts": "^5.0.0-beta.0", - "vue-i18n": "^8.24.4", - "vue-katex-auto-render": "^0.1.3", - "vue-m-message": "^3.0.0", - "vue-monoplasty-slide-verify": "^1.1.3", - "vue-particles": "^1.0.9", - "vue-router": "^3.2.0", - "vue-template-compiler": "^2.6.12", - "vuex": "^3.4.0", - "vuex-router-sync": "^5.0.0", - "vxe-table": "^2.9.26", - "xe-utils": "^2.8.1" - }, - "devDependencies": { - "@types/highlight.js": "^10.1.0", - "@vue/cli-plugin-babel": "~4.5.0", - "@vue/cli-plugin-router": "~4.5.0", - "@vue/cli-plugin-vuex": "~4.5.0", - "@vue/cli-service": "~4.5.0", - "uglifyjs-webpack-plugin": "^2.2.0", - "webpack-bundle-analyzer": "^4.4.0" - } - }, - "node_modules/@babel/code-frame": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/code-frame/download/@babel/code-frame-7.10.4.tgz?cache=0&sync_timestamp=1593529659031&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fcode-frame%2Fdownload%2F%40babel%2Fcode-frame-7.10.4.tgz", - "integrity": "sha1-Fo2ho26Q2miujUnA8bSMfGJJITo=", - "dev": true, - "dependencies": { - "@babel/highlight": "^7.10.4" - } - }, - "node_modules/@babel/compat-data": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/compat-data/download/@babel/compat-data-7.12.1.tgz?cache=0&sync_timestamp=1602801772375&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fcompat-data%2Fdownload%2F%40babel%2Fcompat-data-7.12.1.tgz", - "integrity": "sha1-1zhqaJqg3fBiVQBbS5kZiAIRAaA=", - "dev": true - }, - "node_modules/@babel/core": { - "version": "7.12.3", - "resolved": "https://registry.npm.taobao.org/@babel/core/download/@babel/core-7.12.3.tgz?cache=0&sync_timestamp=1602881203345&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fcore%2Fdownload%2F%40babel%2Fcore-7.12.3.tgz", - "integrity": "sha1-G0NohOHjv/b7EyjcArIIdZ3pKtg=", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.10.4", - "@babel/generator": "^7.12.1", - "@babel/helper-module-transforms": "^7.12.1", - "@babel/helpers": "^7.12.1", - "@babel/parser": "^7.12.3", - "@babel/template": "^7.10.4", - "@babel/traverse": "^7.12.1", - "@babel/types": "^7.12.1", - "convert-source-map": "^1.7.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.1", - "json5": "^2.1.2", - "lodash": "^4.17.19", - "resolve": "^1.3.2", - "semver": "^5.4.1", - "source-map": "^0.5.0" - }, - "engines": { - "node": ">=6.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/babel" - } - }, - "node_modules/@babel/generator": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/generator/download/@babel/generator-7.12.1.tgz?cache=0&sync_timestamp=1602799917077&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fgenerator%2Fdownload%2F%40babel%2Fgenerator-7.12.1.tgz", - "integrity": "sha1-DXC+Mr2qA9fFHIWX3aduDfHxVGg=", - "dev": true, - "dependencies": { - "@babel/types": "^7.12.1", - "jsesc": "^2.5.1", - "source-map": "^0.5.0" - } - }, - "node_modules/@babel/helper-annotate-as-pure": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/helper-annotate-as-pure/download/@babel/helper-annotate-as-pure-7.10.4.tgz", - "integrity": "sha1-W/DUlaP3V6w72ki1vzs7ownHK6M=", - "dev": true, - "dependencies": { - "@babel/types": "^7.10.4" - } - }, - "node_modules/@babel/helper-builder-binary-assignment-operator-visitor": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/helper-builder-binary-assignment-operator-visitor/download/@babel/helper-builder-binary-assignment-operator-visitor-7.10.4.tgz", - "integrity": "sha1-uwt18xv5jL+f8UPBrleLhydK4aM=", - "dev": true, - "dependencies": { - "@babel/helper-explode-assignable-expression": "^7.10.4", - "@babel/types": "^7.10.4" - } - }, - "node_modules/@babel/helper-compilation-targets": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/helper-compilation-targets/download/@babel/helper-compilation-targets-7.12.1.tgz?cache=0&sync_timestamp=1602799917475&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fhelper-compilation-targets%2Fdownload%2F%40babel%2Fhelper-compilation-targets-7.12.1.tgz", - "integrity": "sha1-MQ41KIj7292Fd76N/dKvueetz1A=", - "dev": true, - "dependencies": { - "@babel/compat-data": "^7.12.1", - "@babel/helper-validator-option": "^7.12.1", - "browserslist": "^4.12.0", - "semver": "^5.5.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-create-class-features-plugin": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/helper-create-class-features-plugin/download/@babel/helper-create-class-features-plugin-7.12.1.tgz?cache=0&sync_timestamp=1602799938240&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fhelper-create-class-features-plugin%2Fdownload%2F%40babel%2Fhelper-create-class-features-plugin-7.12.1.tgz", - "integrity": "sha1-PEWZj0Me3UqSFMXx060USKYTf24=", - "dev": true, - "dependencies": { - "@babel/helper-function-name": "^7.10.4", - "@babel/helper-member-expression-to-functions": "^7.12.1", - "@babel/helper-optimise-call-expression": "^7.10.4", - "@babel/helper-replace-supers": "^7.12.1", - "@babel/helper-split-export-declaration": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-create-regexp-features-plugin": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/helper-create-regexp-features-plugin/download/@babel/helper-create-regexp-features-plugin-7.12.1.tgz?cache=0&sync_timestamp=1602799980691&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fhelper-create-regexp-features-plugin%2Fdownload%2F%40babel%2Fhelper-create-regexp-features-plugin-7.12.1.tgz", - "integrity": "sha1-GLEwLUZ3+dxHQP6MntlmgOKdN+g=", - "dev": true, - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.10.4", - "@babel/helper-regex": "^7.10.4", - "regexpu-core": "^4.7.1" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-define-map": { - "version": "7.10.5", - "resolved": "https://registry.npm.taobao.org/@babel/helper-define-map/download/@babel/helper-define-map-7.10.5.tgz", - "integrity": "sha1-tTwQ23imQIABUmkrEzkxR6y5uzA=", - "dev": true, - "dependencies": { - "@babel/helper-function-name": "^7.10.4", - "@babel/types": "^7.10.5", - "lodash": "^4.17.19" - } - }, - "node_modules/@babel/helper-explode-assignable-expression": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/helper-explode-assignable-expression/download/@babel/helper-explode-assignable-expression-7.12.1.tgz?cache=0&sync_timestamp=1602801819900&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fhelper-explode-assignable-expression%2Fdownload%2F%40babel%2Fhelper-explode-assignable-expression-7.12.1.tgz", - "integrity": "sha1-gAakZmlcSthqKl8vsVtfLDGtVjM=", - "dev": true, - "dependencies": { - "@babel/types": "^7.12.1" - } - }, - "node_modules/@babel/helper-function-name": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/helper-function-name/download/@babel/helper-function-name-7.10.4.tgz", - "integrity": "sha1-0tOyDFmtjEcRL6fSqUvAnV74Lxo=", - "dev": true, - "dependencies": { - "@babel/helper-get-function-arity": "^7.10.4", - "@babel/template": "^7.10.4", - "@babel/types": "^7.10.4" - } - }, - "node_modules/@babel/helper-get-function-arity": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/helper-get-function-arity/download/@babel/helper-get-function-arity-7.10.4.tgz", - "integrity": "sha1-mMHL6g4jMvM/mkZhuM4VBbLBm6I=", - "dev": true, - "dependencies": { - "@babel/types": "^7.10.4" - } - }, - "node_modules/@babel/helper-hoist-variables": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/helper-hoist-variables/download/@babel/helper-hoist-variables-7.10.4.tgz", - "integrity": "sha1-1JsAHR1aaMpeZgTdoBpil/fJOB4=", - "dev": true, - "dependencies": { - "@babel/types": "^7.10.4" - } - }, - "node_modules/@babel/helper-member-expression-to-functions": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/helper-member-expression-to-functions/download/@babel/helper-member-expression-to-functions-7.12.1.tgz", - "integrity": "sha1-+6Dy/P8/ugDm7LZku15uJuLWFlw=", - "dev": true, - "dependencies": { - "@babel/types": "^7.12.1" - } - }, - "node_modules/@babel/helper-module-imports": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/helper-module-imports/download/@babel/helper-module-imports-7.12.1.tgz?cache=0&sync_timestamp=1602799917569&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fhelper-module-imports%2Fdownload%2F%40babel%2Fhelper-module-imports-7.12.1.tgz", - "integrity": "sha1-FkTAFZGhWi8ITdbQktlDDrHRIWw=", - "dev": true, - "dependencies": { - "@babel/types": "^7.12.1" - } - }, - "node_modules/@babel/helper-module-transforms": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/helper-module-transforms/download/@babel/helper-module-transforms-7.12.1.tgz?cache=0&sync_timestamp=1602799922305&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fhelper-module-transforms%2Fdownload%2F%40babel%2Fhelper-module-transforms-7.12.1.tgz", - "integrity": "sha1-eVT+xx9bMsSOSzA7Q3w0RT/XJHw=", - "dev": true, - "dependencies": { - "@babel/helper-module-imports": "^7.12.1", - "@babel/helper-replace-supers": "^7.12.1", - "@babel/helper-simple-access": "^7.12.1", - "@babel/helper-split-export-declaration": "^7.11.0", - "@babel/helper-validator-identifier": "^7.10.4", - "@babel/template": "^7.10.4", - "@babel/traverse": "^7.12.1", - "@babel/types": "^7.12.1", - "lodash": "^4.17.19" - } - }, - "node_modules/@babel/helper-optimise-call-expression": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/helper-optimise-call-expression/download/@babel/helper-optimise-call-expression-7.10.4.tgz", - "integrity": "sha1-UNyWQT1ZT5lad5BZBbBYk813lnM=", - "dev": true, - "dependencies": { - "@babel/types": "^7.10.4" - } - }, - "node_modules/@babel/helper-plugin-utils": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/helper-plugin-utils/download/@babel/helper-plugin-utils-7.10.4.tgz", - "integrity": "sha1-L3WoMSadT2d95JmG3/WZJ1M883U=", - "dev": true - }, - "node_modules/@babel/helper-regex": { - "version": "7.10.5", - "resolved": "https://registry.npm.taobao.org/@babel/helper-regex/download/@babel/helper-regex-7.10.5.tgz?cache=0&sync_timestamp=1594750677873&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fhelper-regex%2Fdownload%2F%40babel%2Fhelper-regex-7.10.5.tgz", - "integrity": "sha1-Mt+7eYmQc8QVVXBToZvQVarlCuA=", - "dev": true, - "dependencies": { - "lodash": "^4.17.19" - } - }, - "node_modules/@babel/helper-remap-async-to-generator": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/helper-remap-async-to-generator/download/@babel/helper-remap-async-to-generator-7.12.1.tgz", - "integrity": "sha1-jE27+RYxT2BH3AXmoiFwdCODR/0=", - "dev": true, - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.10.4", - "@babel/helper-wrap-function": "^7.10.4", - "@babel/types": "^7.12.1" - } - }, - "node_modules/@babel/helper-replace-supers": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/helper-replace-supers/download/@babel/helper-replace-supers-7.12.1.tgz?cache=0&sync_timestamp=1602799937610&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fhelper-replace-supers%2Fdownload%2F%40babel%2Fhelper-replace-supers-7.12.1.tgz", - "integrity": "sha1-8VycyJdDkoGJHhHVzhJWKsDPP6k=", - "dev": true, - "dependencies": { - "@babel/helper-member-expression-to-functions": "^7.12.1", - "@babel/helper-optimise-call-expression": "^7.10.4", - "@babel/traverse": "^7.12.1", - "@babel/types": "^7.12.1" - } - }, - "node_modules/@babel/helper-simple-access": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/helper-simple-access/download/@babel/helper-simple-access-7.12.1.tgz?cache=0&sync_timestamp=1602799955395&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fhelper-simple-access%2Fdownload%2F%40babel%2Fhelper-simple-access-7.12.1.tgz", - "integrity": "sha1-MkJ+WqYVR9OOsebq9f0UJv2tkTY=", - "dev": true, - "dependencies": { - "@babel/types": "^7.12.1" - } - }, - "node_modules/@babel/helper-skip-transparent-expression-wrappers": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/helper-skip-transparent-expression-wrappers/download/@babel/helper-skip-transparent-expression-wrappers-7.12.1.tgz", - "integrity": "sha1-Ri3GOn5DWt6EaDhcY9K4TM5LPL8=", - "dev": true, - "dependencies": { - "@babel/types": "^7.12.1" - } - }, - "node_modules/@babel/helper-split-export-declaration": { - "version": "7.11.0", - "resolved": "https://registry.npm.taobao.org/@babel/helper-split-export-declaration/download/@babel/helper-split-export-declaration-7.11.0.tgz", - "integrity": "sha1-+KSRJErPamdhWKxCBykRuoOtCZ8=", - "dev": true, - "dependencies": { - "@babel/types": "^7.11.0" - } - }, - "node_modules/@babel/helper-validator-identifier": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/helper-validator-identifier/download/@babel/helper-validator-identifier-7.10.4.tgz", - "integrity": "sha1-p4x6clHgH2FlEtMbEK3PUq2l4NI=", - "dev": true - }, - "node_modules/@babel/helper-validator-option": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/helper-validator-option/download/@babel/helper-validator-option-7.12.1.tgz?cache=0&sync_timestamp=1602801773085&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fhelper-validator-option%2Fdownload%2F%40babel%2Fhelper-validator-option-7.12.1.tgz", - "integrity": "sha1-F1VnOAw+d9YP+YpUuwFf548heNk=", - "dev": true - }, - "node_modules/@babel/helper-wrap-function": { - "version": "7.12.3", - "resolved": "https://registry.npm.taobao.org/@babel/helper-wrap-function/download/@babel/helper-wrap-function-7.12.3.tgz?cache=0&sync_timestamp=1602881330831&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fhelper-wrap-function%2Fdownload%2F%40babel%2Fhelper-wrap-function-7.12.3.tgz", - "integrity": "sha1-MzIzn8TR+78cJ9eVjCfTRwjpkNk=", - "dev": true, - "dependencies": { - "@babel/helper-function-name": "^7.10.4", - "@babel/template": "^7.10.4", - "@babel/traverse": "^7.10.4", - "@babel/types": "^7.10.4" - } - }, - "node_modules/@babel/helpers": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/helpers/download/@babel/helpers-7.12.1.tgz?cache=0&sync_timestamp=1602799921702&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fhelpers%2Fdownload%2F%40babel%2Fhelpers-7.12.1.tgz", - "integrity": "sha1-ioJhwdQ47BjLiQQ0307HaHNMHnk=", - "dev": true, - "dependencies": { - "@babel/template": "^7.10.4", - "@babel/traverse": "^7.12.1", - "@babel/types": "^7.12.1" - } - }, - "node_modules/@babel/highlight": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/highlight/download/@babel/highlight-7.10.4.tgz", - "integrity": "sha1-fRvf1ldTU4+r5sOFls23bZrGAUM=", - "dev": true, - "dependencies": { - "@babel/helper-validator-identifier": "^7.10.4", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - } - }, - "node_modules/@babel/parser": { - "version": "7.12.3", - "resolved": "https://registry.npm.taobao.org/@babel/parser/download/@babel/parser-7.12.3.tgz?cache=0&sync_timestamp=1602881242014&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fparser%2Fdownload%2F%40babel%2Fparser-7.12.3.tgz", - "integrity": "sha1-owVBXr56bHAjtAtRIqBmLZKDNM0=", - "dev": true, - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/plugin-proposal-async-generator-functions": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-proposal-async-generator-functions/download/@babel/plugin-proposal-async-generator-functions-7.12.1.tgz?cache=0&sync_timestamp=1602799957225&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-proposal-async-generator-functions%2Fdownload%2F%40babel%2Fplugin-proposal-async-generator-functions-7.12.1.tgz", - "integrity": "sha1-3GwRcOJ9isqZ/2X0klvQaxyQVQ4=", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4", - "@babel/helper-remap-async-to-generator": "^7.12.1", - "@babel/plugin-syntax-async-generators": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-class-properties": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-proposal-class-properties/download/@babel/plugin-proposal-class-properties-7.12.1.tgz?cache=0&sync_timestamp=1602801742700&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-proposal-class-properties%2Fdownload%2F%40babel%2Fplugin-proposal-class-properties-7.12.1.tgz", - "integrity": "sha1-oIL/VB8qKaSCEGW4rdk0bAwW5d4=", - "dev": true, - "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.12.1", - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-decorators": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-proposal-decorators/download/@babel/plugin-proposal-decorators-7.12.1.tgz", - "integrity": "sha1-WScUOf7UFFRWxBBnRQVDruMy0V8=", - "dev": true, - "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.12.1", - "@babel/helper-plugin-utils": "^7.10.4", - "@babel/plugin-syntax-decorators": "^7.12.1" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-dynamic-import": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-proposal-dynamic-import/download/@babel/plugin-proposal-dynamic-import-7.12.1.tgz?cache=0&sync_timestamp=1602801779067&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-proposal-dynamic-import%2Fdownload%2F%40babel%2Fplugin-proposal-dynamic-import-7.12.1.tgz", - "integrity": "sha1-Q+tcKjSH7NmMXI6otf22midJstw=", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4", - "@babel/plugin-syntax-dynamic-import": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-export-namespace-from": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-proposal-export-namespace-from/download/@babel/plugin-proposal-export-namespace-from-7.12.1.tgz?cache=0&sync_timestamp=1602801775633&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-proposal-export-namespace-from%2Fdownload%2F%40babel%2Fplugin-proposal-export-namespace-from-7.12.1.tgz", - "integrity": "sha1-i5uPN2stiPXdd05NJKXMLjZ5ttQ=", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4", - "@babel/plugin-syntax-export-namespace-from": "^7.8.3" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-json-strings": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-proposal-json-strings/download/@babel/plugin-proposal-json-strings-7.12.1.tgz?cache=0&sync_timestamp=1602801778453&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-proposal-json-strings%2Fdownload%2F%40babel%2Fplugin-proposal-json-strings-7.12.1.tgz", - "integrity": "sha1-1FQjtRdxTu3VYhqd/cA/qfTrJBw=", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4", - "@babel/plugin-syntax-json-strings": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-logical-assignment-operators": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-proposal-logical-assignment-operators/download/@babel/plugin-proposal-logical-assignment-operators-7.12.1.tgz?cache=0&sync_timestamp=1602801777850&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-proposal-logical-assignment-operators%2Fdownload%2F%40babel%2Fplugin-proposal-logical-assignment-operators-7.12.1.tgz", - "integrity": "sha1-8sSQ024bPJZZJBA0pdLNUCY6J1E=", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4", - "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-nullish-coalescing-operator": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-proposal-nullish-coalescing-operator/download/@babel/plugin-proposal-nullish-coalescing-operator-7.12.1.tgz?cache=0&sync_timestamp=1602801777104&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-proposal-nullish-coalescing-operator%2Fdownload%2F%40babel%2Fplugin-proposal-nullish-coalescing-operator-7.12.1.tgz", - "integrity": "sha1-PtT/8xwBXn8/FGfxkNvlRc17BGw=", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-numeric-separator": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-proposal-numeric-separator/download/@babel/plugin-proposal-numeric-separator-7.12.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-proposal-numeric-separator%2Fdownload%2F%40babel%2Fplugin-proposal-numeric-separator-7.12.1.tgz", - "integrity": "sha1-DixndMTOSL5BIRm01pOsd392haY=", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4", - "@babel/plugin-syntax-numeric-separator": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-object-rest-spread": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-proposal-object-rest-spread/download/@babel/plugin-proposal-object-rest-spread-7.12.1.tgz?cache=0&sync_timestamp=1602799956368&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-proposal-object-rest-spread%2Fdownload%2F%40babel%2Fplugin-proposal-object-rest-spread-7.12.1.tgz", - "integrity": "sha1-3vm9A86g+bcig9rA7CLSicdpEGk=", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4", - "@babel/plugin-syntax-object-rest-spread": "^7.8.0", - "@babel/plugin-transform-parameters": "^7.12.1" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-optional-catch-binding": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-proposal-optional-catch-binding/download/@babel/plugin-proposal-optional-catch-binding-7.12.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-proposal-optional-catch-binding%2Fdownload%2F%40babel%2Fplugin-proposal-optional-catch-binding-7.12.1.tgz", - "integrity": "sha1-zMJCGvZNOq5QtVinHO3pKaWrKUI=", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-optional-chaining": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-proposal-optional-chaining/download/@babel/plugin-proposal-optional-chaining-7.12.1.tgz?cache=0&sync_timestamp=1602799957375&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-proposal-optional-chaining%2Fdownload%2F%40babel%2Fplugin-proposal-optional-chaining-7.12.1.tgz", - "integrity": "sha1-zOEiID/IoyeUKW/Dd8be2vQ2N5c=", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4", - "@babel/helper-skip-transparent-expression-wrappers": "^7.12.1", - "@babel/plugin-syntax-optional-chaining": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-private-methods": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-proposal-private-methods/download/@babel/plugin-proposal-private-methods-7.12.1.tgz?cache=0&sync_timestamp=1602801864793&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-proposal-private-methods%2Fdownload%2F%40babel%2Fplugin-proposal-private-methods-7.12.1.tgz", - "integrity": "sha1-hoFPbnohN0yYDBDTi0ST5wP0o4k=", - "dev": true, - "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.12.1", - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-unicode-property-regex": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-proposal-unicode-property-regex/download/@babel/plugin-proposal-unicode-property-regex-7.12.1.tgz?cache=0&sync_timestamp=1602799956486&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-proposal-unicode-property-regex%2Fdownload%2F%40babel%2Fplugin-proposal-unicode-property-regex-7.12.1.tgz", - "integrity": "sha1-Khg5WNQXdluerjNPR3WOXWqC4HI=", - "dev": true, - "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.12.1", - "@babel/helper-plugin-utils": "^7.10.4" - }, - "engines": { - "node": ">=4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-async-generators": { - "version": "7.8.4", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-syntax-async-generators/download/@babel/plugin-syntax-async-generators-7.8.4.tgz", - "integrity": "sha1-qYP7Gusuw/btBCohD2QOkOeG/g0=", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-class-properties": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-syntax-class-properties/download/@babel/plugin-syntax-class-properties-7.12.1.tgz?cache=0&sync_timestamp=1602801779713&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-syntax-class-properties%2Fdownload%2F%40babel%2Fplugin-syntax-class-properties-7.12.1.tgz", - "integrity": "sha1-vLKXxTZueb663vUJVJzZOwTxmXg=", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-decorators": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-syntax-decorators/download/@babel/plugin-syntax-decorators-7.12.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-syntax-decorators%2Fdownload%2F%40babel%2Fplugin-syntax-decorators-7.12.1.tgz", - "integrity": "sha1-gai1NbKER2xBvm3gaFOogCuYxd0=", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-dynamic-import": { - "version": "7.8.3", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-syntax-dynamic-import/download/@babel/plugin-syntax-dynamic-import-7.8.3.tgz", - "integrity": "sha1-Yr+Ysto80h1iYVT8lu5bPLaOrLM=", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-export-namespace-from": { - "version": "7.8.3", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-syntax-export-namespace-from/download/@babel/plugin-syntax-export-namespace-from-7.8.3.tgz", - "integrity": "sha1-AolkqbqA28CUyRXEh618TnpmRlo=", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.3" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-json-strings": { - "version": "7.8.3", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-syntax-json-strings/download/@babel/plugin-syntax-json-strings-7.8.3.tgz", - "integrity": "sha1-AcohtmjNghjJ5kDLbdiMVBKyyWo=", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-jsx": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-syntax-jsx/download/@babel/plugin-syntax-jsx-7.12.1.tgz?cache=0&sync_timestamp=1602799927826&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-syntax-jsx%2Fdownload%2F%40babel%2Fplugin-syntax-jsx-7.12.1.tgz", - "integrity": "sha1-nZ01fMgYqnrnk1kXwSV/Z2d6CSY=", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-logical-assignment-operators": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-syntax-logical-assignment-operators/download/@babel/plugin-syntax-logical-assignment-operators-7.10.4.tgz", - "integrity": "sha1-ypHvRjA1MESLkGZSusLp/plB9pk=", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { - "version": "7.8.3", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-syntax-nullish-coalescing-operator/download/@babel/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", - "integrity": "sha1-Fn7XA2iIYIH3S1w2xlqIwDtm0ak=", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-numeric-separator": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-syntax-numeric-separator/download/@babel/plugin-syntax-numeric-separator-7.10.4.tgz", - "integrity": "sha1-ubBws+M1cM2f0Hun+pHA3Te5r5c=", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-object-rest-spread": { - "version": "7.8.3", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-syntax-object-rest-spread/download/@babel/plugin-syntax-object-rest-spread-7.8.3.tgz", - "integrity": "sha1-YOIl7cvZimQDMqLnLdPmbxr1WHE=", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-optional-catch-binding": { - "version": "7.8.3", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-syntax-optional-catch-binding/download/@babel/plugin-syntax-optional-catch-binding-7.8.3.tgz", - "integrity": "sha1-YRGiZbz7Ag6579D9/X0mQCue1sE=", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-optional-chaining": { - "version": "7.8.3", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-syntax-optional-chaining/download/@babel/plugin-syntax-optional-chaining-7.8.3.tgz", - "integrity": "sha1-T2nCq5UWfgGAzVM2YT+MV4j31Io=", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-top-level-await": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-syntax-top-level-await/download/@babel/plugin-syntax-top-level-await-7.12.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-syntax-top-level-await%2Fdownload%2F%40babel%2Fplugin-syntax-top-level-await-7.12.1.tgz", - "integrity": "sha1-3WwLNXrBuxQtmFN0UKMZYl0T0qA=", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-arrow-functions": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-arrow-functions/download/@babel/plugin-transform-arrow-functions-7.12.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-arrow-functions%2Fdownload%2F%40babel%2Fplugin-transform-arrow-functions-7.12.1.tgz", - "integrity": "sha1-gIP/yGrI53f74ktZZ8SyUh88srM=", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-async-to-generator": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-async-to-generator/download/@babel/plugin-transform-async-to-generator-7.12.1.tgz?cache=0&sync_timestamp=1602799957601&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-async-to-generator%2Fdownload%2F%40babel%2Fplugin-transform-async-to-generator-7.12.1.tgz", - "integrity": "sha1-OEmknMKiLpdDy9a1KSbTAzcimvE=", - "dev": true, - "dependencies": { - "@babel/helper-module-imports": "^7.12.1", - "@babel/helper-plugin-utils": "^7.10.4", - "@babel/helper-remap-async-to-generator": "^7.12.1" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-block-scoped-functions": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-block-scoped-functions/download/@babel/plugin-transform-block-scoped-functions-7.12.1.tgz?cache=0&sync_timestamp=1602801921176&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-block-scoped-functions%2Fdownload%2F%40babel%2Fplugin-transform-block-scoped-functions-7.12.1.tgz", - "integrity": "sha1-8qGjZb3itxEuCm3tkGf918B5Bdk=", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-block-scoping": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-block-scoping/download/@babel/plugin-transform-block-scoping-7.12.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-block-scoping%2Fdownload%2F%40babel%2Fplugin-transform-block-scoping-7.12.1.tgz", - "integrity": "sha1-8O5yeHS0KiCKSKWGuEw9IiwrvvE=", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-classes": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-classes/download/@babel/plugin-transform-classes-7.12.1.tgz?cache=0&sync_timestamp=1602801866220&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-classes%2Fdownload%2F%40babel%2Fplugin-transform-classes-7.12.1.tgz", - "integrity": "sha1-ZeZQ/K3dPYjdzmfA+DSj1DajLbY=", - "dev": true, - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.10.4", - "@babel/helper-define-map": "^7.10.4", - "@babel/helper-function-name": "^7.10.4", - "@babel/helper-optimise-call-expression": "^7.10.4", - "@babel/helper-plugin-utils": "^7.10.4", - "@babel/helper-replace-supers": "^7.12.1", - "@babel/helper-split-export-declaration": "^7.10.4", - "globals": "^11.1.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-computed-properties": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-computed-properties/download/@babel/plugin-transform-computed-properties-7.12.1.tgz?cache=0&sync_timestamp=1602801922882&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-computed-properties%2Fdownload%2F%40babel%2Fplugin-transform-computed-properties-7.12.1.tgz", - "integrity": "sha1-1oz2ybf4OKikFEutvpdUHqCQSFI=", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-destructuring": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-destructuring/download/@babel/plugin-transform-destructuring-7.12.1.tgz?cache=0&sync_timestamp=1602801919435&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-destructuring%2Fdownload%2F%40babel%2Fplugin-transform-destructuring-7.12.1.tgz", - "integrity": "sha1-uaVw/g0KjUYBFkE8tPl+jgiy+Ec=", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-dotall-regex": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-dotall-regex/download/@babel/plugin-transform-dotall-regex-7.12.1.tgz?cache=0&sync_timestamp=1602799956601&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-dotall-regex%2Fdownload%2F%40babel%2Fplugin-transform-dotall-regex-7.12.1.tgz", - "integrity": "sha1-odFsFIYoF7ZAnApnjW+Tc8qc2XU=", - "dev": true, - "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.12.1", - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-duplicate-keys": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-duplicate-keys/download/@babel/plugin-transform-duplicate-keys-7.12.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-duplicate-keys%2Fdownload%2F%40babel%2Fplugin-transform-duplicate-keys-7.12.1.tgz", - "integrity": "sha1-dFZhuropWsBuaGgieXpp+6osoig=", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-exponentiation-operator": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-exponentiation-operator/download/@babel/plugin-transform-exponentiation-operator-7.12.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-exponentiation-operator%2Fdownload%2F%40babel%2Fplugin-transform-exponentiation-operator-7.12.1.tgz", - "integrity": "sha1-sPLtNWuhvhQo7K8Sj/iiTwKDCuA=", - "dev": true, - "dependencies": { - "@babel/helper-builder-binary-assignment-operator-visitor": "^7.10.4", - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-for-of": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-for-of/download/@babel/plugin-transform-for-of-7.12.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-for-of%2Fdownload%2F%40babel%2Fplugin-transform-for-of-7.12.1.tgz", - "integrity": "sha1-B2QPKIZ+0W+VEcmciIKR9WCSHPo=", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-function-name": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-function-name/download/@babel/plugin-transform-function-name-7.12.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-function-name%2Fdownload%2F%40babel%2Fplugin-transform-function-name-7.12.1.tgz", - "integrity": "sha1-LsdiWMcP4IxtfaFUADpIBiDrpmc=", - "dev": true, - "dependencies": { - "@babel/helper-function-name": "^7.10.4", - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-literals": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-literals/download/@babel/plugin-transform-literals-7.12.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-literals%2Fdownload%2F%40babel%2Fplugin-transform-literals-7.12.1.tgz", - "integrity": "sha1-1zuAOiazcBfd+dO7j03Fi/uAb1c=", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-member-expression-literals": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-member-expression-literals/download/@babel/plugin-transform-member-expression-literals-7.12.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-member-expression-literals%2Fdownload%2F%40babel%2Fplugin-transform-member-expression-literals-7.12.1.tgz", - "integrity": "sha1-SWA4YC2vFRSmTUPY4Xy7J1Xgw60=", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-modules-amd": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-modules-amd/download/@babel/plugin-transform-modules-amd-7.12.1.tgz?cache=0&sync_timestamp=1602801866519&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-modules-amd%2Fdownload%2F%40babel%2Fplugin-transform-modules-amd-7.12.1.tgz", - "integrity": "sha1-MVQwCwJhhWZu67DA7X+EFf789vk=", - "dev": true, - "dependencies": { - "@babel/helper-module-transforms": "^7.12.1", - "@babel/helper-plugin-utils": "^7.10.4", - "babel-plugin-dynamic-import-node": "^2.3.3" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-modules-commonjs": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-modules-commonjs/download/@babel/plugin-transform-modules-commonjs-7.12.1.tgz?cache=0&sync_timestamp=1602801780277&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-modules-commonjs%2Fdownload%2F%40babel%2Fplugin-transform-modules-commonjs-7.12.1.tgz", - "integrity": "sha1-+kAxJFQmNseGz5tGCg/7tIqG5kg=", - "dev": true, - "dependencies": { - "@babel/helper-module-transforms": "^7.12.1", - "@babel/helper-plugin-utils": "^7.10.4", - "@babel/helper-simple-access": "^7.12.1", - "babel-plugin-dynamic-import-node": "^2.3.3" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-modules-systemjs": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-modules-systemjs/download/@babel/plugin-transform-modules-systemjs-7.12.1.tgz?cache=0&sync_timestamp=1602799960092&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-modules-systemjs%2Fdownload%2F%40babel%2Fplugin-transform-modules-systemjs-7.12.1.tgz", - "integrity": "sha1-Zj/qYg1ZPJPyFKRkzTmb9txoMIY=", - "dev": true, - "dependencies": { - "@babel/helper-hoist-variables": "^7.10.4", - "@babel/helper-module-transforms": "^7.12.1", - "@babel/helper-plugin-utils": "^7.10.4", - "@babel/helper-validator-identifier": "^7.10.4", - "babel-plugin-dynamic-import-node": "^2.3.3" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-modules-umd": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-modules-umd/download/@babel/plugin-transform-modules-umd-7.12.1.tgz?cache=0&sync_timestamp=1602801867203&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-modules-umd%2Fdownload%2F%40babel%2Fplugin-transform-modules-umd-7.12.1.tgz", - "integrity": "sha1-61ohjWscaPPWIXuPosyC/sZUeQI=", - "dev": true, - "dependencies": { - "@babel/helper-module-transforms": "^7.12.1", - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-named-capturing-groups-regex": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-named-capturing-groups-regex/download/@babel/plugin-transform-named-capturing-groups-regex-7.12.1.tgz?cache=0&sync_timestamp=1602799956689&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-named-capturing-groups-regex%2Fdownload%2F%40babel%2Fplugin-transform-named-capturing-groups-regex-7.12.1.tgz", - "integrity": "sha1-tAf1yWvg2fX4hGdJf6grMKw+h1M=", - "dev": true, - "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.12.1" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/plugin-transform-new-target": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-new-target/download/@babel/plugin-transform-new-target-7.12.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-new-target%2Fdownload%2F%40babel%2Fplugin-transform-new-target-7.12.1.tgz", - "integrity": "sha1-gAc/Au4bstNlw0FkkOCFyVdZ3sA=", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-object-super": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-object-super/download/@babel/plugin-transform-object-super-7.12.1.tgz?cache=0&sync_timestamp=1602799958437&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-object-super%2Fdownload%2F%40babel%2Fplugin-transform-object-super-7.12.1.tgz", - "integrity": "sha1-TqCGlrjS5lhB0MdwZIKwSL7RBm4=", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4", - "@babel/helper-replace-supers": "^7.12.1" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-parameters": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-parameters/download/@babel/plugin-transform-parameters-7.12.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-parameters%2Fdownload%2F%40babel%2Fplugin-transform-parameters-7.12.1.tgz", - "integrity": "sha1-0uljsDh3FlDJIu/1k3mclthTJV0=", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-property-literals": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-property-literals/download/@babel/plugin-transform-property-literals-7.12.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-property-literals%2Fdownload%2F%40babel%2Fplugin-transform-property-literals-7.12.1.tgz", - "integrity": "sha1-QbyBIA1zCrtEVquLP71VN7Wa3s0=", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-regenerator": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-regenerator/download/@babel/plugin-transform-regenerator-7.12.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-regenerator%2Fdownload%2F%40babel%2Fplugin-transform-regenerator-7.12.1.tgz", - "integrity": "sha1-Xwoo2EL2RiKB8GqWToi6jXq0l1M=", - "dev": true, - "dependencies": { - "regenerator-transform": "^0.14.2" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-reserved-words": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-reserved-words/download/@babel/plugin-transform-reserved-words-7.12.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-reserved-words%2Fdownload%2F%40babel%2Fplugin-transform-reserved-words-7.12.1.tgz", - "integrity": "sha1-b9/IzH7cxCs2p8EhiMZ4fIc63Ng=", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-runtime": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-runtime/download/@babel/plugin-transform-runtime-7.12.1.tgz", - "integrity": "sha1-BLeSBX60YDif9qQZjjd2FOoee6U=", - "dev": true, - "dependencies": { - "@babel/helper-module-imports": "^7.12.1", - "@babel/helper-plugin-utils": "^7.10.4", - "resolve": "^1.8.1", - "semver": "^5.5.1" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-shorthand-properties": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-shorthand-properties/download/@babel/plugin-transform-shorthand-properties-7.12.1.tgz?cache=0&sync_timestamp=1602799951645&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-shorthand-properties%2Fdownload%2F%40babel%2Fplugin-transform-shorthand-properties-7.12.1.tgz", - "integrity": "sha1-C/nKxVUPzgz98ENCD2YdZF/cdeM=", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-spread": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-spread/download/@babel/plugin-transform-spread-7.12.1.tgz?cache=0&sync_timestamp=1602799957708&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-spread%2Fdownload%2F%40babel%2Fplugin-transform-spread-7.12.1.tgz", - "integrity": "sha1-Un+fMRvk7H/cK3m7ife/iEs+Hh4=", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4", - "@babel/helper-skip-transparent-expression-wrappers": "^7.12.1" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-sticky-regex": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-sticky-regex/download/@babel/plugin-transform-sticky-regex-7.12.1.tgz?cache=0&sync_timestamp=1602799951745&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-sticky-regex%2Fdownload%2F%40babel%2Fplugin-transform-sticky-regex-7.12.1.tgz", - "integrity": "sha1-XCTPUN45bTDpmvyNHHAOi84PXK8=", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4", - "@babel/helper-regex": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-template-literals": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-template-literals/download/@babel/plugin-transform-template-literals-7.12.1.tgz?cache=0&sync_timestamp=1602799951964&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-template-literals%2Fdownload%2F%40babel%2Fplugin-transform-template-literals-7.12.1.tgz", - "integrity": "sha1-tD7ObtmnnAxxEZ9XbSme8J2UKEM=", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-typeof-symbol": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-typeof-symbol/download/@babel/plugin-transform-typeof-symbol-7.12.1.tgz?cache=0&sync_timestamp=1602799953235&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-typeof-symbol%2Fdownload%2F%40babel%2Fplugin-transform-typeof-symbol-7.12.1.tgz", - "integrity": "sha1-nKa+ND1CUS+8LmgjaoKuZLx694o=", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-unicode-escapes": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-unicode-escapes/download/@babel/plugin-transform-unicode-escapes-7.12.1.tgz?cache=0&sync_timestamp=1602799952036&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-unicode-escapes%2Fdownload%2F%40babel%2Fplugin-transform-unicode-escapes-7.12.1.tgz", - "integrity": "sha1-UjK5+BzLBwcLfDw2xnobePGEVwk=", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-unicode-regex": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-unicode-regex/download/@babel/plugin-transform-unicode-regex-7.12.1.tgz?cache=0&sync_timestamp=1602799957036&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-unicode-regex%2Fdownload%2F%40babel%2Fplugin-transform-unicode-regex-7.12.1.tgz", - "integrity": "sha1-zJZh9hOQ21xl4/66zO/Vxqw/rss=", - "dev": true, - "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.12.1", - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/preset-env": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/preset-env/download/@babel/preset-env-7.12.1.tgz?cache=0&sync_timestamp=1602801753046&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fpreset-env%2Fdownload%2F%40babel%2Fpreset-env-7.12.1.tgz", - "integrity": "sha1-nH5cqCoZ78hlOEu0mJFI0u5desI=", - "dev": true, - "dependencies": { - "@babel/compat-data": "^7.12.1", - "@babel/helper-compilation-targets": "^7.12.1", - "@babel/helper-module-imports": "^7.12.1", - "@babel/helper-plugin-utils": "^7.10.4", - "@babel/helper-validator-option": "^7.12.1", - "@babel/plugin-proposal-async-generator-functions": "^7.12.1", - "@babel/plugin-proposal-class-properties": "^7.12.1", - "@babel/plugin-proposal-dynamic-import": "^7.12.1", - "@babel/plugin-proposal-export-namespace-from": "^7.12.1", - "@babel/plugin-proposal-json-strings": "^7.12.1", - "@babel/plugin-proposal-logical-assignment-operators": "^7.12.1", - "@babel/plugin-proposal-nullish-coalescing-operator": "^7.12.1", - "@babel/plugin-proposal-numeric-separator": "^7.12.1", - "@babel/plugin-proposal-object-rest-spread": "^7.12.1", - "@babel/plugin-proposal-optional-catch-binding": "^7.12.1", - "@babel/plugin-proposal-optional-chaining": "^7.12.1", - "@babel/plugin-proposal-private-methods": "^7.12.1", - "@babel/plugin-proposal-unicode-property-regex": "^7.12.1", - "@babel/plugin-syntax-async-generators": "^7.8.0", - "@babel/plugin-syntax-class-properties": "^7.12.1", - "@babel/plugin-syntax-dynamic-import": "^7.8.0", - "@babel/plugin-syntax-export-namespace-from": "^7.8.3", - "@babel/plugin-syntax-json-strings": "^7.8.0", - "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0", - "@babel/plugin-syntax-numeric-separator": "^7.10.4", - "@babel/plugin-syntax-object-rest-spread": "^7.8.0", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.0", - "@babel/plugin-syntax-optional-chaining": "^7.8.0", - "@babel/plugin-syntax-top-level-await": "^7.12.1", - "@babel/plugin-transform-arrow-functions": "^7.12.1", - "@babel/plugin-transform-async-to-generator": "^7.12.1", - "@babel/plugin-transform-block-scoped-functions": "^7.12.1", - "@babel/plugin-transform-block-scoping": "^7.12.1", - "@babel/plugin-transform-classes": "^7.12.1", - "@babel/plugin-transform-computed-properties": "^7.12.1", - "@babel/plugin-transform-destructuring": "^7.12.1", - "@babel/plugin-transform-dotall-regex": "^7.12.1", - "@babel/plugin-transform-duplicate-keys": "^7.12.1", - "@babel/plugin-transform-exponentiation-operator": "^7.12.1", - "@babel/plugin-transform-for-of": "^7.12.1", - "@babel/plugin-transform-function-name": "^7.12.1", - "@babel/plugin-transform-literals": "^7.12.1", - "@babel/plugin-transform-member-expression-literals": "^7.12.1", - "@babel/plugin-transform-modules-amd": "^7.12.1", - "@babel/plugin-transform-modules-commonjs": "^7.12.1", - "@babel/plugin-transform-modules-systemjs": "^7.12.1", - "@babel/plugin-transform-modules-umd": "^7.12.1", - "@babel/plugin-transform-named-capturing-groups-regex": "^7.12.1", - "@babel/plugin-transform-new-target": "^7.12.1", - "@babel/plugin-transform-object-super": "^7.12.1", - "@babel/plugin-transform-parameters": "^7.12.1", - "@babel/plugin-transform-property-literals": "^7.12.1", - "@babel/plugin-transform-regenerator": "^7.12.1", - "@babel/plugin-transform-reserved-words": "^7.12.1", - "@babel/plugin-transform-shorthand-properties": "^7.12.1", - "@babel/plugin-transform-spread": "^7.12.1", - "@babel/plugin-transform-sticky-regex": "^7.12.1", - "@babel/plugin-transform-template-literals": "^7.12.1", - "@babel/plugin-transform-typeof-symbol": "^7.12.1", - "@babel/plugin-transform-unicode-escapes": "^7.12.1", - "@babel/plugin-transform-unicode-regex": "^7.12.1", - "@babel/preset-modules": "^0.1.3", - "@babel/types": "^7.12.1", - "core-js-compat": "^3.6.2", - "semver": "^5.5.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/preset-modules": { - "version": "0.1.4", - "resolved": "https://registry.npm.taobao.org/@babel/preset-modules/download/@babel/preset-modules-0.1.4.tgz?cache=0&sync_timestamp=1598549925898&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fpreset-modules%2Fdownload%2F%40babel%2Fpreset-modules-0.1.4.tgz", - "integrity": "sha1-Ni8raMZihClw/bXiVP/I/BwuQV4=", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-proposal-unicode-property-regex": "^7.4.4", - "@babel/plugin-transform-dotall-regex": "^7.4.4", - "@babel/types": "^7.4.4", - "esutils": "^2.0.2" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/runtime": { - "version": "7.18.3", - "resolved": "https://registry.npmmirror.com/@babel/runtime/-/runtime-7.18.3.tgz", - "integrity": "sha512-38Y8f7YUhce/K7RMwTp7m0uCumpv9hZkitCbBClqQIow1qSbCvGkcegKOXpEWCQLfWmevgRiWokZ1GkpfhbZug==", - "dependencies": { - "regenerator-runtime": "^0.13.4" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/template": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/template/download/@babel/template-7.10.4.tgz", - "integrity": "sha1-MlGZbEIA68cdGo/EBfupQPNrong=", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.10.4", - "@babel/parser": "^7.10.4", - "@babel/types": "^7.10.4" - } - }, - "node_modules/@babel/traverse": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/traverse/download/@babel/traverse-7.12.1.tgz?cache=0&sync_timestamp=1602801751997&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Ftraverse%2Fdownload%2F%40babel%2Ftraverse-7.12.1.tgz", - "integrity": "sha1-lBOV4MXMhtXT51yqCV05JFJvDB4=", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.10.4", - "@babel/generator": "^7.12.1", - "@babel/helper-function-name": "^7.10.4", - "@babel/helper-split-export-declaration": "^7.11.0", - "@babel/parser": "^7.12.1", - "@babel/types": "^7.12.1", - "debug": "^4.1.0", - "globals": "^11.1.0", - "lodash": "^4.17.19" - } - }, - "node_modules/@babel/types": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/types/download/@babel/types-7.12.1.tgz?cache=0&sync_timestamp=1602799916513&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Ftypes%2Fdownload%2F%40babel%2Ftypes-7.12.1.tgz", - "integrity": "sha1-4QnZq5mo3nNb4ofuPWqZR6GQxK4=", - "dev": true, - "dependencies": { - "@babel/helper-validator-identifier": "^7.10.4", - "lodash": "^4.17.19", - "to-fast-properties": "^2.0.0" - } - }, - "node_modules/@hapi/address": { - "version": "2.1.4", - "resolved": "https://registry.npm.taobao.org/@hapi/address/download/@hapi/address-2.1.4.tgz?cache=0&sync_timestamp=1603524710662&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40hapi%2Faddress%2Fdownload%2F%40hapi%2Faddress-2.1.4.tgz", - "integrity": "sha1-XWftQ/P9QaadS5/3tW58DR0KgeU=", - "deprecated": "Moved to 'npm install @sideway/address'", - "dev": true - }, - "node_modules/@hapi/bourne": { - "version": "1.3.2", - "resolved": "https://registry.npm.taobao.org/@hapi/bourne/download/@hapi/bourne-1.3.2.tgz", - "integrity": "sha1-CnCVreoGckPOMoPhtWuKj0U7JCo=", - "deprecated": "This version has been deprecated and is no longer supported or maintained", - "dev": true - }, - "node_modules/@hapi/hoek": { - "version": "8.5.1", - "resolved": "https://registry.npm.taobao.org/@hapi/hoek/download/@hapi/hoek-8.5.1.tgz?cache=0&sync_timestamp=1599008894201&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40hapi%2Fhoek%2Fdownload%2F%40hapi%2Fhoek-8.5.1.tgz", - "integrity": "sha1-/elgZMpEbeyMVajC8TCVewcMbgY=", - "deprecated": "This version has been deprecated and is no longer supported or maintained", - "dev": true - }, - "node_modules/@hapi/joi": { - "version": "15.1.1", - "resolved": "https://registry.npm.taobao.org/@hapi/joi/download/@hapi/joi-15.1.1.tgz?cache=0&sync_timestamp=1603524515155&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40hapi%2Fjoi%2Fdownload%2F%40hapi%2Fjoi-15.1.1.tgz", - "integrity": "sha1-xnW4pxKW8Cgz+NbSQ7NMV7jOGdc=", - "deprecated": "Switch to 'npm install joi'", - "dev": true, - "dependencies": { - "@hapi/address": "2.x.x", - "@hapi/bourne": "1.x.x", - "@hapi/hoek": "8.x.x", - "@hapi/topo": "3.x.x" - } - }, - "node_modules/@hapi/topo": { - "version": "3.1.6", - "resolved": "https://registry.npm.taobao.org/@hapi/topo/download/@hapi/topo-3.1.6.tgz", - "integrity": "sha1-aNk1+j6uf91asNf5U/MgXYsr/Ck=", - "deprecated": "This version has been deprecated and is no longer supported or maintained", - "dev": true, - "dependencies": { - "@hapi/hoek": "^8.3.0" - } - }, - "node_modules/@iktakahiro/markdown-it-katex": { - "version": "4.0.1", - "resolved": "https://registry.npm.taobao.org/@iktakahiro/markdown-it-katex/download/@iktakahiro/markdown-it-katex-4.0.1.tgz", - "integrity": "sha1-Zf+dEq/UwLdoTdJHq+fOQvwe2sM=", - "dependencies": { - "katex": "^0.12.0" - } - }, - "node_modules/@intervolga/optimize-cssnano-plugin": { - "version": "1.0.6", - "resolved": "https://registry.npm.taobao.org/@intervolga/optimize-cssnano-plugin/download/@intervolga/optimize-cssnano-plugin-1.0.6.tgz", - "integrity": "sha1-vnx4RhKLiPapsdEmGgrQbrXA/fg=", - "dev": true, - "dependencies": { - "cssnano": "^4.0.0", - "cssnano-preset-default": "^4.0.0", - "postcss": "^7.0.0" - }, - "peerDependencies": { - "webpack": "^4.0.0" - } - }, - "node_modules/@mrmlnc/readdir-enhanced": { - "version": "2.2.1", - "resolved": "https://registry.npm.taobao.org/@mrmlnc/readdir-enhanced/download/@mrmlnc/readdir-enhanced-2.2.1.tgz", - "integrity": "sha1-UkryQNGjYFJ7cwR17PoTRKpUDd4=", - "dev": true, - "dependencies": { - "call-me-maybe": "^1.0.1", - "glob-to-regexp": "^0.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@nodelib/fs.stat": { - "version": "1.1.3", - "resolved": "https://registry.npm.taobao.org/@nodelib/fs.stat/download/@nodelib/fs.stat-1.1.3.tgz", - "integrity": "sha1-K1o6s/kYzKSKjHVMCBaOPwPrphs=", - "dev": true, - "engines": { - "node": ">= 6" - } - }, - "node_modules/@npmcli/move-file": { - "version": "1.1.2", - "resolved": "https://registry.npm.taobao.org/@npmcli/move-file/download/@npmcli/move-file-1.1.2.tgz?cache=0&sync_timestamp=1613068732526&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40npmcli%2Fmove-file%2Fdownload%2F%40npmcli%2Fmove-file-1.1.2.tgz", - "integrity": "sha1-GoLD43L3yuklPrZtclQ9a4aFxnQ=", - "dependencies": { - "mkdirp": "^1.0.4", - "rimraf": "^3.0.2" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@npmcli/move-file/node_modules/mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npm.taobao.org/mkdirp/download/mkdirp-1.0.4.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmkdirp%2Fdownload%2Fmkdirp-1.0.4.tgz", - "integrity": "sha1-PrXtYmInVteaXw4qIh3+utdcL34=", - "bin": { - "mkdirp": "bin/cmd.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@npmcli/move-file/node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npm.taobao.org/rimraf/download/rimraf-3.0.2.tgz?cache=0&sync_timestamp=1599054104695&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Frimraf%2Fdownload%2Frimraf-3.0.2.tgz", - "integrity": "sha1-8aVAK6YiCtUswSgrrBrjqkn9Bho=", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@polka/url": { - "version": "1.0.0-next.12", - "resolved": "https://registry.npm.taobao.org/@polka/url/download/@polka/url-1.0.0-next.12.tgz", - "integrity": "sha1-Qx7DQqcZViL4Zoi72oLjFmzoyyg=", - "dev": true - }, - "node_modules/@soda/friendly-errors-webpack-plugin": { - "version": "1.7.1", - "resolved": "https://registry.npm.taobao.org/@soda/friendly-errors-webpack-plugin/download/@soda/friendly-errors-webpack-plugin-1.7.1.tgz", - "integrity": "sha1-cG9kvLSouWQrSK46zkRMcDNNYV0=", - "dev": true, - "dependencies": { - "chalk": "^1.1.3", - "error-stack-parser": "^2.0.0", - "string-width": "^2.0.0" - }, - "peerDependencies": { - "webpack": "^2.0.0 || ^3.0.0 || ^4.0.0" - } - }, - "node_modules/@soda/friendly-errors-webpack-plugin/node_modules/ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npm.taobao.org/ansi-regex/download/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/@soda/friendly-errors-webpack-plugin/node_modules/ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npm.taobao.org/ansi-styles/download/ansi-styles-2.2.1.tgz?cache=0&sync_timestamp=1601839122515&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fansi-styles%2Fdownload%2Fansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/@soda/friendly-errors-webpack-plugin/node_modules/chalk": { - "version": "1.1.3", - "resolved": "https://registry.npm.taobao.org/chalk/download/chalk-1.1.3.tgz?cache=0&sync_timestamp=1591687070184&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fchalk%2Fdownload%2Fchalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "dependencies": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/@soda/friendly-errors-webpack-plugin/node_modules/strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npm.taobao.org/strip-ansi/download/strip-ansi-3.0.1.tgz?cache=0&sync_timestamp=1573280518303&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstrip-ansi%2Fdownload%2Fstrip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, - "dependencies": { - "ansi-regex": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/@soda/friendly-errors-webpack-plugin/node_modules/supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-2.0.0.tgz?cache=0&sync_timestamp=1598611709087&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsupports-color%2Fdownload%2Fsupports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/@soda/get-current-script": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/@soda/get-current-script/download/@soda/get-current-script-1.0.2.tgz", - "integrity": "sha1-pTUV2yXYA4N0OBtzryC7Ty5QjYc=", - "dev": true - }, - "node_modules/@types/anymatch": { - "version": "1.3.1", - "resolved": "https://registry.npm.taobao.org/@types/anymatch/download/@types/anymatch-1.3.1.tgz", - "integrity": "sha1-M2utwb7sudrMOL6izzKt9ieoQho=", - "dev": true - }, - "node_modules/@types/body-parser": { - "version": "1.19.0", - "resolved": "https://registry.npm.taobao.org/@types/body-parser/download/@types/body-parser-1.19.0.tgz", - "integrity": "sha1-BoWzxH6zAG/+0RfN1VFkth+AU48=", - "dev": true, - "dependencies": { - "@types/connect": "*", - "@types/node": "*" - } - }, - "node_modules/@types/connect": { - "version": "3.4.33", - "resolved": "https://registry.npm.taobao.org/@types/connect/download/@types/connect-3.4.33.tgz?cache=0&sync_timestamp=1596837850490&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fconnect%2Fdownload%2F%40types%2Fconnect-3.4.33.tgz", - "integrity": "sha1-MWEMkB7KVzuHE8MzCrxua59YhUY=", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/connect-history-api-fallback": { - "version": "1.3.3", - "resolved": "https://registry.npm.taobao.org/@types/connect-history-api-fallback/download/@types/connect-history-api-fallback-1.3.3.tgz", - "integrity": "sha1-R3K3m4tTGF8PTJ3qsJI2uvdu47Q=", - "dev": true, - "dependencies": { - "@types/express-serve-static-core": "*", - "@types/node": "*" - } - }, - "node_modules/@types/express": { - "version": "4.17.8", - "resolved": "https://registry.npm.taobao.org/@types/express/download/@types/express-4.17.8.tgz?cache=0&sync_timestamp=1598966318122&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fexpress%2Fdownload%2F%40types%2Fexpress-4.17.8.tgz", - "integrity": "sha1-PfQpMpMxfmHGATfSc6LpbNjV8no=", - "dev": true, - "dependencies": { - "@types/body-parser": "*", - "@types/express-serve-static-core": "*", - "@types/qs": "*", - "@types/serve-static": "*" - } - }, - "node_modules/@types/express-serve-static-core": { - "version": "4.17.13", - "resolved": "https://registry.npm.taobao.org/@types/express-serve-static-core/download/@types/express-serve-static-core-4.17.13.tgz?cache=0&sync_timestamp=1600734282121&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fexpress-serve-static-core%2Fdownload%2F%40types%2Fexpress-serve-static-core-4.17.13.tgz", - "integrity": "sha1-2a8CXpJfyLCJvjdCO40erHgb4IQ=", - "dev": true, - "dependencies": { - "@types/node": "*", - "@types/qs": "*", - "@types/range-parser": "*" - } - }, - "node_modules/@types/glob": { - "version": "7.1.3", - "resolved": "https://registry.npm.taobao.org/@types/glob/download/@types/glob-7.1.3.tgz?cache=0&sync_timestamp=1596838206290&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fglob%2Fdownload%2F%40types%2Fglob-7.1.3.tgz", - "integrity": "sha1-5rqA82t9qtLGhazZJmOC5omFwYM=", - "dev": true, - "dependencies": { - "@types/minimatch": "*", - "@types/node": "*" - } - }, - "node_modules/@types/highlight.js": { - "version": "10.1.0", - "resolved": "https://registry.npm.taobao.org/@types/highlight.js/download/@types/highlight.js-10.1.0.tgz", - "integrity": "sha1-ibsMICmX16kKB70uwffQDFa7kLQ=", - "deprecated": "This is a stub types definition. highlight.js provides its own type definitions, so you do not need this installed.", - "dev": true, - "dependencies": { - "highlight.js": "*" - } - }, - "node_modules/@types/http-proxy": { - "version": "1.17.4", - "resolved": "https://registry.npm.taobao.org/@types/http-proxy/download/@types/http-proxy-1.17.4.tgz?cache=0&sync_timestamp=1596839386031&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fhttp-proxy%2Fdownload%2F%40types%2Fhttp-proxy-1.17.4.tgz", - "integrity": "sha1-58kuPb4+E6p5lED/QubToXqdBFs=", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/http-proxy-middleware": { - "version": "0.19.3", - "resolved": "https://registry.npm.taobao.org/@types/http-proxy-middleware/download/@types/http-proxy-middleware-0.19.3.tgz?cache=0&sync_timestamp=1596839386511&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fhttp-proxy-middleware%2Fdownload%2F%40types%2Fhttp-proxy-middleware-0.19.3.tgz", - "integrity": "sha1-suuW+8D5rHJQtdnExTqt4ElJfQM=", - "dev": true, - "dependencies": { - "@types/connect": "*", - "@types/http-proxy": "*", - "@types/node": "*" - } - }, - "node_modules/@types/json-schema": { - "version": "7.0.6", - "resolved": "https://registry.npm.taobao.org/@types/json-schema/download/@types/json-schema-7.0.6.tgz?cache=0&sync_timestamp=1598910403749&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fjson-schema%2Fdownload%2F%40types%2Fjson-schema-7.0.6.tgz", - "integrity": "sha1-9MfsQ+gbMZqYFRFQMXCfJph4kfA=" - }, - "node_modules/@types/mime": { - "version": "2.0.3", - "resolved": "https://registry.npm.taobao.org/@types/mime/download/@types/mime-2.0.3.tgz", - "integrity": "sha1-yJO3NyHbc2mZQ7/DZTsd63+qSjo=", - "dev": true - }, - "node_modules/@types/minimatch": { - "version": "3.0.3", - "resolved": "https://registry.npm.taobao.org/@types/minimatch/download/@types/minimatch-3.0.3.tgz?cache=0&sync_timestamp=1596839141589&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fminimatch%2Fdownload%2F%40types%2Fminimatch-3.0.3.tgz", - "integrity": "sha1-PcoOPzOyAPx9ETnAzZbBJoyt/Z0=", - "dev": true - }, - "node_modules/@types/minimist": { - "version": "1.2.0", - "resolved": "https://registry.npm.taobao.org/@types/minimist/download/@types/minimist-1.2.0.tgz", - "integrity": "sha1-aaI6OtKcrwCX8G7aWbNh7i8GOfY=", - "dev": true - }, - "node_modules/@types/node": { - "version": "14.14.6", - "resolved": "https://registry.npm.taobao.org/@types/node/download/@types/node-14.14.6.tgz?cache=0&sync_timestamp=1603910973093&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fnode%2Fdownload%2F%40types%2Fnode-14.14.6.tgz", - "integrity": "sha1-FG09pXs8Y2zA0XaTls4c+omRFH8=", - "dev": true - }, - "node_modules/@types/normalize-package-data": { - "version": "2.4.0", - "resolved": "https://registry.npm.taobao.org/@types/normalize-package-data/download/@types/normalize-package-data-2.4.0.tgz?cache=0&sync_timestamp=1596839391651&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fnormalize-package-data%2Fdownload%2F%40types%2Fnormalize-package-data-2.4.0.tgz", - "integrity": "sha1-5IbQ2XOW15vu3QpuM/RTT/a0lz4=", - "dev": true - }, - "node_modules/@types/q": { - "version": "1.5.4", - "resolved": "https://registry.npm.taobao.org/@types/q/download/@types/q-1.5.4.tgz", - "integrity": "sha1-FZJUFOCtLNdlv+9YhC9+JqesyyQ=", - "dev": true - }, - "node_modules/@types/qs": { - "version": "6.9.5", - "resolved": "https://registry.npm.taobao.org/@types/qs/download/@types/qs-6.9.5.tgz?cache=0&sync_timestamp=1600295893721&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fqs%2Fdownload%2F%40types%2Fqs-6.9.5.tgz", - "integrity": "sha1-Q0cRvdSete5p2QwdZ8NUqajssYs=", - "dev": true - }, - "node_modules/@types/range-parser": { - "version": "1.2.3", - "resolved": "https://registry.npm.taobao.org/@types/range-parser/download/@types/range-parser-1.2.3.tgz", - "integrity": "sha1-fuMwunyq+5gJC+zoal7kQRWQTCw=", - "dev": true - }, - "node_modules/@types/serve-static": { - "version": "1.13.6", - "resolved": "https://registry.npm.taobao.org/@types/serve-static/download/@types/serve-static-1.13.6.tgz?cache=0&sync_timestamp=1603136972762&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fserve-static%2Fdownload%2F%40types%2Fserve-static-1.13.6.tgz", - "integrity": "sha1-hmsbjexBw24ox75ArHJbiL5DxcE=", - "dev": true, - "dependencies": { - "@types/mime": "*", - "@types/node": "*" - } - }, - "node_modules/@types/source-list-map": { - "version": "0.1.2", - "resolved": "https://registry.npm.taobao.org/@types/source-list-map/download/@types/source-list-map-0.1.2.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fsource-list-map%2Fdownload%2F%40types%2Fsource-list-map-0.1.2.tgz", - "integrity": "sha1-AHiDYGP/rxdBI0m7o2QIfgrALsk=", - "dev": true - }, - "node_modules/@types/tapable": { - "version": "1.0.6", - "resolved": "https://registry.npm.taobao.org/@types/tapable/download/@types/tapable-1.0.6.tgz", - "integrity": "sha1-qcpLcKGLJwzLK8Cqr+/R1Ia36nQ=", - "dev": true - }, - "node_modules/@types/uglify-js": { - "version": "3.11.1", - "resolved": "https://registry.npm.taobao.org/@types/uglify-js/download/@types/uglify-js-3.11.1.tgz?cache=0&sync_timestamp=1603833602967&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fuglify-js%2Fdownload%2F%40types%2Fuglify-js-3.11.1.tgz", - "integrity": "sha1-l/8w5hoKpodsJwtfU4c34tarjOs=", - "dev": true, - "dependencies": { - "source-map": "^0.6.1" - } - }, - "node_modules/@types/uglify-js/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz?cache=0&sync_timestamp=1571657176668&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsource-map%2Fdownload%2Fsource-map-0.6.1.tgz", - "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/@types/webpack": { - "version": "4.41.24", - "resolved": "https://registry.npm.taobao.org/@types/webpack/download/@types/webpack-4.41.24.tgz?cache=0&sync_timestamp=1603911290982&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fwebpack%2Fdownload%2F%40types%2Fwebpack-4.41.24.tgz", - "integrity": "sha1-dbZkq+PVvP5U5kMTyjtD5JhVBCI=", - "dev": true, - "dependencies": { - "@types/anymatch": "*", - "@types/node": "*", - "@types/tapable": "*", - "@types/uglify-js": "*", - "@types/webpack-sources": "*", - "source-map": "^0.6.0" - } - }, - "node_modules/@types/webpack-dev-server": { - "version": "3.11.1", - "resolved": "https://registry.npm.taobao.org/@types/webpack-dev-server/download/@types/webpack-dev-server-3.11.1.tgz?cache=0&sync_timestamp=1604039710913&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fwebpack-dev-server%2Fdownload%2F%40types%2Fwebpack-dev-server-3.11.1.tgz", - "integrity": "sha1-+PTawdoibVML0VodXcNLI7p2bMs=", - "dev": true, - "dependencies": { - "@types/connect-history-api-fallback": "*", - "@types/express": "*", - "@types/http-proxy-middleware": "*", - "@types/serve-static": "*", - "@types/webpack": "*" - } - }, - "node_modules/@types/webpack-sources": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/@types/webpack-sources/download/@types/webpack-sources-2.0.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fwebpack-sources%2Fdownload%2F%40types%2Fwebpack-sources-2.0.0.tgz", - "integrity": "sha1-CCFqub4r4uFJm+rrxNRpzsgegqc=", - "dev": true, - "dependencies": { - "@types/node": "*", - "@types/source-list-map": "*", - "source-map": "^0.7.3" - } - }, - "node_modules/@types/webpack-sources/node_modules/source-map": { - "version": "0.7.3", - "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.7.3.tgz?cache=0&sync_timestamp=1571657176668&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsource-map%2Fdownload%2Fsource-map-0.7.3.tgz", - "integrity": "sha1-UwL4FpAxc1ImVECS5kmB91F1A4M=", - "dev": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@types/webpack/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz?cache=0&sync_timestamp=1571657176668&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsource-map%2Fdownload%2Fsource-map-0.6.1.tgz", - "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/@vue/babel-helper-vue-jsx-merge-props": { - "version": "1.2.1", - "resolved": "https://registry.npm.taobao.org/@vue/babel-helper-vue-jsx-merge-props/download/@vue/babel-helper-vue-jsx-merge-props-1.2.1.tgz?cache=0&sync_timestamp=1602851122331&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40vue%2Fbabel-helper-vue-jsx-merge-props%2Fdownload%2F%40vue%2Fbabel-helper-vue-jsx-merge-props-1.2.1.tgz", - "integrity": "sha1-MWJKelBfsU2h1YAjclpMXycOaoE=", - "dev": true - }, - "node_modules/@vue/babel-helper-vue-transform-on": { - "version": "1.0.0-rc.2", - "resolved": "https://registry.npm.taobao.org/@vue/babel-helper-vue-transform-on/download/@vue/babel-helper-vue-transform-on-1.0.0-rc.2.tgz", - "integrity": "sha1-ckY0H2ZufG5lsT2kIOLOhXFPu8o=", - "dev": true - }, - "node_modules/@vue/babel-plugin-jsx": { - "version": "1.0.0-rc.3", - "resolved": "https://registry.npm.taobao.org/@vue/babel-plugin-jsx/download/@vue/babel-plugin-jsx-1.0.0-rc.3.tgz?cache=0&sync_timestamp=1600074484657&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40vue%2Fbabel-plugin-jsx%2Fdownload%2F%40vue%2Fbabel-plugin-jsx-1.0.0-rc.3.tgz", - "integrity": "sha1-q0d+6Vx2T75ohCou3dR08SLnCsY=", - "dev": true, - "dependencies": { - "@babel/helper-module-imports": "^7.0.0", - "@babel/plugin-syntax-jsx": "^7.0.0", - "@babel/traverse": "^7.0.0", - "@babel/types": "^7.0.0", - "@vue/babel-helper-vue-transform-on": "^1.0.0-rc.2", - "camelcase": "^6.0.0", - "html-tags": "^3.1.0", - "svg-tags": "^1.0.0" - } - }, - "node_modules/@vue/babel-plugin-transform-vue-jsx": { - "version": "1.2.1", - "resolved": "https://registry.npm.taobao.org/@vue/babel-plugin-transform-vue-jsx/download/@vue/babel-plugin-transform-vue-jsx-1.2.1.tgz?cache=0&sync_timestamp=1602851121024&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40vue%2Fbabel-plugin-transform-vue-jsx%2Fdownload%2F%40vue%2Fbabel-plugin-transform-vue-jsx-1.2.1.tgz", - "integrity": "sha1-ZGBGxlLC8CQnJ/NFGdkXsGQEHtc=", - "dev": true, - "dependencies": { - "@babel/helper-module-imports": "^7.0.0", - "@babel/plugin-syntax-jsx": "^7.2.0", - "@vue/babel-helper-vue-jsx-merge-props": "^1.2.1", - "html-tags": "^2.0.0", - "lodash.kebabcase": "^4.1.1", - "svg-tags": "^1.0.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@vue/babel-plugin-transform-vue-jsx/node_modules/html-tags": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/html-tags/download/html-tags-2.0.0.tgz", - "integrity": "sha1-ELMKOGCF9Dzt41PMj6fLDe7qZos=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/@vue/babel-preset-app": { - "version": "4.5.8", - "resolved": "https://registry.npm.taobao.org/@vue/babel-preset-app/download/@vue/babel-preset-app-4.5.8.tgz", - "integrity": "sha1-P8X1IYHbdgVOzAhWIvPLBmwkL20=", - "dev": true, - "dependencies": { - "@babel/core": "^7.11.0", - "@babel/helper-compilation-targets": "^7.9.6", - "@babel/helper-module-imports": "^7.8.3", - "@babel/plugin-proposal-class-properties": "^7.8.3", - "@babel/plugin-proposal-decorators": "^7.8.3", - "@babel/plugin-syntax-dynamic-import": "^7.8.3", - "@babel/plugin-syntax-jsx": "^7.8.3", - "@babel/plugin-transform-runtime": "^7.11.0", - "@babel/preset-env": "^7.11.0", - "@babel/runtime": "^7.11.0", - "@vue/babel-plugin-jsx": "^1.0.0-0", - "@vue/babel-preset-jsx": "^1.1.2", - "babel-plugin-dynamic-import-node": "^2.3.3", - "core-js": "^3.6.5", - "core-js-compat": "^3.6.5", - "semver": "^6.1.0" - }, - "peerDependencies": { - "@babel/core": "*", - "core-js": "^3", - "vue": "^2 || ^3.0.0-0" - }, - "peerDependenciesMeta": { - "core-js": { - "optional": true - }, - "vue": { - "optional": true - } - } - }, - "node_modules/@vue/babel-preset-app/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npm.taobao.org/semver/download/semver-6.3.0.tgz", - "integrity": "sha1-7gpkyK9ejO6mdoexM3YeG+y9HT0=", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/@vue/babel-preset-jsx": { - "version": "1.2.4", - "resolved": "https://registry.npm.taobao.org/@vue/babel-preset-jsx/download/@vue/babel-preset-jsx-1.2.4.tgz?cache=0&sync_timestamp=1603806772378&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40vue%2Fbabel-preset-jsx%2Fdownload%2F%40vue%2Fbabel-preset-jsx-1.2.4.tgz", - "integrity": "sha1-kv6nnbbxOwHoDToAmeKSS9y+Toc=", - "dev": true, - "dependencies": { - "@vue/babel-helper-vue-jsx-merge-props": "^1.2.1", - "@vue/babel-plugin-transform-vue-jsx": "^1.2.1", - "@vue/babel-sugar-composition-api-inject-h": "^1.2.1", - "@vue/babel-sugar-composition-api-render-instance": "^1.2.4", - "@vue/babel-sugar-functional-vue": "^1.2.2", - "@vue/babel-sugar-inject-h": "^1.2.2", - "@vue/babel-sugar-v-model": "^1.2.3", - "@vue/babel-sugar-v-on": "^1.2.3" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@vue/babel-sugar-composition-api-inject-h": { - "version": "1.2.1", - "resolved": "https://registry.npm.taobao.org/@vue/babel-sugar-composition-api-inject-h/download/@vue/babel-sugar-composition-api-inject-h-1.2.1.tgz?cache=0&sync_timestamp=1602851211529&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40vue%2Fbabel-sugar-composition-api-inject-h%2Fdownload%2F%40vue%2Fbabel-sugar-composition-api-inject-h-1.2.1.tgz", - "integrity": "sha1-BdbgxDJxDjdYKyvppgSbaJtvA+s=", - "dev": true, - "dependencies": { - "@babel/plugin-syntax-jsx": "^7.2.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@vue/babel-sugar-composition-api-render-instance": { - "version": "1.2.4", - "resolved": "https://registry.npm.taobao.org/@vue/babel-sugar-composition-api-render-instance/download/@vue/babel-sugar-composition-api-render-instance-1.2.4.tgz?cache=0&sync_timestamp=1603806780231&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40vue%2Fbabel-sugar-composition-api-render-instance%2Fdownload%2F%40vue%2Fbabel-sugar-composition-api-render-instance-1.2.4.tgz", - "integrity": "sha1-5MvGmXw0T6wnF4WteikyXFHWjRk=", - "dev": true, - "dependencies": { - "@babel/plugin-syntax-jsx": "^7.2.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@vue/babel-sugar-functional-vue": { - "version": "1.2.2", - "resolved": "https://registry.npm.taobao.org/@vue/babel-sugar-functional-vue/download/@vue/babel-sugar-functional-vue-1.2.2.tgz?cache=0&sync_timestamp=1602929533577&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40vue%2Fbabel-sugar-functional-vue%2Fdownload%2F%40vue%2Fbabel-sugar-functional-vue-1.2.2.tgz", - "integrity": "sha1-JnqayNeHyW7b8Dzj85LEnam9Jlg=", - "dev": true, - "dependencies": { - "@babel/plugin-syntax-jsx": "^7.2.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@vue/babel-sugar-inject-h": { - "version": "1.2.2", - "resolved": "https://registry.npm.taobao.org/@vue/babel-sugar-inject-h/download/@vue/babel-sugar-inject-h-1.2.2.tgz?cache=0&sync_timestamp=1602929533397&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40vue%2Fbabel-sugar-inject-h%2Fdownload%2F%40vue%2Fbabel-sugar-inject-h-1.2.2.tgz", - "integrity": "sha1-1zjTyJM2fshJHcu2abAAkZKT46o=", - "dev": true, - "dependencies": { - "@babel/plugin-syntax-jsx": "^7.2.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@vue/babel-sugar-v-model": { - "version": "1.2.3", - "resolved": "https://registry.npm.taobao.org/@vue/babel-sugar-v-model/download/@vue/babel-sugar-v-model-1.2.3.tgz?cache=0&sync_timestamp=1603182488740&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40vue%2Fbabel-sugar-v-model%2Fdownload%2F%40vue%2Fbabel-sugar-v-model-1.2.3.tgz", - "integrity": "sha1-+h8pulHr8KoabDX6ZtU5vEWaGPI=", - "dev": true, - "dependencies": { - "@babel/plugin-syntax-jsx": "^7.2.0", - "@vue/babel-helper-vue-jsx-merge-props": "^1.2.1", - "@vue/babel-plugin-transform-vue-jsx": "^1.2.1", - "camelcase": "^5.0.0", - "html-tags": "^2.0.0", - "svg-tags": "^1.0.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@vue/babel-sugar-v-model/node_modules/camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npm.taobao.org/camelcase/download/camelcase-5.3.1.tgz?cache=0&sync_timestamp=1603923709404&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcamelcase%2Fdownload%2Fcamelcase-5.3.1.tgz", - "integrity": "sha1-48mzFWnhBoEd8kL3FXJaH0xJQyA=", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/@vue/babel-sugar-v-model/node_modules/html-tags": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/html-tags/download/html-tags-2.0.0.tgz", - "integrity": "sha1-ELMKOGCF9Dzt41PMj6fLDe7qZos=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/@vue/babel-sugar-v-on": { - "version": "1.2.3", - "resolved": "https://registry.npm.taobao.org/@vue/babel-sugar-v-on/download/@vue/babel-sugar-v-on-1.2.3.tgz?cache=0&sync_timestamp=1603181872606&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40vue%2Fbabel-sugar-v-on%2Fdownload%2F%40vue%2Fbabel-sugar-v-on-1.2.3.tgz", - "integrity": "sha1-NCNnF4WGpp85LwS/ujICHQKROto=", - "dev": true, - "dependencies": { - "@babel/plugin-syntax-jsx": "^7.2.0", - "@vue/babel-plugin-transform-vue-jsx": "^1.2.1", - "camelcase": "^5.0.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@vue/babel-sugar-v-on/node_modules/camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npm.taobao.org/camelcase/download/camelcase-5.3.1.tgz?cache=0&sync_timestamp=1603923709404&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcamelcase%2Fdownload%2Fcamelcase-5.3.1.tgz", - "integrity": "sha1-48mzFWnhBoEd8kL3FXJaH0xJQyA=", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/@vue/cli-overlay": { - "version": "4.5.8", - "resolved": "https://registry.npm.taobao.org/@vue/cli-overlay/download/@vue/cli-overlay-4.5.8.tgz?cache=0&sync_timestamp=1603102330205&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40vue%2Fcli-overlay%2Fdownload%2F%40vue%2Fcli-overlay-4.5.8.tgz", - "integrity": "sha1-W3G4G9SQubWWz92nj5AVVkPgN9Q=", - "dev": true - }, - "node_modules/@vue/cli-plugin-babel": { - "version": "4.5.8", - "resolved": "https://registry.npm.taobao.org/@vue/cli-plugin-babel/download/@vue/cli-plugin-babel-4.5.8.tgz?cache=0&sync_timestamp=1603102349671&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40vue%2Fcli-plugin-babel%2Fdownload%2F%40vue%2Fcli-plugin-babel-4.5.8.tgz", - "integrity": "sha1-V1ng0kxWjLFF59CzB0l85k9HLLA=", - "dev": true, - "dependencies": { - "@babel/core": "^7.11.0", - "@vue/babel-preset-app": "^4.5.8", - "@vue/cli-shared-utils": "^4.5.8", - "babel-loader": "^8.1.0", - "cache-loader": "^4.1.0", - "thread-loader": "^2.1.3", - "webpack": "^4.0.0" - }, - "peerDependencies": { - "@vue/cli-service": "^3.0.0 || ^4.0.0-0" - } - }, - "node_modules/@vue/cli-plugin-router": { - "version": "4.5.8", - "resolved": "https://registry.npm.taobao.org/@vue/cli-plugin-router/download/@vue/cli-plugin-router-4.5.8.tgz", - "integrity": "sha1-23CmnfTtyQaQdl+MJXSaaLIN2FA=", - "dev": true, - "dependencies": { - "@vue/cli-shared-utils": "^4.5.8" - }, - "peerDependencies": { - "@vue/cli-service": "^3.0.0 || ^4.0.0-0" - } - }, - "node_modules/@vue/cli-plugin-vuex": { - "version": "4.5.8", - "resolved": "https://registry.npm.taobao.org/@vue/cli-plugin-vuex/download/@vue/cli-plugin-vuex-4.5.8.tgz?cache=0&sync_timestamp=1603102281094&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40vue%2Fcli-plugin-vuex%2Fdownload%2F%40vue%2Fcli-plugin-vuex-4.5.8.tgz", - "integrity": "sha1-gSKuk79ZMn06AGPAxtpRUToeJFY=", - "dev": true, - "peerDependencies": { - "@vue/cli-service": "^3.0.0 || ^4.0.0-0" - } - }, - "node_modules/@vue/cli-service": { - "version": "4.5.8", - "resolved": "https://registry.npm.taobao.org/@vue/cli-service/download/@vue/cli-service-4.5.8.tgz?cache=0&sync_timestamp=1603104183081&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40vue%2Fcli-service%2Fdownload%2F%40vue%2Fcli-service-4.5.8.tgz", - "integrity": "sha1-n+WLx8d8USHqu5QPgOBsGNqxI+o=", - "dev": true, - "dependencies": { - "@intervolga/optimize-cssnano-plugin": "^1.0.5", - "@soda/friendly-errors-webpack-plugin": "^1.7.1", - "@soda/get-current-script": "^1.0.0", - "@types/minimist": "^1.2.0", - "@types/webpack": "^4.0.0", - "@types/webpack-dev-server": "^3.11.0", - "@vue/cli-overlay": "^4.5.8", - "@vue/cli-plugin-router": "^4.5.8", - "@vue/cli-plugin-vuex": "^4.5.8", - "@vue/cli-shared-utils": "^4.5.8", - "@vue/component-compiler-utils": "^3.1.2", - "@vue/preload-webpack-plugin": "^1.1.0", - "@vue/web-component-wrapper": "^1.2.0", - "acorn": "^7.4.0", - "acorn-walk": "^7.1.1", - "address": "^1.1.2", - "autoprefixer": "^9.8.6", - "browserslist": "^4.12.0", - "cache-loader": "^4.1.0", - "case-sensitive-paths-webpack-plugin": "^2.3.0", - "cli-highlight": "^2.1.4", - "clipboardy": "^2.3.0", - "cliui": "^6.0.0", - "copy-webpack-plugin": "^5.1.1", - "css-loader": "^3.5.3", - "cssnano": "^4.1.10", - "debug": "^4.1.1", - "default-gateway": "^5.0.5", - "dotenv": "^8.2.0", - "dotenv-expand": "^5.1.0", - "file-loader": "^4.2.0", - "fs-extra": "^7.0.1", - "globby": "^9.2.0", - "hash-sum": "^2.0.0", - "html-webpack-plugin": "^3.2.0", - "launch-editor-middleware": "^2.2.1", - "lodash.defaultsdeep": "^4.6.1", - "lodash.mapvalues": "^4.6.0", - "lodash.transform": "^4.6.0", - "mini-css-extract-plugin": "^0.9.0", - "minimist": "^1.2.5", - "pnp-webpack-plugin": "^1.6.4", - "portfinder": "^1.0.26", - "postcss-loader": "^3.0.0", - "ssri": "^7.1.0", - "terser-webpack-plugin": "^2.3.6", - "thread-loader": "^2.1.3", - "url-loader": "^2.2.0", - "vue-loader": "^15.9.2", - "vue-style-loader": "^4.1.2", - "webpack": "^4.0.0", - "webpack-bundle-analyzer": "^3.8.0", - "webpack-chain": "^6.4.0", - "webpack-dev-server": "^3.11.0", - "webpack-merge": "^4.2.2" - }, - "bin": { - "vue-cli-service": "bin/vue-cli-service.js" - }, - "engines": { - "node": ">=8" - }, - "optionalDependencies": { - "vue-loader-v16": "npm:vue-loader@^16.0.0-beta.7" - }, - "peerDependencies": { - "@vue/compiler-sfc": "^3.0.0-beta.14", - "vue-template-compiler": "^2.0.0" - }, - "peerDependenciesMeta": { - "@vue/compiler-sfc": { - "optional": true - }, - "less-loader": { - "optional": true - }, - "pug-plain-loader": { - "optional": true - }, - "raw-loader": { - "optional": true - }, - "sass-loader": { - "optional": true - }, - "stylus-loader": { - "optional": true - }, - "vue-template-compiler": { - "optional": true - } - } - }, - "node_modules/@vue/cli-service/node_modules/acorn": { - "version": "7.4.1", - "resolved": "https://registry.npm.taobao.org/acorn/download/acorn-7.4.1.tgz", - "integrity": "sha1-/q7SVZc9LndVW4PbwIhRpsY1IPo=", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/@vue/cli-service/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npm.taobao.org/ansi-styles/download/ansi-styles-4.3.0.tgz?cache=0&sync_timestamp=1601839122515&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fansi-styles%2Fdownload%2Fansi-styles-4.3.0.tgz", - "integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=", - "dev": true, - "optional": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@vue/cli-service/node_modules/cacache": { - "version": "13.0.1", - "resolved": "https://registry.npm.taobao.org/cacache/download/cacache-13.0.1.tgz?cache=0&sync_timestamp=1594429684526&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcacache%2Fdownload%2Fcacache-13.0.1.tgz", - "integrity": "sha1-qAAMIWlwiQgvhSh6GuxuOCAkpxw=", - "dev": true, - "dependencies": { - "chownr": "^1.1.2", - "figgy-pudding": "^3.5.1", - "fs-minipass": "^2.0.0", - "glob": "^7.1.4", - "graceful-fs": "^4.2.2", - "infer-owner": "^1.0.4", - "lru-cache": "^5.1.1", - "minipass": "^3.0.0", - "minipass-collect": "^1.0.2", - "minipass-flush": "^1.0.5", - "minipass-pipeline": "^1.2.2", - "mkdirp": "^0.5.1", - "move-concurrently": "^1.0.1", - "p-map": "^3.0.0", - "promise-inflight": "^1.0.1", - "rimraf": "^2.7.1", - "ssri": "^7.0.0", - "unique-filename": "^1.1.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@vue/cli-service/node_modules/chalk": { - "version": "4.1.0", - "resolved": "https://registry.npm.taobao.org/chalk/download/chalk-4.1.0.tgz?cache=0&sync_timestamp=1591687070184&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fchalk%2Fdownload%2Fchalk-4.1.0.tgz", - "integrity": "sha1-ThSHCmGNni7dl92DRf2dncMVZGo=", - "dev": true, - "optional": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/@vue/cli-service/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/color-convert/download/color-convert-2.0.1.tgz", - "integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=", - "dev": true, - "optional": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/@vue/cli-service/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npm.taobao.org/color-name/download/color-name-1.1.4.tgz", - "integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=", - "dev": true, - "optional": true - }, - "node_modules/@vue/cli-service/node_modules/find-cache-dir": { - "version": "3.3.1", - "resolved": "https://registry.npm.taobao.org/find-cache-dir/download/find-cache-dir-3.3.1.tgz", - "integrity": "sha1-ibM/rUpGcNqpT4Vff74x1thP6IA=", - "dev": true, - "dependencies": { - "commondir": "^1.0.1", - "make-dir": "^3.0.2", - "pkg-dir": "^4.1.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/avajs/find-cache-dir?sponsor=1" - } - }, - "node_modules/@vue/cli-service/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npm.taobao.org/find-up/download/find-up-4.1.0.tgz?cache=0&sync_timestamp=1597169842138&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffind-up%2Fdownload%2Ffind-up-4.1.0.tgz", - "integrity": "sha1-l6/n1s3AvFkoWEt8jXsW6KmqXRk=", - "dev": true, - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@vue/cli-service/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/has-flag/download/has-flag-4.0.0.tgz", - "integrity": "sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=", - "dev": true, - "optional": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/@vue/cli-service/node_modules/loader-utils": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/loader-utils/download/loader-utils-2.0.0.tgz?cache=0&sync_timestamp=1584445207623&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Floader-utils%2Fdownload%2Floader-utils-2.0.0.tgz", - "integrity": "sha1-5MrOW4FtQloWa18JfhDNErNgZLA=", - "dev": true, - "optional": true, - "dependencies": { - "big.js": "^5.2.2", - "emojis-list": "^3.0.0", - "json5": "^2.1.2" - }, - "engines": { - "node": ">=8.9.0" - } - }, - "node_modules/@vue/cli-service/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npm.taobao.org/locate-path/download/locate-path-5.0.0.tgz", - "integrity": "sha1-Gvujlq/WdqbUJQTQpno6frn2KqA=", - "dev": true, - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@vue/cli-service/node_modules/make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/make-dir/download/make-dir-3.1.0.tgz?cache=0&sync_timestamp=1587567572251&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmake-dir%2Fdownload%2Fmake-dir-3.1.0.tgz", - "integrity": "sha1-QV6WcEazp/HRhSd9hKpYIDcmoT8=", - "dev": true, - "dependencies": { - "semver": "^6.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@vue/cli-service/node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npm.taobao.org/p-locate/download/p-locate-4.1.0.tgz", - "integrity": "sha1-o0KLtwiLOmApL2aRkni3wpetTwc=", - "dev": true, - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@vue/cli-service/node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/path-exists/download/path-exists-4.0.0.tgz", - "integrity": "sha1-UTvb4tO5XXdi6METfvoZXGxhtbM=", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/@vue/cli-service/node_modules/pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npm.taobao.org/pkg-dir/download/pkg-dir-4.2.0.tgz?cache=0&sync_timestamp=1602859045787&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpkg-dir%2Fdownload%2Fpkg-dir-4.2.0.tgz", - "integrity": "sha1-8JkTPfft5CLoHR2ESCcO6z5CYfM=", - "dev": true, - "dependencies": { - "find-up": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@vue/cli-service/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npm.taobao.org/semver/download/semver-6.3.0.tgz", - "integrity": "sha1-7gpkyK9ejO6mdoexM3YeG+y9HT0=", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/@vue/cli-service/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz?cache=0&sync_timestamp=1571657176668&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsource-map%2Fdownload%2Fsource-map-0.6.1.tgz", - "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/@vue/cli-service/node_modules/ssri": { - "version": "7.1.0", - "resolved": "https://registry.npm.taobao.org/ssri/download/ssri-7.1.0.tgz", - "integrity": "sha1-ksJBv23oI2W1x/tL126XVSLhKU0=", - "dev": true, - "dependencies": { - "figgy-pudding": "^3.5.1", - "minipass": "^3.1.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@vue/cli-service/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-7.2.0.tgz?cache=0&sync_timestamp=1606205035829&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsupports-color%2Fdownload%2Fsupports-color-7.2.0.tgz", - "integrity": "sha1-G33NyzK4E4gBs+R4umpRyqiWSNo=", - "dev": true, - "optional": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@vue/cli-service/node_modules/terser-webpack-plugin": { - "version": "2.3.8", - "resolved": "https://registry.npm.taobao.org/terser-webpack-plugin/download/terser-webpack-plugin-2.3.8.tgz?cache=0&sync_timestamp=1603881713213&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fterser-webpack-plugin%2Fdownload%2Fterser-webpack-plugin-2.3.8.tgz", - "integrity": "sha1-iUdkoZsHQ/L3BOfCqEjFKDppZyQ=", - "dev": true, - "dependencies": { - "cacache": "^13.0.1", - "find-cache-dir": "^3.3.1", - "jest-worker": "^25.4.0", - "p-limit": "^2.3.0", - "schema-utils": "^2.6.6", - "serialize-javascript": "^4.0.0", - "source-map": "^0.6.1", - "terser": "^4.6.12", - "webpack-sources": "^1.4.3" - }, - "engines": { - "node": ">= 8.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "webpack": "^4.0.0 || ^5.0.0" - } - }, - "node_modules/@vue/cli-service/node_modules/vue-loader-v16": { - "name": "vue-loader", - "version": "16.1.2", - "resolved": "https://registry.npm.taobao.org/vue-loader/download/vue-loader-16.1.2.tgz?cache=0&sync_timestamp=1608188009078&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fvue-loader%2Fdownload%2Fvue-loader-16.1.2.tgz", - "integrity": "sha1-XAO2xQ0qX5g8fOuhXFDXjKKymPQ=", - "dev": true, - "optional": true, - "dependencies": { - "chalk": "^4.1.0", - "hash-sum": "^2.0.0", - "loader-utils": "^2.0.0" - } - }, - "node_modules/@vue/cli-service/node_modules/webpack-bundle-analyzer": { - "version": "3.9.0", - "resolved": "https://registry.npm.taobao.org/webpack-bundle-analyzer/download/webpack-bundle-analyzer-3.9.0.tgz?cache=0&sync_timestamp=1611221513167&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fwebpack-bundle-analyzer%2Fdownload%2Fwebpack-bundle-analyzer-3.9.0.tgz", - "integrity": "sha1-9vlNsQj7V05BWtMT3kGicH0z7zw=", - "dev": true, - "dependencies": { - "acorn": "^7.1.1", - "acorn-walk": "^7.1.1", - "bfj": "^6.1.1", - "chalk": "^2.4.1", - "commander": "^2.18.0", - "ejs": "^2.6.1", - "express": "^4.16.3", - "filesize": "^3.6.1", - "gzip-size": "^5.0.0", - "lodash": "^4.17.19", - "mkdirp": "^0.5.1", - "opener": "^1.5.1", - "ws": "^6.0.0" - }, - "bin": { - "webpack-bundle-analyzer": "lib/bin/analyzer.js" - }, - "engines": { - "node": ">= 6.14.4" - } - }, - "node_modules/@vue/cli-service/node_modules/webpack-bundle-analyzer/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npm.taobao.org/ansi-styles/download/ansi-styles-3.2.1.tgz?cache=0&sync_timestamp=1617175602652&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fansi-styles%2Fdownload%2Fansi-styles-3.2.1.tgz", - "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", - "dev": true, - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@vue/cli-service/node_modules/webpack-bundle-analyzer/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npm.taobao.org/chalk/download/chalk-2.4.2.tgz", - "integrity": "sha1-zUJUFnelQzPPVBpJEIwUMrRMlCQ=", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@vue/cli-service/node_modules/webpack-bundle-analyzer/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npm.taobao.org/color-convert/download/color-convert-1.9.3.tgz", - "integrity": "sha1-u3GFBpDh8TZWfeYp0tVHHe2kweg=", - "dev": true, - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/@vue/cli-service/node_modules/webpack-bundle-analyzer/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npm.taobao.org/color-name/download/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true - }, - "node_modules/@vue/cli-service/node_modules/webpack-bundle-analyzer/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/has-flag/download/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/@vue/cli-service/node_modules/webpack-bundle-analyzer/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-5.5.0.tgz?cache=0&sync_timestamp=1611393963969&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsupports-color%2Fdownload%2Fsupports-color-5.5.0.tgz", - "integrity": "sha1-4uaaRKyHcveKHsCzW2id9lMO/I8=", - "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@vue/cli-shared-utils": { - "version": "4.5.8", - "resolved": "https://registry.npm.taobao.org/@vue/cli-shared-utils/download/@vue/cli-shared-utils-4.5.8.tgz?cache=0&sync_timestamp=1603102380635&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40vue%2Fcli-shared-utils%2Fdownload%2F%40vue%2Fcli-shared-utils-4.5.8.tgz", - "integrity": "sha1-1FQwaqpRDmZqNLFEr8gYMPwjrMk=", - "dev": true, - "dependencies": { - "@hapi/joi": "^15.0.1", - "chalk": "^2.4.2", - "execa": "^1.0.0", - "launch-editor": "^2.2.1", - "lru-cache": "^5.1.1", - "node-ipc": "^9.1.1", - "open": "^6.3.0", - "ora": "^3.4.0", - "read-pkg": "^5.1.1", - "request": "^2.88.2", - "semver": "^6.1.0", - "strip-ansi": "^6.0.0" - } - }, - "node_modules/@vue/cli-shared-utils/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npm.taobao.org/semver/download/semver-6.3.0.tgz", - "integrity": "sha1-7gpkyK9ejO6mdoexM3YeG+y9HT0=", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/@vue/component-compiler-utils": { - "version": "3.2.0", - "resolved": "https://registry.npm.taobao.org/@vue/component-compiler-utils/download/@vue/component-compiler-utils-3.2.0.tgz?cache=0&sync_timestamp=1595427628913&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40vue%2Fcomponent-compiler-utils%2Fdownload%2F%40vue%2Fcomponent-compiler-utils-3.2.0.tgz", - "integrity": "sha1-j4UYLO7Sjps8dTE95mn4MWbRHl0=", - "dev": true, - "dependencies": { - "consolidate": "^0.15.1", - "hash-sum": "^1.0.2", - "lru-cache": "^4.1.2", - "merge-source-map": "^1.1.0", - "postcss": "^7.0.14", - "postcss-selector-parser": "^6.0.2", - "source-map": "~0.6.1", - "vue-template-es2015-compiler": "^1.9.0" - }, - "optionalDependencies": { - "prettier": "^1.18.2" - } - }, - "node_modules/@vue/component-compiler-utils/node_modules/hash-sum": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/hash-sum/download/hash-sum-1.0.2.tgz", - "integrity": "sha1-M7QHd3VMZDJXPBIMw4CLvRDUfwQ=", - "dev": true - }, - "node_modules/@vue/component-compiler-utils/node_modules/lru-cache": { - "version": "4.1.5", - "resolved": "https://registry.npm.taobao.org/lru-cache/download/lru-cache-4.1.5.tgz?cache=0&sync_timestamp=1594427567713&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Flru-cache%2Fdownload%2Flru-cache-4.1.5.tgz", - "integrity": "sha1-i75Q6oW+1ZvJ4z3KuCNe6bz0Q80=", - "dev": true, - "dependencies": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, - "node_modules/@vue/component-compiler-utils/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz?cache=0&sync_timestamp=1571657176668&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsource-map%2Fdownload%2Fsource-map-0.6.1.tgz", - "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/@vue/component-compiler-utils/node_modules/yallist": { - "version": "2.1.2", - "resolved": "https://registry.npm.taobao.org/yallist/download/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", - "dev": true - }, - "node_modules/@vue/preload-webpack-plugin": { - "version": "1.1.2", - "resolved": "https://registry.npm.taobao.org/@vue/preload-webpack-plugin/download/@vue/preload-webpack-plugin-1.1.2.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40vue%2Fpreload-webpack-plugin%2Fdownload%2F%40vue%2Fpreload-webpack-plugin-1.1.2.tgz", - "integrity": "sha1-zrkktOyzucQ4ccekKaAvhCPmIas=", - "dev": true, - "engines": { - "node": ">=6.0.0" - }, - "peerDependencies": { - "html-webpack-plugin": ">=2.26.0", - "webpack": ">=4.0.0" - } - }, - "node_modules/@vue/web-component-wrapper": { - "version": "1.2.0", - "resolved": "https://registry.npm.taobao.org/@vue/web-component-wrapper/download/@vue/web-component-wrapper-1.2.0.tgz", - "integrity": "sha1-uw5G8VhafiibTuYGfcxaauYvHdE=", - "dev": true - }, - "node_modules/@webassemblyjs/ast": { - "version": "1.9.0", - "resolved": "https://registry.npm.taobao.org/@webassemblyjs/ast/download/@webassemblyjs/ast-1.9.0.tgz", - "integrity": "sha1-vYUGBLQEJFmlpBzX0zjL7Wle2WQ=", - "dependencies": { - "@webassemblyjs/helper-module-context": "1.9.0", - "@webassemblyjs/helper-wasm-bytecode": "1.9.0", - "@webassemblyjs/wast-parser": "1.9.0" - } - }, - "node_modules/@webassemblyjs/floating-point-hex-parser": { - "version": "1.9.0", - "resolved": "https://registry.npm.taobao.org/@webassemblyjs/floating-point-hex-parser/download/@webassemblyjs/floating-point-hex-parser-1.9.0.tgz", - "integrity": "sha1-PD07Jxvd/ITesA9xNEQ4MR1S/7Q=" - }, - "node_modules/@webassemblyjs/helper-api-error": { - "version": "1.9.0", - "resolved": "https://registry.npm.taobao.org/@webassemblyjs/helper-api-error/download/@webassemblyjs/helper-api-error-1.9.0.tgz", - "integrity": "sha1-ID9nbjM7lsnaLuqzzO8zxFkotqI=" - }, - "node_modules/@webassemblyjs/helper-buffer": { - "version": "1.9.0", - "resolved": "https://registry.npm.taobao.org/@webassemblyjs/helper-buffer/download/@webassemblyjs/helper-buffer-1.9.0.tgz", - "integrity": "sha1-oUQtJpxf6yP8vJ73WdrDVH8p3gA=" - }, - "node_modules/@webassemblyjs/helper-code-frame": { - "version": "1.9.0", - "resolved": "https://registry.npm.taobao.org/@webassemblyjs/helper-code-frame/download/@webassemblyjs/helper-code-frame-1.9.0.tgz", - "integrity": "sha1-ZH+Iks0gQ6gqwMjF51w28dkVnyc=", - "dependencies": { - "@webassemblyjs/wast-printer": "1.9.0" - } - }, - "node_modules/@webassemblyjs/helper-fsm": { - "version": "1.9.0", - "resolved": "https://registry.npm.taobao.org/@webassemblyjs/helper-fsm/download/@webassemblyjs/helper-fsm-1.9.0.tgz", - "integrity": "sha1-wFJWtxJEIUZx9LCOwQitY7cO3bg=" - }, - "node_modules/@webassemblyjs/helper-module-context": { - "version": "1.9.0", - "resolved": "https://registry.npm.taobao.org/@webassemblyjs/helper-module-context/download/@webassemblyjs/helper-module-context-1.9.0.tgz", - "integrity": "sha1-JdiIS3aDmHGgimxvgGw5ee9xLwc=", - "dependencies": { - "@webassemblyjs/ast": "1.9.0" - } - }, - "node_modules/@webassemblyjs/helper-wasm-bytecode": { - "version": "1.9.0", - "resolved": "https://registry.npm.taobao.org/@webassemblyjs/helper-wasm-bytecode/download/@webassemblyjs/helper-wasm-bytecode-1.9.0.tgz", - "integrity": "sha1-T+2L6sm4wU+MWLcNEk1UndH+V5A=" - }, - "node_modules/@webassemblyjs/helper-wasm-section": { - "version": "1.9.0", - "resolved": "https://registry.npm.taobao.org/@webassemblyjs/helper-wasm-section/download/@webassemblyjs/helper-wasm-section-1.9.0.tgz", - "integrity": "sha1-WkE41aYpK6GLBMWuSXF+QWeWU0Y=", - "dependencies": { - "@webassemblyjs/ast": "1.9.0", - "@webassemblyjs/helper-buffer": "1.9.0", - "@webassemblyjs/helper-wasm-bytecode": "1.9.0", - "@webassemblyjs/wasm-gen": "1.9.0" - } - }, - "node_modules/@webassemblyjs/ieee754": { - "version": "1.9.0", - "resolved": "https://registry.npm.taobao.org/@webassemblyjs/ieee754/download/@webassemblyjs/ieee754-1.9.0.tgz", - "integrity": "sha1-Fceg+6roP7JhQ7us9tbfFwKtOeQ=", - "dependencies": { - "@xtuc/ieee754": "^1.2.0" - } - }, - "node_modules/@webassemblyjs/leb128": { - "version": "1.9.0", - "resolved": "https://registry.npm.taobao.org/@webassemblyjs/leb128/download/@webassemblyjs/leb128-1.9.0.tgz", - "integrity": "sha1-8Zygt2ptxVYjoJz/p2noOPoeHJU=", - "dependencies": { - "@xtuc/long": "4.2.2" - } - }, - "node_modules/@webassemblyjs/utf8": { - "version": "1.9.0", - "resolved": "https://registry.npm.taobao.org/@webassemblyjs/utf8/download/@webassemblyjs/utf8-1.9.0.tgz", - "integrity": "sha1-BNM7Y2945qaBMifoJAL3Y3tiKas=" - }, - "node_modules/@webassemblyjs/wasm-edit": { - "version": "1.9.0", - "resolved": "https://registry.npm.taobao.org/@webassemblyjs/wasm-edit/download/@webassemblyjs/wasm-edit-1.9.0.tgz", - "integrity": "sha1-P+bXnT8PkiGDqoYALELdJWz+6c8=", - "dependencies": { - "@webassemblyjs/ast": "1.9.0", - "@webassemblyjs/helper-buffer": "1.9.0", - "@webassemblyjs/helper-wasm-bytecode": "1.9.0", - "@webassemblyjs/helper-wasm-section": "1.9.0", - "@webassemblyjs/wasm-gen": "1.9.0", - "@webassemblyjs/wasm-opt": "1.9.0", - "@webassemblyjs/wasm-parser": "1.9.0", - "@webassemblyjs/wast-printer": "1.9.0" - } - }, - "node_modules/@webassemblyjs/wasm-gen": { - "version": "1.9.0", - "resolved": "https://registry.npm.taobao.org/@webassemblyjs/wasm-gen/download/@webassemblyjs/wasm-gen-1.9.0.tgz", - "integrity": "sha1-ULxw7Gje2OJ2OwGhQYv0NJGnpJw=", - "dependencies": { - "@webassemblyjs/ast": "1.9.0", - "@webassemblyjs/helper-wasm-bytecode": "1.9.0", - "@webassemblyjs/ieee754": "1.9.0", - "@webassemblyjs/leb128": "1.9.0", - "@webassemblyjs/utf8": "1.9.0" - } - }, - "node_modules/@webassemblyjs/wasm-opt": { - "version": "1.9.0", - "resolved": "https://registry.npm.taobao.org/@webassemblyjs/wasm-opt/download/@webassemblyjs/wasm-opt-1.9.0.tgz", - "integrity": "sha1-IhEYHlsxMmRDzIES658LkChyGmE=", - "dependencies": { - "@webassemblyjs/ast": "1.9.0", - "@webassemblyjs/helper-buffer": "1.9.0", - "@webassemblyjs/wasm-gen": "1.9.0", - "@webassemblyjs/wasm-parser": "1.9.0" - } - }, - "node_modules/@webassemblyjs/wasm-parser": { - "version": "1.9.0", - "resolved": "https://registry.npm.taobao.org/@webassemblyjs/wasm-parser/download/@webassemblyjs/wasm-parser-1.9.0.tgz", - "integrity": "sha1-nUjkSCbfSmWYKUqmyHRp1kL/9l4=", - "dependencies": { - "@webassemblyjs/ast": "1.9.0", - "@webassemblyjs/helper-api-error": "1.9.0", - "@webassemblyjs/helper-wasm-bytecode": "1.9.0", - "@webassemblyjs/ieee754": "1.9.0", - "@webassemblyjs/leb128": "1.9.0", - "@webassemblyjs/utf8": "1.9.0" - } - }, - "node_modules/@webassemblyjs/wast-parser": { - "version": "1.9.0", - "resolved": "https://registry.npm.taobao.org/@webassemblyjs/wast-parser/download/@webassemblyjs/wast-parser-1.9.0.tgz", - "integrity": "sha1-MDERXXmsW9JhVWzsw/qQo+9FGRQ=", - "dependencies": { - "@webassemblyjs/ast": "1.9.0", - "@webassemblyjs/floating-point-hex-parser": "1.9.0", - "@webassemblyjs/helper-api-error": "1.9.0", - "@webassemblyjs/helper-code-frame": "1.9.0", - "@webassemblyjs/helper-fsm": "1.9.0", - "@xtuc/long": "4.2.2" - } - }, - "node_modules/@webassemblyjs/wast-printer": { - "version": "1.9.0", - "resolved": "https://registry.npm.taobao.org/@webassemblyjs/wast-printer/download/@webassemblyjs/wast-printer-1.9.0.tgz", - "integrity": "sha1-STXVTIX+9jewDOn1I3dFHQDUeJk=", - "dependencies": { - "@webassemblyjs/ast": "1.9.0", - "@webassemblyjs/wast-parser": "1.9.0", - "@xtuc/long": "4.2.2" - } - }, - "node_modules/@xtuc/ieee754": { - "version": "1.2.0", - "resolved": "https://registry.npm.taobao.org/@xtuc/ieee754/download/@xtuc/ieee754-1.2.0.tgz", - "integrity": "sha1-7vAUoxRa5Hehy8AM0eVSM23Ot5A=" - }, - "node_modules/@xtuc/long": { - "version": "4.2.2", - "resolved": "https://registry.npm.taobao.org/@xtuc/long/download/@xtuc/long-4.2.2.tgz", - "integrity": "sha1-0pHGpOl5ibXGHZrPOWrk/hM6cY0=" - }, - "node_modules/accepts": { - "version": "1.3.7", - "resolved": "https://registry.npm.taobao.org/accepts/download/accepts-1.3.7.tgz", - "integrity": "sha1-UxvHJlF6OytB+FACHGzBXqq1B80=", - "dev": true, - "dependencies": { - "mime-types": "~2.1.24", - "negotiator": "0.6.2" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/acorn": { - "version": "6.4.2", - "resolved": "https://registry.npm.taobao.org/acorn/download/acorn-6.4.2.tgz", - "integrity": "sha1-NYZv1xBSjpLeEM8GAWSY5H454eY=", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-walk": { - "version": "7.2.0", - "resolved": "https://registry.npm.taobao.org/acorn-walk/download/acorn-walk-7.2.0.tgz?cache=0&sync_timestamp=1597235855275&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Facorn-walk%2Fdownload%2Facorn-walk-7.2.0.tgz", - "integrity": "sha1-DeiJpgEgOQmw++B7iTjcIdLpZ7w=", - "dev": true, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/address": { - "version": "1.1.2", - "resolved": "https://registry.npm.taobao.org/address/download/address-1.1.2.tgz", - "integrity": "sha1-vxEWycdYxRt6kz0pa3LCIe2UKLY=", - "dev": true, - "engines": { - "node": ">= 0.12.0" - } - }, - "node_modules/aggregate-error": { - "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/aggregate-error/download/aggregate-error-3.1.0.tgz?cache=0&sync_timestamp=1598049717562&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Faggregate-error%2Fdownload%2Faggregate-error-3.1.0.tgz", - "integrity": "sha1-kmcP9Q9TWb23o+DUDQ7DDFc3aHo=", - "dependencies": { - "clean-stack": "^2.0.0", - "indent-string": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npm.taobao.org/ajv/download/ajv-6.12.6.tgz?cache=0&sync_timestamp=1603561547443&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fajv%2Fdownload%2Fajv-6.12.6.tgz", - "integrity": "sha1-uvWmLoArB9l3A0WG+MO69a3ybfQ=", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/ajv-errors": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/ajv-errors/download/ajv-errors-1.0.1.tgz", - "integrity": "sha1-81mGrOuRr63sQQL72FAUlQzvpk0=", - "peerDependencies": { - "ajv": ">=5.0.0" - } - }, - "node_modules/ajv-keywords": { - "version": "3.5.2", - "resolved": "https://registry.npm.taobao.org/ajv-keywords/download/ajv-keywords-3.5.2.tgz?cache=0&sync_timestamp=1603566069729&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fajv-keywords%2Fdownload%2Fajv-keywords-3.5.2.tgz", - "integrity": "sha1-MfKdpatuANHC0yms97WSlhTVAU0=", - "peerDependencies": { - "ajv": "^6.9.1" - } - }, - "node_modules/alphanum-sort": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/alphanum-sort/download/alphanum-sort-1.0.2.tgz", - "integrity": "sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM=", - "dev": true - }, - "node_modules/ansi-colors": { - "version": "3.2.4", - "resolved": "https://registry.npm.taobao.org/ansi-colors/download/ansi-colors-3.2.4.tgz?cache=0&sync_timestamp=1593529711167&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fansi-colors%2Fdownload%2Fansi-colors-3.2.4.tgz", - "integrity": "sha1-46PaS/uubIapwoViXeEkojQCb78=", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/ansi-html": { - "version": "0.0.7", - "resolved": "https://registry.npm.taobao.org/ansi-html/download/ansi-html-0.0.7.tgz", - "integrity": "sha1-gTWEAhliqenm/QOflA0S9WynhZ4=", - "dev": true, - "engines": [ - "node >= 0.8.0" - ], - "bin": { - "ansi-html": "bin/ansi-html" - } - }, - "node_modules/ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npm.taobao.org/ansi-regex/download/ansi-regex-4.1.0.tgz", - "integrity": "sha1-i5+PCM8ay4Q3Vqg5yox+MWjFGZc=", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npm.taobao.org/ansi-styles/download/ansi-styles-3.2.1.tgz?cache=0&sync_timestamp=1601839122515&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fansi-styles%2Fdownload%2Fansi-styles-3.2.1.tgz", - "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", - "dev": true, - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/any-promise": { - "version": "1.3.0", - "resolved": "https://registry.npm.taobao.org/any-promise/download/any-promise-1.3.0.tgz", - "integrity": "sha1-q8av7tzqUugJzcA3au0845Y10X8=", - "dev": true - }, - "node_modules/anymatch": { - "version": "3.1.1", - "resolved": "https://registry.npm.taobao.org/anymatch/download/anymatch-3.1.1.tgz", - "integrity": "sha1-xV7PAhheJGklk5kxDBc84xIzsUI=", - "optional": true, - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/aproba": { - "version": "1.2.0", - "resolved": "https://registry.npm.taobao.org/aproba/download/aproba-1.2.0.tgz", - "integrity": "sha1-aALmJk79GMeQobDVF/DyYnvyyUo=" - }, - "node_modules/arch": { - "version": "2.2.0", - "resolved": "https://registry.npm.taobao.org/arch/download/arch-2.2.0.tgz?cache=0&sync_timestamp=1603836487323&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Farch%2Fdownload%2Farch-2.2.0.tgz", - "integrity": "sha1-G8R4GPMFdk8jqzMGsL/AhsWinRE=", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npm.taobao.org/argparse/download/argparse-1.0.10.tgz?cache=0&sync_timestamp=1598649734444&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fargparse%2Fdownload%2Fargparse-1.0.10.tgz", - "integrity": "sha1-vNZ5HqWuCXJeF+WtmIE0zUCz2RE=", - "dev": true, - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "node_modules/arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/arr-diff/download/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/arr-flatten": { - "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/arr-flatten/download/arr-flatten-1.1.0.tgz", - "integrity": "sha1-NgSLv/TntH4TZkQxbJlmnqWukfE=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/arr-union": { - "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/arr-union/download/arr-union-3.1.0.tgz", - "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/array-flatten": { - "version": "1.1.1", - "resolved": "https://registry.npm.taobao.org/array-flatten/download/array-flatten-1.1.1.tgz?cache=0&sync_timestamp=1574313384951&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Farray-flatten%2Fdownload%2Farray-flatten-1.1.1.tgz", - "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=", - "dev": true - }, - "node_modules/array-union": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/array-union/download/array-union-1.0.2.tgz", - "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", - "dev": true, - "dependencies": { - "array-uniq": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/array-uniq": { - "version": "1.0.3", - "resolved": "https://registry.npm.taobao.org/array-uniq/download/array-uniq-1.0.3.tgz", - "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npm.taobao.org/array-unique/download/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/asn1": { - "version": "0.2.4", - "resolved": "https://registry.npm.taobao.org/asn1/download/asn1-0.2.4.tgz", - "integrity": "sha1-jSR136tVO7M+d7VOWeiAu4ziMTY=", - "dev": true, - "dependencies": { - "safer-buffer": "~2.1.0" - } - }, - "node_modules/asn1.js": { - "version": "5.4.1", - "resolved": "https://registry.npm.taobao.org/asn1.js/download/asn1.js-5.4.1.tgz", - "integrity": "sha1-EamAuE67kXgc41sP3C7ilON4Pwc=", - "dependencies": { - "bn.js": "^4.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "safer-buffer": "^2.1.0" - } - }, - "node_modules/asn1.js/node_modules/bn.js": { - "version": "4.11.9", - "resolved": "https://registry.npm.taobao.org/bn.js/download/bn.js-4.11.9.tgz", - "integrity": "sha1-JtVWgpRY+dHoH8SJUkk9C6NQeCg=" - }, - "node_modules/assert": { - "version": "1.5.0", - "resolved": "https://registry.npm.taobao.org/assert/download/assert-1.5.0.tgz", - "integrity": "sha1-VcEJqvbgrv2z3EtxJAxwv1dLGOs=", - "dependencies": { - "object-assign": "^4.1.1", - "util": "0.10.3" - } - }, - "node_modules/assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/assert-plus/download/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "dev": true, - "engines": { - "node": ">=0.8" - } - }, - "node_modules/assert/node_modules/inherits": { - "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/inherits/download/inherits-2.0.1.tgz", - "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=" - }, - "node_modules/assert/node_modules/util": { - "version": "0.10.3", - "resolved": "https://registry.npm.taobao.org/util/download/util-0.10.3.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Futil%2Fdownload%2Futil-0.10.3.tgz", - "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", - "dependencies": { - "inherits": "2.0.1" - } - }, - "node_modules/assign-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/assign-symbols/download/assign-symbols-1.0.0.tgz", - "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/async": { - "version": "2.6.3", - "resolved": "https://registry.npm.taobao.org/async/download/async-2.6.3.tgz", - "integrity": "sha1-1yYl4jRKNlbjo61Pp0n6gymdgv8=", - "dev": true, - "dependencies": { - "lodash": "^4.17.14" - } - }, - "node_modules/async-each": { - "version": "1.0.3", - "resolved": "https://registry.npm.taobao.org/async-each/download/async-each-1.0.3.tgz", - "integrity": "sha1-tyfb+H12UWAvBvTUrDh/R9kbDL8=", - "devOptional": true - }, - "node_modules/async-limiter": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/async-limiter/download/async-limiter-1.0.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fasync-limiter%2Fdownload%2Fasync-limiter-1.0.1.tgz", - "integrity": "sha1-3TeelPDbgxCwgpH51kwyCXZmF/0=", - "dev": true - }, - "node_modules/async-validator": { - "version": "1.8.5", - "resolved": "https://registry.npm.taobao.org/async-validator/download/async-validator-1.8.5.tgz?cache=0&sync_timestamp=1596623572478&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fasync-validator%2Fdownload%2Fasync-validator-1.8.5.tgz", - "integrity": "sha1-3D4I7B/Q3dtn5ghC8CwM0c7G1/A=", - "dependencies": { - "babel-runtime": "6.x" - } - }, - "node_modules/asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npm.taobao.org/asynckit/download/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", - "dev": true - }, - "node_modules/atob": { - "version": "2.1.2", - "resolved": "https://registry.npm.taobao.org/atob/download/atob-2.1.2.tgz", - "integrity": "sha1-bZUX654DDSQ2ZmZR6GvZ9vE1M8k=", - "bin": { - "atob": "bin/atob.js" - }, - "engines": { - "node": ">= 4.5.0" - } - }, - "node_modules/autoprefixer": { - "version": "9.8.6", - "resolved": "https://registry.npm.taobao.org/autoprefixer/download/autoprefixer-9.8.6.tgz?cache=0&sync_timestamp=1601167582745&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fautoprefixer%2Fdownload%2Fautoprefixer-9.8.6.tgz", - "integrity": "sha1-O3NZTKG/kmYyDFrPFYjXTep0IQ8=", - "dev": true, - "dependencies": { - "browserslist": "^4.12.0", - "caniuse-lite": "^1.0.30001109", - "colorette": "^1.2.1", - "normalize-range": "^0.1.2", - "num2fraction": "^1.2.2", - "postcss": "^7.0.32", - "postcss-value-parser": "^4.1.0" - }, - "bin": { - "autoprefixer": "bin/autoprefixer" - }, - "funding": { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/autoprefixer" - } - }, - "node_modules/aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npm.taobao.org/aws-sign2/download/aws-sign2-0.7.0.tgz", - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/aws4": { - "version": "1.10.1", - "resolved": "https://registry.npm.taobao.org/aws4/download/aws4-1.10.1.tgz?cache=0&sync_timestamp=1597236947743&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Faws4%2Fdownload%2Faws4-1.10.1.tgz", - "integrity": "sha1-4eguTz6Zniz9YbFhKA0WoRH4ZCg=", - "dev": true - }, - "node_modules/axios": { - "version": "0.21.0", - "resolved": "https://registry.npm.taobao.org/axios/download/axios-0.21.0.tgz", - "integrity": "sha1-Jt8IiAOiNQ3/LCf5b++Z/klEKso=", - "deprecated": "Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410", - "dependencies": { - "follow-redirects": "^1.10.0" - } - }, - "node_modules/babel-helper-vue-jsx-merge-props": { - "version": "2.0.3", - "resolved": "https://registry.npm.taobao.org/babel-helper-vue-jsx-merge-props/download/babel-helper-vue-jsx-merge-props-2.0.3.tgz", - "integrity": "sha1-Iq69OzOQIyjlEyk6jkmSs4T58bY=" - }, - "node_modules/babel-loader": { - "version": "8.1.0", - "resolved": "https://registry.npm.taobao.org/babel-loader/download/babel-loader-8.1.0.tgz?cache=0&sync_timestamp=1584715910722&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fbabel-loader%2Fdownload%2Fbabel-loader-8.1.0.tgz", - "integrity": "sha1-xhHVESvVIJq+i5+oTD5NolJ18cM=", - "dev": true, - "dependencies": { - "find-cache-dir": "^2.1.0", - "loader-utils": "^1.4.0", - "mkdirp": "^0.5.3", - "pify": "^4.0.1", - "schema-utils": "^2.6.5" - }, - "engines": { - "node": ">= 6.9" - }, - "peerDependencies": { - "@babel/core": "^7.0.0", - "webpack": ">=2" - } - }, - "node_modules/babel-plugin-dynamic-import-node": { - "version": "2.3.3", - "resolved": "https://registry.npm.taobao.org/babel-plugin-dynamic-import-node/download/babel-plugin-dynamic-import-node-2.3.3.tgz", - "integrity": "sha1-hP2hnJduxcbe/vV/lCez3vZuF6M=", - "dev": true, - "dependencies": { - "object.assign": "^4.1.0" - } - }, - "node_modules/babel-runtime": { - "version": "6.26.0", - "resolved": "https://registry.npm.taobao.org/babel-runtime/download/babel-runtime-6.26.0.tgz", - "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", - "dependencies": { - "core-js": "^2.4.0", - "regenerator-runtime": "^0.11.0" - } - }, - "node_modules/babel-runtime/node_modules/core-js": { - "version": "2.6.12", - "resolved": "https://registry.npmmirror.com/core-js/download/core-js-2.6.12.tgz", - "integrity": "sha1-2TM9+nsGXjR8xWgiGdb2kIWcwuw=", - "deprecated": "core-js@<3.4 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.", - "hasInstallScript": true - }, - "node_modules/babel-runtime/node_modules/regenerator-runtime": { - "version": "0.11.1", - "resolved": "https://registry.npm.taobao.org/regenerator-runtime/download/regenerator-runtime-0.11.1.tgz?cache=0&sync_timestamp=1595456311465&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fregenerator-runtime%2Fdownload%2Fregenerator-runtime-0.11.1.tgz", - "integrity": "sha1-vgWtf5v30i4Fb5cmzuUBf78Z4uk=" - }, - "node_modules/balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/balanced-match/download/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" - }, - "node_modules/base": { - "version": "0.11.2", - "resolved": "https://registry.npm.taobao.org/base/download/base-0.11.2.tgz", - "integrity": "sha1-e95c7RRbbVUakNuH+DxVi060io8=", - "dependencies": { - "cache-base": "^1.0.1", - "class-utils": "^0.3.5", - "component-emitter": "^1.2.1", - "define-property": "^1.0.0", - "isobject": "^3.0.1", - "mixin-deep": "^1.2.0", - "pascalcase": "^0.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/base/node_modules/define-property": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/define-property/download/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dependencies": { - "is-descriptor": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/base/node_modules/is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/is-accessor-descriptor/download/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY=", - "dependencies": { - "kind-of": "^6.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/base/node_modules/is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/is-data-descriptor/download/is-data-descriptor-1.0.0.tgz", - "integrity": "sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc=", - "dependencies": { - "kind-of": "^6.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/base/node_modules/is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/is-descriptor/download/is-descriptor-1.0.2.tgz", - "integrity": "sha1-OxWXRqZmBLBPjIFSS6NlxfFNhuw=", - "dependencies": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/base64-js": { - "version": "1.3.1", - "resolved": "https://registry.npm.taobao.org/base64-js/download/base64-js-1.3.1.tgz", - "integrity": "sha1-WOzoy3XdB+ce0IxzarxfrE2/jfE=" - }, - "node_modules/batch": { - "version": "0.6.1", - "resolved": "https://registry.npm.taobao.org/batch/download/batch-0.6.1.tgz", - "integrity": "sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY=", - "dev": true - }, - "node_modules/bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/bcrypt-pbkdf/download/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", - "dev": true, - "dependencies": { - "tweetnacl": "^0.14.3" - } - }, - "node_modules/bfj": { - "version": "6.1.2", - "resolved": "https://registry.npm.taobao.org/bfj/download/bfj-6.1.2.tgz", - "integrity": "sha1-MlyGGoIryzWKQceKM7jm4ght3n8=", - "dev": true, - "dependencies": { - "bluebird": "^3.5.5", - "check-types": "^8.0.3", - "hoopy": "^0.1.4", - "tryer": "^1.0.1" - }, - "engines": { - "node": ">= 6.0.0" - } - }, - "node_modules/big.js": { - "version": "5.2.2", - "resolved": "https://registry.npm.taobao.org/big.js/download/big.js-5.2.2.tgz", - "integrity": "sha1-ZfCvOC9Xi83HQr2cKB6cstd2gyg=", - "engines": { - "node": "*" - } - }, - "node_modules/binary-extensions": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/binary-extensions/download/binary-extensions-2.1.0.tgz", - "integrity": "sha1-MPpAyef+B9vIlWeM0ocCTeokHdk=", - "optional": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/bindings": { - "version": "1.5.0", - "resolved": "https://registry.npm.taobao.org/bindings/download/bindings-1.5.0.tgz", - "integrity": "sha1-EDU8npRTNLwFEabZCzj7x8nFBN8=", - "optional": true, - "dependencies": { - "file-uri-to-path": "1.0.0" - } - }, - "node_modules/bluebird": { - "version": "3.7.2", - "resolved": "https://registry.npm.taobao.org/bluebird/download/bluebird-3.7.2.tgz", - "integrity": "sha1-nyKcFb4nJFT/qXOs4NvueaGww28=" - }, - "node_modules/bn.js": { - "version": "5.1.3", - "resolved": "https://registry.npm.taobao.org/bn.js/download/bn.js-5.1.3.tgz", - "integrity": "sha1-vsoAVAj2Quvr6oCwQrTRjSrA7ms=" - }, - "node_modules/body-parser": { - "version": "1.19.0", - "resolved": "https://registry.npm.taobao.org/body-parser/download/body-parser-1.19.0.tgz", - "integrity": "sha1-lrJwnlfJxOCab9Zqj9l5hE9p8Io=", - "dev": true, - "dependencies": { - "bytes": "3.1.0", - "content-type": "~1.0.4", - "debug": "2.6.9", - "depd": "~1.1.2", - "http-errors": "1.7.2", - "iconv-lite": "0.4.24", - "on-finished": "~2.3.0", - "qs": "6.7.0", - "raw-body": "2.4.0", - "type-is": "~1.6.17" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/body-parser/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npm.taobao.org/debug/download/debug-2.6.9.tgz?cache=0&sync_timestamp=1600502894812&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdebug%2Fdownload%2Fdebug-2.6.9.tgz", - "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/body-parser/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/ms/download/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, - "node_modules/body-parser/node_modules/qs": { - "version": "6.7.0", - "resolved": "https://registry.npm.taobao.org/qs/download/qs-6.7.0.tgz", - "integrity": "sha1-QdwaAV49WB8WIXdr4xr7KHapsbw=", - "dev": true, - "engines": { - "node": ">=0.6" - } - }, - "node_modules/body-scroll-lock": { - "version": "2.7.1", - "resolved": "https://registry.npm.taobao.org/body-scroll-lock/download/body-scroll-lock-2.7.1.tgz", - "integrity": "sha1-yvP5yRdzrx/7aEzWbtkTe1tzcBQ=" - }, - "node_modules/bonjour": { - "version": "3.5.0", - "resolved": "https://registry.npm.taobao.org/bonjour/download/bonjour-3.5.0.tgz", - "integrity": "sha1-jokKGD2O6aI5OzhExpGkK897yfU=", - "dev": true, - "dependencies": { - "array-flatten": "^2.1.0", - "deep-equal": "^1.0.1", - "dns-equal": "^1.0.0", - "dns-txt": "^2.0.2", - "multicast-dns": "^6.0.1", - "multicast-dns-service-types": "^1.1.0" - } - }, - "node_modules/bonjour/node_modules/array-flatten": { - "version": "2.1.2", - "resolved": "https://registry.npm.taobao.org/array-flatten/download/array-flatten-2.1.2.tgz?cache=0&sync_timestamp=1574313384951&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Farray-flatten%2Fdownload%2Farray-flatten-2.1.2.tgz", - "integrity": "sha1-JO+AoowaiTYX4hSbDG0NeIKTsJk=", - "dev": true - }, - "node_modules/boolbase": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/boolbase/download/boolbase-1.0.0.tgz", - "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=", - "dev": true - }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npm.taobao.org/brace-expansion/download/brace-expansion-1.1.11.tgz?cache=0&sync_timestamp=1601898189928&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fbrace-expansion%2Fdownload%2Fbrace-expansion-1.1.11.tgz", - "integrity": "sha1-PH/L9SnYcibz0vUrlm/1Jx60Qd0=", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/braces": { - "version": "2.3.2", - "resolved": "https://registry.npm.taobao.org/braces/download/braces-2.3.2.tgz", - "integrity": "sha1-WXn9PxTNUxVl5fot8av/8d+u5yk=", - "dependencies": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/braces/node_modules/extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/extend-shallow/download/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dependencies": { - "is-extendable": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/brorand": { - "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/brorand/download/brorand-1.1.0.tgz", - "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" - }, - "node_modules/browser-detect": { - "version": "0.2.28", - "resolved": "https://registry.npm.taobao.org/browser-detect/download/browser-detect-0.2.28.tgz", - "integrity": "sha1-Voj8IvY4OQYU6+pGRkg0A/sg6/s=", - "dependencies": { - "core-js": "^2.5.7" - } - }, - "node_modules/browser-detect/node_modules/core-js": { - "version": "2.6.12", - "resolved": "https://registry.npm.taobao.org/core-js/download/core-js-2.6.12.tgz?cache=0&sync_timestamp=1606326891071&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcore-js%2Fdownload%2Fcore-js-2.6.12.tgz", - "integrity": "sha1-2TM9+nsGXjR8xWgiGdb2kIWcwuw=", - "deprecated": "core-js@<3.4 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.", - "hasInstallScript": true - }, - "node_modules/browserify-aes": { - "version": "1.2.0", - "resolved": "https://registry.npm.taobao.org/browserify-aes/download/browserify-aes-1.2.0.tgz", - "integrity": "sha1-Mmc0ZC9APavDADIJhTu3CtQo70g=", - "dependencies": { - "buffer-xor": "^1.0.3", - "cipher-base": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.3", - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "node_modules/browserify-cipher": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/browserify-cipher/download/browserify-cipher-1.0.1.tgz", - "integrity": "sha1-jWR0wbhwv9q807z8wZNKEOlPFfA=", - "dependencies": { - "browserify-aes": "^1.0.4", - "browserify-des": "^1.0.0", - "evp_bytestokey": "^1.0.0" - } - }, - "node_modules/browserify-des": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/browserify-des/download/browserify-des-1.0.2.tgz", - "integrity": "sha1-OvTx9Zg5QDVy8cZiBDdfen9wPpw=", - "dependencies": { - "cipher-base": "^1.0.1", - "des.js": "^1.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "node_modules/browserify-rsa": { - "version": "4.0.1", - "resolved": "https://registry.npm.taobao.org/browserify-rsa/download/browserify-rsa-4.0.1.tgz", - "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", - "dependencies": { - "bn.js": "^4.1.0", - "randombytes": "^2.0.1" - } - }, - "node_modules/browserify-rsa/node_modules/bn.js": { - "version": "4.11.9", - "resolved": "https://registry.npm.taobao.org/bn.js/download/bn.js-4.11.9.tgz", - "integrity": "sha1-JtVWgpRY+dHoH8SJUkk9C6NQeCg=" - }, - "node_modules/browserify-sign": { - "version": "4.2.1", - "resolved": "https://registry.npm.taobao.org/browserify-sign/download/browserify-sign-4.2.1.tgz", - "integrity": "sha1-6vSt1G3VS+O7OzbAzxWrvrp5VsM=", - "dependencies": { - "bn.js": "^5.1.1", - "browserify-rsa": "^4.0.1", - "create-hash": "^1.2.0", - "create-hmac": "^1.1.7", - "elliptic": "^6.5.3", - "inherits": "^2.0.4", - "parse-asn1": "^5.1.5", - "readable-stream": "^3.6.0", - "safe-buffer": "^5.2.0" - } - }, - "node_modules/browserify-sign/node_modules/readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npm.taobao.org/readable-stream/download/readable-stream-3.6.0.tgz?cache=0&sync_timestamp=1581624324274&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Freadable-stream%2Fdownload%2Freadable-stream-3.6.0.tgz", - "integrity": "sha1-M3u9o63AcGvT4CRCaihtS0sskZg=", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/browserify-sign/node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npm.taobao.org/safe-buffer/download/safe-buffer-5.2.1.tgz", - "integrity": "sha1-Hq+fqb2x/dTsdfWPnNtOa3gn7sY=", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/browserify-zlib": { - "version": "0.2.0", - "resolved": "https://registry.npm.taobao.org/browserify-zlib/download/browserify-zlib-0.2.0.tgz", - "integrity": "sha1-KGlFnZqjviRf6P4sofRuLn9U1z8=", - "dependencies": { - "pako": "~1.0.5" - } - }, - "node_modules/browserslist": { - "version": "4.14.5", - "resolved": "https://registry.npm.taobao.org/browserslist/download/browserslist-4.14.5.tgz?cache=0&sync_timestamp=1600993129773&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fbrowserslist%2Fdownload%2Fbrowserslist-4.14.5.tgz", - "integrity": "sha1-HHUUYaEC3cYOQJk2ObcJvn8sQBU=", - "dev": true, - "dependencies": { - "caniuse-lite": "^1.0.30001135", - "electron-to-chromium": "^1.3.571", - "escalade": "^3.1.0", - "node-releases": "^1.1.61" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - }, - "funding": { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - } - }, - "node_modules/buffer": { - "version": "4.9.2", - "resolved": "https://registry.npm.taobao.org/buffer/download/buffer-4.9.2.tgz?cache=0&sync_timestamp=1603834228181&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fbuffer%2Fdownload%2Fbuffer-4.9.2.tgz", - "integrity": "sha1-Iw6tNEACmIZEhBqwJEr4xEu+Pvg=", - "dependencies": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4", - "isarray": "^1.0.0" - } - }, - "node_modules/buffer-from": { - "version": "1.1.1", - "resolved": "https://registry.npm.taobao.org/buffer-from/download/buffer-from-1.1.1.tgz", - "integrity": "sha1-MnE7wCj3XAL9txDXx7zsHyxgcO8=" - }, - "node_modules/buffer-indexof": { - "version": "1.1.1", - "resolved": "https://registry.npm.taobao.org/buffer-indexof/download/buffer-indexof-1.1.1.tgz", - "integrity": "sha1-Uvq8xqYG0aADAoAmSO9o9jnaJow=", - "dev": true - }, - "node_modules/buffer-json": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/buffer-json/download/buffer-json-2.0.0.tgz", - "integrity": "sha1-9z4TseQvGW/i/WfQAcfXEH7dfCM=", - "dev": true - }, - "node_modules/buffer-xor": { - "version": "1.0.3", - "resolved": "https://registry.npm.taobao.org/buffer-xor/download/buffer-xor-1.0.3.tgz", - "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=" - }, - "node_modules/builtin-status-codes": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/builtin-status-codes/download/builtin-status-codes-3.0.0.tgz", - "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=" - }, - "node_modules/bytes": { - "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/bytes/download/bytes-3.1.0.tgz", - "integrity": "sha1-9s95M6Ng4FiPqf3oVlHNx/gF0fY=", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/cacache": { - "version": "12.0.4", - "resolved": "https://registry.npm.taobao.org/cacache/download/cacache-12.0.4.tgz?cache=0&sync_timestamp=1594429684526&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcacache%2Fdownload%2Fcacache-12.0.4.tgz", - "integrity": "sha1-ZovL0QWutfHZL+JVcOyVJcj6pAw=", - "dependencies": { - "bluebird": "^3.5.5", - "chownr": "^1.1.1", - "figgy-pudding": "^3.5.1", - "glob": "^7.1.4", - "graceful-fs": "^4.1.15", - "infer-owner": "^1.0.3", - "lru-cache": "^5.1.1", - "mississippi": "^3.0.0", - "mkdirp": "^0.5.1", - "move-concurrently": "^1.0.1", - "promise-inflight": "^1.0.1", - "rimraf": "^2.6.3", - "ssri": "^6.0.1", - "unique-filename": "^1.1.1", - "y18n": "^4.0.0" - } - }, - "node_modules/cache-base": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/cache-base/download/cache-base-1.0.1.tgz", - "integrity": "sha1-Cn9GQWgxyLZi7jb+TnxZ129marI=", - "dependencies": { - "collection-visit": "^1.0.0", - "component-emitter": "^1.2.1", - "get-value": "^2.0.6", - "has-value": "^1.0.0", - "isobject": "^3.0.1", - "set-value": "^2.0.0", - "to-object-path": "^0.3.0", - "union-value": "^1.0.0", - "unset-value": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/cache-loader": { - "version": "4.1.0", - "resolved": "https://registry.npm.taobao.org/cache-loader/download/cache-loader-4.1.0.tgz", - "integrity": "sha1-mUjK41OuwKH8ser9ojAIFuyFOH4=", - "dev": true, - "dependencies": { - "buffer-json": "^2.0.0", - "find-cache-dir": "^3.0.0", - "loader-utils": "^1.2.3", - "mkdirp": "^0.5.1", - "neo-async": "^2.6.1", - "schema-utils": "^2.0.0" - }, - "engines": { - "node": ">= 8.9.0" - }, - "peerDependencies": { - "webpack": "^4.0.0" - } - }, - "node_modules/cache-loader/node_modules/find-cache-dir": { - "version": "3.3.1", - "resolved": "https://registry.npm.taobao.org/find-cache-dir/download/find-cache-dir-3.3.1.tgz", - "integrity": "sha1-ibM/rUpGcNqpT4Vff74x1thP6IA=", - "dev": true, - "dependencies": { - "commondir": "^1.0.1", - "make-dir": "^3.0.2", - "pkg-dir": "^4.1.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/avajs/find-cache-dir?sponsor=1" - } - }, - "node_modules/cache-loader/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npm.taobao.org/find-up/download/find-up-4.1.0.tgz?cache=0&sync_timestamp=1597169842138&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffind-up%2Fdownload%2Ffind-up-4.1.0.tgz", - "integrity": "sha1-l6/n1s3AvFkoWEt8jXsW6KmqXRk=", - "dev": true, - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cache-loader/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npm.taobao.org/locate-path/download/locate-path-5.0.0.tgz", - "integrity": "sha1-Gvujlq/WdqbUJQTQpno6frn2KqA=", - "dev": true, - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cache-loader/node_modules/make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/make-dir/download/make-dir-3.1.0.tgz?cache=0&sync_timestamp=1587567572251&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmake-dir%2Fdownload%2Fmake-dir-3.1.0.tgz", - "integrity": "sha1-QV6WcEazp/HRhSd9hKpYIDcmoT8=", - "dev": true, - "dependencies": { - "semver": "^6.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/cache-loader/node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npm.taobao.org/p-locate/download/p-locate-4.1.0.tgz", - "integrity": "sha1-o0KLtwiLOmApL2aRkni3wpetTwc=", - "dev": true, - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cache-loader/node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/path-exists/download/path-exists-4.0.0.tgz", - "integrity": "sha1-UTvb4tO5XXdi6METfvoZXGxhtbM=", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/cache-loader/node_modules/pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npm.taobao.org/pkg-dir/download/pkg-dir-4.2.0.tgz?cache=0&sync_timestamp=1602859045787&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpkg-dir%2Fdownload%2Fpkg-dir-4.2.0.tgz", - "integrity": "sha1-8JkTPfft5CLoHR2ESCcO6z5CYfM=", - "dev": true, - "dependencies": { - "find-up": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cache-loader/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npm.taobao.org/semver/download/semver-6.3.0.tgz", - "integrity": "sha1-7gpkyK9ejO6mdoexM3YeG+y9HT0=", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/call-me-maybe": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/call-me-maybe/download/call-me-maybe-1.0.1.tgz", - "integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms=", - "dev": true - }, - "node_modules/caller-callsite": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/caller-callsite/download/caller-callsite-2.0.0.tgz", - "integrity": "sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ=", - "dev": true, - "dependencies": { - "callsites": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/caller-path": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/caller-path/download/caller-path-2.0.0.tgz", - "integrity": "sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ=", - "dev": true, - "dependencies": { - "caller-callsite": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/callsites": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/callsites/download/callsites-2.0.0.tgz", - "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/camel-case": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/camel-case/download/camel-case-3.0.0.tgz", - "integrity": "sha1-yjw2iKTpzzpM2nd9xNy8cTJJz3M=", - "dev": true, - "dependencies": { - "no-case": "^2.2.0", - "upper-case": "^1.1.1" - } - }, - "node_modules/camelcase": { - "version": "6.2.0", - "resolved": "https://registry.npm.taobao.org/camelcase/download/camelcase-6.2.0.tgz?cache=0&sync_timestamp=1603923709404&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcamelcase%2Fdownload%2Fcamelcase-6.2.0.tgz", - "integrity": "sha1-kkr4gcnVJaydh/QNlk5c6pgqGAk=", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/caniuse-api": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/caniuse-api/download/caniuse-api-3.0.0.tgz", - "integrity": "sha1-Xk2Q4idJYdRikZl99Znj7QCO5MA=", - "dev": true, - "dependencies": { - "browserslist": "^4.0.0", - "caniuse-lite": "^1.0.0", - "lodash.memoize": "^4.1.2", - "lodash.uniq": "^4.5.0" - } - }, - "node_modules/caniuse-lite": { - "version": "1.0.30001154", - "resolved": "https://registry.npm.taobao.org/caniuse-lite/download/caniuse-lite-1.0.30001154.tgz?cache=0&sync_timestamp=1604001843079&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcaniuse-lite%2Fdownload%2Fcaniuse-lite-1.0.30001154.tgz", - "integrity": "sha1-87vCRc5V5MHNIPpzGwl4gBgafxc=", - "dev": true - }, - "node_modules/case-sensitive-paths-webpack-plugin": { - "version": "2.3.0", - "resolved": "https://registry.npm.taobao.org/case-sensitive-paths-webpack-plugin/download/case-sensitive-paths-webpack-plugin-2.3.0.tgz", - "integrity": "sha1-I6xhPMmoVuT4j/i7c7u16YmCXPc=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/caseless": { - "version": "0.12.0", - "resolved": "https://registry.npm.taobao.org/caseless/download/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", - "dev": true - }, - "node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npm.taobao.org/chalk/download/chalk-2.4.2.tgz?cache=0&sync_timestamp=1591687070184&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fchalk%2Fdownload%2Fchalk-2.4.2.tgz", - "integrity": "sha1-zUJUFnelQzPPVBpJEIwUMrRMlCQ=", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/check-types": { - "version": "8.0.3", - "resolved": "https://registry.npm.taobao.org/check-types/download/check-types-8.0.3.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcheck-types%2Fdownload%2Fcheck-types-8.0.3.tgz", - "integrity": "sha1-M1bMoZyIlUTy16le1JzlCKDs9VI=", - "dev": true - }, - "node_modules/chokidar": { - "version": "3.4.3", - "resolved": "https://registry.npm.taobao.org/chokidar/download/chokidar-3.4.3.tgz?cache=0&sync_timestamp=1602585381749&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fchokidar%2Fdownload%2Fchokidar-3.4.3.tgz", - "integrity": "sha1-wd84IxRI5FykrFiObHlXO6alfVs=", - "optional": true, - "dependencies": { - "anymatch": "~3.1.1", - "braces": "~3.0.2", - "glob-parent": "~5.1.0", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.5.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "optionalDependencies": { - "fsevents": "~2.1.2" - } - }, - "node_modules/chokidar/node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npm.taobao.org/braces/download/braces-3.0.2.tgz", - "integrity": "sha1-NFThpGLujVmeI23zNs2epPiv4Qc=", - "optional": true, - "dependencies": { - "fill-range": "^7.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/chokidar/node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npm.taobao.org/fill-range/download/fill-range-7.0.1.tgz", - "integrity": "sha1-GRmmp8df44ssfHflGYU12prN2kA=", - "optional": true, - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/chokidar/node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npm.taobao.org/is-number/download/is-number-7.0.0.tgz", - "integrity": "sha1-dTU0W4lnNNX4DE0GxQlVUnoU8Ss=", - "optional": true, - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/chokidar/node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npm.taobao.org/to-regex-range/download/to-regex-range-5.0.1.tgz", - "integrity": "sha1-FkjESq58jZiKMmAY7XL1tN0DkuQ=", - "optional": true, - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/chownr": { - "version": "1.1.4", - "resolved": "https://registry.npm.taobao.org/chownr/download/chownr-1.1.4.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fchownr%2Fdownload%2Fchownr-1.1.4.tgz", - "integrity": "sha1-b8nXtC0ypYNZYzdmbn0ICE2izGs=" - }, - "node_modules/chrome-trace-event": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/chrome-trace-event/download/chrome-trace-event-1.0.2.tgz", - "integrity": "sha1-I0CQ7pfH1K0aLEvq4nUF3v/GCKQ=", - "dependencies": { - "tslib": "^1.9.0" - }, - "engines": { - "node": ">=6.0" - } - }, - "node_modules/cipher-base": { - "version": "1.0.4", - "resolved": "https://registry.npm.taobao.org/cipher-base/download/cipher-base-1.0.4.tgz", - "integrity": "sha1-h2Dk7MJy9MNjUy+SbYdKriwTl94=", - "dependencies": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "node_modules/class-utils": { - "version": "0.3.6", - "resolved": "https://registry.npm.taobao.org/class-utils/download/class-utils-0.3.6.tgz", - "integrity": "sha1-+TNprouafOAv1B+q0MqDAzGQxGM=", - "dependencies": { - "arr-union": "^3.1.0", - "define-property": "^0.2.5", - "isobject": "^3.0.0", - "static-extend": "^0.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/class-utils/node_modules/define-property": { - "version": "0.2.5", - "resolved": "https://registry.npm.taobao.org/define-property/download/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dependencies": { - "is-descriptor": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/clean-css": { - "version": "4.2.3", - "resolved": "https://registry.npm.taobao.org/clean-css/download/clean-css-4.2.3.tgz", - "integrity": "sha1-UHtd59l7SO5T2ErbAWD/YhY4D3g=", - "dev": true, - "dependencies": { - "source-map": "~0.6.0" - }, - "engines": { - "node": ">= 4.0" - } - }, - "node_modules/clean-css/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz?cache=0&sync_timestamp=1571657176668&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsource-map%2Fdownload%2Fsource-map-0.6.1.tgz", - "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/clean-stack": { - "version": "2.2.0", - "resolved": "https://registry.npm.taobao.org/clean-stack/download/clean-stack-2.2.0.tgz", - "integrity": "sha1-7oRy27Ep5yezHooQpCfe6d/kAIs=", - "engines": { - "node": ">=6" - } - }, - "node_modules/cli-cursor": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/cli-cursor/download/cli-cursor-2.1.0.tgz", - "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", - "dev": true, - "dependencies": { - "restore-cursor": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/cli-highlight": { - "version": "2.1.4", - "resolved": "https://registry.npm.taobao.org/cli-highlight/download/cli-highlight-2.1.4.tgz", - "integrity": "sha1-CYy2Qs8X9CrcHBFF4H+WDsTXUis=", - "dev": true, - "dependencies": { - "chalk": "^3.0.0", - "highlight.js": "^9.6.0", - "mz": "^2.4.0", - "parse5": "^5.1.1", - "parse5-htmlparser2-tree-adapter": "^5.1.1", - "yargs": "^15.0.0" - }, - "bin": { - "highlight": "bin/highlight" - }, - "engines": { - "node": ">=8.0.0", - "npm": ">=5.0.0" - } - }, - "node_modules/cli-highlight/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npm.taobao.org/ansi-styles/download/ansi-styles-4.3.0.tgz?cache=0&sync_timestamp=1601839122515&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fansi-styles%2Fdownload%2Fansi-styles-4.3.0.tgz", - "integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/cli-highlight/node_modules/chalk": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/chalk/download/chalk-3.0.0.tgz?cache=0&sync_timestamp=1591687070184&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fchalk%2Fdownload%2Fchalk-3.0.0.tgz", - "integrity": "sha1-P3PCv1JlkfV0zEksUeJFY0n4ROQ=", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cli-highlight/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/color-convert/download/color-convert-2.0.1.tgz", - "integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/cli-highlight/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npm.taobao.org/color-name/download/color-name-1.1.4.tgz", - "integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=", - "dev": true - }, - "node_modules/cli-highlight/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/has-flag/download/has-flag-4.0.0.tgz", - "integrity": "sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/cli-highlight/node_modules/highlight.js": { - "version": "9.18.3", - "resolved": "https://registry.npm.taobao.org/highlight.js/download/highlight.js-9.18.3.tgz", - "integrity": "sha1-oaCiAo1eMUniOA+Khl7oUWcD1jQ=", - "deprecated": "Version no longer supported. Upgrade to @latest", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/cli-highlight/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-7.2.0.tgz?cache=0&sync_timestamp=1598611709087&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsupports-color%2Fdownload%2Fsupports-color-7.2.0.tgz", - "integrity": "sha1-G33NyzK4E4gBs+R4umpRyqiWSNo=", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cli-spinners": { - "version": "2.5.0", - "resolved": "https://registry.npm.taobao.org/cli-spinners/download/cli-spinners-2.5.0.tgz?cache=0&sync_timestamp=1602505826257&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcli-spinners%2Fdownload%2Fcli-spinners-2.5.0.tgz", - "integrity": "sha1-EnY+RyUb+VHLdcIB36WP8byy0Ec=", - "dev": true, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/clipboard": { - "version": "2.0.6", - "resolved": "https://registry.npm.taobao.org/clipboard/download/clipboard-2.0.6.tgz?cache=0&sync_timestamp=1599054235610&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fclipboard%2Fdownload%2Fclipboard-2.0.6.tgz", - "integrity": "sha1-UpISlu7A/fd+rRdJQhshyWhkc3Y=", - "dependencies": { - "good-listener": "^1.2.2", - "select": "^1.1.2", - "tiny-emitter": "^2.0.0" - } - }, - "node_modules/clipboardy": { - "version": "2.3.0", - "resolved": "https://registry.npm.taobao.org/clipboardy/download/clipboardy-2.3.0.tgz", - "integrity": "sha1-PCkDZQxo5GqRs4iYW8J3QofbopA=", - "dev": true, - "dependencies": { - "arch": "^2.1.1", - "execa": "^1.0.0", - "is-wsl": "^2.1.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/clipboardy/node_modules/is-wsl": { - "version": "2.2.0", - "resolved": "https://registry.npm.taobao.org/is-wsl/download/is-wsl-2.2.0.tgz", - "integrity": "sha1-dKTHbnfKn9P5MvKQwX6jJs0VcnE=", - "dev": true, - "dependencies": { - "is-docker": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cliui": { - "version": "6.0.0", - "resolved": "https://registry.npm.taobao.org/cliui/download/cliui-6.0.0.tgz?cache=0&sync_timestamp=1602861367442&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcliui%2Fdownload%2Fcliui-6.0.0.tgz", - "integrity": "sha1-UR1wLAxOQcoVbX0OlgIfI+EyJbE=", - "dev": true, - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^6.2.0" - } - }, - "node_modules/cliui/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/is-fullwidth-code-point/download/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha1-8Rb4Bk/pCz94RKOJl8C3UFEmnx0=", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/cliui/node_modules/string-width": { - "version": "4.2.0", - "resolved": "https://registry.npm.taobao.org/string-width/download/string-width-4.2.0.tgz", - "integrity": "sha1-lSGCxGzHssMT0VluYjmSvRY7crU=", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/clone": { - "version": "1.0.4", - "resolved": "https://registry.npm.taobao.org/clone/download/clone-1.0.4.tgz", - "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=", - "dev": true, - "engines": { - "node": ">=0.8" - } - }, - "node_modules/coa": { - "version": "2.0.2", - "resolved": "https://registry.npm.taobao.org/coa/download/coa-2.0.2.tgz", - "integrity": "sha1-Q/bCEVG07yv1cYfbDXPeIp4+fsM=", - "dev": true, - "dependencies": { - "@types/q": "^1.5.1", - "chalk": "^2.4.1", - "q": "^1.1.2" - }, - "engines": { - "node": ">= 4.0" - } - }, - "node_modules/codemirror": { - "version": "5.59.3", - "resolved": "https://registry.npm.taobao.org/codemirror/download/codemirror-5.59.3.tgz", - "integrity": "sha1-I37DrA45/uUNbxphlsgXKnx8K6E=" - }, - "node_modules/collection-visit": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/collection-visit/download/collection-visit-1.0.0.tgz", - "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", - "dependencies": { - "map-visit": "^1.0.0", - "object-visit": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/color": { - "version": "3.1.3", - "resolved": "https://registry.npm.taobao.org/color/download/color-3.1.3.tgz?cache=0&sync_timestamp=1602228883047&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcolor%2Fdownload%2Fcolor-3.1.3.tgz", - "integrity": "sha1-ymf7TnuX1hHc3jns7tQiBn2RWW4=", - "dev": true, - "dependencies": { - "color-convert": "^1.9.1", - "color-string": "^1.5.4" - } - }, - "node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npm.taobao.org/color-convert/download/color-convert-1.9.3.tgz", - "integrity": "sha1-u3GFBpDh8TZWfeYp0tVHHe2kweg=", - "dev": true, - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npm.taobao.org/color-name/download/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true - }, - "node_modules/color-string": { - "version": "1.5.4", - "resolved": "https://registry.npm.taobao.org/color-string/download/color-string-1.5.4.tgz?cache=0&sync_timestamp=1602228106182&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcolor-string%2Fdownload%2Fcolor-string-1.5.4.tgz", - "integrity": "sha1-3VHNJc/ulT0Tj+QAI3LMPQ5QTLY=", - "dev": true, - "dependencies": { - "color-name": "^1.0.0", - "simple-swizzle": "^0.2.2" - } - }, - "node_modules/colorette": { - "version": "1.2.1", - "resolved": "https://registry.npm.taobao.org/colorette/download/colorette-1.2.1.tgz?cache=0&sync_timestamp=1593955804228&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcolorette%2Fdownload%2Fcolorette-1.2.1.tgz", - "integrity": "sha1-TQuSEyXBT6+SYzCGpTbbbolWSxs=", - "dev": true - }, - "node_modules/combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npm.taobao.org/combined-stream/download/combined-stream-1.0.8.tgz", - "integrity": "sha1-w9RaizT9cwYxoRCoolIGgrMdWn8=", - "dev": true, - "dependencies": { - "delayed-stream": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/commander": { - "version": "2.20.3", - "resolved": "https://registry.npm.taobao.org/commander/download/commander-2.20.3.tgz?cache=0&sync_timestamp=1603599636161&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcommander%2Fdownload%2Fcommander-2.20.3.tgz", - "integrity": "sha1-/UhehMA+tIgcIHIrpIA16FMa6zM=" - }, - "node_modules/commondir": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/commondir/download/commondir-1.0.1.tgz", - "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=" - }, - "node_modules/component-emitter": { - "version": "1.3.0", - "resolved": "https://registry.npm.taobao.org/component-emitter/download/component-emitter-1.3.0.tgz", - "integrity": "sha1-FuQHD7qK4ptnnyIVhT7hgasuq8A=" - }, - "node_modules/compressible": { - "version": "2.0.18", - "resolved": "https://registry.npm.taobao.org/compressible/download/compressible-2.0.18.tgz?cache=0&sync_timestamp=1578286264482&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcompressible%2Fdownload%2Fcompressible-2.0.18.tgz", - "integrity": "sha1-r1PMprBw1MPAdQ+9dyhqbXzEb7o=", - "dev": true, - "dependencies": { - "mime-db": ">= 1.43.0 < 2" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/compression": { - "version": "1.7.4", - "resolved": "https://registry.npm.taobao.org/compression/download/compression-1.7.4.tgz", - "integrity": "sha1-lVI+/xcMpXwpoMpB5v4TH0Hlu48=", - "dev": true, - "dependencies": { - "accepts": "~1.3.5", - "bytes": "3.0.0", - "compressible": "~2.0.16", - "debug": "2.6.9", - "on-headers": "~1.0.2", - "safe-buffer": "5.1.2", - "vary": "~1.1.2" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/compression-webpack-plugin": { - "version": "5.0.1", - "resolved": "https://registry.npm.taobao.org/compression-webpack-plugin/download/compression-webpack-plugin-5.0.1.tgz?cache=0&sync_timestamp=1610367177662&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcompression-webpack-plugin%2Fdownload%2Fcompression-webpack-plugin-5.0.1.tgz", - "integrity": "sha1-MWwaTkzMlFEKl4yWf8FDWB0eNkM=", - "dependencies": { - "cacache": "^15.0.5", - "find-cache-dir": "^3.3.1", - "schema-utils": "^2.7.0", - "serialize-javascript": "^4.0.0", - "webpack-sources": "^1.4.3" - }, - "engines": { - "node": ">= 10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "webpack": "^4.0.0 || ^5.0.0" - } - }, - "node_modules/compression-webpack-plugin/node_modules/cacache": { - "version": "15.0.6", - "resolved": "https://registry.npm.taobao.org/cacache/download/cacache-15.0.6.tgz?cache=0&sync_timestamp=1616431156987&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcacache%2Fdownload%2Fcacache-15.0.6.tgz", - "integrity": "sha1-ZajFgP2hW1kVD7dr8/Oo5F1YMJk=", - "dependencies": { - "@npmcli/move-file": "^1.0.1", - "chownr": "^2.0.0", - "fs-minipass": "^2.0.0", - "glob": "^7.1.4", - "infer-owner": "^1.0.4", - "lru-cache": "^6.0.0", - "minipass": "^3.1.1", - "minipass-collect": "^1.0.2", - "minipass-flush": "^1.0.5", - "minipass-pipeline": "^1.2.2", - "mkdirp": "^1.0.3", - "p-map": "^4.0.0", - "promise-inflight": "^1.0.1", - "rimraf": "^3.0.2", - "ssri": "^8.0.1", - "tar": "^6.0.2", - "unique-filename": "^1.1.1" - }, - "engines": { - "node": ">= 10" - } - }, - "node_modules/compression-webpack-plugin/node_modules/chownr": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/chownr/download/chownr-2.0.0.tgz", - "integrity": "sha1-Fb++U9LqtM9w8YqM1o6+Wzyx3s4=", - "engines": { - "node": ">=10" - } - }, - "node_modules/compression-webpack-plugin/node_modules/find-cache-dir": { - "version": "3.3.1", - "resolved": "https://registry.npm.taobao.org/find-cache-dir/download/find-cache-dir-3.3.1.tgz", - "integrity": "sha1-ibM/rUpGcNqpT4Vff74x1thP6IA=", - "dependencies": { - "commondir": "^1.0.1", - "make-dir": "^3.0.2", - "pkg-dir": "^4.1.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/avajs/find-cache-dir?sponsor=1" - } - }, - "node_modules/compression-webpack-plugin/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npm.taobao.org/find-up/download/find-up-4.1.0.tgz?cache=0&sync_timestamp=1599054261724&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffind-up%2Fdownload%2Ffind-up-4.1.0.tgz", - "integrity": "sha1-l6/n1s3AvFkoWEt8jXsW6KmqXRk=", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/compression-webpack-plugin/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npm.taobao.org/locate-path/download/locate-path-5.0.0.tgz", - "integrity": "sha1-Gvujlq/WdqbUJQTQpno6frn2KqA=", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/compression-webpack-plugin/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npm.taobao.org/lru-cache/download/lru-cache-6.0.0.tgz", - "integrity": "sha1-bW/mVw69lqr5D8rR2vo7JWbbOpQ=", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/compression-webpack-plugin/node_modules/make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/make-dir/download/make-dir-3.1.0.tgz", - "integrity": "sha1-QV6WcEazp/HRhSd9hKpYIDcmoT8=", - "dependencies": { - "semver": "^6.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/compression-webpack-plugin/node_modules/mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npm.taobao.org/mkdirp/download/mkdirp-1.0.4.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmkdirp%2Fdownload%2Fmkdirp-1.0.4.tgz", - "integrity": "sha1-PrXtYmInVteaXw4qIh3+utdcL34=", - "bin": { - "mkdirp": "bin/cmd.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/compression-webpack-plugin/node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npm.taobao.org/p-locate/download/p-locate-4.1.0.tgz", - "integrity": "sha1-o0KLtwiLOmApL2aRkni3wpetTwc=", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/compression-webpack-plugin/node_modules/p-map": { - "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/p-map/download/p-map-4.0.0.tgz?cache=0&sync_timestamp=1599054263097&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fp-map%2Fdownload%2Fp-map-4.0.0.tgz", - "integrity": "sha1-uy+Vpe2i7BaOySdOBqdHw+KQTSs=", - "dependencies": { - "aggregate-error": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/compression-webpack-plugin/node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/path-exists/download/path-exists-4.0.0.tgz", - "integrity": "sha1-UTvb4tO5XXdi6METfvoZXGxhtbM=", - "engines": { - "node": ">=8" - } - }, - "node_modules/compression-webpack-plugin/node_modules/pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npm.taobao.org/pkg-dir/download/pkg-dir-4.2.0.tgz?cache=0&sync_timestamp=1602859045787&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpkg-dir%2Fdownload%2Fpkg-dir-4.2.0.tgz", - "integrity": "sha1-8JkTPfft5CLoHR2ESCcO6z5CYfM=", - "dependencies": { - "find-up": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/compression-webpack-plugin/node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npm.taobao.org/rimraf/download/rimraf-3.0.2.tgz?cache=0&sync_timestamp=1599054104695&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Frimraf%2Fdownload%2Frimraf-3.0.2.tgz", - "integrity": "sha1-8aVAK6YiCtUswSgrrBrjqkn9Bho=", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/compression-webpack-plugin/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npm.taobao.org/semver/download/semver-6.3.0.tgz", - "integrity": "sha1-7gpkyK9ejO6mdoexM3YeG+y9HT0=", - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/compression-webpack-plugin/node_modules/ssri": { - "version": "8.0.1", - "resolved": "https://registry.npm.taobao.org/ssri/download/ssri-8.0.1.tgz?cache=0&sync_timestamp=1617826295004&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fssri%2Fdownload%2Fssri-8.0.1.tgz", - "integrity": "sha1-Y45OQ54v+9LNKJd21cpFfE9Roq8=", - "dependencies": { - "minipass": "^3.1.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/compression-webpack-plugin/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/yallist/download/yallist-4.0.0.tgz", - "integrity": "sha1-m7knkNnA7/7GO+c1GeEaNQGaOnI=" - }, - "node_modules/compression/node_modules/bytes": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/bytes/download/bytes-3.0.0.tgz", - "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/compression/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npm.taobao.org/debug/download/debug-2.6.9.tgz?cache=0&sync_timestamp=1600502894812&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdebug%2Fdownload%2Fdebug-2.6.9.tgz", - "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/compression/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/ms/download/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npm.taobao.org/concat-map/download/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" - }, - "node_modules/concat-stream": { - "version": "1.6.2", - "resolved": "https://registry.npm.taobao.org/concat-stream/download/concat-stream-1.6.2.tgz", - "integrity": "sha1-kEvfGUzTEi/Gdcd/xKw9T/D9GjQ=", - "engines": [ - "node >= 0.8" - ], - "dependencies": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" - } - }, - "node_modules/connect-history-api-fallback": { - "version": "1.6.0", - "resolved": "https://registry.npm.taobao.org/connect-history-api-fallback/download/connect-history-api-fallback-1.6.0.tgz", - "integrity": "sha1-izIIk1kwjRERFdgcrT/Oq4iPl7w=", - "dev": true, - "engines": { - "node": ">=0.8" - } - }, - "node_modules/console-browserify": { - "version": "1.2.0", - "resolved": "https://registry.npm.taobao.org/console-browserify/download/console-browserify-1.2.0.tgz", - "integrity": "sha1-ZwY871fOts9Jk6KrOlWECujEkzY=" - }, - "node_modules/consolidate": { - "version": "0.15.1", - "resolved": "https://registry.npm.taobao.org/consolidate/download/consolidate-0.15.1.tgz?cache=0&sync_timestamp=1599596647062&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fconsolidate%2Fdownload%2Fconsolidate-0.15.1.tgz", - "integrity": "sha1-IasEMjXHGgfUXZqtmFk7DbpWurc=", - "dev": true, - "dependencies": { - "bluebird": "^3.1.1" - }, - "engines": { - "node": ">= 0.10.0" - } - }, - "node_modules/constants-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/constants-browserify/download/constants-browserify-1.0.0.tgz", - "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=" - }, - "node_modules/content-disposition": { - "version": "0.5.3", - "resolved": "https://registry.npm.taobao.org/content-disposition/download/content-disposition-0.5.3.tgz", - "integrity": "sha1-4TDK9+cnkIfFYWwgB9BIVpiYT70=", - "dev": true, - "dependencies": { - "safe-buffer": "5.1.2" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/content-type": { - "version": "1.0.4", - "resolved": "https://registry.npm.taobao.org/content-type/download/content-type-1.0.4.tgz", - "integrity": "sha1-4TjMdeBAxyexlm/l5fjJruJW/js=", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/convert-source-map": { - "version": "1.7.0", - "resolved": "https://registry.npm.taobao.org/convert-source-map/download/convert-source-map-1.7.0.tgz?cache=0&sync_timestamp=1573003637425&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fconvert-source-map%2Fdownload%2Fconvert-source-map-1.7.0.tgz", - "integrity": "sha1-F6LLiC1/d9NJBYXizmxSRCSjpEI=", - "dev": true, - "dependencies": { - "safe-buffer": "~5.1.1" - } - }, - "node_modules/cookie": { - "version": "0.4.0", - "resolved": "https://registry.npm.taobao.org/cookie/download/cookie-0.4.0.tgz?cache=0&sync_timestamp=1587525865178&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcookie%2Fdownload%2Fcookie-0.4.0.tgz", - "integrity": "sha1-vrQ35wIrO21JAZ0IhmUwPr6cFLo=", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/cookie-signature": { - "version": "1.0.6", - "resolved": "https://registry.npm.taobao.org/cookie-signature/download/cookie-signature-1.0.6.tgz", - "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=", - "dev": true - }, - "node_modules/copy-concurrently": { - "version": "1.0.5", - "resolved": "https://registry.npm.taobao.org/copy-concurrently/download/copy-concurrently-1.0.5.tgz", - "integrity": "sha1-kilzmMrjSTf8r9bsgTnBgFHwteA=", - "dependencies": { - "aproba": "^1.1.1", - "fs-write-stream-atomic": "^1.0.8", - "iferr": "^0.1.5", - "mkdirp": "^0.5.1", - "rimraf": "^2.5.4", - "run-queue": "^1.0.0" - } - }, - "node_modules/copy-descriptor": { - "version": "0.1.1", - "resolved": "https://registry.npm.taobao.org/copy-descriptor/download/copy-descriptor-0.1.1.tgz", - "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/copy-webpack-plugin": { - "version": "5.1.2", - "resolved": "https://registry.npm.taobao.org/copy-webpack-plugin/download/copy-webpack-plugin-5.1.2.tgz", - "integrity": "sha1-ioieHcr6bJHGzUvhrRWPHTgjuuI=", - "dev": true, - "dependencies": { - "cacache": "^12.0.3", - "find-cache-dir": "^2.1.0", - "glob-parent": "^3.1.0", - "globby": "^7.1.1", - "is-glob": "^4.0.1", - "loader-utils": "^1.2.3", - "minimatch": "^3.0.4", - "normalize-path": "^3.0.0", - "p-limit": "^2.2.1", - "schema-utils": "^1.0.0", - "serialize-javascript": "^4.0.0", - "webpack-log": "^2.0.0" - }, - "engines": { - "node": ">= 6.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "webpack": "^4.0.0 || ^5.0.0" - } - }, - "node_modules/copy-webpack-plugin/node_modules/glob-parent": { - "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/glob-parent/download/glob-parent-3.1.0.tgz", - "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", - "dev": true, - "dependencies": { - "is-glob": "^3.1.0", - "path-dirname": "^1.0.0" - } - }, - "node_modules/copy-webpack-plugin/node_modules/glob-parent/node_modules/is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/is-glob/download/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "dev": true, - "dependencies": { - "is-extglob": "^2.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/copy-webpack-plugin/node_modules/globby": { - "version": "7.1.1", - "resolved": "https://registry.npm.taobao.org/globby/download/globby-7.1.1.tgz?cache=0&sync_timestamp=1591083783605&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fglobby%2Fdownload%2Fglobby-7.1.1.tgz", - "integrity": "sha1-+yzP+UAfhgCUXfral0QMypcrhoA=", - "dev": true, - "dependencies": { - "array-union": "^1.0.1", - "dir-glob": "^2.0.0", - "glob": "^7.1.2", - "ignore": "^3.3.5", - "pify": "^3.0.0", - "slash": "^1.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/copy-webpack-plugin/node_modules/pify": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/pify/download/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/copy-webpack-plugin/node_modules/schema-utils": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/schema-utils/download/schema-utils-1.0.0.tgz", - "integrity": "sha1-C3mpMgTXtgDUsoUNH2bCo0lRx3A=", - "dev": true, - "dependencies": { - "ajv": "^6.1.0", - "ajv-errors": "^1.0.0", - "ajv-keywords": "^3.1.0" - }, - "engines": { - "node": ">= 4" - } - }, - "node_modules/core-js": { - "version": "3.6.5", - "resolved": "https://registry.npm.taobao.org/core-js/download/core-js-3.6.5.tgz?cache=0&sync_timestamp=1586450269267&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcore-js%2Fdownload%2Fcore-js-3.6.5.tgz", - "integrity": "sha1-c5XcJzrzf7LlDpvT2f6EEoUjHRo=", - "hasInstallScript": true, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/core-js" - } - }, - "node_modules/core-js-compat": { - "version": "3.6.5", - "resolved": "https://registry.npm.taobao.org/core-js-compat/download/core-js-compat-3.6.5.tgz", - "integrity": "sha1-KlHZpOJd/W5pAlGqgfmePAVIHxw=", - "dev": true, - "dependencies": { - "browserslist": "^4.8.5", - "semver": "7.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/core-js" - } - }, - "node_modules/core-js-compat/node_modules/semver": { - "version": "7.0.0", - "resolved": "https://registry.npm.taobao.org/semver/download/semver-7.0.0.tgz", - "integrity": "sha1-XzyjV2HkfgWyBsba/yz4FPAxa44=", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/core-util-is/download/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" - }, - "node_modules/cosmiconfig": { - "version": "5.2.1", - "resolved": "https://registry.npm.taobao.org/cosmiconfig/download/cosmiconfig-5.2.1.tgz?cache=0&sync_timestamp=1596310819353&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcosmiconfig%2Fdownload%2Fcosmiconfig-5.2.1.tgz", - "integrity": "sha1-BA9yaAnFked6F8CjYmykW08Wixo=", - "dev": true, - "dependencies": { - "import-fresh": "^2.0.0", - "is-directory": "^0.3.1", - "js-yaml": "^3.13.1", - "parse-json": "^4.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/cosmiconfig/node_modules/parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/parse-json/download/parse-json-4.0.0.tgz?cache=0&sync_timestamp=1598129182781&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fparse-json%2Fdownload%2Fparse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", - "dev": true, - "dependencies": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/create-ecdh": { - "version": "4.0.4", - "resolved": "https://registry.npm.taobao.org/create-ecdh/download/create-ecdh-4.0.4.tgz", - "integrity": "sha1-1uf0v/pmc2CFoHYv06YyaE2rzE4=", - "dependencies": { - "bn.js": "^4.1.0", - "elliptic": "^6.5.3" - } - }, - "node_modules/create-ecdh/node_modules/bn.js": { - "version": "4.11.9", - "resolved": "https://registry.npm.taobao.org/bn.js/download/bn.js-4.11.9.tgz", - "integrity": "sha1-JtVWgpRY+dHoH8SJUkk9C6NQeCg=" - }, - "node_modules/create-hash": { - "version": "1.2.0", - "resolved": "https://registry.npm.taobao.org/create-hash/download/create-hash-1.2.0.tgz", - "integrity": "sha1-iJB4rxGmN1a8+1m9IhmWvjqe8ZY=", - "dependencies": { - "cipher-base": "^1.0.1", - "inherits": "^2.0.1", - "md5.js": "^1.3.4", - "ripemd160": "^2.0.1", - "sha.js": "^2.4.0" - } - }, - "node_modules/create-hmac": { - "version": "1.1.7", - "resolved": "https://registry.npm.taobao.org/create-hmac/download/create-hmac-1.1.7.tgz", - "integrity": "sha1-aRcMeLOrlXFHsriwRXLkfq0iQ/8=", - "dependencies": { - "cipher-base": "^1.0.3", - "create-hash": "^1.1.0", - "inherits": "^2.0.1", - "ripemd160": "^2.0.0", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, - "node_modules/cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npm.taobao.org/cross-spawn/download/cross-spawn-6.0.5.tgz", - "integrity": "sha1-Sl7Hxk364iw6FBJNus3uhG2Ay8Q=", - "dev": true, - "dependencies": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - }, - "engines": { - "node": ">=4.8" - } - }, - "node_modules/crypto-browserify": { - "version": "3.12.0", - "resolved": "https://registry.npm.taobao.org/crypto-browserify/download/crypto-browserify-3.12.0.tgz", - "integrity": "sha1-OWz58xN/A+S45TLFj2mCVOAPgOw=", - "dependencies": { - "browserify-cipher": "^1.0.0", - "browserify-sign": "^4.0.0", - "create-ecdh": "^4.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.0", - "diffie-hellman": "^5.0.0", - "inherits": "^2.0.1", - "pbkdf2": "^3.0.3", - "public-encrypt": "^4.0.0", - "randombytes": "^2.0.0", - "randomfill": "^1.0.3" - }, - "engines": { - "node": "*" - } - }, - "node_modules/css-color-names": { - "version": "0.0.4", - "resolved": "https://registry.npm.taobao.org/css-color-names/download/css-color-names-0.0.4.tgz", - "integrity": "sha1-gIrcLnnPhHOAabZGyyDsJ762KeA=", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/css-declaration-sorter": { - "version": "4.0.1", - "resolved": "https://registry.npm.taobao.org/css-declaration-sorter/download/css-declaration-sorter-4.0.1.tgz?cache=0&sync_timestamp=1603749642748&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcss-declaration-sorter%2Fdownload%2Fcss-declaration-sorter-4.0.1.tgz", - "integrity": "sha1-wZiUD2OnbX42wecQGLABchBUyyI=", - "dev": true, - "dependencies": { - "postcss": "^7.0.1", - "timsort": "^0.3.0" - }, - "engines": { - "node": ">4" - } - }, - "node_modules/css-loader": { - "version": "3.6.0", - "resolved": "https://registry.npm.taobao.org/css-loader/download/css-loader-3.6.0.tgz?cache=0&sync_timestamp=1602609200442&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcss-loader%2Fdownload%2Fcss-loader-3.6.0.tgz", - "integrity": "sha1-Lkssfm4tJ/jI8o9hv/zS5ske9kU=", - "dev": true, - "dependencies": { - "camelcase": "^5.3.1", - "cssesc": "^3.0.0", - "icss-utils": "^4.1.1", - "loader-utils": "^1.2.3", - "normalize-path": "^3.0.0", - "postcss": "^7.0.32", - "postcss-modules-extract-imports": "^2.0.0", - "postcss-modules-local-by-default": "^3.0.2", - "postcss-modules-scope": "^2.2.0", - "postcss-modules-values": "^3.0.0", - "postcss-value-parser": "^4.1.0", - "schema-utils": "^2.7.0", - "semver": "^6.3.0" - }, - "engines": { - "node": ">= 8.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "webpack": "^4.0.0 || ^5.0.0" - } - }, - "node_modules/css-loader/node_modules/camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npm.taobao.org/camelcase/download/camelcase-5.3.1.tgz?cache=0&sync_timestamp=1603923709404&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcamelcase%2Fdownload%2Fcamelcase-5.3.1.tgz", - "integrity": "sha1-48mzFWnhBoEd8kL3FXJaH0xJQyA=", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/css-loader/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npm.taobao.org/semver/download/semver-6.3.0.tgz", - "integrity": "sha1-7gpkyK9ejO6mdoexM3YeG+y9HT0=", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/css-select": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/css-select/download/css-select-2.1.0.tgz", - "integrity": "sha1-ajRlM1ZjWTSoG6ymjQJVQyEF2+8=", - "dev": true, - "dependencies": { - "boolbase": "^1.0.0", - "css-what": "^3.2.1", - "domutils": "^1.7.0", - "nth-check": "^1.0.2" - } - }, - "node_modules/css-select-base-adapter": { - "version": "0.1.1", - "resolved": "https://registry.npm.taobao.org/css-select-base-adapter/download/css-select-base-adapter-0.1.1.tgz", - "integrity": "sha1-Oy/0lyzDYquIVhUHqVQIoUMhNdc=", - "dev": true - }, - "node_modules/css-tree": { - "version": "1.0.0-alpha.37", - "resolved": "https://registry.npm.taobao.org/css-tree/download/css-tree-1.0.0-alpha.37.tgz?cache=0&sync_timestamp=1603806516773&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcss-tree%2Fdownload%2Fcss-tree-1.0.0-alpha.37.tgz", - "integrity": "sha1-mL69YsTB2flg7DQM+fdSLjBwmiI=", - "dev": true, - "dependencies": { - "mdn-data": "2.0.4", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/css-tree/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz?cache=0&sync_timestamp=1571657176668&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsource-map%2Fdownload%2Fsource-map-0.6.1.tgz", - "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/css-what": { - "version": "3.4.2", - "resolved": "https://registry.npm.taobao.org/css-what/download/css-what-3.4.2.tgz?cache=0&sync_timestamp=1602571001952&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcss-what%2Fdownload%2Fcss-what-3.4.2.tgz", - "integrity": "sha1-6nAm/LAXd+295SEk4h8yfnrpUOQ=", - "dev": true, - "engines": { - "node": ">= 6" - }, - "funding": { - "url": "https://github.com/sponsors/fb55" - } - }, - "node_modules/cssesc": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/cssesc/download/cssesc-3.0.0.tgz", - "integrity": "sha1-N3QZGZA7hoVl4cCep0dEXNGJg+4=", - "dev": true, - "bin": { - "cssesc": "bin/cssesc" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/cssfilter": { - "version": "0.0.10", - "resolved": "https://registry.npmmirror.com/cssfilter/-/cssfilter-0.0.10.tgz", - "integrity": "sha512-FAaLDaplstoRsDR8XGYH51znUN0UY7nMc6Z9/fvE8EXGwvJE9hu7W2vHwx1+bd6gCYnln9nLbzxFTrcO9YQDZw==" - }, - "node_modules/cssnano": { - "version": "4.1.10", - "resolved": "https://registry.npm.taobao.org/cssnano/download/cssnano-4.1.10.tgz?cache=0&sync_timestamp=1603212729205&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcssnano%2Fdownload%2Fcssnano-4.1.10.tgz", - "integrity": "sha1-CsQfCxPRPUZUh+ERt3jULaYxuLI=", - "dev": true, - "dependencies": { - "cosmiconfig": "^5.0.0", - "cssnano-preset-default": "^4.0.7", - "is-resolvable": "^1.0.0", - "postcss": "^7.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/cssnano-preset-default": { - "version": "4.0.7", - "resolved": "https://registry.npm.taobao.org/cssnano-preset-default/download/cssnano-preset-default-4.0.7.tgz?cache=0&sync_timestamp=1603212741552&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcssnano-preset-default%2Fdownload%2Fcssnano-preset-default-4.0.7.tgz", - "integrity": "sha1-UexmLM/KD4izltzZZ5zbkxvhf3Y=", - "dev": true, - "dependencies": { - "css-declaration-sorter": "^4.0.1", - "cssnano-util-raw-cache": "^4.0.1", - "postcss": "^7.0.0", - "postcss-calc": "^7.0.1", - "postcss-colormin": "^4.0.3", - "postcss-convert-values": "^4.0.1", - "postcss-discard-comments": "^4.0.2", - "postcss-discard-duplicates": "^4.0.2", - "postcss-discard-empty": "^4.0.1", - "postcss-discard-overridden": "^4.0.1", - "postcss-merge-longhand": "^4.0.11", - "postcss-merge-rules": "^4.0.3", - "postcss-minify-font-values": "^4.0.2", - "postcss-minify-gradients": "^4.0.2", - "postcss-minify-params": "^4.0.2", - "postcss-minify-selectors": "^4.0.2", - "postcss-normalize-charset": "^4.0.1", - "postcss-normalize-display-values": "^4.0.2", - "postcss-normalize-positions": "^4.0.2", - "postcss-normalize-repeat-style": "^4.0.2", - "postcss-normalize-string": "^4.0.2", - "postcss-normalize-timing-functions": "^4.0.2", - "postcss-normalize-unicode": "^4.0.1", - "postcss-normalize-url": "^4.0.1", - "postcss-normalize-whitespace": "^4.0.2", - "postcss-ordered-values": "^4.1.2", - "postcss-reduce-initial": "^4.0.3", - "postcss-reduce-transforms": "^4.0.2", - "postcss-svgo": "^4.0.2", - "postcss-unique-selectors": "^4.0.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/cssnano-util-get-arguments": { - "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/cssnano-util-get-arguments/download/cssnano-util-get-arguments-4.0.0.tgz", - "integrity": "sha1-7ToIKZ8h11dBsg87gfGU7UnMFQ8=", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/cssnano-util-get-match": { - "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/cssnano-util-get-match/download/cssnano-util-get-match-4.0.0.tgz", - "integrity": "sha1-wOTKB/U4a7F+xeUiULT1lhNlFW0=", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/cssnano-util-raw-cache": { - "version": "4.0.1", - "resolved": "https://registry.npm.taobao.org/cssnano-util-raw-cache/download/cssnano-util-raw-cache-4.0.1.tgz", - "integrity": "sha1-sm1f1fcqEd/np4RvtMZyYPlr8oI=", - "dev": true, - "dependencies": { - "postcss": "^7.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/cssnano-util-same-parent": { - "version": "4.0.1", - "resolved": "https://registry.npm.taobao.org/cssnano-util-same-parent/download/cssnano-util-same-parent-4.0.1.tgz", - "integrity": "sha1-V0CC+yhZ0ttDOFWDXZqEVuoYu/M=", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/csso": { - "version": "4.1.0", - "resolved": "https://registry.npm.taobao.org/csso/download/csso-4.1.0.tgz?cache=0&sync_timestamp=1603840362568&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcsso%2Fdownload%2Fcsso-4.1.0.tgz", - "integrity": "sha1-HTEZPvqZuHqmutbAzvFV5UPQnos=", - "dev": true, - "dependencies": { - "css-tree": "^1.0.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/csso/node_modules/css-tree": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/css-tree/download/css-tree-1.0.0.tgz?cache=0&sync_timestamp=1603806516773&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcss-tree%2Fdownload%2Fcss-tree-1.0.0.tgz", - "integrity": "sha1-IZk/onDXQmQqkECaLAyzrAKYrfY=", - "dev": true, - "dependencies": { - "mdn-data": "2.0.12", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/csso/node_modules/mdn-data": { - "version": "2.0.12", - "resolved": "https://registry.npm.taobao.org/mdn-data/download/mdn-data-2.0.12.tgz?cache=0&sync_timestamp=1602987212845&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmdn-data%2Fdownload%2Fmdn-data-2.0.12.tgz", - "integrity": "sha1-u7ZY0Is49XS7uI97g3A979zEaEQ=", - "dev": true - }, - "node_modules/csso/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz?cache=0&sync_timestamp=1571657176668&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsource-map%2Fdownload%2Fsource-map-0.6.1.tgz", - "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/cyclist": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/cyclist/download/cyclist-1.0.1.tgz", - "integrity": "sha1-WW6WmP0MgOEgOMK4LW6xs1tiJNk=" - }, - "node_modules/dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npm.taobao.org/dashdash/download/dashdash-1.14.1.tgz?cache=0&sync_timestamp=1601073454623&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdashdash%2Fdownload%2Fdashdash-1.14.1.tgz", - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", - "dev": true, - "dependencies": { - "assert-plus": "^1.0.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/dayjs": { - "version": "1.9.6", - "resolved": "https://registry.npm.taobao.org/dayjs/download/dayjs-1.9.6.tgz?cache=0&sync_timestamp=1604990508741&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdayjs%2Fdownload%2Fdayjs-1.9.6.tgz", - "integrity": "sha1-bwx312rB/2NyDdEZfly4e2eUPXA=" - }, - "node_modules/de-indent": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/de-indent/download/de-indent-1.0.2.tgz", - "integrity": "sha1-sgOOhG3DO6pXlhKNCAS0VbjB4h0=" - }, - "node_modules/debug": { - "version": "4.2.0", - "resolved": "https://registry.npm.taobao.org/debug/download/debug-4.2.0.tgz?cache=0&sync_timestamp=1600502894812&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdebug%2Fdownload%2Fdebug-4.2.0.tgz", - "integrity": "sha1-fxUPk5IOlMWPVXTC/QGjEQ7/5/E=", - "deprecated": "Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npm.taobao.org/decamelize/download/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/decode-uri-component": { - "version": "0.2.0", - "resolved": "https://registry.npm.taobao.org/decode-uri-component/download/decode-uri-component-0.2.0.tgz", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", - "engines": { - "node": ">=0.10" - } - }, - "node_modules/deep-equal": { - "version": "1.1.1", - "resolved": "https://registry.npm.taobao.org/deep-equal/download/deep-equal-1.1.1.tgz", - "integrity": "sha1-tcmMlCzv+vfLBR4k4UNKJaLmB2o=", - "dev": true, - "dependencies": { - "is-arguments": "^1.0.4", - "is-date-object": "^1.0.1", - "is-regex": "^1.0.4", - "object-is": "^1.0.1", - "object-keys": "^1.1.1", - "regexp.prototype.flags": "^1.2.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/deepmerge": { - "version": "1.5.2", - "resolved": "https://registry.npm.taobao.org/deepmerge/download/deepmerge-1.5.2.tgz?cache=0&sync_timestamp=1572279720382&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdeepmerge%2Fdownload%2Fdeepmerge-1.5.2.tgz", - "integrity": "sha1-EEmdhohEza1P7ghC34x/bwyVp1M=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/default-gateway": { - "version": "5.0.5", - "resolved": "https://registry.npm.taobao.org/default-gateway/download/default-gateway-5.0.5.tgz", - "integrity": "sha1-T9a9XShV05s0zFpZUFSG6ar8mxA=", - "dev": true, - "dependencies": { - "execa": "^3.3.0" - }, - "engines": { - "node": "^8.12.0 || >=9.7.0" - } - }, - "node_modules/default-gateway/node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npm.taobao.org/cross-spawn/download/cross-spawn-7.0.3.tgz", - "integrity": "sha1-9zqFudXUHQRVUcF34ogtSshXKKY=", - "dev": true, - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/default-gateway/node_modules/execa": { - "version": "3.4.0", - "resolved": "https://registry.npm.taobao.org/execa/download/execa-3.4.0.tgz?cache=0&sync_timestamp=1603882912233&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fexeca%2Fdownload%2Fexeca-3.4.0.tgz", - "integrity": "sha1-wI7UVQ72XYWPrCaf/IVyRG8364k=", - "dev": true, - "dependencies": { - "cross-spawn": "^7.0.0", - "get-stream": "^5.0.0", - "human-signals": "^1.1.1", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.0", - "onetime": "^5.1.0", - "p-finally": "^2.0.0", - "signal-exit": "^3.0.2", - "strip-final-newline": "^2.0.0" - }, - "engines": { - "node": "^8.12.0 || >=9.7.0" - } - }, - "node_modules/default-gateway/node_modules/get-stream": { - "version": "5.2.0", - "resolved": "https://registry.npm.taobao.org/get-stream/download/get-stream-5.2.0.tgz?cache=0&sync_timestamp=1597056502934&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fget-stream%2Fdownload%2Fget-stream-5.2.0.tgz", - "integrity": "sha1-SWaheV7lrOZecGxLe+txJX1uItM=", - "dev": true, - "dependencies": { - "pump": "^3.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/default-gateway/node_modules/is-stream": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/is-stream/download/is-stream-2.0.0.tgz", - "integrity": "sha1-venDJoDW+uBBKdasnZIc54FfeOM=", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/default-gateway/node_modules/mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/mimic-fn/download/mimic-fn-2.1.0.tgz?cache=0&sync_timestamp=1596095644798&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmimic-fn%2Fdownload%2Fmimic-fn-2.1.0.tgz", - "integrity": "sha1-ftLCzMyvhNP/y3pptXcR/CCDQBs=", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/default-gateway/node_modules/npm-run-path": { - "version": "4.0.1", - "resolved": "https://registry.npm.taobao.org/npm-run-path/download/npm-run-path-4.0.1.tgz", - "integrity": "sha1-t+zR5e1T2o43pV4cImnguX7XSOo=", - "dev": true, - "dependencies": { - "path-key": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/default-gateway/node_modules/onetime": { - "version": "5.1.2", - "resolved": "https://registry.npm.taobao.org/onetime/download/onetime-5.1.2.tgz?cache=0&sync_timestamp=1597005345612&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fonetime%2Fdownload%2Fonetime-5.1.2.tgz", - "integrity": "sha1-0Oluu1awdHbfHdnEgG5SN5hcpF4=", - "dev": true, - "dependencies": { - "mimic-fn": "^2.1.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/default-gateway/node_modules/p-finally": { - "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/p-finally/download/p-finally-2.0.1.tgz", - "integrity": "sha1-vW/KqcVZoJa2gIBvTWV7Pw8kBWE=", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/default-gateway/node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npm.taobao.org/path-key/download/path-key-3.1.1.tgz", - "integrity": "sha1-WB9q3mWMu6ZaDTOA3ndTKVBU83U=", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/default-gateway/node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/shebang-command/download/shebang-command-2.0.0.tgz", - "integrity": "sha1-zNCvT4g1+9wmW4JGGq8MNmY/NOo=", - "dev": true, - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/default-gateway/node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/shebang-regex/download/shebang-regex-3.0.0.tgz", - "integrity": "sha1-rhbxZE2HPsrYQ7AwexQzYtTEIXI=", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/default-gateway/node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npm.taobao.org/which/download/which-2.0.2.tgz?cache=0&sync_timestamp=1574116720213&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fwhich%2Fdownload%2Fwhich-2.0.2.tgz", - "integrity": "sha1-fGqN0KY2oDJ+ELWckobu6T8/UbE=", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/defaults": { - "version": "1.0.3", - "resolved": "https://registry.npm.taobao.org/defaults/download/defaults-1.0.3.tgz", - "integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=", - "dev": true, - "dependencies": { - "clone": "^1.0.2" - } - }, - "node_modules/define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npm.taobao.org/define-properties/download/define-properties-1.1.3.tgz", - "integrity": "sha1-z4jabL7ib+bbcJT2HYcMvYTO6fE=", - "dev": true, - "dependencies": { - "object-keys": "^1.0.12" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/define-property": { - "version": "2.0.2", - "resolved": "https://registry.npm.taobao.org/define-property/download/define-property-2.0.2.tgz", - "integrity": "sha1-1Flono1lS6d+AqgX+HENcCyxbp0=", - "dependencies": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/define-property/node_modules/is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/is-accessor-descriptor/download/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY=", - "dependencies": { - "kind-of": "^6.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/define-property/node_modules/is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/is-data-descriptor/download/is-data-descriptor-1.0.0.tgz", - "integrity": "sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc=", - "dependencies": { - "kind-of": "^6.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/define-property/node_modules/is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/is-descriptor/download/is-descriptor-1.0.2.tgz", - "integrity": "sha1-OxWXRqZmBLBPjIFSS6NlxfFNhuw=", - "dependencies": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/del": { - "version": "4.1.1", - "resolved": "https://registry.npm.taobao.org/del/download/del-4.1.1.tgz?cache=0&sync_timestamp=1601076882347&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdel%2Fdownload%2Fdel-4.1.1.tgz", - "integrity": "sha1-no8RciLqRKMf86FWwEm5kFKp8LQ=", - "dev": true, - "dependencies": { - "@types/glob": "^7.1.1", - "globby": "^6.1.0", - "is-path-cwd": "^2.0.0", - "is-path-in-cwd": "^2.0.0", - "p-map": "^2.0.0", - "pify": "^4.0.1", - "rimraf": "^2.6.3" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/del/node_modules/globby": { - "version": "6.1.0", - "resolved": "https://registry.npm.taobao.org/globby/download/globby-6.1.0.tgz?cache=0&sync_timestamp=1591083783605&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fglobby%2Fdownload%2Fglobby-6.1.0.tgz", - "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", - "dev": true, - "dependencies": { - "array-union": "^1.0.1", - "glob": "^7.0.3", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/del/node_modules/globby/node_modules/pify": { - "version": "2.3.0", - "resolved": "https://registry.npm.taobao.org/pify/download/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/del/node_modules/p-map": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/p-map/download/p-map-2.1.0.tgz", - "integrity": "sha1-MQko/u+cnsxltosXaTAYpmXOoXU=", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/delayed-stream/download/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", - "dev": true, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/delegate": { - "version": "3.2.0", - "resolved": "https://registry.npm.taobao.org/delegate/download/delegate-3.2.0.tgz", - "integrity": "sha1-tmtxwxWFIuirV0T3INjKDCr1kWY=" - }, - "node_modules/depd": { - "version": "1.1.2", - "resolved": "https://registry.npm.taobao.org/depd/download/depd-1.1.2.tgz", - "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/des.js": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/des.js/download/des.js-1.0.1.tgz", - "integrity": "sha1-U4IULhvcU/hdhtU+X0qn3rkeCEM=", - "dependencies": { - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" - } - }, - "node_modules/destroy": { - "version": "1.0.4", - "resolved": "https://registry.npm.taobao.org/destroy/download/destroy-1.0.4.tgz", - "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=", - "dev": true - }, - "node_modules/detect-node": { - "version": "2.0.4", - "resolved": "https://registry.npm.taobao.org/detect-node/download/detect-node-2.0.4.tgz", - "integrity": "sha1-AU7o+PZpxcWAI9pkuBecCDooxGw=", - "dev": true - }, - "node_modules/diffie-hellman": { - "version": "5.0.3", - "resolved": "https://registry.npm.taobao.org/diffie-hellman/download/diffie-hellman-5.0.3.tgz", - "integrity": "sha1-QOjumPVaIUlgcUaSHGPhrl89KHU=", - "dependencies": { - "bn.js": "^4.1.0", - "miller-rabin": "^4.0.0", - "randombytes": "^2.0.0" - } - }, - "node_modules/diffie-hellman/node_modules/bn.js": { - "version": "4.11.9", - "resolved": "https://registry.npm.taobao.org/bn.js/download/bn.js-4.11.9.tgz", - "integrity": "sha1-JtVWgpRY+dHoH8SJUkk9C6NQeCg=" - }, - "node_modules/dir-glob": { - "version": "2.2.2", - "resolved": "https://registry.npm.taobao.org/dir-glob/download/dir-glob-2.2.2.tgz", - "integrity": "sha1-+gnwaUFTyJGLGLoN6vrpR2n8UMQ=", - "dev": true, - "dependencies": { - "path-type": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/dns-equal": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/dns-equal/download/dns-equal-1.0.0.tgz", - "integrity": "sha1-s55/HabrCnW6nBcySzR1PEfgZU0=", - "dev": true - }, - "node_modules/dns-packet": { - "version": "1.3.1", - "resolved": "https://registry.npm.taobao.org/dns-packet/download/dns-packet-1.3.1.tgz", - "integrity": "sha1-EqpCaYEHW+UAuRDu3NC0fdfe2lo=", - "dev": true, - "dependencies": { - "ip": "^1.1.0", - "safe-buffer": "^5.0.1" - } - }, - "node_modules/dns-txt": { - "version": "2.0.2", - "resolved": "https://registry.npm.taobao.org/dns-txt/download/dns-txt-2.0.2.tgz", - "integrity": "sha1-uR2Ab10nGI5Ks+fRB9iBocxGQrY=", - "dev": true, - "dependencies": { - "buffer-indexof": "^1.0.0" - } - }, - "node_modules/dom-converter": { - "version": "0.2.0", - "resolved": "https://registry.npm.taobao.org/dom-converter/download/dom-converter-0.2.0.tgz", - "integrity": "sha1-ZyGp2u4uKTaClVtq/kFncWJ7t2g=", - "dev": true, - "dependencies": { - "utila": "~0.4" - } - }, - "node_modules/dom-serializer": { - "version": "0.2.2", - "resolved": "https://registry.npm.taobao.org/dom-serializer/download/dom-serializer-0.2.2.tgz", - "integrity": "sha1-GvuB9TNxcXXUeGVd68XjMtn5u1E=", - "dev": true, - "dependencies": { - "domelementtype": "^2.0.1", - "entities": "^2.0.0" - } - }, - "node_modules/dom-serializer/node_modules/domelementtype": { - "version": "2.0.2", - "resolved": "https://registry.npm.taobao.org/domelementtype/download/domelementtype-2.0.2.tgz?cache=0&sync_timestamp=1600028495728&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdomelementtype%2Fdownload%2Fdomelementtype-2.0.2.tgz", - "integrity": "sha1-87blSSAeRvWItZRj3XcYcTH+aXE=", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/fb55" - } - ] - }, - "node_modules/domain-browser": { - "version": "1.2.0", - "resolved": "https://registry.npm.taobao.org/domain-browser/download/domain-browser-1.2.0.tgz", - "integrity": "sha1-PTH1AZGmdJ3RN1p/Ui6CPULlTto=", - "engines": { - "node": ">=0.4", - "npm": ">=1.2" - } - }, - "node_modules/domelementtype": { - "version": "1.3.1", - "resolved": "https://registry.npm.taobao.org/domelementtype/download/domelementtype-1.3.1.tgz?cache=0&sync_timestamp=1600028495728&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdomelementtype%2Fdownload%2Fdomelementtype-1.3.1.tgz", - "integrity": "sha1-0EjESzew0Qp/Kj1f7j9DM9eQSB8=", - "dev": true - }, - "node_modules/domhandler": { - "version": "2.4.2", - "resolved": "https://registry.npm.taobao.org/domhandler/download/domhandler-2.4.2.tgz", - "integrity": "sha1-iAUJfpM9ZehVRvcm1g9euItE+AM=", - "dev": true, - "dependencies": { - "domelementtype": "1" - } - }, - "node_modules/dompurify": { - "version": "2.3.6", - "resolved": "https://registry.npmmirror.com/dompurify/-/dompurify-2.3.6.tgz", - "integrity": "sha512-OFP2u/3T1R5CEgWCEONuJ1a5+MFKnOYpkywpUSxv/dj1LeBT1erK+JwM7zK0ROy2BRhqVCf0LRw/kHqKuMkVGg==" - }, - "node_modules/domutils": { - "version": "1.7.0", - "resolved": "https://registry.npm.taobao.org/domutils/download/domutils-1.7.0.tgz", - "integrity": "sha1-Vuo0HoNOBuZ0ivehyyXaZ+qfjCo=", - "dev": true, - "dependencies": { - "dom-serializer": "0", - "domelementtype": "1" - } - }, - "node_modules/dot-prop": { - "version": "5.3.0", - "resolved": "https://registry.npm.taobao.org/dot-prop/download/dot-prop-5.3.0.tgz", - "integrity": "sha1-kMzOcIzZzYLMTcjD3dmr3VWyDog=", - "dev": true, - "dependencies": { - "is-obj": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/dotenv": { - "version": "8.2.0", - "resolved": "https://registry.npm.taobao.org/dotenv/download/dotenv-8.2.0.tgz", - "integrity": "sha1-l+YZJZradQ7qPk6j4mvO6lQksWo=", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/dotenv-expand": { - "version": "5.1.0", - "resolved": "https://registry.npm.taobao.org/dotenv-expand/download/dotenv-expand-5.1.0.tgz", - "integrity": "sha1-P7rwIL/XlIhAcuomsel5HUWmKfA=", - "dev": true - }, - "node_modules/duplexer": { - "version": "0.1.2", - "resolved": "https://registry.npm.taobao.org/duplexer/download/duplexer-0.1.2.tgz", - "integrity": "sha1-Or5DrvODX4rgd9E23c4PJ2sEAOY=", - "dev": true - }, - "node_modules/duplexify": { - "version": "3.7.1", - "resolved": "https://registry.npm.taobao.org/duplexify/download/duplexify-3.7.1.tgz", - "integrity": "sha1-Kk31MX9sz9kfhtb9JdjYoQO4gwk=", - "dependencies": { - "end-of-stream": "^1.0.0", - "inherits": "^2.0.1", - "readable-stream": "^2.0.0", - "stream-shift": "^1.0.0" - } - }, - "node_modules/easy-stack": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/easy-stack/download/easy-stack-1.0.0.tgz", - "integrity": "sha1-EskbMIWjfwuqM26UhurEv5Tj54g=", - "dev": true, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npm.taobao.org/ecc-jsbn/download/ecc-jsbn-0.1.2.tgz", - "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", - "dev": true, - "dependencies": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" - } - }, - "node_modules/echarts": { - "version": "4.9.0", - "resolved": "https://registry.npm.taobao.org/echarts/download/echarts-4.9.0.tgz?cache=0&sync_timestamp=1605024811446&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fecharts%2Fdownload%2Fecharts-4.9.0.tgz", - "integrity": "sha1-qbm6oD8Doqcx5jQMVb77V6nhNH0=", - "dependencies": { - "zrender": "4.3.2" - } - }, - "node_modules/ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npm.taobao.org/ee-first/download/ee-first-1.1.1.tgz", - "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=", - "dev": true - }, - "node_modules/ejs": { - "version": "2.7.4", - "resolved": "https://registry.npm.taobao.org/ejs/download/ejs-2.7.4.tgz?cache=0&sync_timestamp=1597678506855&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fejs%2Fdownload%2Fejs-2.7.4.tgz", - "integrity": "sha1-SGYSh1c9zFPjZsehrlLDoSDuybo=", - "dev": true, - "hasInstallScript": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/electron-to-chromium": { - "version": "1.3.584", - "resolved": "https://registry.npm.taobao.org/electron-to-chromium/download/electron-to-chromium-1.3.584.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Felectron-to-chromium%2Fdownload%2Felectron-to-chromium-1.3.584.tgz", - "integrity": "sha1-UGz3uliVqvqCQYdqsChlS2H9nOs=", - "dev": true - }, - "node_modules/element-ui": { - "version": "2.15.6", - "resolved": "https://registry.nlark.com/element-ui/download/element-ui-2.15.6.tgz", - "integrity": "sha1-yWCa3TWvWmhqS3aF3B11fHXgHfM=", - "dependencies": { - "async-validator": "~1.8.1", - "babel-helper-vue-jsx-merge-props": "^2.0.0", - "deepmerge": "^1.2.0", - "normalize-wheel": "^1.0.1", - "resize-observer-polyfill": "^1.5.0", - "throttle-debounce": "^1.0.1" - }, - "peerDependencies": { - "vue": "^2.5.17" - } - }, - "node_modules/elliptic": { - "version": "6.5.3", - "resolved": "https://registry.npm.taobao.org/elliptic/download/elliptic-6.5.3.tgz?cache=0&sync_timestamp=1592492805287&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Felliptic%2Fdownload%2Felliptic-6.5.3.tgz", - "integrity": "sha1-y1nrLv2vc6C9eMzXAVpirW4Pk9Y=", - "dependencies": { - "bn.js": "^4.4.0", - "brorand": "^1.0.1", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.0" - } - }, - "node_modules/elliptic/node_modules/bn.js": { - "version": "4.11.9", - "resolved": "https://registry.npm.taobao.org/bn.js/download/bn.js-4.11.9.tgz", - "integrity": "sha1-JtVWgpRY+dHoH8SJUkk9C6NQeCg=" - }, - "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npm.taobao.org/emoji-regex/download/emoji-regex-8.0.0.tgz?cache=0&sync_timestamp=1603212180491&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Femoji-regex%2Fdownload%2Femoji-regex-8.0.0.tgz", - "integrity": "sha1-6Bj9ac5cz8tARZT4QpY79TFkzDc=", - "dev": true - }, - "node_modules/emojis-list": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/emojis-list/download/emojis-list-3.0.0.tgz", - "integrity": "sha1-VXBmIEatKeLpFucariYKvf9Pang=", - "engines": { - "node": ">= 4" - } - }, - "node_modules/encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/encodeurl/download/encodeurl-1.0.2.tgz", - "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npm.taobao.org/end-of-stream/download/end-of-stream-1.4.4.tgz", - "integrity": "sha1-WuZKX0UFe682JuwU2gyl5LJDHrA=", - "dependencies": { - "once": "^1.4.0" - } - }, - "node_modules/enhanced-resolve": { - "version": "4.3.0", - "resolved": "https://registry.npm.taobao.org/enhanced-resolve/download/enhanced-resolve-4.3.0.tgz", - "integrity": "sha1-O4BvO/r8HsfeaVUe+TzKRsFwQSY=", - "dependencies": { - "graceful-fs": "^4.1.2", - "memory-fs": "^0.5.0", - "tapable": "^1.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/enhanced-resolve/node_modules/memory-fs": { - "version": "0.5.0", - "resolved": "https://registry.npm.taobao.org/memory-fs/download/memory-fs-0.5.0.tgz", - "integrity": "sha1-MkwBKIuIZSlm0WHbd4OHIIRajjw=", - "dependencies": { - "errno": "^0.1.3", - "readable-stream": "^2.0.1" - }, - "engines": { - "node": ">=4.3.0 <5.0.0 || >=5.10" - } - }, - "node_modules/entities": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/entities/download/entities-2.1.0.tgz?cache=0&sync_timestamp=1602897029273&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fentities%2Fdownload%2Fentities-2.1.0.tgz", - "integrity": "sha1-mS0xKc999ocLlsV4WMJJoSD4uLU=", - "dev": true, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, - "node_modules/errno": { - "version": "0.1.7", - "resolved": "https://registry.npm.taobao.org/errno/download/errno-0.1.7.tgz", - "integrity": "sha1-RoTXF3mtOa8Xfj8AeZb3xnyFJhg=", - "dependencies": { - "prr": "~1.0.1" - }, - "bin": { - "errno": "cli.js" - } - }, - "node_modules/error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npm.taobao.org/error-ex/download/error-ex-1.3.2.tgz", - "integrity": "sha1-tKxAZIEH/c3PriQvQovqihTU8b8=", - "dev": true, - "dependencies": { - "is-arrayish": "^0.2.1" - } - }, - "node_modules/error-stack-parser": { - "version": "2.0.6", - "resolved": "https://registry.npm.taobao.org/error-stack-parser/download/error-stack-parser-2.0.6.tgz?cache=0&sync_timestamp=1578288503034&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ferror-stack-parser%2Fdownload%2Ferror-stack-parser-2.0.6.tgz", - "integrity": "sha1-WpmnB716TFinl5AtSNgoA+3mqtg=", - "dev": true, - "dependencies": { - "stackframe": "^1.1.1" - } - }, - "node_modules/es-abstract": { - "version": "1.18.0-next.1", - "resolved": "https://registry.npm.taobao.org/es-abstract/download/es-abstract-1.18.0-next.1.tgz?cache=0&sync_timestamp=1601502719982&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fes-abstract%2Fdownload%2Fes-abstract-1.18.0-next.1.tgz", - "integrity": "sha1-bjoKS9pxflAjqzuOkL7DYQjSLGg=", - "dev": true, - "dependencies": { - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.2.2", - "is-negative-zero": "^2.0.0", - "is-regex": "^1.1.1", - "object-inspect": "^1.8.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.1", - "string.prototype.trimend": "^1.0.1", - "string.prototype.trimstart": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npm.taobao.org/es-to-primitive/download/es-to-primitive-1.2.1.tgz", - "integrity": "sha1-5VzUyc3BiLzvsDs2bHNjI/xciYo=", - "dev": true, - "dependencies": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/escalade": { - "version": "3.1.1", - "resolved": "https://registry.npm.taobao.org/escalade/download/escalade-3.1.1.tgz?cache=0&sync_timestamp=1602567224085&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fescalade%2Fdownload%2Fescalade-3.1.1.tgz", - "integrity": "sha1-2M/ccACWXFoBdLSoLqpcBVJ0LkA=", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npm.taobao.org/escape-html/download/escape-html-1.0.3.tgz", - "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=", - "dev": true - }, - "node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npm.taobao.org/escape-string-regexp/download/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/eslint-scope": { - "version": "4.0.3", - "resolved": "https://registry.npm.taobao.org/eslint-scope/download/eslint-scope-4.0.3.tgz?cache=0&sync_timestamp=1599933651660&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Feslint-scope%2Fdownload%2Feslint-scope-4.0.3.tgz", - "integrity": "sha1-ygODMxD2iJoyZHgaqC5j65z+eEg=", - "dependencies": { - "esrecurse": "^4.1.0", - "estraverse": "^4.1.1" - }, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npm.taobao.org/esprima/download/esprima-4.0.1.tgz", - "integrity": "sha1-E7BM2z5sXRnfkatph6hpVhmwqnE=", - "dev": true, - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npm.taobao.org/esrecurse/download/esrecurse-4.3.0.tgz?cache=0&sync_timestamp=1598898255610&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fesrecurse%2Fdownload%2Fesrecurse-4.3.0.tgz", - "integrity": "sha1-eteWTWeauyi+5yzsY3WLHF0smSE=", - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/esrecurse/node_modules/estraverse": { - "version": "5.2.0", - "resolved": "https://registry.npm.taobao.org/estraverse/download/estraverse-5.2.0.tgz?cache=0&sync_timestamp=1596642998635&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Festraverse%2Fdownload%2Festraverse-5.2.0.tgz", - "integrity": "sha1-MH30JUfmzHMk088DwVXVzbjFOIA=", - "engines": { - "node": ">=4.0" - } - }, - "node_modules/estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npm.taobao.org/estraverse/download/estraverse-4.3.0.tgz?cache=0&sync_timestamp=1596642998635&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Festraverse%2Fdownload%2Festraverse-4.3.0.tgz", - "integrity": "sha1-OYrT88WiSUi+dyXoPRGn3ijNvR0=", - "engines": { - "node": ">=4.0" - } - }, - "node_modules/esutils": { - "version": "2.0.3", - "resolved": "https://registry.npm.taobao.org/esutils/download/esutils-2.0.3.tgz", - "integrity": "sha1-dNLrTeC42hKTcRkQ1Qd1ubcQ72Q=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/etag": { - "version": "1.8.1", - "resolved": "https://registry.npm.taobao.org/etag/download/etag-1.8.1.tgz", - "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/event-pubsub": { - "version": "4.3.0", - "resolved": "https://registry.npm.taobao.org/event-pubsub/download/event-pubsub-4.3.0.tgz", - "integrity": "sha1-9o2Ba8KfHsAsU53FjI3UDOcss24=", - "dev": true, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/eventemitter3": { - "version": "4.0.7", - "resolved": "https://registry.npm.taobao.org/eventemitter3/download/eventemitter3-4.0.7.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Feventemitter3%2Fdownload%2Feventemitter3-4.0.7.tgz", - "integrity": "sha1-Lem2j2Uo1WRO9cWVJqG0oHMGFp8=", - "dev": true - }, - "node_modules/events": { - "version": "3.2.0", - "resolved": "https://registry.npm.taobao.org/events/download/events-3.2.0.tgz?cache=0&sync_timestamp=1595422595227&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fevents%2Fdownload%2Fevents-3.2.0.tgz", - "integrity": "sha1-k7h8GPjvzUICpGGuxN/AVWtjk3k=", - "engines": { - "node": ">=0.8.x" - } - }, - "node_modules/eventsource": { - "version": "1.0.7", - "resolved": "https://registry.npm.taobao.org/eventsource/download/eventsource-1.0.7.tgz", - "integrity": "sha1-j7xyyT/NNAiAkLwKTmT0tc7m2NA=", - "dev": true, - "dependencies": { - "original": "^1.0.0" - }, - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/evp_bytestokey": { - "version": "1.0.3", - "resolved": "https://registry.npm.taobao.org/evp_bytestokey/download/evp_bytestokey-1.0.3.tgz", - "integrity": "sha1-f8vbGY3HGVlDLv4ThCaE4FJaywI=", - "dependencies": { - "md5.js": "^1.3.4", - "safe-buffer": "^5.1.1" - } - }, - "node_modules/execa": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/execa/download/execa-1.0.0.tgz?cache=0&sync_timestamp=1603882912233&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fexeca%2Fdownload%2Fexeca-1.0.0.tgz", - "integrity": "sha1-xiNqW7TfbW8V6I5/AXeYIWdJ3dg=", - "dev": true, - "dependencies": { - "cross-spawn": "^6.0.0", - "get-stream": "^4.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/expand-brackets": { - "version": "2.1.4", - "resolved": "https://registry.npm.taobao.org/expand-brackets/download/expand-brackets-2.1.4.tgz", - "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", - "dependencies": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-brackets/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npm.taobao.org/debug/download/debug-2.6.9.tgz?cache=0&sync_timestamp=1600502894812&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdebug%2Fdownload%2Fdebug-2.6.9.tgz", - "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/expand-brackets/node_modules/define-property": { - "version": "0.2.5", - "resolved": "https://registry.npm.taobao.org/define-property/download/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dependencies": { - "is-descriptor": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-brackets/node_modules/extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/extend-shallow/download/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dependencies": { - "is-extendable": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-brackets/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/ms/download/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - }, - "node_modules/express": { - "version": "4.17.1", - "resolved": "https://registry.npm.taobao.org/express/download/express-4.17.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fexpress%2Fdownload%2Fexpress-4.17.1.tgz", - "integrity": "sha1-RJH8OGBc9R+GKdOcK10Cb5ikwTQ=", - "dev": true, - "dependencies": { - "accepts": "~1.3.7", - "array-flatten": "1.1.1", - "body-parser": "1.19.0", - "content-disposition": "0.5.3", - "content-type": "~1.0.4", - "cookie": "0.4.0", - "cookie-signature": "1.0.6", - "debug": "2.6.9", - "depd": "~1.1.2", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "~1.1.2", - "fresh": "0.5.2", - "merge-descriptors": "1.0.1", - "methods": "~1.1.2", - "on-finished": "~2.3.0", - "parseurl": "~1.3.3", - "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.5", - "qs": "6.7.0", - "range-parser": "~1.2.1", - "safe-buffer": "5.1.2", - "send": "0.17.1", - "serve-static": "1.14.1", - "setprototypeof": "1.1.1", - "statuses": "~1.5.0", - "type-is": "~1.6.18", - "utils-merge": "1.0.1", - "vary": "~1.1.2" - }, - "engines": { - "node": ">= 0.10.0" - } - }, - "node_modules/express/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npm.taobao.org/debug/download/debug-2.6.9.tgz?cache=0&sync_timestamp=1600502894812&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdebug%2Fdownload%2Fdebug-2.6.9.tgz", - "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/express/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/ms/download/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, - "node_modules/express/node_modules/qs": { - "version": "6.7.0", - "resolved": "https://registry.npm.taobao.org/qs/download/qs-6.7.0.tgz", - "integrity": "sha1-QdwaAV49WB8WIXdr4xr7KHapsbw=", - "dev": true, - "engines": { - "node": ">=0.6" - } - }, - "node_modules/extend": { - "version": "3.0.2", - "resolved": "https://registry.npm.taobao.org/extend/download/extend-3.0.2.tgz", - "integrity": "sha1-+LETa0Bx+9jrFAr/hYsQGewpFfo=", - "dev": true - }, - "node_modules/extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npm.taobao.org/extend-shallow/download/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", - "dependencies": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/extend-shallow/node_modules/is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/is-extendable/download/is-extendable-1.0.1.tgz", - "integrity": "sha1-p0cPnkJnM9gb2B4RVSZOOjUHyrQ=", - "dependencies": { - "is-plain-object": "^2.0.4" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/extglob": { - "version": "2.0.4", - "resolved": "https://registry.npm.taobao.org/extglob/download/extglob-2.0.4.tgz", - "integrity": "sha1-rQD+TcYSqSMuhxhxHcXLWrAoVUM=", - "dependencies": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/extglob/node_modules/define-property": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/define-property/download/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dependencies": { - "is-descriptor": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/extglob/node_modules/extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/extend-shallow/download/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dependencies": { - "is-extendable": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/extglob/node_modules/is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/is-accessor-descriptor/download/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY=", - "dependencies": { - "kind-of": "^6.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/extglob/node_modules/is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/is-data-descriptor/download/is-data-descriptor-1.0.0.tgz", - "integrity": "sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc=", - "dependencies": { - "kind-of": "^6.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/extglob/node_modules/is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/is-descriptor/download/is-descriptor-1.0.2.tgz", - "integrity": "sha1-OxWXRqZmBLBPjIFSS6NlxfFNhuw=", - "dependencies": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npm.taobao.org/extsprintf/download/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", - "dev": true, - "engines": [ - "node >=0.6.0" - ] - }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npm.taobao.org/fast-deep-equal/download/fast-deep-equal-3.1.3.tgz?cache=0&sync_timestamp=1591599697571&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffast-deep-equal%2Fdownload%2Ffast-deep-equal-3.1.3.tgz", - "integrity": "sha1-On1WtVnWy8PrUSMlJE5hmmXGxSU=" - }, - "node_modules/fast-glob": { - "version": "2.2.7", - "resolved": "https://registry.npm.taobao.org/fast-glob/download/fast-glob-2.2.7.tgz", - "integrity": "sha1-aVOFfDr6R1//ku5gFdUtpwpM050=", - "dev": true, - "dependencies": { - "@mrmlnc/readdir-enhanced": "^2.2.1", - "@nodelib/fs.stat": "^1.1.2", - "glob-parent": "^3.1.0", - "is-glob": "^4.0.0", - "merge2": "^1.2.3", - "micromatch": "^3.1.10" - }, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/fast-glob/node_modules/glob-parent": { - "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/glob-parent/download/glob-parent-3.1.0.tgz", - "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", - "dev": true, - "dependencies": { - "is-glob": "^3.1.0", - "path-dirname": "^1.0.0" - } - }, - "node_modules/fast-glob/node_modules/glob-parent/node_modules/is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/is-glob/download/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "dev": true, - "dependencies": { - "is-extglob": "^2.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/fast-json-stable-stringify/download/fast-json-stable-stringify-2.1.0.tgz?cache=0&sync_timestamp=1576340291001&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffast-json-stable-stringify%2Fdownload%2Ffast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha1-h0v2nG9ATCtdmcSBNBOZ/VWJJjM=" - }, - "node_modules/faye-websocket": { - "version": "0.10.0", - "resolved": "https://registry.npm.taobao.org/faye-websocket/download/faye-websocket-0.10.0.tgz", - "integrity": "sha1-TkkvjQTftviQA1B/btvy1QHnxvQ=", - "dev": true, - "dependencies": { - "websocket-driver": ">=0.5.1" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/figgy-pudding": { - "version": "3.5.2", - "resolved": "https://registry.npm.taobao.org/figgy-pudding/download/figgy-pudding-3.5.2.tgz", - "integrity": "sha1-tO7oFIq7Adzx0aw0Nn1Z4S+mHW4=" - }, - "node_modules/file-loader": { - "version": "4.3.0", - "resolved": "https://registry.npm.taobao.org/file-loader/download/file-loader-4.3.0.tgz?cache=0&sync_timestamp=1603816843418&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffile-loader%2Fdownload%2Ffile-loader-4.3.0.tgz", - "integrity": "sha1-eA8ED3KbPRgBnyBgX3I+hEuKWK8=", - "dev": true, - "dependencies": { - "loader-utils": "^1.2.3", - "schema-utils": "^2.5.0" - }, - "engines": { - "node": ">= 8.9.0" - }, - "peerDependencies": { - "webpack": "^4.0.0" - } - }, - "node_modules/file-uri-to-path": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/file-uri-to-path/download/file-uri-to-path-1.0.0.tgz", - "integrity": "sha1-VTp7hEb/b2hDWcRF8eN6BdrMM90=", - "optional": true - }, - "node_modules/filesize": { - "version": "3.6.1", - "resolved": "https://registry.npm.taobao.org/filesize/download/filesize-3.6.1.tgz?cache=0&sync_timestamp=1582340569604&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffilesize%2Fdownload%2Ffilesize-3.6.1.tgz", - "integrity": "sha1-CQuz7gG2+AGoqL6Z0xcQs0Irsxc=", - "dev": true, - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/fill-range/download/fill-range-4.0.0.tgz", - "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", - "dependencies": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/fill-range/node_modules/extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/extend-shallow/download/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dependencies": { - "is-extendable": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/finalhandler": { - "version": "1.1.2", - "resolved": "https://registry.npm.taobao.org/finalhandler/download/finalhandler-1.1.2.tgz", - "integrity": "sha1-t+fQAP/RGTjQ/bBTUG9uur6fWH0=", - "dev": true, - "dependencies": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "~2.3.0", - "parseurl": "~1.3.3", - "statuses": "~1.5.0", - "unpipe": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/finalhandler/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npm.taobao.org/debug/download/debug-2.6.9.tgz?cache=0&sync_timestamp=1600502894812&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdebug%2Fdownload%2Fdebug-2.6.9.tgz", - "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/finalhandler/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/ms/download/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, - "node_modules/find-cache-dir": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/find-cache-dir/download/find-cache-dir-2.1.0.tgz", - "integrity": "sha1-jQ+UzRP+Q8bHwmGg2GEVypGMBfc=", - "dependencies": { - "commondir": "^1.0.1", - "make-dir": "^2.0.0", - "pkg-dir": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/find-up": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/find-up/download/find-up-3.0.0.tgz?cache=0&sync_timestamp=1597169842138&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffind-up%2Fdownload%2Ffind-up-3.0.0.tgz", - "integrity": "sha1-SRafHXmTQwZG2mHsxa41XCHJe3M=", - "dependencies": { - "locate-path": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/flush-write-stream": { - "version": "1.1.1", - "resolved": "https://registry.npm.taobao.org/flush-write-stream/download/flush-write-stream-1.1.1.tgz", - "integrity": "sha1-jdfYc6G6vCB9lOrQwuDkQnbr8ug=", - "dependencies": { - "inherits": "^2.0.3", - "readable-stream": "^2.3.6" - } - }, - "node_modules/follow-redirects": { - "version": "1.13.0", - "resolved": "https://registry.npm.taobao.org/follow-redirects/download/follow-redirects-1.13.0.tgz?cache=0&sync_timestamp=1597057976909&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffollow-redirects%2Fdownload%2Ffollow-redirects-1.13.0.tgz", - "integrity": "sha1-tC6Nk6Kn7qXtiGM2dtZZe8jjhNs=", - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/RubenVerborgh" - } - ], - "engines": { - "node": ">=4.0" - } - }, - "node_modules/font-awesome": { - "version": "4.7.0", - "resolved": "https://registry.npm.taobao.org/font-awesome/download/font-awesome-4.7.0.tgz", - "integrity": "sha1-j6jPBBGhoxr9B7BtKQK7n8gVoTM=", - "engines": { - "node": ">=0.10.3" - } - }, - "node_modules/for-in": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/for-in/download/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npm.taobao.org/forever-agent/download/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/form-data": { - "version": "2.3.3", - "resolved": "https://registry.npm.taobao.org/form-data/download/form-data-2.3.3.tgz", - "integrity": "sha1-3M5SwF9kTymManq5Nr1yTO/786Y=", - "dev": true, - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 0.12" - } - }, - "node_modules/forwarded": { - "version": "0.1.2", - "resolved": "https://registry.npm.taobao.org/forwarded/download/forwarded-0.1.2.tgz", - "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/fragment-cache": { - "version": "0.2.1", - "resolved": "https://registry.npm.taobao.org/fragment-cache/download/fragment-cache-0.2.1.tgz", - "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", - "dependencies": { - "map-cache": "^0.2.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/fresh": { - "version": "0.5.2", - "resolved": "https://registry.npm.taobao.org/fresh/download/fresh-0.5.2.tgz", - "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/from2": { - "version": "2.3.0", - "resolved": "https://registry.npm.taobao.org/from2/download/from2-2.3.0.tgz", - "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", - "dependencies": { - "inherits": "^2.0.1", - "readable-stream": "^2.0.0" - } - }, - "node_modules/fs-extra": { - "version": "7.0.1", - "resolved": "https://registry.npm.taobao.org/fs-extra/download/fs-extra-7.0.1.tgz", - "integrity": "sha1-TxicRKoSO4lfcigE9V6iPq3DSOk=", - "dev": true, - "dependencies": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - }, - "engines": { - "node": ">=6 <7 || >=8" - } - }, - "node_modules/fs-minipass": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/fs-minipass/download/fs-minipass-2.1.0.tgz", - "integrity": "sha1-f1A2/b8SxjwWkZDL5BmchSJx+fs=", - "dependencies": { - "minipass": "^3.0.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/fs-write-stream-atomic": { - "version": "1.0.10", - "resolved": "https://registry.npm.taobao.org/fs-write-stream-atomic/download/fs-write-stream-atomic-1.0.10.tgz", - "integrity": "sha1-tH31NJPvkR33VzHnCp3tAYnbQMk=", - "dependencies": { - "graceful-fs": "^4.1.2", - "iferr": "^0.1.5", - "imurmurhash": "^0.1.4", - "readable-stream": "1 || 2" - } - }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/fs.realpath/download/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" - }, - "node_modules/fsevents": { - "version": "2.1.3", - "resolved": "https://registry.npm.taobao.org/fsevents/download/fsevents-2.1.3.tgz?cache=0&sync_timestamp=1588787369955&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffsevents%2Fdownload%2Ffsevents-2.1.3.tgz", - "integrity": "sha1-+3OHA66NL5/pAMM4Nt3r7ouX8j4=", - "deprecated": "\"Please update to latest v2.3 or v2.2\"", - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npm.taobao.org/function-bind/download/function-bind-1.1.1.tgz", - "integrity": "sha1-pWiZ0+o8m6uHS7l3O3xe3pL0iV0=", - "dev": true - }, - "node_modules/gensync": { - "version": "1.0.0-beta.2", - "resolved": "https://registry.npm.taobao.org/gensync/download/gensync-1.0.0-beta.2.tgz?cache=0&sync_timestamp=1603829773003&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fgensync%2Fdownload%2Fgensync-1.0.0-beta.2.tgz", - "integrity": "sha1-MqbudsPX9S1GsrGuXZP+qFgKJeA=", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npm.taobao.org/get-caller-file/download/get-caller-file-2.0.5.tgz", - "integrity": "sha1-T5RBKoLbMvNuOwuXQfipf+sDH34=", - "dev": true, - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "node_modules/get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npm.taobao.org/get-stream/download/get-stream-4.1.0.tgz?cache=0&sync_timestamp=1597056502934&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fget-stream%2Fdownload%2Fget-stream-4.1.0.tgz", - "integrity": "sha1-wbJVV189wh1Zv8ec09K0axw6VLU=", - "dev": true, - "dependencies": { - "pump": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/get-value": { - "version": "2.0.6", - "resolved": "https://registry.npm.taobao.org/get-value/download/get-value-2.0.6.tgz", - "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/getpass": { - "version": "0.1.7", - "resolved": "https://registry.npm.taobao.org/getpass/download/getpass-0.1.7.tgz", - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", - "dev": true, - "dependencies": { - "assert-plus": "^1.0.0" - } - }, - "node_modules/glob": { - "version": "7.1.6", - "resolved": "https://registry.npm.taobao.org/glob/download/glob-7.1.6.tgz", - "integrity": "sha1-FB8zuBp8JJLhJVlDB0gMRmeSeKY=", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/glob-parent": { - "version": "5.1.1", - "resolved": "https://registry.npm.taobao.org/glob-parent/download/glob-parent-5.1.1.tgz", - "integrity": "sha1-tsHvQXxOVmPqSY8cRa+saRa7wik=", - "optional": true, - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/glob-to-regexp": { - "version": "0.3.0", - "resolved": "https://registry.npm.taobao.org/glob-to-regexp/download/glob-to-regexp-0.3.0.tgz", - "integrity": "sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs=", - "dev": true - }, - "node_modules/globals": { - "version": "11.12.0", - "resolved": "https://registry.npm.taobao.org/globals/download/globals-11.12.0.tgz?cache=0&sync_timestamp=1603664378253&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fglobals%2Fdownload%2Fglobals-11.12.0.tgz", - "integrity": "sha1-q4eVM4hooLq9hSV1gBjCp+uVxC4=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/globby": { - "version": "9.2.0", - "resolved": "https://registry.npm.taobao.org/globby/download/globby-9.2.0.tgz?cache=0&sync_timestamp=1591083783605&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fglobby%2Fdownload%2Fglobby-9.2.0.tgz", - "integrity": "sha1-/QKacGxwPSm90XD0tts6P3p8tj0=", - "dev": true, - "dependencies": { - "@types/glob": "^7.1.1", - "array-union": "^1.0.2", - "dir-glob": "^2.2.2", - "fast-glob": "^2.2.6", - "glob": "^7.1.3", - "ignore": "^4.0.3", - "pify": "^4.0.1", - "slash": "^2.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/globby/node_modules/ignore": { - "version": "4.0.6", - "resolved": "https://registry.npm.taobao.org/ignore/download/ignore-4.0.6.tgz?cache=0&sync_timestamp=1590809289115&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fignore%2Fdownload%2Fignore-4.0.6.tgz", - "integrity": "sha1-dQ49tYYgh7RzfrrIIH/9HvJ7Jfw=", - "dev": true, - "engines": { - "node": ">= 4" - } - }, - "node_modules/globby/node_modules/slash": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/slash/download/slash-2.0.0.tgz", - "integrity": "sha1-3lUoUaF1nfOo8gZTVEL17E3eq0Q=", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/good-listener": { - "version": "1.2.2", - "resolved": "https://registry.npm.taobao.org/good-listener/download/good-listener-1.2.2.tgz", - "integrity": "sha1-1TswzfkxPf+33JoNR3CWqm0UXFA=", - "dependencies": { - "delegate": "^3.1.2" - } - }, - "node_modules/graceful-fs": { - "version": "4.2.4", - "resolved": "https://registry.npm.taobao.org/graceful-fs/download/graceful-fs-4.2.4.tgz", - "integrity": "sha1-Ila94U02MpWMRl68ltxGfKB6Kfs=" - }, - "node_modules/gzip-size": { - "version": "5.1.1", - "resolved": "https://registry.npm.taobao.org/gzip-size/download/gzip-size-5.1.1.tgz", - "integrity": "sha1-y5vuaS+HwGErIyhAqHOQTkwTUnQ=", - "dev": true, - "dependencies": { - "duplexer": "^0.1.1", - "pify": "^4.0.1" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/handle-thing": { - "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/handle-thing/download/handle-thing-2.0.1.tgz", - "integrity": "sha1-hX95zjWVgMNA1DCBzGSJcNC7I04=", - "dev": true - }, - "node_modules/har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/har-schema/download/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/har-validator": { - "version": "5.1.5", - "resolved": "https://registry.npm.taobao.org/har-validator/download/har-validator-5.1.5.tgz?cache=0&sync_timestamp=1596082584903&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fhar-validator%2Fdownload%2Fhar-validator-5.1.5.tgz", - "integrity": "sha1-HwgDufjLIMD6E4It8ezds2veHv0=", - "deprecated": "this library is no longer supported", - "dev": true, - "dependencies": { - "ajv": "^6.12.3", - "har-schema": "^2.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/has": { - "version": "1.0.3", - "resolved": "https://registry.npm.taobao.org/has/download/has-1.0.3.tgz", - "integrity": "sha1-ci18v8H2qoJB8W3YFOAR4fQeh5Y=", - "dev": true, - "dependencies": { - "function-bind": "^1.1.1" - }, - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/has-ansi/download/has-ansi-2.0.0.tgz", - "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", - "dev": true, - "dependencies": { - "ansi-regex": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/has-ansi/node_modules/ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npm.taobao.org/ansi-regex/download/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/has-flag/download/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/has-symbols": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/has-symbols/download/has-symbols-1.0.1.tgz", - "integrity": "sha1-n1IUdYpEGWxAbZvXbOv4HsLdMeg=", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-value": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/has-value/download/has-value-1.0.0.tgz", - "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", - "dependencies": { - "get-value": "^2.0.6", - "has-values": "^1.0.0", - "isobject": "^3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/has-values": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/has-values/download/has-values-1.0.0.tgz", - "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", - "dependencies": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/has-values/node_modules/kind-of": { - "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/kind-of/download/kind-of-4.0.0.tgz", - "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/hash-base": { - "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/hash-base/download/hash-base-3.1.0.tgz", - "integrity": "sha1-VcOB2eBuHSmXqIO0o/3f5/DTrzM=", - "dependencies": { - "inherits": "^2.0.4", - "readable-stream": "^3.6.0", - "safe-buffer": "^5.2.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/hash-base/node_modules/readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npm.taobao.org/readable-stream/download/readable-stream-3.6.0.tgz?cache=0&sync_timestamp=1581624324274&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Freadable-stream%2Fdownload%2Freadable-stream-3.6.0.tgz", - "integrity": "sha1-M3u9o63AcGvT4CRCaihtS0sskZg=", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/hash-base/node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npm.taobao.org/safe-buffer/download/safe-buffer-5.2.1.tgz", - "integrity": "sha1-Hq+fqb2x/dTsdfWPnNtOa3gn7sY=", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/hash-sum": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/hash-sum/download/hash-sum-2.0.0.tgz", - "integrity": "sha1-gdAbtd6OpKIUrV1urRtSNGCwtFo=", - "dev": true - }, - "node_modules/hash.js": { - "version": "1.1.7", - "resolved": "https://registry.npm.taobao.org/hash.js/download/hash.js-1.1.7.tgz", - "integrity": "sha1-C6vKU46NTuSg+JiNaIZlN6ADz0I=", - "dependencies": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" - } - }, - "node_modules/he": { - "version": "1.2.0", - "resolved": "https://registry.npm.taobao.org/he/download/he-1.2.0.tgz", - "integrity": "sha1-hK5l+n6vsWX922FWauFLrwVmTw8=", - "bin": { - "he": "bin/he" - } - }, - "node_modules/hex-color-regex": { - "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/hex-color-regex/download/hex-color-regex-1.1.0.tgz", - "integrity": "sha1-TAb8y0YC/iYCs8k9+C1+fb8aio4=", - "dev": true - }, - "node_modules/highlight.js": { - "version": "10.3.2", - "resolved": "https://registry.npm.taobao.org/highlight.js/download/highlight.js-10.3.2.tgz", - "integrity": "sha1-E1/TYZoAw8u4tM1tvHjVa/y8RvE=", - "deprecated": "Potential vulnerability. Please upgrade to @latest", - "engines": { - "node": "*" - } - }, - "node_modules/highlight.js-async-webpack": { - "version": "1.0.4", - "resolved": "https://registry.npmmirror.com/highlight.js-async-webpack/-/highlight.js-async-webpack-1.0.4.tgz", - "integrity": "sha512-IC0AwUgNr7BU8pqheaCEvOQvOtIZwO3I4rtbmT489Ndz8loE31IRmBmT6C4qDCbfZjzNO+k2w3VceZjTQ3JQ8Q==" - }, - "node_modules/hmac-drbg": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/hmac-drbg/download/hmac-drbg-1.0.1.tgz", - "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", - "dependencies": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "node_modules/hoopy": { - "version": "0.1.4", - "resolved": "https://registry.npm.taobao.org/hoopy/download/hoopy-0.1.4.tgz", - "integrity": "sha1-YJIH1mEQADOpqUAq096mdzgcGx0=", - "dev": true, - "engines": { - "node": ">= 6.0.0" - } - }, - "node_modules/hosted-git-info": { - "version": "2.8.8", - "resolved": "https://registry.npm.taobao.org/hosted-git-info/download/hosted-git-info-2.8.8.tgz?cache=0&sync_timestamp=1602803832496&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fhosted-git-info%2Fdownload%2Fhosted-git-info-2.8.8.tgz", - "integrity": "sha1-dTm9S8Hg4KiVgVouAmJCCxKFhIg=", - "dev": true - }, - "node_modules/hpack.js": { - "version": "2.1.6", - "resolved": "https://registry.npm.taobao.org/hpack.js/download/hpack.js-2.1.6.tgz", - "integrity": "sha1-h3dMCUnlE/QuhFdbPEVoH63ioLI=", - "dev": true, - "dependencies": { - "inherits": "^2.0.1", - "obuf": "^1.0.0", - "readable-stream": "^2.0.1", - "wbuf": "^1.1.0" - } - }, - "node_modules/hsl-regex": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/hsl-regex/download/hsl-regex-1.0.0.tgz", - "integrity": "sha1-1JMwx4ntgZ4nakwNJy3/owsY/m4=", - "dev": true - }, - "node_modules/hsla-regex": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/hsla-regex/download/hsla-regex-1.0.0.tgz", - "integrity": "sha1-wc56MWjIxmFAM6S194d/OyJfnDg=", - "dev": true - }, - "node_modules/html-comment-regex": { - "version": "1.1.2", - "resolved": "https://registry.npm.taobao.org/html-comment-regex/download/html-comment-regex-1.1.2.tgz", - "integrity": "sha1-l9RoiutcgYhqNk+qDK0d2hTUM6c=", - "dev": true - }, - "node_modules/html-entities": { - "version": "1.3.1", - "resolved": "https://registry.npm.taobao.org/html-entities/download/html-entities-1.3.1.tgz", - "integrity": "sha1-+5oaS1sUxdq6gtPjTGrk/nAaDkQ=", - "dev": true - }, - "node_modules/html-minifier": { - "version": "3.5.21", - "resolved": "https://registry.npm.taobao.org/html-minifier/download/html-minifier-3.5.21.tgz", - "integrity": "sha1-0AQOBUcw41TbAIRjWTGUAVIS0gw=", - "dev": true, - "dependencies": { - "camel-case": "3.0.x", - "clean-css": "4.2.x", - "commander": "2.17.x", - "he": "1.2.x", - "param-case": "2.1.x", - "relateurl": "0.2.x", - "uglify-js": "3.4.x" - }, - "bin": { - "html-minifier": "cli.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/html-minifier/node_modules/commander": { - "version": "2.17.1", - "resolved": "https://registry.npm.taobao.org/commander/download/commander-2.17.1.tgz?cache=0&sync_timestamp=1603599636161&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcommander%2Fdownload%2Fcommander-2.17.1.tgz", - "integrity": "sha1-vXerfebelCBc6sxy8XFtKfIKd78=", - "dev": true - }, - "node_modules/html-tags": { - "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/html-tags/download/html-tags-3.1.0.tgz", - "integrity": "sha1-e15vfmZen7QfMAB+2eDUHpf7IUA=", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/html-webpack-plugin": { - "version": "3.2.0", - "resolved": "https://registry.npm.taobao.org/html-webpack-plugin/download/html-webpack-plugin-3.2.0.tgz?cache=0&sync_timestamp=1603664396975&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fhtml-webpack-plugin%2Fdownload%2Fhtml-webpack-plugin-3.2.0.tgz", - "integrity": "sha1-sBq71yOsqqeze2r0SS69oD2d03s=", - "deprecated": "3.x is no longer supported", - "dev": true, - "dependencies": { - "html-minifier": "^3.2.3", - "loader-utils": "^0.2.16", - "lodash": "^4.17.3", - "pretty-error": "^2.0.2", - "tapable": "^1.0.0", - "toposort": "^1.0.0", - "util.promisify": "1.0.0" - }, - "engines": { - "node": ">=6.9" - }, - "peerDependencies": { - "webpack": "^1.0.0 || ^2.0.0 || ^3.0.0 || ^4.0.0" - } - }, - "node_modules/html-webpack-plugin/node_modules/big.js": { - "version": "3.2.0", - "resolved": "https://registry.npm.taobao.org/big.js/download/big.js-3.2.0.tgz", - "integrity": "sha1-pfwpi4G54Nyi5FiCR4S2XFK6WI4=", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/html-webpack-plugin/node_modules/emojis-list": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/emojis-list/download/emojis-list-2.1.0.tgz", - "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=", - "dev": true, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/html-webpack-plugin/node_modules/json5": { - "version": "0.5.1", - "resolved": "https://registry.npm.taobao.org/json5/download/json5-0.5.1.tgz", - "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", - "dev": true, - "bin": { - "json5": "lib/cli.js" - } - }, - "node_modules/html-webpack-plugin/node_modules/loader-utils": { - "version": "0.2.17", - "resolved": "https://registry.npm.taobao.org/loader-utils/download/loader-utils-0.2.17.tgz?cache=0&sync_timestamp=1584445207623&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Floader-utils%2Fdownload%2Floader-utils-0.2.17.tgz", - "integrity": "sha1-+G5jdNQyBabmxg6RlvF8Apm/s0g=", - "dev": true, - "dependencies": { - "big.js": "^3.1.3", - "emojis-list": "^2.0.0", - "json5": "^0.5.0", - "object-assign": "^4.0.1" - } - }, - "node_modules/html-webpack-plugin/node_modules/util.promisify": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/util.promisify/download/util.promisify-1.0.0.tgz", - "integrity": "sha1-RA9xZaRZyaFtwUXrjnLzVocJcDA=", - "dev": true, - "dependencies": { - "define-properties": "^1.1.2", - "object.getownpropertydescriptors": "^2.0.3" - } - }, - "node_modules/htmlparser2": { - "version": "3.10.1", - "resolved": "https://registry.npm.taobao.org/htmlparser2/download/htmlparser2-3.10.1.tgz?cache=0&sync_timestamp=1603668161350&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fhtmlparser2%2Fdownload%2Fhtmlparser2-3.10.1.tgz", - "integrity": "sha1-vWedw/WYl7ajS7EHSchVu1OpOS8=", - "dev": true, - "dependencies": { - "domelementtype": "^1.3.1", - "domhandler": "^2.3.0", - "domutils": "^1.5.1", - "entities": "^1.1.1", - "inherits": "^2.0.1", - "readable-stream": "^3.1.1" - } - }, - "node_modules/htmlparser2/node_modules/entities": { - "version": "1.1.2", - "resolved": "https://registry.npm.taobao.org/entities/download/entities-1.1.2.tgz?cache=0&sync_timestamp=1602897029273&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fentities%2Fdownload%2Fentities-1.1.2.tgz", - "integrity": "sha1-vfpzUplmTfr9NFKe1PhSKidf6lY=", - "dev": true - }, - "node_modules/htmlparser2/node_modules/readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npm.taobao.org/readable-stream/download/readable-stream-3.6.0.tgz?cache=0&sync_timestamp=1581624324274&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Freadable-stream%2Fdownload%2Freadable-stream-3.6.0.tgz", - "integrity": "sha1-M3u9o63AcGvT4CRCaihtS0sskZg=", - "dev": true, - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/http-deceiver": { - "version": "1.2.7", - "resolved": "https://registry.npm.taobao.org/http-deceiver/download/http-deceiver-1.2.7.tgz", - "integrity": "sha1-+nFolEq5pRnTN8sL7HKE3D5yPYc=", - "dev": true - }, - "node_modules/http-errors": { - "version": "1.7.2", - "resolved": "https://registry.npm.taobao.org/http-errors/download/http-errors-1.7.2.tgz", - "integrity": "sha1-T1ApzxMjnzEDblsuVSkrz7zIXI8=", - "dev": true, - "dependencies": { - "depd": "~1.1.2", - "inherits": "2.0.3", - "setprototypeof": "1.1.1", - "statuses": ">= 1.5.0 < 2", - "toidentifier": "1.0.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/http-errors/node_modules/inherits": { - "version": "2.0.3", - "resolved": "https://registry.npm.taobao.org/inherits/download/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true - }, - "node_modules/http-proxy": { - "version": "1.18.1", - "resolved": "https://registry.npm.taobao.org/http-proxy/download/http-proxy-1.18.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fhttp-proxy%2Fdownload%2Fhttp-proxy-1.18.1.tgz", - "integrity": "sha1-QBVB8FNIhLv5UmAzTnL4juOXZUk=", - "dev": true, - "dependencies": { - "eventemitter3": "^4.0.0", - "follow-redirects": "^1.0.0", - "requires-port": "^1.0.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/http-proxy-middleware": { - "version": "0.19.1", - "resolved": "https://registry.npm.taobao.org/http-proxy-middleware/download/http-proxy-middleware-0.19.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fhttp-proxy-middleware%2Fdownload%2Fhttp-proxy-middleware-0.19.1.tgz", - "integrity": "sha1-GDx9xKoUeRUDBkmMIQza+WCApDo=", - "dev": true, - "dependencies": { - "http-proxy": "^1.17.0", - "is-glob": "^4.0.0", - "lodash": "^4.17.11", - "micromatch": "^3.1.10" - }, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npm.taobao.org/http-signature/download/http-signature-1.2.0.tgz?cache=0&sync_timestamp=1600868452638&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fhttp-signature%2Fdownload%2Fhttp-signature-1.2.0.tgz", - "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", - "dev": true, - "dependencies": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - }, - "engines": { - "node": ">=0.8", - "npm": ">=1.3.7" - } - }, - "node_modules/https-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/https-browserify/download/https-browserify-1.0.0.tgz", - "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=" - }, - "node_modules/human-signals": { - "version": "1.1.1", - "resolved": "https://registry.npm.taobao.org/human-signals/download/human-signals-1.1.1.tgz", - "integrity": "sha1-xbHNFPUK6uCatsWf5jujOV/k36M=", - "dev": true, - "engines": { - "node": ">=8.12.0" - } - }, - "node_modules/iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npm.taobao.org/iconv-lite/download/iconv-lite-0.4.24.tgz?cache=0&sync_timestamp=1594184250387&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ficonv-lite%2Fdownload%2Ficonv-lite-0.4.24.tgz", - "integrity": "sha1-ICK0sl+93CHS9SSXSkdKr+czkIs=", - "dev": true, - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/icss-utils": { - "version": "4.1.1", - "resolved": "https://registry.npm.taobao.org/icss-utils/download/icss-utils-4.1.1.tgz?cache=0&sync_timestamp=1602526927264&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ficss-utils%2Fdownload%2Ficss-utils-4.1.1.tgz", - "integrity": "sha1-IRcLU3ie4nRHwvR91oMIFAP5pGc=", - "dev": true, - "dependencies": { - "postcss": "^7.0.14" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npm.taobao.org/ieee754/download/ieee754-1.2.1.tgz?cache=0&sync_timestamp=1603838208740&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fieee754%2Fdownload%2Fieee754-1.2.1.tgz", - "integrity": "sha1-jrehCmP/8l0VpXsAFYbRd9Gw01I=", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/iferr": { - "version": "0.1.5", - "resolved": "https://registry.npm.taobao.org/iferr/download/iferr-0.1.5.tgz", - "integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=" - }, - "node_modules/ignore": { - "version": "3.3.10", - "resolved": "https://registry.npm.taobao.org/ignore/download/ignore-3.3.10.tgz?cache=0&sync_timestamp=1590809289115&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fignore%2Fdownload%2Fignore-3.3.10.tgz", - "integrity": "sha1-Cpf7h2mG6AgcYxFg+PnziRV/AEM=", - "dev": true - }, - "node_modules/import-cwd": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/import-cwd/download/import-cwd-2.1.0.tgz", - "integrity": "sha1-qmzzbnInYShcs3HsZRn1PiQ1sKk=", - "dev": true, - "dependencies": { - "import-from": "^2.1.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/import-fresh": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/import-fresh/download/import-fresh-2.0.0.tgz", - "integrity": "sha1-2BNVwVYS04bGH53dOSLUMEgipUY=", - "dev": true, - "dependencies": { - "caller-path": "^2.0.0", - "resolve-from": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/import-from": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/import-from/download/import-from-2.1.0.tgz", - "integrity": "sha1-M1238qev/VOqpHHUuAId7ja387E=", - "dev": true, - "dependencies": { - "resolve-from": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/import-local": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/import-local/download/import-local-2.0.0.tgz", - "integrity": "sha1-VQcL44pZk88Y72236WH1vuXFoJ0=", - "dev": true, - "dependencies": { - "pkg-dir": "^3.0.0", - "resolve-cwd": "^2.0.0" - }, - "bin": { - "import-local-fixture": "fixtures/cli.js" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npm.taobao.org/imurmurhash/download/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", - "engines": { - "node": ">=0.8.19" - } - }, - "node_modules/indent-string": { - "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/indent-string/download/indent-string-4.0.0.tgz", - "integrity": "sha1-Yk+PRJfWGbLZdoUx1Y9BIoVNclE=", - "engines": { - "node": ">=8" - } - }, - "node_modules/indexes-of": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/indexes-of/download/indexes-of-1.0.1.tgz", - "integrity": "sha1-8w9xbI4r00bHtn0985FVZqfAVgc=", - "dev": true - }, - "node_modules/infer-owner": { - "version": "1.0.4", - "resolved": "https://registry.npm.taobao.org/infer-owner/download/infer-owner-1.0.4.tgz", - "integrity": "sha1-xM78qo5RBRwqQLos6KPScpWvlGc=" - }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npm.taobao.org/inflight/download/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npm.taobao.org/inherits/download/inherits-2.0.4.tgz", - "integrity": "sha1-D6LGT5MpF8NDOg3tVTY6rjdBa3w=" - }, - "node_modules/internal-ip": { - "version": "4.3.0", - "resolved": "https://registry.npm.taobao.org/internal-ip/download/internal-ip-4.3.0.tgz?cache=0&sync_timestamp=1596563037835&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Finternal-ip%2Fdownload%2Finternal-ip-4.3.0.tgz", - "integrity": "sha1-hFRSuq2dLKO2nGNaE3rLmg2tCQc=", - "dev": true, - "dependencies": { - "default-gateway": "^4.2.0", - "ipaddr.js": "^1.9.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/internal-ip/node_modules/default-gateway": { - "version": "4.2.0", - "resolved": "https://registry.npm.taobao.org/default-gateway/download/default-gateway-4.2.0.tgz", - "integrity": "sha1-FnEEx1AMIRX23WmwpTa7jtcgVSs=", - "dev": true, - "dependencies": { - "execa": "^1.0.0", - "ip-regex": "^2.1.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/ip": { - "version": "1.1.5", - "resolved": "https://registry.npm.taobao.org/ip/download/ip-1.1.5.tgz", - "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=", - "dev": true - }, - "node_modules/ip-regex": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/ip-regex/download/ip-regex-2.1.0.tgz", - "integrity": "sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/ipaddr.js": { - "version": "1.9.1", - "resolved": "https://registry.npm.taobao.org/ipaddr.js/download/ipaddr.js-1.9.1.tgz", - "integrity": "sha1-v/OFQ+64mEglB5/zoqjmy9RngbM=", - "dev": true, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/is-absolute-url": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/is-absolute-url/download/is-absolute-url-2.1.0.tgz", - "integrity": "sha1-UFMN+4T8yap9vnhS6Do3uTufKqY=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npm.taobao.org/is-accessor-descriptor/download/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-accessor-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npm.taobao.org/kind-of/download/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-arguments": { - "version": "1.0.4", - "resolved": "https://registry.npm.taobao.org/is-arguments/download/is-arguments-1.0.4.tgz", - "integrity": "sha1-P6+WbHy6D/Q3+zH2JQCC/PBEjPM=", - "dev": true, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npm.taobao.org/is-arrayish/download/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", - "dev": true - }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/is-binary-path/download/is-binary-path-2.1.0.tgz", - "integrity": "sha1-6h9/O4DwZCNug0cPhsCcJU+0Wwk=", - "optional": true, - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npm.taobao.org/is-buffer/download/is-buffer-1.1.6.tgz?cache=0&sync_timestamp=1588707106955&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fis-buffer%2Fdownload%2Fis-buffer-1.1.6.tgz", - "integrity": "sha1-76ouqdqg16suoTqXsritUf776L4=" - }, - "node_modules/is-callable": { - "version": "1.2.2", - "resolved": "https://registry.npm.taobao.org/is-callable/download/is-callable-1.2.2.tgz?cache=0&sync_timestamp=1600719276620&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fis-callable%2Fdownload%2Fis-callable-1.2.2.tgz", - "integrity": "sha1-x8ZxXNItTdtI0+GZcCI6zquwgNk=", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-color-stop": { - "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/is-color-stop/download/is-color-stop-1.1.0.tgz", - "integrity": "sha1-z/9HGu5N1cnhWFmPvhKWe1za00U=", - "dev": true, - "dependencies": { - "css-color-names": "^0.0.4", - "hex-color-regex": "^1.1.0", - "hsl-regex": "^1.0.0", - "hsla-regex": "^1.0.0", - "rgb-regex": "^1.0.1", - "rgba-regex": "^1.0.0" - } - }, - "node_modules/is-core-module": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/is-core-module/download/is-core-module-2.0.0.tgz?cache=0&sync_timestamp=1603133391687&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fis-core-module%2Fdownload%2Fis-core-module-2.0.0.tgz", - "integrity": "sha1-WFMbcK7R23wOjU6xoKLR3dZL0S0=", - "dev": true, - "dependencies": { - "has": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npm.taobao.org/is-data-descriptor/download/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-data-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npm.taobao.org/kind-of/download/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-date-object": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/is-date-object/download/is-date-object-1.0.2.tgz?cache=0&sync_timestamp=1576729165697&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fis-date-object%2Fdownload%2Fis-date-object-1.0.2.tgz", - "integrity": "sha1-vac28s2P0G0yhE53Q7+nSUw7/X4=", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npm.taobao.org/is-descriptor/download/is-descriptor-0.1.6.tgz", - "integrity": "sha1-Nm2CQN3kh8pRgjsaufB6EKeCUco=", - "dependencies": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-descriptor/node_modules/kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npm.taobao.org/kind-of/download/kind-of-5.1.0.tgz", - "integrity": "sha1-cpyR4thXt6QZofmqZWhcTDP1hF0=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-directory": { - "version": "0.3.1", - "resolved": "https://registry.npm.taobao.org/is-directory/download/is-directory-0.3.1.tgz", - "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-docker": { - "version": "2.1.1", - "resolved": "https://registry.npm.taobao.org/is-docker/download/is-docker-2.1.1.tgz", - "integrity": "sha1-QSWojkTkUNOE4JBH7eca3C0UQVY=", - "dev": true, - "bin": { - "is-docker": "cli.js" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npm.taobao.org/is-extendable/download/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npm.taobao.org/is-extglob/download/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "devOptional": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/is-fullwidth-code-point/download/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npm.taobao.org/is-glob/download/is-glob-4.0.1.tgz", - "integrity": "sha1-dWfb6fL14kZ7x3q4PEopSCQHpdw=", - "devOptional": true, - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-negative-zero": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/is-negative-zero/download/is-negative-zero-2.0.0.tgz", - "integrity": "sha1-lVOxIbD6wohp2p7UWeIMdUN4hGE=", - "dev": true, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/is-number": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/is-number/download/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-number/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npm.taobao.org/kind-of/download/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-obj": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/is-obj/download/is-obj-2.0.0.tgz", - "integrity": "sha1-Rz+wXZc3BeP9liBUUBjKjiLvSYI=", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-path-cwd": { - "version": "2.2.0", - "resolved": "https://registry.npm.taobao.org/is-path-cwd/download/is-path-cwd-2.2.0.tgz", - "integrity": "sha1-Z9Q7gmZKe1GR/ZEZEn6zAASKn9s=", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/is-path-in-cwd": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/is-path-in-cwd/download/is-path-in-cwd-2.1.0.tgz", - "integrity": "sha1-v+Lcomxp85cmWkAJljYCk1oFOss=", - "dev": true, - "dependencies": { - "is-path-inside": "^2.1.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/is-path-inside": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/is-path-inside/download/is-path-inside-2.1.0.tgz", - "integrity": "sha1-fJgQWH1lmkDSe8201WFuqwWUlLI=", - "dev": true, - "dependencies": { - "path-is-inside": "^1.0.2" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/is-plain-obj": { - "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/is-plain-obj/download/is-plain-obj-1.1.0.tgz?cache=0&sync_timestamp=1602541451286&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fis-plain-obj%2Fdownload%2Fis-plain-obj-1.1.0.tgz", - "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npm.taobao.org/is-plain-object/download/is-plain-object-2.0.4.tgz", - "integrity": "sha1-LBY7P6+xtgbZ0Xko8FwqHDjgdnc=", - "dependencies": { - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-regex": { - "version": "1.1.1", - "resolved": "https://registry.npm.taobao.org/is-regex/download/is-regex-1.1.1.tgz?cache=0&sync_timestamp=1596555640677&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fis-regex%2Fdownload%2Fis-regex-1.1.1.tgz", - "integrity": "sha1-xvmKrMVG9s7FRooHt7FTq1ZKV7k=", - "dev": true, - "dependencies": { - "has-symbols": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-resolvable": { - "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/is-resolvable/download/is-resolvable-1.1.0.tgz", - "integrity": "sha1-+xj4fOH+uSUWnJpAfBkxijIG7Yg=", - "dev": true - }, - "node_modules/is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/is-stream/download/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-svg": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/is-svg/download/is-svg-3.0.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fis-svg%2Fdownload%2Fis-svg-3.0.0.tgz", - "integrity": "sha1-kyHb0pwhLlypnE+peUxxS8r6L3U=", - "dev": true, - "dependencies": { - "html-comment-regex": "^1.1.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/is-symbol": { - "version": "1.0.3", - "resolved": "https://registry.npm.taobao.org/is-symbol/download/is-symbol-1.0.3.tgz", - "integrity": "sha1-OOEBS55jKb4N6dJKQU/XRB7GGTc=", - "dev": true, - "dependencies": { - "has-symbols": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/is-typedarray/download/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", - "dev": true - }, - "node_modules/is-windows": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/is-windows/download/is-windows-1.0.2.tgz", - "integrity": "sha1-0YUOuXkezRjmGCzhKjDzlmNLsZ0=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-wsl": { - "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/is-wsl/download/is-wsl-1.1.0.tgz", - "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=", - "engines": { - "node": ">=4" - } - }, - "node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/isarray/download/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/isexe/download/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true - }, - "node_modules/isobject": { - "version": "3.0.1", - "resolved": "https://registry.npm.taobao.org/isobject/download/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/isstream": { - "version": "0.1.2", - "resolved": "https://registry.npm.taobao.org/isstream/download/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", - "dev": true - }, - "node_modules/javascript-stringify": { - "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/javascript-stringify/download/javascript-stringify-2.0.1.tgz", - "integrity": "sha1-bvNYA1MQ411mfGde1j0+t8GqGeU=", - "dev": true - }, - "node_modules/jest-worker": { - "version": "25.5.0", - "resolved": "https://registry.npm.taobao.org/jest-worker/download/jest-worker-25.5.0.tgz?cache=0&sync_timestamp=1603442917089&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fjest-worker%2Fdownload%2Fjest-worker-25.5.0.tgz", - "integrity": "sha1-JhHQcbec6g9D7lej0RhZOsFUfbE=", - "dev": true, - "dependencies": { - "merge-stream": "^2.0.0", - "supports-color": "^7.0.0" - }, - "engines": { - "node": ">= 8.3" - } - }, - "node_modules/jest-worker/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/has-flag/download/has-flag-4.0.0.tgz", - "integrity": "sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-worker/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-7.2.0.tgz?cache=0&sync_timestamp=1598611709087&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsupports-color%2Fdownload%2Fsupports-color-7.2.0.tgz", - "integrity": "sha1-G33NyzK4E4gBs+R4umpRyqiWSNo=", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jquery": { - "version": "3.5.1", - "resolved": "https://registry.npm.taobao.org/jquery/download/jquery-3.5.1.tgz", - "integrity": "sha1-17TQjhv9uGrS8aPQOeoXMEcXq7U=" - }, - "node_modules/js-message": { - "version": "1.0.5", - "resolved": "https://registry.npm.taobao.org/js-message/download/js-message-1.0.5.tgz", - "integrity": "sha1-IwDSSxrwjondCVvBpMnJz8uJLRU=", - "dev": true, - "engines": { - "node": ">=0.6.0" - } - }, - "node_modules/js-queue": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/js-queue/download/js-queue-2.0.0.tgz", - "integrity": "sha1-NiITz4YPRo8BJfxslqvBdCUx+Ug=", - "dev": true, - "dependencies": { - "easy-stack": "^1.0.0" - }, - "engines": { - "node": ">=1.0.0" - } - }, - "node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/js-tokens/download/js-tokens-4.0.0.tgz?cache=0&sync_timestamp=1586796260005&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fjs-tokens%2Fdownload%2Fjs-tokens-4.0.0.tgz", - "integrity": "sha1-GSA/tZmR35jjoocFDUZHzerzJJk=", - "dev": true - }, - "node_modules/js-yaml": { - "version": "3.14.0", - "resolved": "https://registry.npm.taobao.org/js-yaml/download/js-yaml-3.14.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fjs-yaml%2Fdownload%2Fjs-yaml-3.14.0.tgz", - "integrity": "sha1-p6NBcPJqIbsWJCTYray0ETpp5II=", - "dev": true, - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npm.taobao.org/jsbn/download/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", - "dev": true - }, - "node_modules/jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npm.taobao.org/jsesc/download/jsesc-2.5.2.tgz?cache=0&sync_timestamp=1603891232110&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fjsesc%2Fdownload%2Fjsesc-2.5.2.tgz", - "integrity": "sha1-gFZNLkg9rPbo7yCWUKZ98/DCg6Q=", - "dev": true, - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/json-parse-better-errors": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/json-parse-better-errors/download/json-parse-better-errors-1.0.2.tgz", - "integrity": "sha1-u4Z8+zRQ5pEHwTHRxRS6s9yLyqk=" - }, - "node_modules/json-parse-even-better-errors": { - "version": "2.3.1", - "resolved": "https://registry.npm.taobao.org/json-parse-even-better-errors/download/json-parse-even-better-errors-2.3.1.tgz?cache=0&sync_timestamp=1599064788298&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fjson-parse-even-better-errors%2Fdownload%2Fjson-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha1-fEeAWpQxmSjgV3dAXcEuH3pO4C0=", - "dev": true - }, - "node_modules/json-schema": { - "version": "0.2.3", - "resolved": "https://registry.npm.taobao.org/json-schema/download/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", - "dev": true - }, - "node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npm.taobao.org/json-schema-traverse/download/json-schema-traverse-0.4.1.tgz?cache=0&sync_timestamp=1599333856086&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fjson-schema-traverse%2Fdownload%2Fjson-schema-traverse-0.4.1.tgz", - "integrity": "sha1-afaofZUTq4u4/mO9sJecRI5oRmA=" - }, - "node_modules/json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npm.taobao.org/json-stringify-safe/download/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", - "dev": true - }, - "node_modules/json3": { - "version": "3.3.3", - "resolved": "https://registry.npm.taobao.org/json3/download/json3-3.3.3.tgz", - "integrity": "sha1-f8EON1/FrkLEcFpcwKpvYr4wW4E=", - "dev": true - }, - "node_modules/json5": { - "version": "2.1.3", - "resolved": "https://registry.npm.taobao.org/json5/download/json5-2.1.3.tgz", - "integrity": "sha1-ybD3+pIzv+WAf+ZvzzpWF+1ZfUM=", - "dev": true, - "dependencies": { - "minimist": "^1.2.5" - }, - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/jsonfile/download/jsonfile-4.0.0.tgz", - "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", - "dev": true, - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/jsprim": { - "version": "1.4.1", - "resolved": "https://registry.npm.taobao.org/jsprim/download/jsprim-1.4.1.tgz", - "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", - "dev": true, - "engines": [ - "node >=0.6.0" - ], - "dependencies": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.2.3", - "verror": "1.10.0" - } - }, - "node_modules/katex": { - "version": "0.12.0", - "resolved": "https://registry.npm.taobao.org/katex/download/katex-0.12.0.tgz", - "integrity": "sha1-L7HGZdvSsEPtz4ofXFVfRr6qDLk=", - "dependencies": { - "commander": "^2.19.0" - }, - "bin": { - "katex": "cli.js" - } - }, - "node_modules/keycode": { - "version": "2.2.0", - "resolved": "https://registry.npm.taobao.org/keycode/download/keycode-2.2.0.tgz", - "integrity": "sha1-PQr1bce4uOXLqNCpfxByBO7CKwQ=" - }, - "node_modules/killable": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/killable/download/killable-1.0.1.tgz", - "integrity": "sha1-TIzkQRh6Bhx0dPuHygjipjgZSJI=", - "dev": true - }, - "node_modules/kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npm.taobao.org/kind-of/download/kind-of-6.0.3.tgz", - "integrity": "sha1-B8BQNKbDSfoG4k+jWqdttFgM5N0=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/launch-editor": { - "version": "2.2.1", - "resolved": "https://registry.npm.taobao.org/launch-editor/download/launch-editor-2.2.1.tgz", - "integrity": "sha1-hxtaPuOdZoD8wm03kwtu7aidsMo=", - "dev": true, - "dependencies": { - "chalk": "^2.3.0", - "shell-quote": "^1.6.1" - } - }, - "node_modules/launch-editor-middleware": { - "version": "2.2.1", - "resolved": "https://registry.npm.taobao.org/launch-editor-middleware/download/launch-editor-middleware-2.2.1.tgz", - "integrity": "sha1-4UsH5scVSwpLhqD9NFeE5FgEwVc=", - "dev": true, - "dependencies": { - "launch-editor": "^2.2.1" - } - }, - "node_modules/lines-and-columns": { - "version": "1.1.6", - "resolved": "https://registry.npm.taobao.org/lines-and-columns/download/lines-and-columns-1.1.6.tgz", - "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=", - "dev": true - }, - "node_modules/loader-runner": { - "version": "2.4.0", - "resolved": "https://registry.npm.taobao.org/loader-runner/download/loader-runner-2.4.0.tgz?cache=0&sync_timestamp=1601450715716&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Floader-runner%2Fdownload%2Floader-runner-2.4.0.tgz", - "integrity": "sha1-7UcGa/5TTX6ExMe5mYwqdWB9k1c=", - "engines": { - "node": ">=4.3.0 <5.0.0 || >=5.10" - } - }, - "node_modules/loader-utils": { - "version": "1.4.0", - "resolved": "https://registry.npm.taobao.org/loader-utils/download/loader-utils-1.4.0.tgz?cache=0&sync_timestamp=1584445207623&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Floader-utils%2Fdownload%2Floader-utils-1.4.0.tgz", - "integrity": "sha1-xXm140yzSxp07cbB+za/o3HVphM=", - "dependencies": { - "big.js": "^5.2.2", - "emojis-list": "^3.0.0", - "json5": "^1.0.1" - }, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/loader-utils/node_modules/json5": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/json5/download/json5-1.0.1.tgz", - "integrity": "sha1-d5+wAYYE+oVOrL9iUhgNg1Q+Pb4=", - "dependencies": { - "minimist": "^1.2.0" - }, - "bin": { - "json5": "lib/cli.js" - } - }, - "node_modules/locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/locate-path/download/locate-path-3.0.0.tgz", - "integrity": "sha1-2+w7OrdZdYBxtY/ln8QYca8hQA4=", - "dependencies": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmmirror.com/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" - }, - "node_modules/lodash.defaultsdeep": { - "version": "4.6.1", - "resolved": "https://registry.npm.taobao.org/lodash.defaultsdeep/download/lodash.defaultsdeep-4.6.1.tgz", - "integrity": "sha1-US6b1yHSctlOPTpjZT+hdRZ0HKY=", - "dev": true - }, - "node_modules/lodash.kebabcase": { - "version": "4.1.1", - "resolved": "https://registry.npm.taobao.org/lodash.kebabcase/download/lodash.kebabcase-4.1.1.tgz", - "integrity": "sha1-hImxyw0p/4gZXM7KRI/21swpXDY=", - "dev": true - }, - "node_modules/lodash.mapvalues": { - "version": "4.6.0", - "resolved": "https://registry.npm.taobao.org/lodash.mapvalues/download/lodash.mapvalues-4.6.0.tgz", - "integrity": "sha1-G6+lAF3p3W9PJmaMMMo3IwzJaJw=", - "dev": true - }, - "node_modules/lodash.memoize": { - "version": "4.1.2", - "resolved": "https://registry.npm.taobao.org/lodash.memoize/download/lodash.memoize-4.1.2.tgz", - "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=", - "dev": true - }, - "node_modules/lodash.transform": { - "version": "4.6.0", - "resolved": "https://registry.npm.taobao.org/lodash.transform/download/lodash.transform-4.6.0.tgz", - "integrity": "sha1-EjBkIvYzJK7YSD0/ODMrX2cFR6A=", - "dev": true - }, - "node_modules/lodash.uniq": { - "version": "4.5.0", - "resolved": "https://registry.npm.taobao.org/lodash.uniq/download/lodash.uniq-4.5.0.tgz", - "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=", - "dev": true - }, - "node_modules/log-symbols": { - "version": "2.2.0", - "resolved": "https://registry.npm.taobao.org/log-symbols/download/log-symbols-2.2.0.tgz?cache=0&sync_timestamp=1587898912367&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Flog-symbols%2Fdownload%2Flog-symbols-2.2.0.tgz", - "integrity": "sha1-V0Dhxdbw39pK2TI7UzIQfva0xAo=", - "dev": true, - "dependencies": { - "chalk": "^2.0.1" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/loglevel": { - "version": "1.7.0", - "resolved": "https://registry.npm.taobao.org/loglevel/download/loglevel-1.7.0.tgz", - "integrity": "sha1-coFmhVp0DVnTjbAc9G8ELKoEG7A=", - "dev": true, - "engines": { - "node": ">= 0.6.0" - }, - "funding": { - "type": "tidelift", - "url": "https://tidelift.com/subscription/pkg/npm-loglevel?utm_medium=referral&utm_source=npm_fund" - } - }, - "node_modules/lower-case": { - "version": "1.1.4", - "resolved": "https://registry.npm.taobao.org/lower-case/download/lower-case-1.1.4.tgz", - "integrity": "sha1-miyr0bno4K6ZOkv31YdcOcQujqw=", - "dev": true - }, - "node_modules/lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npm.taobao.org/lru-cache/download/lru-cache-5.1.1.tgz?cache=0&sync_timestamp=1594427567713&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Flru-cache%2Fdownload%2Flru-cache-5.1.1.tgz", - "integrity": "sha1-HaJ+ZxAnGUdpXa9oSOhH8B2EuSA=", - "dependencies": { - "yallist": "^3.0.2" - } - }, - "node_modules/make-dir": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/make-dir/download/make-dir-2.1.0.tgz?cache=0&sync_timestamp=1587567572251&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmake-dir%2Fdownload%2Fmake-dir-2.1.0.tgz", - "integrity": "sha1-XwMQ4YuL6JjMBwCSlaMK5B6R5vU=", - "dependencies": { - "pify": "^4.0.1", - "semver": "^5.6.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/map-cache": { - "version": "0.2.2", - "resolved": "https://registry.npm.taobao.org/map-cache/download/map-cache-0.2.2.tgz", - "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/map-visit": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/map-visit/download/map-visit-1.0.0.tgz", - "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", - "dependencies": { - "object-visit": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/mavon-editor": { - "version": "2.9.1", - "resolved": "https://registry.npmmirror.com/mavon-editor/-/mavon-editor-2.9.1.tgz", - "integrity": "sha512-N42ZBBVjDOOmwwBKRLytItMGG9bR8KBZN4ZI8sxpHh3dqL6SF5HNhzn/sVHDctp9vxphO930a3zu4GFZWQwZ1Q==", - "dependencies": { - "highlight.js": "^9.11.0", - "highlight.js-async-webpack": "^1.0.4", - "xss": "^1.0.6" - } - }, - "node_modules/mavon-editor/node_modules/highlight.js": { - "version": "9.18.5", - "resolved": "https://registry.npmmirror.com/highlight.js/-/highlight.js-9.18.5.tgz", - "integrity": "sha512-a5bFyofd/BHCX52/8i8uJkjr9DYwXIPnM/plwI6W7ezItLGqzt7X2G2nXuYSfsIJdkwwj/g9DG1LkcGJI/dDoA==", - "deprecated": "Support has ended for 9.x series. Upgrade to @latest", - "hasInstallScript": true, - "engines": { - "node": "*" - } - }, - "node_modules/md5.js": { - "version": "1.3.5", - "resolved": "https://registry.npm.taobao.org/md5.js/download/md5.js-1.3.5.tgz", - "integrity": "sha1-tdB7jjIW4+J81yjXL3DR5qNCAF8=", - "dependencies": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "node_modules/mdn-data": { - "version": "2.0.4", - "resolved": "https://registry.npm.taobao.org/mdn-data/download/mdn-data-2.0.4.tgz?cache=0&sync_timestamp=1602987212845&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmdn-data%2Fdownload%2Fmdn-data-2.0.4.tgz", - "integrity": "sha1-aZs8OKxvHXKAkaZGULZdOIUC/Vs=", - "dev": true - }, - "node_modules/media-typer": { - "version": "0.3.0", - "resolved": "https://registry.npm.taobao.org/media-typer/download/media-typer-0.3.0.tgz", - "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/memory-fs": { - "version": "0.4.1", - "resolved": "https://registry.npm.taobao.org/memory-fs/download/memory-fs-0.4.1.tgz", - "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=", - "dependencies": { - "errno": "^0.1.3", - "readable-stream": "^2.0.1" - } - }, - "node_modules/merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/merge-descriptors/download/merge-descriptors-1.0.1.tgz", - "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=", - "dev": true - }, - "node_modules/merge-source-map": { - "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/merge-source-map/download/merge-source-map-1.1.0.tgz", - "integrity": "sha1-L93n5gIJOfcJBqaPLXrmheTIxkY=", - "dev": true, - "dependencies": { - "source-map": "^0.6.1" - } - }, - "node_modules/merge-source-map/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz?cache=0&sync_timestamp=1571657176668&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsource-map%2Fdownload%2Fsource-map-0.6.1.tgz", - "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/merge-stream": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/merge-stream/download/merge-stream-2.0.0.tgz", - "integrity": "sha1-UoI2KaFN0AyXcPtq1H3GMQ8sH2A=", - "dev": true - }, - "node_modules/merge2": { - "version": "1.4.1", - "resolved": "https://registry.npm.taobao.org/merge2/download/merge2-1.4.1.tgz", - "integrity": "sha1-Q2iJL4hekHRVpv19xVwMnUBJkK4=", - "dev": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/methods": { - "version": "1.1.2", - "resolved": "https://registry.npm.taobao.org/methods/download/methods-1.1.2.tgz", - "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npm.taobao.org/micromatch/download/micromatch-3.1.10.tgz", - "integrity": "sha1-cIWbyVyYQJUvNZoGij/En57PrCM=", - "dependencies": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/miller-rabin": { - "version": "4.0.1", - "resolved": "https://registry.npm.taobao.org/miller-rabin/download/miller-rabin-4.0.1.tgz", - "integrity": "sha1-8IA1HIZbDcViqEYpZtqlNUPHik0=", - "dependencies": { - "bn.js": "^4.0.0", - "brorand": "^1.0.1" - }, - "bin": { - "miller-rabin": "bin/miller-rabin" - } - }, - "node_modules/miller-rabin/node_modules/bn.js": { - "version": "4.11.9", - "resolved": "https://registry.npm.taobao.org/bn.js/download/bn.js-4.11.9.tgz", - "integrity": "sha1-JtVWgpRY+dHoH8SJUkk9C6NQeCg=" - }, - "node_modules/mime": { - "version": "2.4.6", - "resolved": "https://registry.npm.taobao.org/mime/download/mime-2.4.6.tgz?cache=0&sync_timestamp=1590596706367&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmime%2Fdownload%2Fmime-2.4.6.tgz", - "integrity": "sha1-5bQHyQ20QvK+tbFiNz0Htpr/pNE=", - "dev": true, - "bin": { - "mime": "cli.js" - }, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/mime-db": { - "version": "1.44.0", - "resolved": "https://registry.npm.taobao.org/mime-db/download/mime-db-1.44.0.tgz?cache=0&sync_timestamp=1600831210195&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmime-db%2Fdownload%2Fmime-db-1.44.0.tgz", - "integrity": "sha1-+hHF6wrKEzS0Izy01S8QxaYnL5I=", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.27", - "resolved": "https://registry.npm.taobao.org/mime-types/download/mime-types-2.1.27.tgz", - "integrity": "sha1-R5SfmOJ56lMRn1ci4PNOUpvsAJ8=", - "dev": true, - "dependencies": { - "mime-db": "1.44.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mimic-fn": { - "version": "1.2.0", - "resolved": "https://registry.npm.taobao.org/mimic-fn/download/mimic-fn-1.2.0.tgz?cache=0&sync_timestamp=1596095644798&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmimic-fn%2Fdownload%2Fmimic-fn-1.2.0.tgz", - "integrity": "sha1-ggyGo5M0ZA6ZUWkovQP8qIBX0CI=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/mini-css-extract-plugin": { - "version": "0.9.0", - "resolved": "https://registry.npm.taobao.org/mini-css-extract-plugin/download/mini-css-extract-plugin-0.9.0.tgz?cache=0&sync_timestamp=1603807566472&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmini-css-extract-plugin%2Fdownload%2Fmini-css-extract-plugin-0.9.0.tgz", - "integrity": "sha1-R/LPB6oWWrNXM7H8l9TEbAVkM54=", - "dev": true, - "dependencies": { - "loader-utils": "^1.1.0", - "normalize-url": "1.9.1", - "schema-utils": "^1.0.0", - "webpack-sources": "^1.1.0" - }, - "engines": { - "node": ">= 6.9.0" - }, - "peerDependencies": { - "webpack": "^4.4.0" - } - }, - "node_modules/mini-css-extract-plugin/node_modules/normalize-url": { - "version": "1.9.1", - "resolved": "https://registry.npm.taobao.org/normalize-url/download/normalize-url-1.9.1.tgz?cache=0&sync_timestamp=1602432435724&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fnormalize-url%2Fdownload%2Fnormalize-url-1.9.1.tgz", - "integrity": "sha1-LMDWazHqIwNkWENuNiDYWVTGbDw=", - "dev": true, - "dependencies": { - "object-assign": "^4.0.1", - "prepend-http": "^1.0.0", - "query-string": "^4.1.0", - "sort-keys": "^1.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/mini-css-extract-plugin/node_modules/schema-utils": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/schema-utils/download/schema-utils-1.0.0.tgz", - "integrity": "sha1-C3mpMgTXtgDUsoUNH2bCo0lRx3A=", - "dev": true, - "dependencies": { - "ajv": "^6.1.0", - "ajv-errors": "^1.0.0", - "ajv-keywords": "^3.1.0" - }, - "engines": { - "node": ">= 4" - } - }, - "node_modules/minimalistic-assert": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/minimalistic-assert/download/minimalistic-assert-1.0.1.tgz", - "integrity": "sha1-LhlN4ERibUoQ5/f7wAznPoPk1cc=" - }, - "node_modules/minimalistic-crypto-utils": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/minimalistic-crypto-utils/download/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=" - }, - "node_modules/minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npm.taobao.org/minimatch/download/minimatch-3.0.4.tgz", - "integrity": "sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/minimist": { - "version": "1.2.5", - "resolved": "https://registry.npm.taobao.org/minimist/download/minimist-1.2.5.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fminimist%2Fdownload%2Fminimist-1.2.5.tgz", - "integrity": "sha1-Z9ZgFLZqaoqqDAg8X9WN9OTpdgI=" - }, - "node_modules/minipass": { - "version": "3.1.3", - "resolved": "https://registry.npm.taobao.org/minipass/download/minipass-3.1.3.tgz", - "integrity": "sha1-fUL/HzljVILhX5zbUxhN7r1YFf0=", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/minipass-collect": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/minipass-collect/download/minipass-collect-1.0.2.tgz", - "integrity": "sha1-IrgTv3Rdxu26JXa5QAIq1u3Ixhc=", - "dependencies": { - "minipass": "^3.0.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/minipass-flush": { - "version": "1.0.5", - "resolved": "https://registry.npm.taobao.org/minipass-flush/download/minipass-flush-1.0.5.tgz", - "integrity": "sha1-gucTXX6JpQ/+ZGEKeHlTxMTLs3M=", - "dependencies": { - "minipass": "^3.0.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/minipass-pipeline": { - "version": "1.2.4", - "resolved": "https://registry.npm.taobao.org/minipass-pipeline/download/minipass-pipeline-1.2.4.tgz?cache=0&sync_timestamp=1595998621838&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fminipass-pipeline%2Fdownload%2Fminipass-pipeline-1.2.4.tgz", - "integrity": "sha1-aEcveXEcCEZXwGfFxq2Tzd6oIUw=", - "dependencies": { - "minipass": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/minipass/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/yallist/download/yallist-4.0.0.tgz", - "integrity": "sha1-m7knkNnA7/7GO+c1GeEaNQGaOnI=" - }, - "node_modules/minizlib": { - "version": "2.1.2", - "resolved": "https://registry.npm.taobao.org/minizlib/download/minizlib-2.1.2.tgz", - "integrity": "sha1-6Q00Zrogm5MkUVCKEc49NjIUWTE=", - "dependencies": { - "minipass": "^3.0.0", - "yallist": "^4.0.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/minizlib/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/yallist/download/yallist-4.0.0.tgz", - "integrity": "sha1-m7knkNnA7/7GO+c1GeEaNQGaOnI=" - }, - "node_modules/mississippi": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/mississippi/download/mississippi-3.0.0.tgz", - "integrity": "sha1-6goykfl+C16HdrNj1fChLZTGcCI=", - "dependencies": { - "concat-stream": "^1.5.0", - "duplexify": "^3.4.2", - "end-of-stream": "^1.1.0", - "flush-write-stream": "^1.0.0", - "from2": "^2.1.0", - "parallel-transform": "^1.1.0", - "pump": "^3.0.0", - "pumpify": "^1.3.3", - "stream-each": "^1.1.0", - "through2": "^2.0.0" - }, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/mixin-deep": { - "version": "1.3.2", - "resolved": "https://registry.npm.taobao.org/mixin-deep/download/mixin-deep-1.3.2.tgz", - "integrity": "sha1-ESC0PcNZp4Xc5ltVuC4lfM9HlWY=", - "dependencies": { - "for-in": "^1.0.2", - "is-extendable": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/mixin-deep/node_modules/is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/is-extendable/download/is-extendable-1.0.1.tgz", - "integrity": "sha1-p0cPnkJnM9gb2B4RVSZOOjUHyrQ=", - "dependencies": { - "is-plain-object": "^2.0.4" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npm.taobao.org/mkdirp/download/mkdirp-0.5.5.tgz?cache=0&sync_timestamp=1587535418745&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmkdirp%2Fdownload%2Fmkdirp-0.5.5.tgz", - "integrity": "sha1-2Rzv1i0UNsoPQWIOJRKI1CAJne8=", - "dependencies": { - "minimist": "^1.2.5" - }, - "bin": { - "mkdirp": "bin/cmd.js" - } - }, - "node_modules/moment": { - "version": "2.29.1", - "resolved": "https://registry.npm.taobao.org/moment/download/moment-2.29.1.tgz", - "integrity": "sha1-sr52n6MZQL6e7qZGnAdeNQBvo9M=", - "engines": { - "node": "*" - } - }, - "node_modules/move-concurrently": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/move-concurrently/download/move-concurrently-1.0.1.tgz", - "integrity": "sha1-viwAX9oy4LKa8fBdfEszIUxwH5I=", - "dependencies": { - "aproba": "^1.1.1", - "copy-concurrently": "^1.0.0", - "fs-write-stream-atomic": "^1.0.8", - "mkdirp": "^0.5.1", - "rimraf": "^2.5.4", - "run-queue": "^1.0.3" - } - }, - "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npm.taobao.org/ms/download/ms-2.1.2.tgz", - "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", - "dev": true - }, - "node_modules/multicast-dns": { - "version": "6.2.3", - "resolved": "https://registry.npm.taobao.org/multicast-dns/download/multicast-dns-6.2.3.tgz", - "integrity": "sha1-oOx72QVcQoL3kMPIL04o2zsxsik=", - "dev": true, - "dependencies": { - "dns-packet": "^1.3.1", - "thunky": "^1.0.2" - }, - "bin": { - "multicast-dns": "cli.js" - } - }, - "node_modules/multicast-dns-service-types": { - "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/multicast-dns-service-types/download/multicast-dns-service-types-1.1.0.tgz", - "integrity": "sha1-iZ8R2WhuXgXLkbNdXw5jt3PPyQE=", - "dev": true - }, - "node_modules/muse-ui": { - "version": "3.0.2", - "resolved": "https://registry.npm.taobao.org/muse-ui/download/muse-ui-3.0.2.tgz", - "integrity": "sha1-8pLooGPWJdNbHc4bFQS8DMzXjmU=", - "dependencies": { - "body-scroll-lock": "^2.6.1", - "dayjs": "^1.8.2", - "keycode": "^2.1.9", - "normalize-wheel": "^1.0.1", - "resize-observer-polyfill": "^1.5.0" - }, - "peerDependencies": { - "vue": "^2.5.0" - } - }, - "node_modules/mz": { - "version": "2.7.0", - "resolved": "https://registry.npm.taobao.org/mz/download/mz-2.7.0.tgz", - "integrity": "sha1-lQCAV6Vsr63CvGPd5/n/aVWUjjI=", - "dev": true, - "dependencies": { - "any-promise": "^1.0.0", - "object-assign": "^4.0.1", - "thenify-all": "^1.0.0" - } - }, - "node_modules/nan": { - "version": "2.14.2", - "resolved": "https://registry.npm.taobao.org/nan/download/nan-2.14.2.tgz?cache=0&sync_timestamp=1602591684976&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fnan%2Fdownload%2Fnan-2.14.2.tgz", - "integrity": "sha1-9TdkAGlRaPTMaUrJOT0MlYXu6hk=", - "optional": true - }, - "node_modules/nanomatch": { - "version": "1.2.13", - "resolved": "https://registry.npm.taobao.org/nanomatch/download/nanomatch-1.2.13.tgz", - "integrity": "sha1-uHqKpPwN6P5r6IiVs4mD/yZb0Rk=", - "dependencies": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "fragment-cache": "^0.2.1", - "is-windows": "^1.0.2", - "kind-of": "^6.0.2", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/negotiator": { - "version": "0.6.2", - "resolved": "https://registry.npm.taobao.org/negotiator/download/negotiator-0.6.2.tgz", - "integrity": "sha1-/qz3zPUlp3rpY0Q2pkiD/+yjRvs=", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/neo-async": { - "version": "2.6.2", - "resolved": "https://registry.npm.taobao.org/neo-async/download/neo-async-2.6.2.tgz?cache=0&sync_timestamp=1594317447342&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fneo-async%2Fdownload%2Fneo-async-2.6.2.tgz", - "integrity": "sha1-tKr7k+OustgXTKU88WOrfXMIMF8=" - }, - "node_modules/nice-try": { - "version": "1.0.5", - "resolved": "https://registry.npm.taobao.org/nice-try/download/nice-try-1.0.5.tgz", - "integrity": "sha1-ozeKdpbOfSI+iPybdkvX7xCJ42Y=", - "dev": true - }, - "node_modules/no-case": { - "version": "2.3.2", - "resolved": "https://registry.npm.taobao.org/no-case/download/no-case-2.3.2.tgz?cache=0&sync_timestamp=1576721537540&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fno-case%2Fdownload%2Fno-case-2.3.2.tgz", - "integrity": "sha1-YLgTOWvjmz8SiKTB7V0efSi0ZKw=", - "dev": true, - "dependencies": { - "lower-case": "^1.1.1" - } - }, - "node_modules/node-forge": { - "version": "0.10.0", - "resolved": "https://registry.npm.taobao.org/node-forge/download/node-forge-0.10.0.tgz?cache=0&sync_timestamp=1599010773454&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fnode-forge%2Fdownload%2Fnode-forge-0.10.0.tgz", - "integrity": "sha1-Mt6ir7Ppkm8C7lzoeUkCaRpna/M=", - "dev": true, - "engines": { - "node": ">= 6.0.0" - } - }, - "node_modules/node-ipc": { - "version": "9.1.1", - "resolved": "https://registry.npm.taobao.org/node-ipc/download/node-ipc-9.1.1.tgz", - "integrity": "sha1-TiRe1pOOZRAOWV68XcNLFujdXWk=", - "dev": true, - "dependencies": { - "event-pubsub": "4.3.0", - "js-message": "1.0.5", - "js-queue": "2.0.0" - }, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/node-libs-browser": { - "version": "2.2.1", - "resolved": "https://registry.npm.taobao.org/node-libs-browser/download/node-libs-browser-2.2.1.tgz", - "integrity": "sha1-tk9RPRgzhiX5A0bSew0jXmMfZCU=", - "dependencies": { - "assert": "^1.1.1", - "browserify-zlib": "^0.2.0", - "buffer": "^4.3.0", - "console-browserify": "^1.1.0", - "constants-browserify": "^1.0.0", - "crypto-browserify": "^3.11.0", - "domain-browser": "^1.1.1", - "events": "^3.0.0", - "https-browserify": "^1.0.0", - "os-browserify": "^0.3.0", - "path-browserify": "0.0.1", - "process": "^0.11.10", - "punycode": "^1.2.4", - "querystring-es3": "^0.2.0", - "readable-stream": "^2.3.3", - "stream-browserify": "^2.0.1", - "stream-http": "^2.7.2", - "string_decoder": "^1.0.0", - "timers-browserify": "^2.0.4", - "tty-browserify": "0.0.0", - "url": "^0.11.0", - "util": "^0.11.0", - "vm-browserify": "^1.0.1" - } - }, - "node_modules/node-libs-browser/node_modules/punycode": { - "version": "1.4.1", - "resolved": "https://registry.npm.taobao.org/punycode/download/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" - }, - "node_modules/node-releases": { - "version": "1.1.65", - "resolved": "https://registry.npm.taobao.org/node-releases/download/node-releases-1.1.65.tgz", - "integrity": "sha1-UtlXkXa9YPI+ugXEQ4WD80GUS4E=", - "dev": true - }, - "node_modules/normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npm.taobao.org/normalize-package-data/download/normalize-package-data-2.5.0.tgz?cache=0&sync_timestamp=1602547447569&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fnormalize-package-data%2Fdownload%2Fnormalize-package-data-2.5.0.tgz", - "integrity": "sha1-5m2xg4sgDB38IzIl0SyzZSDiNKg=", - "dev": true, - "dependencies": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/normalize-path/download/normalize-path-3.0.0.tgz", - "integrity": "sha1-Dc1p/yOhybEf0JeDFmRKA4ghamU=", - "devOptional": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/normalize-range": { - "version": "0.1.2", - "resolved": "https://registry.npm.taobao.org/normalize-range/download/normalize-range-0.1.2.tgz", - "integrity": "sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/normalize-url": { - "version": "3.3.0", - "resolved": "https://registry.npm.taobao.org/normalize-url/download/normalize-url-3.3.0.tgz?cache=0&sync_timestamp=1602432435724&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fnormalize-url%2Fdownload%2Fnormalize-url-3.3.0.tgz", - "integrity": "sha1-suHE3E98bVd0PfczpPWXjRhlBVk=", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/normalize-wheel": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/normalize-wheel/download/normalize-wheel-1.0.1.tgz", - "integrity": "sha1-rsiGr/2wRQcNhWRH32Ls+GFG7EU=" - }, - "node_modules/npm-run-path": { - "version": "2.0.2", - "resolved": "https://registry.npm.taobao.org/npm-run-path/download/npm-run-path-2.0.2.tgz", - "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", - "dev": true, - "dependencies": { - "path-key": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/nprogress": { - "version": "0.2.0", - "resolved": "https://registry.npm.taobao.org/nprogress/download/nprogress-0.2.0.tgz?cache=0&sync_timestamp=1587262530340&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fnprogress%2Fdownload%2Fnprogress-0.2.0.tgz", - "integrity": "sha1-y480xTIT2JVyP8urkH6UIq28r7E=" - }, - "node_modules/nth-check": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/nth-check/download/nth-check-1.0.2.tgz", - "integrity": "sha1-sr0pXDfj3VijvwcAN2Zjuk2c8Fw=", - "dev": true, - "dependencies": { - "boolbase": "~1.0.0" - } - }, - "node_modules/num2fraction": { - "version": "1.2.2", - "resolved": "https://registry.npm.taobao.org/num2fraction/download/num2fraction-1.2.2.tgz", - "integrity": "sha1-b2gragJ6Tp3fpFZM0lidHU5mnt4=", - "dev": true - }, - "node_modules/oauth-sign": { - "version": "0.9.0", - "resolved": "https://registry.npm.taobao.org/oauth-sign/download/oauth-sign-0.9.0.tgz", - "integrity": "sha1-R6ewFrqmi1+g7PPe4IqFxnmsZFU=", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npm.taobao.org/object-assign/download/object-assign-4.1.1.tgz?cache=0&sync_timestamp=1571657171505&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fobject-assign%2Fdownload%2Fobject-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-copy": { - "version": "0.1.0", - "resolved": "https://registry.npm.taobao.org/object-copy/download/object-copy-0.1.0.tgz", - "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", - "dependencies": { - "copy-descriptor": "^0.1.0", - "define-property": "^0.2.5", - "kind-of": "^3.0.3" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-copy/node_modules/define-property": { - "version": "0.2.5", - "resolved": "https://registry.npm.taobao.org/define-property/download/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dependencies": { - "is-descriptor": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-copy/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npm.taobao.org/kind-of/download/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-inspect": { - "version": "1.8.0", - "resolved": "https://registry.npm.taobao.org/object-inspect/download/object-inspect-1.8.0.tgz?cache=0&sync_timestamp=1592545149361&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fobject-inspect%2Fdownload%2Fobject-inspect-1.8.0.tgz", - "integrity": "sha1-34B+Xs9TpgnMa/6T6sPMe+WzqdA=", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object-is": { - "version": "1.1.3", - "resolved": "https://registry.npm.taobao.org/object-is/download/object-is-1.1.3.tgz?cache=0&sync_timestamp=1601502788762&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fobject-is%2Fdownload%2Fobject-is-1.1.3.tgz", - "integrity": "sha1-LjueZVYBN0Ve471irsTZCi6hzIE=", - "dev": true, - "dependencies": { - "define-properties": "^1.1.3", - "es-abstract": "^1.18.0-next.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npm.taobao.org/object-keys/download/object-keys-1.1.1.tgz", - "integrity": "sha1-HEfyct8nfzsdrwYWd9nILiMixg4=", - "dev": true, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/object-visit": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/object-visit/download/object-visit-1.0.1.tgz", - "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", - "dependencies": { - "isobject": "^3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object.assign": { - "version": "4.1.1", - "resolved": "https://registry.npm.taobao.org/object.assign/download/object.assign-4.1.1.tgz?cache=0&sync_timestamp=1599844927493&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fobject.assign%2Fdownload%2Fobject.assign-4.1.1.tgz", - "integrity": "sha1-MDhnpmbN1Bk27N7fsfjz4ypHjN0=", - "dev": true, - "dependencies": { - "define-properties": "^1.1.3", - "es-abstract": "^1.18.0-next.0", - "has-symbols": "^1.0.1", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object.getownpropertydescriptors": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/object.getownpropertydescriptors/download/object.getownpropertydescriptors-2.1.0.tgz", - "integrity": "sha1-Npvx+VktiridcS3O1cuBx8U1Jkk=", - "dev": true, - "dependencies": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1" - }, - "engines": { - "node": ">= 0.8" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object.getownpropertydescriptors/node_modules/es-abstract": { - "version": "1.17.7", - "resolved": "https://registry.npm.taobao.org/es-abstract/download/es-abstract-1.17.7.tgz?cache=0&sync_timestamp=1601502719982&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fes-abstract%2Fdownload%2Fes-abstract-1.17.7.tgz", - "integrity": "sha1-pN5hsvZpifx0IWdsHLl4dXOs5Uw=", - "dev": true, - "dependencies": { - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.2.2", - "is-regex": "^1.1.1", - "object-inspect": "^1.8.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.1", - "string.prototype.trimend": "^1.0.1", - "string.prototype.trimstart": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object.pick": { - "version": "1.3.0", - "resolved": "https://registry.npm.taobao.org/object.pick/download/object.pick-1.3.0.tgz", - "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", - "dependencies": { - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object.values": { - "version": "1.1.1", - "resolved": "https://registry.npm.taobao.org/object.values/download/object.values-1.1.1.tgz", - "integrity": "sha1-aKmezeNWt+kpWjxeDOMdyMlT3l4=", - "dev": true, - "dependencies": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1", - "function-bind": "^1.1.1", - "has": "^1.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object.values/node_modules/es-abstract": { - "version": "1.17.7", - "resolved": "https://registry.npm.taobao.org/es-abstract/download/es-abstract-1.17.7.tgz?cache=0&sync_timestamp=1601502719982&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fes-abstract%2Fdownload%2Fes-abstract-1.17.7.tgz", - "integrity": "sha1-pN5hsvZpifx0IWdsHLl4dXOs5Uw=", - "dev": true, - "dependencies": { - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.2.2", - "is-regex": "^1.1.1", - "object-inspect": "^1.8.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.1", - "string.prototype.trimend": "^1.0.1", - "string.prototype.trimstart": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/obuf": { - "version": "1.1.2", - "resolved": "https://registry.npm.taobao.org/obuf/download/obuf-1.1.2.tgz", - "integrity": "sha1-Cb6jND1BhZ69RGKS0RydTbYZCE4=", - "dev": true - }, - "node_modules/on-finished": { - "version": "2.3.0", - "resolved": "https://registry.npm.taobao.org/on-finished/download/on-finished-2.3.0.tgz", - "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", - "dev": true, - "dependencies": { - "ee-first": "1.1.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/on-headers": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/on-headers/download/on-headers-1.0.2.tgz", - "integrity": "sha1-dysK5qqlJcOZ5Imt+tkMQD6zwo8=", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npm.taobao.org/once/download/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/onetime": { - "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/onetime/download/onetime-2.0.1.tgz?cache=0&sync_timestamp=1597005345612&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fonetime%2Fdownload%2Fonetime-2.0.1.tgz", - "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", - "dev": true, - "dependencies": { - "mimic-fn": "^1.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/open": { - "version": "6.4.0", - "resolved": "https://registry.npm.taobao.org/open/download/open-6.4.0.tgz", - "integrity": "sha1-XBPpbQ3IlGhhZPGJZez+iJ7PyKk=", - "dev": true, - "dependencies": { - "is-wsl": "^1.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/opener": { - "version": "1.5.2", - "resolved": "https://registry.npm.taobao.org/opener/download/opener-1.5.2.tgz?cache=0&sync_timestamp=1598733244715&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fopener%2Fdownload%2Fopener-1.5.2.tgz", - "integrity": "sha1-XTfh81B3udysQwE3InGv3rKhNZg=", - "dev": true, - "bin": { - "opener": "bin/opener-bin.js" - } - }, - "node_modules/opn": { - "version": "5.5.0", - "resolved": "https://registry.npm.taobao.org/opn/download/opn-5.5.0.tgz", - "integrity": "sha1-/HFk+rVtI1kExRw7J9pnWMo7m/w=", - "dev": true, - "dependencies": { - "is-wsl": "^1.1.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/ora": { - "version": "3.4.0", - "resolved": "https://registry.npm.taobao.org/ora/download/ora-3.4.0.tgz?cache=0&sync_timestamp=1599424857800&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fora%2Fdownload%2Fora-3.4.0.tgz", - "integrity": "sha1-vwdSSRBZo+8+1MhQl1Md6f280xg=", - "dev": true, - "dependencies": { - "chalk": "^2.4.2", - "cli-cursor": "^2.1.0", - "cli-spinners": "^2.0.0", - "log-symbols": "^2.2.0", - "strip-ansi": "^5.2.0", - "wcwidth": "^1.0.1" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/ora/node_modules/strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npm.taobao.org/strip-ansi/download/strip-ansi-5.2.0.tgz?cache=0&sync_timestamp=1573280518303&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstrip-ansi%2Fdownload%2Fstrip-ansi-5.2.0.tgz", - "integrity": "sha1-jJpTb+tq/JYr36WxBKUJHBrZwK4=", - "dev": true, - "dependencies": { - "ansi-regex": "^4.1.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/original": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/original/download/original-1.0.2.tgz", - "integrity": "sha1-5EKmHP/hxf0gpl8yYcJmY7MD8l8=", - "dev": true, - "dependencies": { - "url-parse": "^1.4.3" - } - }, - "node_modules/os-browserify": { - "version": "0.3.0", - "resolved": "https://registry.npm.taobao.org/os-browserify/download/os-browserify-0.3.0.tgz", - "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=" - }, - "node_modules/p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/p-finally/download/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npm.taobao.org/p-limit/download/p-limit-2.3.0.tgz?cache=0&sync_timestamp=1594559856635&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fp-limit%2Fdownload%2Fp-limit-2.3.0.tgz", - "integrity": "sha1-PdM8ZHohT9//2DWTPrCG2g3CHbE=", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/p-locate/download/p-locate-3.0.0.tgz", - "integrity": "sha1-Mi1poFwCZLJZl9n0DNiokasAZKQ=", - "dependencies": { - "p-limit": "^2.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/p-map": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/p-map/download/p-map-3.0.0.tgz", - "integrity": "sha1-1wTZr4orpoTiYA2aIVmD1BQal50=", - "dev": true, - "dependencies": { - "aggregate-error": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/p-retry": { - "version": "3.0.1", - "resolved": "https://registry.npm.taobao.org/p-retry/download/p-retry-3.0.1.tgz", - "integrity": "sha1-MWtMiJPiyNwc+okfQGxLQivr8yg=", - "dev": true, - "dependencies": { - "retry": "^0.12.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/p-try": { - "version": "2.2.0", - "resolved": "https://registry.npm.taobao.org/p-try/download/p-try-2.2.0.tgz", - "integrity": "sha1-yyhoVA4xPWHeWPr741zpAE1VQOY=", - "engines": { - "node": ">=6" - } - }, - "node_modules/pako": { - "version": "1.0.11", - "resolved": "https://registry.npm.taobao.org/pako/download/pako-1.0.11.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpako%2Fdownload%2Fpako-1.0.11.tgz", - "integrity": "sha1-bJWZ00DVTf05RjgCUqNXBaa5kr8=" - }, - "node_modules/papaparse": { - "version": "5.3.0", - "resolved": "https://registry.npm.taobao.org/papaparse/download/papaparse-5.3.0.tgz", - "integrity": "sha1-qxcC/rlueatDCWUvNtuVNlY60Fo=" - }, - "node_modules/parallel-transform": { - "version": "1.2.0", - "resolved": "https://registry.npm.taobao.org/parallel-transform/download/parallel-transform-1.2.0.tgz", - "integrity": "sha1-kEnKN9bLIYLDsdLHIL6U0UpYFPw=", - "dependencies": { - "cyclist": "^1.0.1", - "inherits": "^2.0.3", - "readable-stream": "^2.1.5" - } - }, - "node_modules/param-case": { - "version": "2.1.1", - "resolved": "https://registry.npm.taobao.org/param-case/download/param-case-2.1.1.tgz", - "integrity": "sha1-35T9jPZTHs915r75oIWPvHK+Ikc=", - "dev": true, - "dependencies": { - "no-case": "^2.2.0" - } - }, - "node_modules/parse-asn1": { - "version": "5.1.6", - "resolved": "https://registry.npm.taobao.org/parse-asn1/download/parse-asn1-5.1.6.tgz?cache=0&sync_timestamp=1597167309380&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fparse-asn1%2Fdownload%2Fparse-asn1-5.1.6.tgz", - "integrity": "sha1-OFCAo+wTy2KmLTlAnLPoiETNrtQ=", - "dependencies": { - "asn1.js": "^5.2.0", - "browserify-aes": "^1.0.0", - "evp_bytestokey": "^1.0.0", - "pbkdf2": "^3.0.3", - "safe-buffer": "^5.1.1" - } - }, - "node_modules/parse-json": { - "version": "5.1.0", - "resolved": "https://registry.npm.taobao.org/parse-json/download/parse-json-5.1.0.tgz?cache=0&sync_timestamp=1598129182781&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fparse-json%2Fdownload%2Fparse-json-5.1.0.tgz", - "integrity": "sha1-+WCIzfJKj6qa6poAny2dlCyZlkY=", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-even-better-errors": "^2.3.0", - "lines-and-columns": "^1.1.6" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/parse5": { - "version": "5.1.1", - "resolved": "https://registry.npm.taobao.org/parse5/download/parse5-5.1.1.tgz?cache=0&sync_timestamp=1595849263958&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fparse5%2Fdownload%2Fparse5-5.1.1.tgz", - "integrity": "sha1-9o5OW6GFKsLK3AD0VV//bCq7YXg=", - "dev": true - }, - "node_modules/parse5-htmlparser2-tree-adapter": { - "version": "5.1.1", - "resolved": "https://registry.npm.taobao.org/parse5-htmlparser2-tree-adapter/download/parse5-htmlparser2-tree-adapter-5.1.1.tgz?cache=0&sync_timestamp=1596089818598&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fparse5-htmlparser2-tree-adapter%2Fdownload%2Fparse5-htmlparser2-tree-adapter-5.1.1.tgz", - "integrity": "sha1-6MdD1OkhlNUpPs3isIvjHmdGHLw=", - "dev": true, - "dependencies": { - "parse5": "^5.1.1" - } - }, - "node_modules/parseurl": { - "version": "1.3.3", - "resolved": "https://registry.npm.taobao.org/parseurl/download/parseurl-1.3.3.tgz", - "integrity": "sha1-naGee+6NEt/wUT7Vt2lXeTvC6NQ=", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/particles.js": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/particles.js/download/particles.js-2.0.0.tgz", - "integrity": "sha1-IThsQyjWx/lngKIB6W7t/AnHNvY=" - }, - "node_modules/pascalcase": { - "version": "0.1.1", - "resolved": "https://registry.npm.taobao.org/pascalcase/download/pascalcase-0.1.1.tgz", - "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-browserify": { - "version": "0.0.1", - "resolved": "https://registry.npm.taobao.org/path-browserify/download/path-browserify-0.0.1.tgz", - "integrity": "sha1-5sTd1+06onxoogzE5Q4aTug7vEo=" - }, - "node_modules/path-dirname": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/path-dirname/download/path-dirname-1.0.2.tgz", - "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", - "devOptional": true - }, - "node_modules/path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/path-exists/download/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "engines": { - "node": ">=4" - } - }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/path-is-absolute/download/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-is-inside": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/path-is-inside/download/path-is-inside-1.0.2.tgz", - "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", - "dev": true - }, - "node_modules/path-key": { - "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/path-key/download/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/path-parse": { - "version": "1.0.6", - "resolved": "https://registry.npm.taobao.org/path-parse/download/path-parse-1.0.6.tgz", - "integrity": "sha1-1i27VnlAXXLEc37FhgDp3c8G0kw=", - "dev": true - }, - "node_modules/path-to-regexp": { - "version": "0.1.7", - "resolved": "https://registry.npm.taobao.org/path-to-regexp/download/path-to-regexp-0.1.7.tgz", - "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=", - "dev": true - }, - "node_modules/path-type": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/path-type/download/path-type-3.0.0.tgz", - "integrity": "sha1-zvMdyOCho7sNEFwM2Xzzv0f0428=", - "dev": true, - "dependencies": { - "pify": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/path-type/node_modules/pify": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/pify/download/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/pbkdf2": { - "version": "3.1.1", - "resolved": "https://registry.npm.taobao.org/pbkdf2/download/pbkdf2-3.1.1.tgz", - "integrity": "sha1-y4cksPramEWWhW0abrr9NYRlS5Q=", - "dependencies": { - "create-hash": "^1.1.2", - "create-hmac": "^1.1.4", - "ripemd160": "^2.0.1", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - }, - "engines": { - "node": ">=0.12" - } - }, - "node_modules/performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/performance-now/download/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", - "dev": true - }, - "node_modules/picomatch": { - "version": "2.2.2", - "resolved": "https://registry.npm.taobao.org/picomatch/download/picomatch-2.2.2.tgz?cache=0&sync_timestamp=1584790434095&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpicomatch%2Fdownload%2Fpicomatch-2.2.2.tgz", - "integrity": "sha1-IfMz6ba46v8CRo9RRupAbTRfTa0=", - "optional": true, - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/pify": { - "version": "4.0.1", - "resolved": "https://registry.npm.taobao.org/pify/download/pify-4.0.1.tgz", - "integrity": "sha1-SyzSXFDVmHNcUCkiJP2MbfQeMjE=", - "engines": { - "node": ">=6" - } - }, - "node_modules/pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npm.taobao.org/pinkie/download/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/pinkie-promise/download/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", - "dev": true, - "dependencies": { - "pinkie": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/pkg-dir": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/pkg-dir/download/pkg-dir-3.0.0.tgz?cache=0&sync_timestamp=1602859045787&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpkg-dir%2Fdownload%2Fpkg-dir-3.0.0.tgz", - "integrity": "sha1-J0kCDyOe2ZCIGx9xIQ1R62UjvqM=", - "dependencies": { - "find-up": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/pnp-webpack-plugin": { - "version": "1.6.4", - "resolved": "https://registry.npm.taobao.org/pnp-webpack-plugin/download/pnp-webpack-plugin-1.6.4.tgz?cache=0&sync_timestamp=1593529697659&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpnp-webpack-plugin%2Fdownload%2Fpnp-webpack-plugin-1.6.4.tgz", - "integrity": "sha1-yXEaxNxIpoXauvyG+Lbdn434QUk=", - "dev": true, - "dependencies": { - "ts-pnp": "^1.1.6" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/popper.js": { - "version": "1.16.1", - "resolved": "https://registry.npmmirror.com/popper.js/-/popper.js-1.16.1.tgz", - "integrity": "sha512-Wb4p1J4zyFTbM+u6WuO4XstYx4Ky9Cewe4DWrel7B0w6VVICvPwdOpotjzcf6eD8TsckVnIMNONQyPIUFOUbCQ==", - "deprecated": "You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1" - }, - "node_modules/portfinder": { - "version": "1.0.28", - "resolved": "https://registry.npm.taobao.org/portfinder/download/portfinder-1.0.28.tgz?cache=0&sync_timestamp=1596018176291&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fportfinder%2Fdownload%2Fportfinder-1.0.28.tgz", - "integrity": "sha1-Z8RiKFK9U3TdHdkA93n1NGL6x3g=", - "dev": true, - "dependencies": { - "async": "^2.6.2", - "debug": "^3.1.1", - "mkdirp": "^0.5.5" - }, - "engines": { - "node": ">= 0.12.0" - } - }, - "node_modules/portfinder/node_modules/debug": { - "version": "3.2.6", - "resolved": "https://registry.npm.taobao.org/debug/download/debug-3.2.6.tgz?cache=0&sync_timestamp=1600502894812&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdebug%2Fdownload%2Fdebug-3.2.6.tgz", - "integrity": "sha1-6D0X3hbYp++3cX7b5fsQE17uYps=", - "deprecated": "Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)", - "dev": true, - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/posix-character-classes": { - "version": "0.1.1", - "resolved": "https://registry.npm.taobao.org/posix-character-classes/download/posix-character-classes-0.1.1.tgz", - "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/postcss": { - "version": "7.0.35", - "resolved": "https://registry.npm.taobao.org/postcss/download/postcss-7.0.35.tgz?cache=0&sync_timestamp=1603496056144&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss%2Fdownload%2Fpostcss-7.0.35.tgz", - "integrity": "sha1-0r4AuZj38hHYonaXQHny6SuXDiQ=", - "dev": true, - "dependencies": { - "chalk": "^2.4.2", - "source-map": "^0.6.1", - "supports-color": "^6.1.0" - }, - "engines": { - "node": ">=6.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - } - }, - "node_modules/postcss-calc": { - "version": "7.0.5", - "resolved": "https://registry.npm.taobao.org/postcss-calc/download/postcss-calc-7.0.5.tgz?cache=0&sync_timestamp=1601732630249&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-calc%2Fdownload%2Fpostcss-calc-7.0.5.tgz", - "integrity": "sha1-+KbpnxLmGcLrwjz2xIb9wVhgkz4=", - "dev": true, - "dependencies": { - "postcss": "^7.0.27", - "postcss-selector-parser": "^6.0.2", - "postcss-value-parser": "^4.0.2" - } - }, - "node_modules/postcss-colormin": { - "version": "4.0.3", - "resolved": "https://registry.npm.taobao.org/postcss-colormin/download/postcss-colormin-4.0.3.tgz?cache=0&sync_timestamp=1603212729528&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-colormin%2Fdownload%2Fpostcss-colormin-4.0.3.tgz", - "integrity": "sha1-rgYLzpPteUrHEmTwgTLVUJVr04E=", - "dev": true, - "dependencies": { - "browserslist": "^4.0.0", - "color": "^3.0.0", - "has": "^1.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-colormin/node_modules/postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npm.taobao.org/postcss-value-parser/download/postcss-value-parser-3.3.1.tgz", - "integrity": "sha1-n/giVH4okyE88cMO+lGsX9G6goE=", - "dev": true - }, - "node_modules/postcss-convert-values": { - "version": "4.0.1", - "resolved": "https://registry.npm.taobao.org/postcss-convert-values/download/postcss-convert-values-4.0.1.tgz?cache=0&sync_timestamp=1603212729674&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-convert-values%2Fdownload%2Fpostcss-convert-values-4.0.1.tgz", - "integrity": "sha1-yjgT7U2g+BL51DcDWE5Enr4Ymn8=", - "dev": true, - "dependencies": { - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-convert-values/node_modules/postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npm.taobao.org/postcss-value-parser/download/postcss-value-parser-3.3.1.tgz", - "integrity": "sha1-n/giVH4okyE88cMO+lGsX9G6goE=", - "dev": true - }, - "node_modules/postcss-discard-comments": { - "version": "4.0.2", - "resolved": "https://registry.npm.taobao.org/postcss-discard-comments/download/postcss-discard-comments-4.0.2.tgz?cache=0&sync_timestamp=1603214702204&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-discard-comments%2Fdownload%2Fpostcss-discard-comments-4.0.2.tgz", - "integrity": "sha1-H7q9LCRr/2qq15l7KwkY9NevQDM=", - "dev": true, - "dependencies": { - "postcss": "^7.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-discard-duplicates": { - "version": "4.0.2", - "resolved": "https://registry.npm.taobao.org/postcss-discard-duplicates/download/postcss-discard-duplicates-4.0.2.tgz?cache=0&sync_timestamp=1603214703212&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-discard-duplicates%2Fdownload%2Fpostcss-discard-duplicates-4.0.2.tgz", - "integrity": "sha1-P+EzzTyCKC5VD8myORdqkge3hOs=", - "dev": true, - "dependencies": { - "postcss": "^7.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-discard-empty": { - "version": "4.0.1", - "resolved": "https://registry.npm.taobao.org/postcss-discard-empty/download/postcss-discard-empty-4.0.1.tgz?cache=0&sync_timestamp=1603212724216&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-discard-empty%2Fdownload%2Fpostcss-discard-empty-4.0.1.tgz", - "integrity": "sha1-yMlR6fc+2UKAGUWERKAq2Qu592U=", - "dev": true, - "dependencies": { - "postcss": "^7.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-discard-overridden": { - "version": "4.0.1", - "resolved": "https://registry.npm.taobao.org/postcss-discard-overridden/download/postcss-discard-overridden-4.0.1.tgz?cache=0&sync_timestamp=1603212724307&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-discard-overridden%2Fdownload%2Fpostcss-discard-overridden-4.0.1.tgz", - "integrity": "sha1-ZSrvipZybwKfXj4AFG7npOdV/1c=", - "dev": true, - "dependencies": { - "postcss": "^7.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-load-config": { - "version": "2.1.2", - "resolved": "https://registry.npm.taobao.org/postcss-load-config/download/postcss-load-config-2.1.2.tgz?cache=0&sync_timestamp=1601607876353&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-load-config%2Fdownload%2Fpostcss-load-config-2.1.2.tgz", - "integrity": "sha1-xepQTyxK7zPHNZo03jVzdyrXUCo=", - "dev": true, - "dependencies": { - "cosmiconfig": "^5.0.0", - "import-cwd": "^2.0.0" - }, - "engines": { - "node": ">= 4" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - } - }, - "node_modules/postcss-loader": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/postcss-loader/download/postcss-loader-3.0.0.tgz", - "integrity": "sha1-a5eUPkfHLYRfqeA/Jzdz1OjdbC0=", - "dev": true, - "dependencies": { - "loader-utils": "^1.1.0", - "postcss": "^7.0.0", - "postcss-load-config": "^2.0.0", - "schema-utils": "^1.0.0" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/postcss-loader/node_modules/schema-utils": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/schema-utils/download/schema-utils-1.0.0.tgz", - "integrity": "sha1-C3mpMgTXtgDUsoUNH2bCo0lRx3A=", - "dev": true, - "dependencies": { - "ajv": "^6.1.0", - "ajv-errors": "^1.0.0", - "ajv-keywords": "^3.1.0" - }, - "engines": { - "node": ">= 4" - } - }, - "node_modules/postcss-merge-longhand": { - "version": "4.0.11", - "resolved": "https://registry.npm.taobao.org/postcss-merge-longhand/download/postcss-merge-longhand-4.0.11.tgz?cache=0&sync_timestamp=1603212724836&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-merge-longhand%2Fdownload%2Fpostcss-merge-longhand-4.0.11.tgz", - "integrity": "sha1-YvSaE+Sg7gTnuY9CuxYGLKJUniQ=", - "dev": true, - "dependencies": { - "css-color-names": "0.0.4", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0", - "stylehacks": "^4.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-merge-longhand/node_modules/postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npm.taobao.org/postcss-value-parser/download/postcss-value-parser-3.3.1.tgz", - "integrity": "sha1-n/giVH4okyE88cMO+lGsX9G6goE=", - "dev": true - }, - "node_modules/postcss-merge-rules": { - "version": "4.0.3", - "resolved": "https://registry.npm.taobao.org/postcss-merge-rules/download/postcss-merge-rules-4.0.3.tgz?cache=0&sync_timestamp=1603212724951&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-merge-rules%2Fdownload%2Fpostcss-merge-rules-4.0.3.tgz", - "integrity": "sha1-NivqT/Wh+Y5AdacTxsslrv75plA=", - "dev": true, - "dependencies": { - "browserslist": "^4.0.0", - "caniuse-api": "^3.0.0", - "cssnano-util-same-parent": "^4.0.0", - "postcss": "^7.0.0", - "postcss-selector-parser": "^3.0.0", - "vendors": "^1.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-merge-rules/node_modules/postcss-selector-parser": { - "version": "3.1.2", - "resolved": "https://registry.npm.taobao.org/postcss-selector-parser/download/postcss-selector-parser-3.1.2.tgz?cache=0&sync_timestamp=1601045316432&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-selector-parser%2Fdownload%2Fpostcss-selector-parser-3.1.2.tgz", - "integrity": "sha1-sxD1xMD9r3b5SQK7qjDbaqhPUnA=", - "dev": true, - "dependencies": { - "dot-prop": "^5.2.0", - "indexes-of": "^1.0.1", - "uniq": "^1.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/postcss-minify-font-values": { - "version": "4.0.2", - "resolved": "https://registry.npm.taobao.org/postcss-minify-font-values/download/postcss-minify-font-values-4.0.2.tgz?cache=0&sync_timestamp=1603212725064&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-minify-font-values%2Fdownload%2Fpostcss-minify-font-values-4.0.2.tgz", - "integrity": "sha1-zUw0TM5HQ0P6xdgiBqssvLiv1aY=", - "dev": true, - "dependencies": { - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-minify-font-values/node_modules/postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npm.taobao.org/postcss-value-parser/download/postcss-value-parser-3.3.1.tgz", - "integrity": "sha1-n/giVH4okyE88cMO+lGsX9G6goE=", - "dev": true - }, - "node_modules/postcss-minify-gradients": { - "version": "4.0.2", - "resolved": "https://registry.npm.taobao.org/postcss-minify-gradients/download/postcss-minify-gradients-4.0.2.tgz?cache=0&sync_timestamp=1603212725189&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-minify-gradients%2Fdownload%2Fpostcss-minify-gradients-4.0.2.tgz", - "integrity": "sha1-k7KcL/UJnFNe7NpWxKpuZlpmNHE=", - "dev": true, - "dependencies": { - "cssnano-util-get-arguments": "^4.0.0", - "is-color-stop": "^1.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-minify-gradients/node_modules/postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npm.taobao.org/postcss-value-parser/download/postcss-value-parser-3.3.1.tgz", - "integrity": "sha1-n/giVH4okyE88cMO+lGsX9G6goE=", - "dev": true - }, - "node_modules/postcss-minify-params": { - "version": "4.0.2", - "resolved": "https://registry.npm.taobao.org/postcss-minify-params/download/postcss-minify-params-4.0.2.tgz?cache=0&sync_timestamp=1603212725335&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-minify-params%2Fdownload%2Fpostcss-minify-params-4.0.2.tgz", - "integrity": "sha1-a5zvAwwR41Jh+V9hjJADbWgNuHQ=", - "dev": true, - "dependencies": { - "alphanum-sort": "^1.0.0", - "browserslist": "^4.0.0", - "cssnano-util-get-arguments": "^4.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0", - "uniqs": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-minify-params/node_modules/postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npm.taobao.org/postcss-value-parser/download/postcss-value-parser-3.3.1.tgz", - "integrity": "sha1-n/giVH4okyE88cMO+lGsX9G6goE=", - "dev": true - }, - "node_modules/postcss-minify-selectors": { - "version": "4.0.2", - "resolved": "https://registry.npm.taobao.org/postcss-minify-selectors/download/postcss-minify-selectors-4.0.2.tgz?cache=0&sync_timestamp=1603212725451&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-minify-selectors%2Fdownload%2Fpostcss-minify-selectors-4.0.2.tgz", - "integrity": "sha1-4uXrQL/uUA0M2SQ1APX46kJi+9g=", - "dev": true, - "dependencies": { - "alphanum-sort": "^1.0.0", - "has": "^1.0.0", - "postcss": "^7.0.0", - "postcss-selector-parser": "^3.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-minify-selectors/node_modules/postcss-selector-parser": { - "version": "3.1.2", - "resolved": "https://registry.npm.taobao.org/postcss-selector-parser/download/postcss-selector-parser-3.1.2.tgz?cache=0&sync_timestamp=1601045316432&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-selector-parser%2Fdownload%2Fpostcss-selector-parser-3.1.2.tgz", - "integrity": "sha1-sxD1xMD9r3b5SQK7qjDbaqhPUnA=", - "dev": true, - "dependencies": { - "dot-prop": "^5.2.0", - "indexes-of": "^1.0.1", - "uniq": "^1.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/postcss-modules-extract-imports": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/postcss-modules-extract-imports/download/postcss-modules-extract-imports-2.0.0.tgz?cache=0&sync_timestamp=1602588245463&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-modules-extract-imports%2Fdownload%2Fpostcss-modules-extract-imports-2.0.0.tgz", - "integrity": "sha1-gYcZoa4doyX5gyRGsBE27rSTzX4=", - "dev": true, - "dependencies": { - "postcss": "^7.0.5" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/postcss-modules-local-by-default": { - "version": "3.0.3", - "resolved": "https://registry.npm.taobao.org/postcss-modules-local-by-default/download/postcss-modules-local-by-default-3.0.3.tgz?cache=0&sync_timestamp=1602587568476&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-modules-local-by-default%2Fdownload%2Fpostcss-modules-local-by-default-3.0.3.tgz", - "integrity": "sha1-uxTgzHgnnVBNvcv9fgyiiZP/u7A=", - "dev": true, - "dependencies": { - "icss-utils": "^4.1.1", - "postcss": "^7.0.32", - "postcss-selector-parser": "^6.0.2", - "postcss-value-parser": "^4.1.0" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/postcss-modules-scope": { - "version": "2.2.0", - "resolved": "https://registry.npm.taobao.org/postcss-modules-scope/download/postcss-modules-scope-2.2.0.tgz?cache=0&sync_timestamp=1602593260387&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-modules-scope%2Fdownload%2Fpostcss-modules-scope-2.2.0.tgz", - "integrity": "sha1-OFyuATzHdD9afXYC0Qc6iequYu4=", - "dev": true, - "dependencies": { - "postcss": "^7.0.6", - "postcss-selector-parser": "^6.0.0" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/postcss-modules-values": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/postcss-modules-values/download/postcss-modules-values-3.0.0.tgz?cache=0&sync_timestamp=1602586230505&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-modules-values%2Fdownload%2Fpostcss-modules-values-3.0.0.tgz", - "integrity": "sha1-W1AA1uuuKbQlUwG0o6VFdEI+fxA=", - "dev": true, - "dependencies": { - "icss-utils": "^4.0.0", - "postcss": "^7.0.6" - } - }, - "node_modules/postcss-normalize-charset": { - "version": "4.0.1", - "resolved": "https://registry.npm.taobao.org/postcss-normalize-charset/download/postcss-normalize-charset-4.0.1.tgz?cache=0&sync_timestamp=1603212725539&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-normalize-charset%2Fdownload%2Fpostcss-normalize-charset-4.0.1.tgz", - "integrity": "sha1-izWt067oOhNrBHHg1ZvlilAoXdQ=", - "dev": true, - "dependencies": { - "postcss": "^7.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-normalize-display-values": { - "version": "4.0.2", - "resolved": "https://registry.npm.taobao.org/postcss-normalize-display-values/download/postcss-normalize-display-values-4.0.2.tgz?cache=0&sync_timestamp=1603214719221&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-normalize-display-values%2Fdownload%2Fpostcss-normalize-display-values-4.0.2.tgz", - "integrity": "sha1-Db4EpM6QY9RmftK+R2u4MMglk1o=", - "dev": true, - "dependencies": { - "cssnano-util-get-match": "^4.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-normalize-display-values/node_modules/postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npm.taobao.org/postcss-value-parser/download/postcss-value-parser-3.3.1.tgz", - "integrity": "sha1-n/giVH4okyE88cMO+lGsX9G6goE=", - "dev": true - }, - "node_modules/postcss-normalize-positions": { - "version": "4.0.2", - "resolved": "https://registry.npm.taobao.org/postcss-normalize-positions/download/postcss-normalize-positions-4.0.2.tgz?cache=0&sync_timestamp=1603212743465&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-normalize-positions%2Fdownload%2Fpostcss-normalize-positions-4.0.2.tgz", - "integrity": "sha1-BfdX+E8mBDc3g2ipH4ky1LECkX8=", - "dev": true, - "dependencies": { - "cssnano-util-get-arguments": "^4.0.0", - "has": "^1.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-normalize-positions/node_modules/postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npm.taobao.org/postcss-value-parser/download/postcss-value-parser-3.3.1.tgz", - "integrity": "sha1-n/giVH4okyE88cMO+lGsX9G6goE=", - "dev": true - }, - "node_modules/postcss-normalize-repeat-style": { - "version": "4.0.2", - "resolved": "https://registry.npm.taobao.org/postcss-normalize-repeat-style/download/postcss-normalize-repeat-style-4.0.2.tgz?cache=0&sync_timestamp=1603212744307&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-normalize-repeat-style%2Fdownload%2Fpostcss-normalize-repeat-style-4.0.2.tgz", - "integrity": "sha1-xOu8KJ85kaAo1EdRy90RkYsXkQw=", - "dev": true, - "dependencies": { - "cssnano-util-get-arguments": "^4.0.0", - "cssnano-util-get-match": "^4.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-normalize-repeat-style/node_modules/postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npm.taobao.org/postcss-value-parser/download/postcss-value-parser-3.3.1.tgz", - "integrity": "sha1-n/giVH4okyE88cMO+lGsX9G6goE=", - "dev": true - }, - "node_modules/postcss-normalize-string": { - "version": "4.0.2", - "resolved": "https://registry.npm.taobao.org/postcss-normalize-string/download/postcss-normalize-string-4.0.2.tgz?cache=0&sync_timestamp=1603212744390&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-normalize-string%2Fdownload%2Fpostcss-normalize-string-4.0.2.tgz", - "integrity": "sha1-zUTECrB6DHo23F6Zqs4eyk7CaQw=", - "dev": true, - "dependencies": { - "has": "^1.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-normalize-string/node_modules/postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npm.taobao.org/postcss-value-parser/download/postcss-value-parser-3.3.1.tgz", - "integrity": "sha1-n/giVH4okyE88cMO+lGsX9G6goE=", - "dev": true - }, - "node_modules/postcss-normalize-timing-functions": { - "version": "4.0.2", - "resolved": "https://registry.npm.taobao.org/postcss-normalize-timing-functions/download/postcss-normalize-timing-functions-4.0.2.tgz?cache=0&sync_timestamp=1603212744477&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-normalize-timing-functions%2Fdownload%2Fpostcss-normalize-timing-functions-4.0.2.tgz", - "integrity": "sha1-jgCcoqOUnNr4rSPmtquZy159KNk=", - "dev": true, - "dependencies": { - "cssnano-util-get-match": "^4.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-normalize-timing-functions/node_modules/postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npm.taobao.org/postcss-value-parser/download/postcss-value-parser-3.3.1.tgz", - "integrity": "sha1-n/giVH4okyE88cMO+lGsX9G6goE=", - "dev": true - }, - "node_modules/postcss-normalize-unicode": { - "version": "4.0.1", - "resolved": "https://registry.npm.taobao.org/postcss-normalize-unicode/download/postcss-normalize-unicode-4.0.1.tgz?cache=0&sync_timestamp=1603212744570&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-normalize-unicode%2Fdownload%2Fpostcss-normalize-unicode-4.0.1.tgz", - "integrity": "sha1-hBvUj9zzAZrUuqdJOj02O1KuHPs=", - "dev": true, - "dependencies": { - "browserslist": "^4.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-normalize-unicode/node_modules/postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npm.taobao.org/postcss-value-parser/download/postcss-value-parser-3.3.1.tgz", - "integrity": "sha1-n/giVH4okyE88cMO+lGsX9G6goE=", - "dev": true - }, - "node_modules/postcss-normalize-url": { - "version": "4.0.1", - "resolved": "https://registry.npm.taobao.org/postcss-normalize-url/download/postcss-normalize-url-4.0.1.tgz?cache=0&sync_timestamp=1603212726241&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-normalize-url%2Fdownload%2Fpostcss-normalize-url-4.0.1.tgz", - "integrity": "sha1-EOQ3+GvHx+WPe5ZS7YeNqqlfquE=", - "dev": true, - "dependencies": { - "is-absolute-url": "^2.0.0", - "normalize-url": "^3.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-normalize-url/node_modules/postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npm.taobao.org/postcss-value-parser/download/postcss-value-parser-3.3.1.tgz", - "integrity": "sha1-n/giVH4okyE88cMO+lGsX9G6goE=", - "dev": true - }, - "node_modules/postcss-normalize-whitespace": { - "version": "4.0.2", - "resolved": "https://registry.npm.taobao.org/postcss-normalize-whitespace/download/postcss-normalize-whitespace-4.0.2.tgz?cache=0&sync_timestamp=1603212744791&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-normalize-whitespace%2Fdownload%2Fpostcss-normalize-whitespace-4.0.2.tgz", - "integrity": "sha1-vx1AcP5Pzqh9E0joJdjMDF+qfYI=", - "dev": true, - "dependencies": { - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-normalize-whitespace/node_modules/postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npm.taobao.org/postcss-value-parser/download/postcss-value-parser-3.3.1.tgz", - "integrity": "sha1-n/giVH4okyE88cMO+lGsX9G6goE=", - "dev": true - }, - "node_modules/postcss-ordered-values": { - "version": "4.1.2", - "resolved": "https://registry.npm.taobao.org/postcss-ordered-values/download/postcss-ordered-values-4.1.2.tgz?cache=0&sync_timestamp=1603212726427&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-ordered-values%2Fdownload%2Fpostcss-ordered-values-4.1.2.tgz", - "integrity": "sha1-DPdcgg7H1cTSgBiVWeC1ceusDu4=", - "dev": true, - "dependencies": { - "cssnano-util-get-arguments": "^4.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-ordered-values/node_modules/postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npm.taobao.org/postcss-value-parser/download/postcss-value-parser-3.3.1.tgz", - "integrity": "sha1-n/giVH4okyE88cMO+lGsX9G6goE=", - "dev": true - }, - "node_modules/postcss-reduce-initial": { - "version": "4.0.3", - "resolved": "https://registry.npm.taobao.org/postcss-reduce-initial/download/postcss-reduce-initial-4.0.3.tgz?cache=0&sync_timestamp=1603212726527&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-reduce-initial%2Fdownload%2Fpostcss-reduce-initial-4.0.3.tgz", - "integrity": "sha1-f9QuvqXpyBRgljniwuhK4nC6SN8=", - "dev": true, - "dependencies": { - "browserslist": "^4.0.0", - "caniuse-api": "^3.0.0", - "has": "^1.0.0", - "postcss": "^7.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-reduce-transforms": { - "version": "4.0.2", - "resolved": "https://registry.npm.taobao.org/postcss-reduce-transforms/download/postcss-reduce-transforms-4.0.2.tgz?cache=0&sync_timestamp=1603214556347&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-reduce-transforms%2Fdownload%2Fpostcss-reduce-transforms-4.0.2.tgz", - "integrity": "sha1-F++kBerMbge+NBSlyi0QdGgdTik=", - "dev": true, - "dependencies": { - "cssnano-util-get-match": "^4.0.0", - "has": "^1.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-reduce-transforms/node_modules/postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npm.taobao.org/postcss-value-parser/download/postcss-value-parser-3.3.1.tgz", - "integrity": "sha1-n/giVH4okyE88cMO+lGsX9G6goE=", - "dev": true - }, - "node_modules/postcss-selector-parser": { - "version": "6.0.4", - "resolved": "https://registry.npm.taobao.org/postcss-selector-parser/download/postcss-selector-parser-6.0.4.tgz?cache=0&sync_timestamp=1601045316432&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-selector-parser%2Fdownload%2Fpostcss-selector-parser-6.0.4.tgz", - "integrity": "sha1-VgdaE4CgRgTDiwY+p3Z6Epr1wrM=", - "dev": true, - "dependencies": { - "cssesc": "^3.0.0", - "indexes-of": "^1.0.1", - "uniq": "^1.0.1", - "util-deprecate": "^1.0.2" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/postcss-svgo": { - "version": "4.0.2", - "resolved": "https://registry.npm.taobao.org/postcss-svgo/download/postcss-svgo-4.0.2.tgz", - "integrity": "sha1-F7mXvHEbMzurFDqu07jT1uPTglg=", - "dev": true, - "dependencies": { - "is-svg": "^3.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0", - "svgo": "^1.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-svgo/node_modules/postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npm.taobao.org/postcss-value-parser/download/postcss-value-parser-3.3.1.tgz", - "integrity": "sha1-n/giVH4okyE88cMO+lGsX9G6goE=", - "dev": true - }, - "node_modules/postcss-unique-selectors": { - "version": "4.0.1", - "resolved": "https://registry.npm.taobao.org/postcss-unique-selectors/download/postcss-unique-selectors-4.0.1.tgz?cache=0&sync_timestamp=1603212891912&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-unique-selectors%2Fdownload%2Fpostcss-unique-selectors-4.0.1.tgz", - "integrity": "sha1-lEaRHzKJv9ZMbWgPBzwDsfnuS6w=", - "dev": true, - "dependencies": { - "alphanum-sort": "^1.0.0", - "postcss": "^7.0.0", - "uniqs": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-value-parser": { - "version": "4.1.0", - "resolved": "https://registry.npm.taobao.org/postcss-value-parser/download/postcss-value-parser-4.1.0.tgz", - "integrity": "sha1-RD9qIM7WSBor2k+oUypuVdeJoss=", - "dev": true - }, - "node_modules/postcss/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz?cache=0&sync_timestamp=1571657176668&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsource-map%2Fdownload%2Fsource-map-0.6.1.tgz", - "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/postcss/node_modules/supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-6.1.0.tgz?cache=0&sync_timestamp=1598611709087&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsupports-color%2Fdownload%2Fsupports-color-6.1.0.tgz", - "integrity": "sha1-B2Srxpxj1ayELdSGfo0CXogN+PM=", - "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/prepend-http": { - "version": "1.0.4", - "resolved": "https://registry.npm.taobao.org/prepend-http/download/prepend-http-1.0.4.tgz", - "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/prettier": { - "version": "1.19.1", - "resolved": "https://registry.npm.taobao.org/prettier/download/prettier-1.19.1.tgz?cache=0&sync_timestamp=1600215482255&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fprettier%2Fdownload%2Fprettier-1.19.1.tgz", - "integrity": "sha1-99f1/4qc2HKnvkyhQglZVqYHl8s=", - "dev": true, - "optional": true, - "bin": { - "prettier": "bin-prettier.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/pretty-error": { - "version": "2.1.2", - "resolved": "https://registry.npm.taobao.org/pretty-error/download/pretty-error-2.1.2.tgz?cache=0&sync_timestamp=1603050467792&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpretty-error%2Fdownload%2Fpretty-error-2.1.2.tgz", - "integrity": "sha1-von4LYGxyG7I/fvDhQRYgnJ/k7Y=", - "dev": true, - "dependencies": { - "lodash": "^4.17.20", - "renderkid": "^2.0.4" - } - }, - "node_modules/process": { - "version": "0.11.10", - "resolved": "https://registry.npm.taobao.org/process/download/process-0.11.10.tgz", - "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", - "engines": { - "node": ">= 0.6.0" - } - }, - "node_modules/process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/process-nextick-args/download/process-nextick-args-2.0.1.tgz", - "integrity": "sha1-eCDZsWEgzFXKmud5JoCufbptf+I=" - }, - "node_modules/promise-inflight": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/promise-inflight/download/promise-inflight-1.0.1.tgz", - "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=" - }, - "node_modules/proxy-addr": { - "version": "2.0.6", - "resolved": "https://registry.npm.taobao.org/proxy-addr/download/proxy-addr-2.0.6.tgz", - "integrity": "sha1-/cIzZQVEfT8vLGOO0nLK9hS7sr8=", - "dev": true, - "dependencies": { - "forwarded": "~0.1.2", - "ipaddr.js": "1.9.1" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/prr": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/prr/download/prr-1.0.1.tgz", - "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=" - }, - "node_modules/pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/pseudomap/download/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", - "dev": true - }, - "node_modules/psl": { - "version": "1.8.0", - "resolved": "https://registry.npm.taobao.org/psl/download/psl-1.8.0.tgz", - "integrity": "sha1-kyb4vPsBOtzABf3/BWrM4CDlHCQ=", - "dev": true - }, - "node_modules/public-encrypt": { - "version": "4.0.3", - "resolved": "https://registry.npm.taobao.org/public-encrypt/download/public-encrypt-4.0.3.tgz", - "integrity": "sha1-T8ydd6B+SLp1J+fL4N4z0HATMeA=", - "dependencies": { - "bn.js": "^4.1.0", - "browserify-rsa": "^4.0.0", - "create-hash": "^1.1.0", - "parse-asn1": "^5.0.0", - "randombytes": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "node_modules/public-encrypt/node_modules/bn.js": { - "version": "4.11.9", - "resolved": "https://registry.npm.taobao.org/bn.js/download/bn.js-4.11.9.tgz", - "integrity": "sha1-JtVWgpRY+dHoH8SJUkk9C6NQeCg=" - }, - "node_modules/pump": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/pump/download/pump-3.0.0.tgz", - "integrity": "sha1-tKIRaBW94vTh6mAjVOjHVWUQemQ=", - "dependencies": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "node_modules/pumpify": { - "version": "1.5.1", - "resolved": "https://registry.npm.taobao.org/pumpify/download/pumpify-1.5.1.tgz", - "integrity": "sha1-NlE74karJ1cLGjdKXOJ4v9dDcM4=", - "dependencies": { - "duplexify": "^3.6.0", - "inherits": "^2.0.3", - "pump": "^2.0.0" - } - }, - "node_modules/pumpify/node_modules/pump": { - "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/pump/download/pump-2.0.1.tgz", - "integrity": "sha1-Ejma3W5M91Jtlzy8i1zi4pCLOQk=", - "dependencies": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "node_modules/punycode": { - "version": "2.1.1", - "resolved": "https://registry.npm.taobao.org/punycode/download/punycode-2.1.1.tgz", - "integrity": "sha1-tYsBCsQMIsVldhbI0sLALHv0eew=", - "engines": { - "node": ">=6" - } - }, - "node_modules/q": { - "version": "1.5.1", - "resolved": "https://registry.npm.taobao.org/q/download/q-1.5.1.tgz", - "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=", - "dev": true, - "engines": { - "node": ">=0.6.0", - "teleport": ">=0.2.0" - } - }, - "node_modules/qs": { - "version": "6.5.2", - "resolved": "https://registry.npm.taobao.org/qs/download/qs-6.5.2.tgz", - "integrity": "sha1-yzroBuh0BERYTvFUzo7pjUA/PjY=", - "dev": true, - "engines": { - "node": ">=0.6" - } - }, - "node_modules/query-string": { - "version": "4.3.4", - "resolved": "https://registry.npm.taobao.org/query-string/download/query-string-4.3.4.tgz?cache=0&sync_timestamp=1602948828228&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fquery-string%2Fdownload%2Fquery-string-4.3.4.tgz", - "integrity": "sha1-u7aTucqRXCMlFbIosaArYJBD2+s=", - "dev": true, - "dependencies": { - "object-assign": "^4.1.0", - "strict-uri-encode": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/querystring": { - "version": "0.2.0", - "resolved": "https://registry.npm.taobao.org/querystring/download/querystring-0.2.0.tgz", - "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", - "deprecated": "The querystring API is considered Legacy. new code should use the URLSearchParams API instead.", - "engines": { - "node": ">=0.4.x" - } - }, - "node_modules/querystring-es3": { - "version": "0.2.1", - "resolved": "https://registry.npm.taobao.org/querystring-es3/download/querystring-es3-0.2.1.tgz", - "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=", - "engines": { - "node": ">=0.4.x" - } - }, - "node_modules/querystringify": { - "version": "2.2.0", - "resolved": "https://registry.npm.taobao.org/querystringify/download/querystringify-2.2.0.tgz?cache=0&sync_timestamp=1597686771604&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fquerystringify%2Fdownload%2Fquerystringify-2.2.0.tgz", - "integrity": "sha1-M0WUG0FTy50ILY7uTNogFqmu9/Y=", - "dev": true - }, - "node_modules/randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/randombytes/download/randombytes-2.1.0.tgz", - "integrity": "sha1-32+ENy8CcNxlzfYpE0mrekc9Tyo=", - "dependencies": { - "safe-buffer": "^5.1.0" - } - }, - "node_modules/randomfill": { - "version": "1.0.4", - "resolved": "https://registry.npm.taobao.org/randomfill/download/randomfill-1.0.4.tgz", - "integrity": "sha1-ySGW/IarQr6YPxvzF3giSTHWFFg=", - "dependencies": { - "randombytes": "^2.0.5", - "safe-buffer": "^5.1.0" - } - }, - "node_modules/range-parser": { - "version": "1.2.1", - "resolved": "https://registry.npm.taobao.org/range-parser/download/range-parser-1.2.1.tgz", - "integrity": "sha1-PPNwI9GZ4cJNGlW4SADC8+ZGgDE=", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/raw-body": { - "version": "2.4.0", - "resolved": "https://registry.npm.taobao.org/raw-body/download/raw-body-2.4.0.tgz", - "integrity": "sha1-oc5vucm8NWylLoklarWQWeE9AzI=", - "dev": true, - "dependencies": { - "bytes": "3.1.0", - "http-errors": "1.7.2", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/read-pkg": { - "version": "5.2.0", - "resolved": "https://registry.npm.taobao.org/read-pkg/download/read-pkg-5.2.0.tgz", - "integrity": "sha1-e/KVQ4yloz5WzTDgU7NO5yUMk8w=", - "dev": true, - "dependencies": { - "@types/normalize-package-data": "^2.4.0", - "normalize-package-data": "^2.5.0", - "parse-json": "^5.0.0", - "type-fest": "^0.6.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npm.taobao.org/readable-stream/download/readable-stream-2.3.7.tgz?cache=0&sync_timestamp=1581624324274&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Freadable-stream%2Fdownload%2Freadable-stream-2.3.7.tgz", - "integrity": "sha1-Hsoc9xGu+BTAT2IlKjamL2yyO1c=", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/readdirp": { - "version": "3.5.0", - "resolved": "https://registry.npm.taobao.org/readdirp/download/readdirp-3.5.0.tgz?cache=0&sync_timestamp=1602584331621&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Freaddirp%2Fdownload%2Freaddirp-3.5.0.tgz", - "integrity": "sha1-m6dMAZsV02UnjS6Ru4xI17TULJ4=", - "optional": true, - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "node_modules/regenerate": { - "version": "1.4.1", - "resolved": "https://registry.npm.taobao.org/regenerate/download/regenerate-1.4.1.tgz?cache=0&sync_timestamp=1591302331571&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fregenerate%2Fdownload%2Fregenerate-1.4.1.tgz", - "integrity": "sha1-ytkq2Oa1kXc0hfvgWkhcr09Ffm8=", - "dev": true - }, - "node_modules/regenerate-unicode-properties": { - "version": "8.2.0", - "resolved": "https://registry.npm.taobao.org/regenerate-unicode-properties/download/regenerate-unicode-properties-8.2.0.tgz", - "integrity": "sha1-5d5xEdZV57pgwFfb6f83yH5lzew=", - "dev": true, - "dependencies": { - "regenerate": "^1.4.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/regenerator-runtime": { - "version": "0.13.7", - "resolved": "https://registry.npm.taobao.org/regenerator-runtime/download/regenerator-runtime-0.13.7.tgz?cache=0&sync_timestamp=1595456311465&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fregenerator-runtime%2Fdownload%2Fregenerator-runtime-0.13.7.tgz", - "integrity": "sha1-ysLazIoepnX+qrrriugziYrkb1U=" - }, - "node_modules/regenerator-transform": { - "version": "0.14.5", - "resolved": "https://registry.npm.taobao.org/regenerator-transform/download/regenerator-transform-0.14.5.tgz?cache=0&sync_timestamp=1593557846694&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fregenerator-transform%2Fdownload%2Fregenerator-transform-0.14.5.tgz", - "integrity": "sha1-yY2hVGg2ccnE3LFuznNlF+G3/rQ=", - "dev": true, - "dependencies": { - "@babel/runtime": "^7.8.4" - } - }, - "node_modules/regex-not": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/regex-not/download/regex-not-1.0.2.tgz", - "integrity": "sha1-H07OJ+ALC2XgJHpoEOaoXYOldSw=", - "dependencies": { - "extend-shallow": "^3.0.2", - "safe-regex": "^1.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/regexp.prototype.flags": { - "version": "1.3.0", - "resolved": "https://registry.npm.taobao.org/regexp.prototype.flags/download/regexp.prototype.flags-1.3.0.tgz?cache=0&sync_timestamp=1576388141321&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fregexp.prototype.flags%2Fdownload%2Fregexp.prototype.flags-1.3.0.tgz", - "integrity": "sha1-erqJs8E6ZFCdq888qNn7ub31y3U=", - "dev": true, - "dependencies": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/regexp.prototype.flags/node_modules/es-abstract": { - "version": "1.17.7", - "resolved": "https://registry.npm.taobao.org/es-abstract/download/es-abstract-1.17.7.tgz?cache=0&sync_timestamp=1601502719982&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fes-abstract%2Fdownload%2Fes-abstract-1.17.7.tgz", - "integrity": "sha1-pN5hsvZpifx0IWdsHLl4dXOs5Uw=", - "dev": true, - "dependencies": { - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.2.2", - "is-regex": "^1.1.1", - "object-inspect": "^1.8.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.1", - "string.prototype.trimend": "^1.0.1", - "string.prototype.trimstart": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/regexpu-core": { - "version": "4.7.1", - "resolved": "https://registry.npm.taobao.org/regexpu-core/download/regexpu-core-4.7.1.tgz?cache=0&sync_timestamp=1600413461940&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fregexpu-core%2Fdownload%2Fregexpu-core-4.7.1.tgz", - "integrity": "sha1-LepamgcjMpj78NuR+pq8TG4PitY=", - "dev": true, - "dependencies": { - "regenerate": "^1.4.0", - "regenerate-unicode-properties": "^8.2.0", - "regjsgen": "^0.5.1", - "regjsparser": "^0.6.4", - "unicode-match-property-ecmascript": "^1.0.4", - "unicode-match-property-value-ecmascript": "^1.2.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/regjsgen": { - "version": "0.5.2", - "resolved": "https://registry.npm.taobao.org/regjsgen/download/regjsgen-0.5.2.tgz", - "integrity": "sha1-kv8pX7He7L9uzaslQ9IH6RqjNzM=", - "dev": true - }, - "node_modules/regjsparser": { - "version": "0.6.4", - "resolved": "https://registry.npm.taobao.org/regjsparser/download/regjsparser-0.6.4.tgz", - "integrity": "sha1-p2n4aEMIQBpm6bUp0kNv9NBmYnI=", - "dev": true, - "dependencies": { - "jsesc": "~0.5.0" - }, - "bin": { - "regjsparser": "bin/parser" - } - }, - "node_modules/regjsparser/node_modules/jsesc": { - "version": "0.5.0", - "resolved": "https://registry.npm.taobao.org/jsesc/download/jsesc-0.5.0.tgz?cache=0&sync_timestamp=1603891232110&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fjsesc%2Fdownload%2Fjsesc-0.5.0.tgz", - "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", - "dev": true, - "bin": { - "jsesc": "bin/jsesc" - } - }, - "node_modules/relateurl": { - "version": "0.2.7", - "resolved": "https://registry.npm.taobao.org/relateurl/download/relateurl-0.2.7.tgz", - "integrity": "sha1-VNvzd+UUQKypCkzSdGANP/LYiKk=", - "dev": true, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/remove-trailing-separator": { - "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/remove-trailing-separator/download/remove-trailing-separator-1.1.0.tgz", - "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", - "devOptional": true - }, - "node_modules/renderkid": { - "version": "2.0.4", - "resolved": "https://registry.npm.taobao.org/renderkid/download/renderkid-2.0.4.tgz?cache=0&sync_timestamp=1603039762136&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Frenderkid%2Fdownload%2Frenderkid-2.0.4.tgz", - "integrity": "sha1-0yXlMq+yjT+Hlv/uMGvo/9b8hkw=", - "dev": true, - "dependencies": { - "css-select": "^1.1.0", - "dom-converter": "^0.2", - "htmlparser2": "^3.3.0", - "lodash": "^4.17.20", - "strip-ansi": "^3.0.0" - } - }, - "node_modules/renderkid/node_modules/ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npm.taobao.org/ansi-regex/download/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/renderkid/node_modules/css-select": { - "version": "1.2.0", - "resolved": "https://registry.npm.taobao.org/css-select/download/css-select-1.2.0.tgz", - "integrity": "sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=", - "dev": true, - "dependencies": { - "boolbase": "~1.0.0", - "css-what": "2.1", - "domutils": "1.5.1", - "nth-check": "~1.0.1" - } - }, - "node_modules/renderkid/node_modules/css-what": { - "version": "2.1.3", - "resolved": "https://registry.npm.taobao.org/css-what/download/css-what-2.1.3.tgz?cache=0&sync_timestamp=1602571001952&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcss-what%2Fdownload%2Fcss-what-2.1.3.tgz", - "integrity": "sha1-ptdgRXM2X+dGhsPzEcVlE9iChfI=", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/renderkid/node_modules/domutils": { - "version": "1.5.1", - "resolved": "https://registry.npm.taobao.org/domutils/download/domutils-1.5.1.tgz", - "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", - "dev": true, - "dependencies": { - "dom-serializer": "0", - "domelementtype": "1" - } - }, - "node_modules/renderkid/node_modules/strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npm.taobao.org/strip-ansi/download/strip-ansi-3.0.1.tgz?cache=0&sync_timestamp=1573280518303&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstrip-ansi%2Fdownload%2Fstrip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, - "dependencies": { - "ansi-regex": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/repeat-element": { - "version": "1.1.3", - "resolved": "https://registry.npm.taobao.org/repeat-element/download/repeat-element-1.1.3.tgz", - "integrity": "sha1-eC4NglwMWjuzlzH4Tv7mt0Lmsc4=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npm.taobao.org/repeat-string/download/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", - "engines": { - "node": ">=0.10" - } - }, - "node_modules/request": { - "version": "2.88.2", - "resolved": "https://registry.npm.taobao.org/request/download/request-2.88.2.tgz", - "integrity": "sha1-1zyRhzHLWofaBH4gcjQUb2ZNErM=", - "deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142", - "dev": true, - "dependencies": { - "aws-sign2": "~0.7.0", - "aws4": "^1.8.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "form-data": "~2.3.2", - "har-validator": "~5.1.3", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.19", - "oauth-sign": "~0.9.0", - "performance-now": "^2.1.0", - "qs": "~6.5.2", - "safe-buffer": "^5.1.2", - "tough-cookie": "~2.5.0", - "tunnel-agent": "^0.6.0", - "uuid": "^3.3.2" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npm.taobao.org/require-directory/download/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/require-main-filename/download/require-main-filename-2.0.0.tgz", - "integrity": "sha1-0LMp7MfMD2Fkn2IhW+aa9UqomJs=", - "dev": true - }, - "node_modules/requires-port": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/requires-port/download/requires-port-1.0.0.tgz", - "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=", - "dev": true - }, - "node_modules/resize-detector": { - "version": "0.1.10", - "resolved": "https://registry.npm.taobao.org/resize-detector/download/resize-detector-0.1.10.tgz", - "integrity": "sha1-HaP5YapfkUzLz9N1LVL9Rb7raSw=" - }, - "node_modules/resize-observer-polyfill": { - "version": "1.5.1", - "resolved": "https://registry.npm.taobao.org/resize-observer-polyfill/download/resize-observer-polyfill-1.5.1.tgz", - "integrity": "sha1-DpAg3T0hAkRY1OvSfiPkAmmBBGQ=" - }, - "node_modules/resolve": { - "version": "1.18.1", - "resolved": "https://registry.npm.taobao.org/resolve/download/resolve-1.18.1.tgz?cache=0&sync_timestamp=1603313597183&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fresolve%2Fdownload%2Fresolve-1.18.1.tgz", - "integrity": "sha1-AY/LLFsgfSpkJK7jYcWiZtqPQTA=", - "dev": true, - "dependencies": { - "is-core-module": "^2.0.0", - "path-parse": "^1.0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/resolve-cwd": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/resolve-cwd/download/resolve-cwd-2.0.0.tgz", - "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=", - "dev": true, - "dependencies": { - "resolve-from": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/resolve-from": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/resolve-from/download/resolve-from-3.0.0.tgz", - "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/resolve-url": { - "version": "0.2.1", - "resolved": "https://registry.npm.taobao.org/resolve-url/download/resolve-url-0.2.1.tgz", - "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", - "deprecated": "https://github.com/lydell/resolve-url#deprecated" - }, - "node_modules/restore-cursor": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/restore-cursor/download/restore-cursor-2.0.0.tgz", - "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", - "dev": true, - "dependencies": { - "onetime": "^2.0.0", - "signal-exit": "^3.0.2" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/ret": { - "version": "0.1.15", - "resolved": "https://registry.npm.taobao.org/ret/download/ret-0.1.15.tgz", - "integrity": "sha1-uKSCXVvbH8P29Twrwz+BOIaBx7w=", - "engines": { - "node": ">=0.12" - } - }, - "node_modules/retry": { - "version": "0.12.0", - "resolved": "https://registry.npm.taobao.org/retry/download/retry-0.12.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fretry%2Fdownload%2Fretry-0.12.0.tgz", - "integrity": "sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs=", - "dev": true, - "engines": { - "node": ">= 4" - } - }, - "node_modules/rgb-regex": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/rgb-regex/download/rgb-regex-1.0.1.tgz", - "integrity": "sha1-wODWiC3w4jviVKR16O3UGRX+rrE=", - "dev": true - }, - "node_modules/rgba-regex": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/rgba-regex/download/rgba-regex-1.0.0.tgz", - "integrity": "sha1-QzdOLiyglosO8VI0YLfXMP8i7rM=", - "dev": true - }, - "node_modules/rimraf": { - "version": "2.7.1", - "resolved": "https://registry.npm.taobao.org/rimraf/download/rimraf-2.7.1.tgz?cache=0&sync_timestamp=1581229865753&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Frimraf%2Fdownload%2Frimraf-2.7.1.tgz", - "integrity": "sha1-NXl/E6f9rcVmFCwp1PB8ytSD4+w=", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - } - }, - "node_modules/ripemd160": { - "version": "2.0.2", - "resolved": "https://registry.npm.taobao.org/ripemd160/download/ripemd160-2.0.2.tgz", - "integrity": "sha1-ocGm9iR1FXe6XQeRTLyShQWFiQw=", - "dependencies": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1" - } - }, - "node_modules/run-queue": { - "version": "1.0.3", - "resolved": "https://registry.npm.taobao.org/run-queue/download/run-queue-1.0.3.tgz", - "integrity": "sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec=", - "dependencies": { - "aproba": "^1.1.1" - } - }, - "node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npm.taobao.org/safe-buffer/download/safe-buffer-5.1.2.tgz", - "integrity": "sha1-mR7GnSluAxN0fVm9/St0XDX4go0=" - }, - "node_modules/safe-regex": { - "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/safe-regex/download/safe-regex-1.1.0.tgz", - "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", - "dependencies": { - "ret": "~0.1.10" - } - }, - "node_modules/safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npm.taobao.org/safer-buffer/download/safer-buffer-2.1.2.tgz", - "integrity": "sha1-RPoWGwGHuVSd2Eu5GAL5vYOFzWo=" - }, - "node_modules/sax": { - "version": "1.2.4", - "resolved": "https://registry.npm.taobao.org/sax/download/sax-1.2.4.tgz", - "integrity": "sha1-KBYjTiN4vdxOU1T6tcqold9xANk=", - "dev": true - }, - "node_modules/schema-utils": { - "version": "2.7.1", - "resolved": "https://registry.npm.taobao.org/schema-utils/download/schema-utils-2.7.1.tgz", - "integrity": "sha1-HKTzLRskxZDCA7jnpQvw6kzTlNc=", - "dependencies": { - "@types/json-schema": "^7.0.5", - "ajv": "^6.12.4", - "ajv-keywords": "^3.5.2" - }, - "engines": { - "node": ">= 8.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - } - }, - "node_modules/select": { - "version": "1.1.2", - "resolved": "https://registry.npm.taobao.org/select/download/select-1.1.2.tgz", - "integrity": "sha1-DnNQrN7ICxEIUoeG7B1EGNEbOW0=" - }, - "node_modules/select-hose": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/select-hose/download/select-hose-2.0.0.tgz", - "integrity": "sha1-Yl2GWPhlr0Psliv8N2o3NZpJlMo=", - "dev": true - }, - "node_modules/selfsigned": { - "version": "1.10.8", - "resolved": "https://registry.npm.taobao.org/selfsigned/download/selfsigned-1.10.8.tgz?cache=0&sync_timestamp=1600186189732&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fselfsigned%2Fdownload%2Fselfsigned-1.10.8.tgz", - "integrity": "sha1-DRcgi30Swz+OrIXEGDXyf8PYGjA=", - "dev": true, - "dependencies": { - "node-forge": "^0.10.0" - } - }, - "node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npm.taobao.org/semver/download/semver-5.7.1.tgz", - "integrity": "sha1-qVT5Ma66UI0we78Gnv8MAclhFvc=", - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/send": { - "version": "0.17.1", - "resolved": "https://registry.npm.taobao.org/send/download/send-0.17.1.tgz", - "integrity": "sha1-wdiwWfeQD3Rm3Uk4vcROEd2zdsg=", - "dev": true, - "dependencies": { - "debug": "2.6.9", - "depd": "~1.1.2", - "destroy": "~1.0.4", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "~1.7.2", - "mime": "1.6.0", - "ms": "2.1.1", - "on-finished": "~2.3.0", - "range-parser": "~1.2.1", - "statuses": "~1.5.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/send/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npm.taobao.org/debug/download/debug-2.6.9.tgz?cache=0&sync_timestamp=1600502894812&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdebug%2Fdownload%2Fdebug-2.6.9.tgz", - "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/send/node_modules/debug/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/ms/download/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, - "node_modules/send/node_modules/mime": { - "version": "1.6.0", - "resolved": "https://registry.npm.taobao.org/mime/download/mime-1.6.0.tgz?cache=0&sync_timestamp=1590596706367&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmime%2Fdownload%2Fmime-1.6.0.tgz", - "integrity": "sha1-Ms2eXGRVO9WNGaVor0Uqz/BJgbE=", - "dev": true, - "bin": { - "mime": "cli.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/send/node_modules/ms": { - "version": "2.1.1", - "resolved": "https://registry.npm.taobao.org/ms/download/ms-2.1.1.tgz", - "integrity": "sha1-MKWGTrPrsKZvLr5tcnrwagnYbgo=", - "dev": true - }, - "node_modules/serialize-javascript": { - "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/serialize-javascript/download/serialize-javascript-4.0.0.tgz?cache=0&sync_timestamp=1599740650381&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fserialize-javascript%2Fdownload%2Fserialize-javascript-4.0.0.tgz", - "integrity": "sha1-tSXhI4SJpez8Qq+sw/6Z5mb0sao=", - "dependencies": { - "randombytes": "^2.1.0" - } - }, - "node_modules/serve-index": { - "version": "1.9.1", - "resolved": "https://registry.npm.taobao.org/serve-index/download/serve-index-1.9.1.tgz", - "integrity": "sha1-03aNabHn2C5c4FD/9bRTvqEqkjk=", - "dev": true, - "dependencies": { - "accepts": "~1.3.4", - "batch": "0.6.1", - "debug": "2.6.9", - "escape-html": "~1.0.3", - "http-errors": "~1.6.2", - "mime-types": "~2.1.17", - "parseurl": "~1.3.2" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/serve-index/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npm.taobao.org/debug/download/debug-2.6.9.tgz?cache=0&sync_timestamp=1600502894812&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdebug%2Fdownload%2Fdebug-2.6.9.tgz", - "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/serve-index/node_modules/http-errors": { - "version": "1.6.3", - "resolved": "https://registry.npm.taobao.org/http-errors/download/http-errors-1.6.3.tgz", - "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", - "dev": true, - "dependencies": { - "depd": "~1.1.2", - "inherits": "2.0.3", - "setprototypeof": "1.1.0", - "statuses": ">= 1.4.0 < 2" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/serve-index/node_modules/inherits": { - "version": "2.0.3", - "resolved": "https://registry.npm.taobao.org/inherits/download/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true - }, - "node_modules/serve-index/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/ms/download/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, - "node_modules/serve-index/node_modules/setprototypeof": { - "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/setprototypeof/download/setprototypeof-1.1.0.tgz", - "integrity": "sha1-0L2FU2iHtv58DYGMuWLZ2RxU5lY=", - "dev": true - }, - "node_modules/serve-static": { - "version": "1.14.1", - "resolved": "https://registry.npm.taobao.org/serve-static/download/serve-static-1.14.1.tgz", - "integrity": "sha1-Zm5jbcTwEPfvKZcKiKZ0MgiYsvk=", - "dev": true, - "dependencies": { - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "parseurl": "~1.3.3", - "send": "0.17.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/set-blocking/download/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", - "dev": true - }, - "node_modules/set-value": { - "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/set-value/download/set-value-2.0.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fset-value%2Fdownload%2Fset-value-2.0.1.tgz", - "integrity": "sha1-oY1AUw5vB95CKMfe/kInr4ytAFs=", - "dependencies": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.3", - "split-string": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/set-value/node_modules/extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/extend-shallow/download/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dependencies": { - "is-extendable": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/setimmediate": { - "version": "1.0.5", - "resolved": "https://registry.npm.taobao.org/setimmediate/download/setimmediate-1.0.5.tgz", - "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" - }, - "node_modules/setprototypeof": { - "version": "1.1.1", - "resolved": "https://registry.npm.taobao.org/setprototypeof/download/setprototypeof-1.1.1.tgz", - "integrity": "sha1-fpWsskqpL1iF4KvvW6ExMw1K5oM=", - "dev": true - }, - "node_modules/sha.js": { - "version": "2.4.11", - "resolved": "https://registry.npm.taobao.org/sha.js/download/sha.js-2.4.11.tgz", - "integrity": "sha1-N6XPC4HsvGlD3hCbopYNGyZYSuc=", - "dependencies": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - }, - "bin": { - "sha.js": "bin.js" - } - }, - "node_modules/shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npm.taobao.org/shebang-command/download/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", - "dev": true, - "dependencies": { - "shebang-regex": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/shebang-regex/download/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/shell-quote": { - "version": "1.7.2", - "resolved": "https://registry.npm.taobao.org/shell-quote/download/shell-quote-1.7.2.tgz", - "integrity": "sha1-Z6fQLHbJ2iT5nSCAj8re0ODgS+I=", - "dev": true - }, - "node_modules/signal-exit": { - "version": "3.0.3", - "resolved": "https://registry.npm.taobao.org/signal-exit/download/signal-exit-3.0.3.tgz", - "integrity": "sha1-oUEMLt2PB3sItOJTyOrPyvBXRhw=", - "dev": true - }, - "node_modules/simple-swizzle": { - "version": "0.2.2", - "resolved": "https://registry.npm.taobao.org/simple-swizzle/download/simple-swizzle-0.2.2.tgz", - "integrity": "sha1-pNprY1/8zMoz9w0Xy5JZLeleVXo=", - "dev": true, - "dependencies": { - "is-arrayish": "^0.3.1" - } - }, - "node_modules/simple-swizzle/node_modules/is-arrayish": { - "version": "0.3.2", - "resolved": "https://registry.npm.taobao.org/is-arrayish/download/is-arrayish-0.3.2.tgz", - "integrity": "sha1-RXSirlb3qyBolvtDHq7tBm/fjwM=", - "dev": true - }, - "node_modules/sirv": { - "version": "1.0.11", - "resolved": "https://registry.npm.taobao.org/sirv/download/sirv-1.0.11.tgz", - "integrity": "sha1-gcGaKSAgSFB9bsDYuokQ/aUutaQ=", - "dev": true, - "dependencies": { - "@polka/url": "^1.0.0-next.9", - "mime": "^2.3.1", - "totalist": "^1.0.0" - }, - "engines": { - "node": ">= 10" - } - }, - "node_modules/slash": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/slash/download/slash-1.0.0.tgz", - "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon": { - "version": "0.8.2", - "resolved": "https://registry.npm.taobao.org/snapdragon/download/snapdragon-0.8.2.tgz", - "integrity": "sha1-ZJIufFZbDhQgS6GqfWlkJ40lGC0=", - "dependencies": { - "base": "^0.11.1", - "debug": "^2.2.0", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "map-cache": "^0.2.2", - "source-map": "^0.5.6", - "source-map-resolve": "^0.5.0", - "use": "^3.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon-node": { - "version": "2.1.1", - "resolved": "https://registry.npm.taobao.org/snapdragon-node/download/snapdragon-node-2.1.1.tgz", - "integrity": "sha1-bBdfhv8UvbByRWPo88GwIaKGhTs=", - "dependencies": { - "define-property": "^1.0.0", - "isobject": "^3.0.0", - "snapdragon-util": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon-node/node_modules/define-property": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/define-property/download/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dependencies": { - "is-descriptor": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon-node/node_modules/is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/is-accessor-descriptor/download/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY=", - "dependencies": { - "kind-of": "^6.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon-node/node_modules/is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/is-data-descriptor/download/is-data-descriptor-1.0.0.tgz", - "integrity": "sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc=", - "dependencies": { - "kind-of": "^6.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon-node/node_modules/is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/is-descriptor/download/is-descriptor-1.0.2.tgz", - "integrity": "sha1-OxWXRqZmBLBPjIFSS6NlxfFNhuw=", - "dependencies": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon-util": { - "version": "3.0.1", - "resolved": "https://registry.npm.taobao.org/snapdragon-util/download/snapdragon-util-3.0.1.tgz", - "integrity": "sha1-+VZHlIbyrNeXAGk/b3uAXkWrVuI=", - "dependencies": { - "kind-of": "^3.2.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon-util/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npm.taobao.org/kind-of/download/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npm.taobao.org/debug/download/debug-2.6.9.tgz?cache=0&sync_timestamp=1600502894812&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdebug%2Fdownload%2Fdebug-2.6.9.tgz", - "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/snapdragon/node_modules/define-property": { - "version": "0.2.5", - "resolved": "https://registry.npm.taobao.org/define-property/download/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dependencies": { - "is-descriptor": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/extend-shallow/download/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dependencies": { - "is-extendable": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/ms/download/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - }, - "node_modules/sockjs": { - "version": "0.3.20", - "resolved": "https://registry.npm.taobao.org/sockjs/download/sockjs-0.3.20.tgz", - "integrity": "sha1-smooPsVi74smh7RAM6Tuzqx12FU=", - "dev": true, - "dependencies": { - "faye-websocket": "^0.10.0", - "uuid": "^3.4.0", - "websocket-driver": "0.6.5" - } - }, - "node_modules/sockjs-client": { - "version": "1.4.0", - "resolved": "https://registry.npm.taobao.org/sockjs-client/download/sockjs-client-1.4.0.tgz?cache=0&sync_timestamp=1596410219305&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsockjs-client%2Fdownload%2Fsockjs-client-1.4.0.tgz", - "integrity": "sha1-yfJWjhnI/YFztJl+o0IOC7MGx9U=", - "dev": true, - "dependencies": { - "debug": "^3.2.5", - "eventsource": "^1.0.7", - "faye-websocket": "~0.11.1", - "inherits": "^2.0.3", - "json3": "^3.3.2", - "url-parse": "^1.4.3" - } - }, - "node_modules/sockjs-client/node_modules/debug": { - "version": "3.2.6", - "resolved": "https://registry.npm.taobao.org/debug/download/debug-3.2.6.tgz?cache=0&sync_timestamp=1600502894812&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdebug%2Fdownload%2Fdebug-3.2.6.tgz", - "integrity": "sha1-6D0X3hbYp++3cX7b5fsQE17uYps=", - "deprecated": "Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)", - "dev": true, - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/sockjs-client/node_modules/faye-websocket": { - "version": "0.11.3", - "resolved": "https://registry.npm.taobao.org/faye-websocket/download/faye-websocket-0.11.3.tgz", - "integrity": "sha1-XA6aiWjokSwoZjn96XeosgnyUI4=", - "dev": true, - "dependencies": { - "websocket-driver": ">=0.5.1" - }, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/sort-keys": { - "version": "1.1.2", - "resolved": "https://registry.npm.taobao.org/sort-keys/download/sort-keys-1.1.2.tgz?cache=0&sync_timestamp=1602621889278&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsort-keys%2Fdownload%2Fsort-keys-1.1.2.tgz", - "integrity": "sha1-RBttTTRnmPG05J6JIK37oOVD+a0=", - "dev": true, - "dependencies": { - "is-plain-obj": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-list-map": { - "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/source-list-map/download/source-list-map-2.0.1.tgz", - "integrity": "sha1-OZO9hzv8SEecyp6jpUeDXHwVSzQ=" - }, - "node_modules/source-map": { - "version": "0.5.7", - "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.5.7.tgz?cache=0&sync_timestamp=1571657176668&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsource-map%2Fdownload%2Fsource-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-map-resolve": { - "version": "0.5.3", - "resolved": "https://registry.npm.taobao.org/source-map-resolve/download/source-map-resolve-0.5.3.tgz?cache=0&sync_timestamp=1584829515586&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsource-map-resolve%2Fdownload%2Fsource-map-resolve-0.5.3.tgz", - "integrity": "sha1-GQhmvs51U+H48mei7oLGBrVQmho=", - "deprecated": "See https://github.com/lydell/source-map-resolve#deprecated", - "dependencies": { - "atob": "^2.1.2", - "decode-uri-component": "^0.2.0", - "resolve-url": "^0.2.1", - "source-map-url": "^0.4.0", - "urix": "^0.1.0" - } - }, - "node_modules/source-map-support": { - "version": "0.5.19", - "resolved": "https://registry.npm.taobao.org/source-map-support/download/source-map-support-0.5.19.tgz?cache=0&sync_timestamp=1587719289626&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsource-map-support%2Fdownload%2Fsource-map-support-0.5.19.tgz", - "integrity": "sha1-qYti+G3K9PZzmWSMCFKRq56P7WE=", - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "node_modules/source-map-support/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz?cache=0&sync_timestamp=1571657176668&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsource-map%2Fdownload%2Fsource-map-0.6.1.tgz", - "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-map-url": { - "version": "0.4.0", - "resolved": "https://registry.npm.taobao.org/source-map-url/download/source-map-url-0.4.0.tgz", - "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", - "deprecated": "See https://github.com/lydell/source-map-url#deprecated" - }, - "node_modules/spdx-correct": { - "version": "3.1.1", - "resolved": "https://registry.npm.taobao.org/spdx-correct/download/spdx-correct-3.1.1.tgz?cache=0&sync_timestamp=1590161967473&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fspdx-correct%2Fdownload%2Fspdx-correct-3.1.1.tgz", - "integrity": "sha1-3s6BrJweZxPl99G28X1Gj6U9iak=", - "dev": true, - "dependencies": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "node_modules/spdx-exceptions": { - "version": "2.3.0", - "resolved": "https://registry.npm.taobao.org/spdx-exceptions/download/spdx-exceptions-2.3.0.tgz", - "integrity": "sha1-PyjOGnegA3JoPq3kpDMYNSeiFj0=", - "dev": true - }, - "node_modules/spdx-expression-parse": { - "version": "3.0.1", - "resolved": "https://registry.npm.taobao.org/spdx-expression-parse/download/spdx-expression-parse-3.0.1.tgz", - "integrity": "sha1-z3D1BILu/cmOPOCmgz5KU87rpnk=", - "dev": true, - "dependencies": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "node_modules/spdx-license-ids": { - "version": "3.0.6", - "resolved": "https://registry.npm.taobao.org/spdx-license-ids/download/spdx-license-ids-3.0.6.tgz?cache=0&sync_timestamp=1600284873714&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fspdx-license-ids%2Fdownload%2Fspdx-license-ids-3.0.6.tgz", - "integrity": "sha1-yAdXODwoq/cpZ0SZjLwQaui4VM4=", - "dev": true - }, - "node_modules/spdy": { - "version": "4.0.2", - "resolved": "https://registry.npm.taobao.org/spdy/download/spdy-4.0.2.tgz?cache=0&sync_timestamp=1585970491493&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fspdy%2Fdownload%2Fspdy-4.0.2.tgz", - "integrity": "sha1-t09GYgOj7aRSwCSSuR+56EonZ3s=", - "dev": true, - "dependencies": { - "debug": "^4.1.0", - "handle-thing": "^2.0.0", - "http-deceiver": "^1.2.7", - "select-hose": "^2.0.0", - "spdy-transport": "^3.0.0" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/spdy-transport": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/spdy-transport/download/spdy-transport-3.0.0.tgz", - "integrity": "sha1-ANSGOmQArXXfkzYaFghgXl3NzzE=", - "dev": true, - "dependencies": { - "debug": "^4.1.0", - "detect-node": "^2.0.4", - "hpack.js": "^2.1.6", - "obuf": "^1.1.2", - "readable-stream": "^3.0.6", - "wbuf": "^1.7.3" - } - }, - "node_modules/spdy-transport/node_modules/readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npm.taobao.org/readable-stream/download/readable-stream-3.6.0.tgz?cache=0&sync_timestamp=1581624324274&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Freadable-stream%2Fdownload%2Freadable-stream-3.6.0.tgz", - "integrity": "sha1-M3u9o63AcGvT4CRCaihtS0sskZg=", - "dev": true, - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/split-string": { - "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/split-string/download/split-string-3.1.0.tgz", - "integrity": "sha1-fLCd2jqGWFcFxks5pkZgOGguj+I=", - "dependencies": { - "extend-shallow": "^3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npm.taobao.org/sprintf-js/download/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true - }, - "node_modules/sshpk": { - "version": "1.16.1", - "resolved": "https://registry.npm.taobao.org/sshpk/download/sshpk-1.16.1.tgz", - "integrity": "sha1-+2YcC+8ps520B2nuOfpwCT1vaHc=", - "dev": true, - "dependencies": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" - }, - "bin": { - "sshpk-conv": "bin/sshpk-conv", - "sshpk-sign": "bin/sshpk-sign", - "sshpk-verify": "bin/sshpk-verify" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/ssri": { - "version": "6.0.1", - "resolved": "https://registry.npm.taobao.org/ssri/download/ssri-6.0.1.tgz", - "integrity": "sha1-KjxBso3UW2K2Nnbst0ABJlrp7dg=", - "dependencies": { - "figgy-pudding": "^3.5.1" - } - }, - "node_modules/stable": { - "version": "0.1.8", - "resolved": "https://registry.npm.taobao.org/stable/download/stable-0.1.8.tgz", - "integrity": "sha1-g26zyDgv4pNv6vVEYxAXzn1Ho88=", - "dev": true - }, - "node_modules/stackframe": { - "version": "1.2.0", - "resolved": "https://registry.npm.taobao.org/stackframe/download/stackframe-1.2.0.tgz?cache=0&sync_timestamp=1590854108362&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstackframe%2Fdownload%2Fstackframe-1.2.0.tgz", - "integrity": "sha1-UkKUktY8YuuYmATBFVLj0i53kwM=", - "dev": true - }, - "node_modules/static-extend": { - "version": "0.1.2", - "resolved": "https://registry.npm.taobao.org/static-extend/download/static-extend-0.1.2.tgz", - "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", - "dependencies": { - "define-property": "^0.2.5", - "object-copy": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/static-extend/node_modules/define-property": { - "version": "0.2.5", - "resolved": "https://registry.npm.taobao.org/define-property/download/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dependencies": { - "is-descriptor": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/statuses": { - "version": "1.5.0", - "resolved": "https://registry.npm.taobao.org/statuses/download/statuses-1.5.0.tgz?cache=0&sync_timestamp=1587327902535&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstatuses%2Fdownload%2Fstatuses-1.5.0.tgz", - "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/stream-browserify": { - "version": "2.0.2", - "resolved": "https://registry.npm.taobao.org/stream-browserify/download/stream-browserify-2.0.2.tgz?cache=0&sync_timestamp=1587041194718&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstream-browserify%2Fdownload%2Fstream-browserify-2.0.2.tgz", - "integrity": "sha1-h1IdOKRKp+6RzhzSpH3wy0ndZgs=", - "dependencies": { - "inherits": "~2.0.1", - "readable-stream": "^2.0.2" - } - }, - "node_modules/stream-each": { - "version": "1.2.3", - "resolved": "https://registry.npm.taobao.org/stream-each/download/stream-each-1.2.3.tgz", - "integrity": "sha1-6+J6DDibBPvMIzZClS4Qcxr6m64=", - "dependencies": { - "end-of-stream": "^1.1.0", - "stream-shift": "^1.0.0" - } - }, - "node_modules/stream-http": { - "version": "2.8.3", - "resolved": "https://registry.npm.taobao.org/stream-http/download/stream-http-2.8.3.tgz", - "integrity": "sha1-stJCRpKIpaJ+xP6JM6z2I95lFPw=", - "dependencies": { - "builtin-status-codes": "^3.0.0", - "inherits": "^2.0.1", - "readable-stream": "^2.3.6", - "to-arraybuffer": "^1.0.0", - "xtend": "^4.0.0" - } - }, - "node_modules/stream-shift": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/stream-shift/download/stream-shift-1.0.1.tgz", - "integrity": "sha1-1wiCgVWasneEJCebCHfaPDktWj0=" - }, - "node_modules/strict-uri-encode": { - "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/strict-uri-encode/download/strict-uri-encode-1.1.0.tgz", - "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npm.taobao.org/string_decoder/download/string_decoder-1.1.1.tgz", - "integrity": "sha1-nPFhG6YmhdcDCunkujQUnDrwP8g=", - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, - "node_modules/string-width": { - "version": "2.1.1", - "resolved": "https://registry.npm.taobao.org/string-width/download/string-width-2.1.1.tgz", - "integrity": "sha1-q5Pyeo3BPSjKyBXEYhQ6bZASrp4=", - "dev": true, - "dependencies": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/string-width/node_modules/ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/ansi-regex/download/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/string-width/node_modules/strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/strip-ansi/download/strip-ansi-4.0.0.tgz?cache=0&sync_timestamp=1573280518303&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstrip-ansi%2Fdownload%2Fstrip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "dependencies": { - "ansi-regex": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/string.prototype.trimend": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/string.prototype.trimend/download/string.prototype.trimend-1.0.2.tgz?cache=0&sync_timestamp=1603219618123&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstring.prototype.trimend%2Fdownload%2Fstring.prototype.trimend-1.0.2.tgz", - "integrity": "sha1-bd2ah5a8cUtImjriIkaiCPN7+kY=", - "dev": true, - "dependencies": { - "define-properties": "^1.1.3", - "es-abstract": "^1.18.0-next.1" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/string.prototype.trimstart": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/string.prototype.trimstart/download/string.prototype.trimstart-1.0.2.tgz?cache=0&sync_timestamp=1603219618047&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstring.prototype.trimstart%2Fdownload%2Fstring.prototype.trimstart-1.0.2.tgz", - "integrity": "sha1-ItRdqBAVMJzQzdeXh+iRn8XGE+c=", - "dev": true, - "dependencies": { - "define-properties": "^1.1.3", - "es-abstract": "^1.18.0-next.1" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npm.taobao.org/strip-ansi/download/strip-ansi-6.0.0.tgz?cache=0&sync_timestamp=1573280518303&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstrip-ansi%2Fdownload%2Fstrip-ansi-6.0.0.tgz", - "integrity": "sha1-CxVx3XZpzNTz4G4U7x7tJiJa5TI=", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi/node_modules/ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npm.taobao.org/ansi-regex/download/ansi-regex-5.0.0.tgz", - "integrity": "sha1-OIU59VF5vzkznIGvMKZU1p+Hy3U=", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-eof": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/strip-eof/download/strip-eof-1.0.0.tgz", - "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/strip-final-newline": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/strip-final-newline/download/strip-final-newline-2.0.0.tgz", - "integrity": "sha1-ibhS+y/L6Tb29LMYevsKEsGrWK0=", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/stylehacks": { - "version": "4.0.3", - "resolved": "https://registry.npm.taobao.org/stylehacks/download/stylehacks-4.0.3.tgz", - "integrity": "sha1-Zxj8r00eB9ihMYaQiB6NlnJqcdU=", - "dev": true, - "dependencies": { - "browserslist": "^4.0.0", - "postcss": "^7.0.0", - "postcss-selector-parser": "^3.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/stylehacks/node_modules/postcss-selector-parser": { - "version": "3.1.2", - "resolved": "https://registry.npm.taobao.org/postcss-selector-parser/download/postcss-selector-parser-3.1.2.tgz?cache=0&sync_timestamp=1601045316432&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-selector-parser%2Fdownload%2Fpostcss-selector-parser-3.1.2.tgz", - "integrity": "sha1-sxD1xMD9r3b5SQK7qjDbaqhPUnA=", - "dev": true, - "dependencies": { - "dot-prop": "^5.2.0", - "indexes-of": "^1.0.1", - "uniq": "^1.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-5.5.0.tgz?cache=0&sync_timestamp=1598611709087&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsupports-color%2Fdownload%2Fsupports-color-5.5.0.tgz", - "integrity": "sha1-4uaaRKyHcveKHsCzW2id9lMO/I8=", - "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/svg-tags": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/svg-tags/download/svg-tags-1.0.0.tgz", - "integrity": "sha1-WPcc7jvVGbWdSyqEO2x95krAR2Q=", - "dev": true - }, - "node_modules/svgo": { - "version": "1.3.2", - "resolved": "https://registry.npm.taobao.org/svgo/download/svgo-1.3.2.tgz?cache=0&sync_timestamp=1572433263159&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsvgo%2Fdownload%2Fsvgo-1.3.2.tgz", - "integrity": "sha1-ttxRHAYzRsnkFbgeQ0ARRbltQWc=", - "deprecated": "This SVGO version is no longer supported. Upgrade to v2.x.x.", - "dev": true, - "dependencies": { - "chalk": "^2.4.1", - "coa": "^2.0.2", - "css-select": "^2.0.0", - "css-select-base-adapter": "^0.1.1", - "css-tree": "1.0.0-alpha.37", - "csso": "^4.0.2", - "js-yaml": "^3.13.1", - "mkdirp": "~0.5.1", - "object.values": "^1.1.0", - "sax": "~1.2.4", - "stable": "^0.1.8", - "unquote": "~1.1.1", - "util.promisify": "~1.0.0" - }, - "bin": { - "svgo": "bin/svgo" - }, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/tapable": { - "version": "1.1.3", - "resolved": "https://registry.npm.taobao.org/tapable/download/tapable-1.1.3.tgz?cache=0&sync_timestamp=1600381197118&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ftapable%2Fdownload%2Ftapable-1.1.3.tgz", - "integrity": "sha1-ofzMBrWNth/XpF2i2kT186Pme6I=", - "engines": { - "node": ">=6" - } - }, - "node_modules/tar": { - "version": "6.1.0", - "resolved": "https://registry.npm.taobao.org/tar/download/tar-6.1.0.tgz", - "integrity": "sha1-0XJOm8wEuXexjVxXOzM6IgcimoM=", - "dependencies": { - "chownr": "^2.0.0", - "fs-minipass": "^2.0.0", - "minipass": "^3.0.0", - "minizlib": "^2.1.1", - "mkdirp": "^1.0.3", - "yallist": "^4.0.0" - }, - "engines": { - "node": ">= 10" - } - }, - "node_modules/tar/node_modules/chownr": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/chownr/download/chownr-2.0.0.tgz", - "integrity": "sha1-Fb++U9LqtM9w8YqM1o6+Wzyx3s4=", - "engines": { - "node": ">=10" - } - }, - "node_modules/tar/node_modules/mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npm.taobao.org/mkdirp/download/mkdirp-1.0.4.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmkdirp%2Fdownload%2Fmkdirp-1.0.4.tgz", - "integrity": "sha1-PrXtYmInVteaXw4qIh3+utdcL34=", - "bin": { - "mkdirp": "bin/cmd.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/tar/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/yallist/download/yallist-4.0.0.tgz", - "integrity": "sha1-m7knkNnA7/7GO+c1GeEaNQGaOnI=" - }, - "node_modules/terser": { - "version": "4.8.0", - "resolved": "https://registry.npm.taobao.org/terser/download/terser-4.8.0.tgz?cache=0&sync_timestamp=1603374108186&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fterser%2Fdownload%2Fterser-4.8.0.tgz", - "integrity": "sha1-YwVjQ9fHC7KfOvZlhlpG/gOg3xc=", - "dependencies": { - "commander": "^2.20.0", - "source-map": "~0.6.1", - "source-map-support": "~0.5.12" - }, - "bin": { - "terser": "bin/terser" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/terser-webpack-plugin": { - "version": "1.4.5", - "resolved": "https://registry.npm.taobao.org/terser-webpack-plugin/download/terser-webpack-plugin-1.4.5.tgz?cache=0&sync_timestamp=1603881713213&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fterser-webpack-plugin%2Fdownload%2Fterser-webpack-plugin-1.4.5.tgz", - "integrity": "sha1-oheu+uozDnNP+sthIOwfoxLWBAs=", - "dependencies": { - "cacache": "^12.0.2", - "find-cache-dir": "^2.1.0", - "is-wsl": "^1.1.0", - "schema-utils": "^1.0.0", - "serialize-javascript": "^4.0.0", - "source-map": "^0.6.1", - "terser": "^4.1.2", - "webpack-sources": "^1.4.0", - "worker-farm": "^1.7.0" - }, - "engines": { - "node": ">= 6.9.0" - }, - "peerDependencies": { - "webpack": "^4.0.0" - } - }, - "node_modules/terser-webpack-plugin/node_modules/schema-utils": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/schema-utils/download/schema-utils-1.0.0.tgz", - "integrity": "sha1-C3mpMgTXtgDUsoUNH2bCo0lRx3A=", - "dependencies": { - "ajv": "^6.1.0", - "ajv-errors": "^1.0.0", - "ajv-keywords": "^3.1.0" - }, - "engines": { - "node": ">= 4" - } - }, - "node_modules/terser-webpack-plugin/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz?cache=0&sync_timestamp=1571657176668&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsource-map%2Fdownload%2Fsource-map-0.6.1.tgz", - "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/terser/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz?cache=0&sync_timestamp=1571657176668&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsource-map%2Fdownload%2Fsource-map-0.6.1.tgz", - "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/thenify": { - "version": "3.3.1", - "resolved": "https://registry.npm.taobao.org/thenify/download/thenify-3.3.1.tgz", - "integrity": "sha1-iTLmhqQGYDigFt2eLKRq3Zg4qV8=", - "dev": true, - "dependencies": { - "any-promise": "^1.0.0" - } - }, - "node_modules/thenify-all": { - "version": "1.6.0", - "resolved": "https://registry.npm.taobao.org/thenify-all/download/thenify-all-1.6.0.tgz", - "integrity": "sha1-GhkY1ALY/D+Y+/I02wvMjMEOlyY=", - "dev": true, - "dependencies": { - "thenify": ">= 3.1.0 < 4" - }, - "engines": { - "node": ">=0.8" - } - }, - "node_modules/thread-loader": { - "version": "2.1.3", - "resolved": "https://registry.npm.taobao.org/thread-loader/download/thread-loader-2.1.3.tgz?cache=0&sync_timestamp=1603809339530&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fthread-loader%2Fdownload%2Fthread-loader-2.1.3.tgz", - "integrity": "sha1-y9LBOfwrLebp0o9iKGq3cMGsvdo=", - "dev": true, - "dependencies": { - "loader-runner": "^2.3.1", - "loader-utils": "^1.1.0", - "neo-async": "^2.6.0" - }, - "engines": { - "node": ">= 6.9.0 <7.0.0 || >= 8.9.0" - }, - "peerDependencies": { - "webpack": "^2.0.0 || ^3.0.0 || ^4.0.0" - } - }, - "node_modules/throttle-debounce": { - "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/throttle-debounce/download/throttle-debounce-1.1.0.tgz?cache=0&sync_timestamp=1604313832516&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fthrottle-debounce%2Fdownload%2Fthrottle-debounce-1.1.0.tgz", - "integrity": "sha1-UYU9o3vmihVctugns1FKPEIuic0=", - "engines": { - "node": ">=4" - } - }, - "node_modules/through2": { - "version": "2.0.5", - "resolved": "https://registry.npm.taobao.org/through2/download/through2-2.0.5.tgz", - "integrity": "sha1-AcHjnrMdB8t9A6lqcIIyYLIxMs0=", - "dependencies": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - }, - "node_modules/thunky": { - "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/thunky/download/thunky-1.1.0.tgz", - "integrity": "sha1-Wrr3FKlAXbBQRzK7zNLO3Z75U30=", - "dev": true - }, - "node_modules/timers-browserify": { - "version": "2.0.12", - "resolved": "https://registry.npm.taobao.org/timers-browserify/download/timers-browserify-2.0.12.tgz?cache=0&sync_timestamp=1603793741116&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ftimers-browserify%2Fdownload%2Ftimers-browserify-2.0.12.tgz", - "integrity": "sha1-RKRcEfv0B/NPl7zNFXfGUjYbAO4=", - "dependencies": { - "setimmediate": "^1.0.4" - }, - "engines": { - "node": ">=0.6.0" - } - }, - "node_modules/timsort": { - "version": "0.3.0", - "resolved": "https://registry.npm.taobao.org/timsort/download/timsort-0.3.0.tgz", - "integrity": "sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q=", - "dev": true - }, - "node_modules/tiny-emitter": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/tiny-emitter/download/tiny-emitter-2.1.0.tgz", - "integrity": "sha1-HRpW7fxRxD6GPLtTgqcjMONVVCM=" - }, - "node_modules/to-arraybuffer": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/to-arraybuffer/download/to-arraybuffer-1.0.1.tgz", - "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=" - }, - "node_modules/to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/to-fast-properties/download/to-fast-properties-2.0.0.tgz?cache=0&sync_timestamp=1580550317222&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fto-fast-properties%2Fdownload%2Fto-fast-properties-2.0.0.tgz", - "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/to-object-path": { - "version": "0.3.0", - "resolved": "https://registry.npm.taobao.org/to-object-path/download/to-object-path-0.3.0.tgz", - "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/to-object-path/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npm.taobao.org/kind-of/download/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/to-regex": { - "version": "3.0.2", - "resolved": "https://registry.npm.taobao.org/to-regex/download/to-regex-3.0.2.tgz", - "integrity": "sha1-E8/dmzNlUvMLUfM6iuG0Knp1mc4=", - "dependencies": { - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "regex-not": "^1.0.2", - "safe-regex": "^1.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/to-regex-range": { - "version": "2.1.1", - "resolved": "https://registry.npm.taobao.org/to-regex-range/download/to-regex-range-2.1.1.tgz", - "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", - "dependencies": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/toidentifier": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/toidentifier/download/toidentifier-1.0.0.tgz", - "integrity": "sha1-fhvjRw8ed5SLxD2Uo8j013UrpVM=", - "dev": true, - "engines": { - "node": ">=0.6" - } - }, - "node_modules/toposort": { - "version": "1.0.7", - "resolved": "https://registry.npm.taobao.org/toposort/download/toposort-1.0.7.tgz?cache=0&sync_timestamp=1574984066913&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ftoposort%2Fdownload%2Ftoposort-1.0.7.tgz", - "integrity": "sha1-LmhELZ9k7HILjMieZEOsbKqVACk=", - "dev": true - }, - "node_modules/totalist": { - "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/totalist/download/totalist-1.1.0.tgz", - "integrity": "sha1-pNZaPlRlF3AePlw3pHpwrJf+Vt8=", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/tough-cookie": { - "version": "2.5.0", - "resolved": "https://registry.npm.taobao.org/tough-cookie/download/tough-cookie-2.5.0.tgz?cache=0&sync_timestamp=1584646121003&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ftough-cookie%2Fdownload%2Ftough-cookie-2.5.0.tgz", - "integrity": "sha1-zZ+yoKodWhK0c72fuW+j3P9lreI=", - "dev": true, - "dependencies": { - "psl": "^1.1.28", - "punycode": "^2.1.1" - }, - "engines": { - "node": ">=0.8" - } - }, - "node_modules/tryer": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/tryer/download/tryer-1.0.1.tgz", - "integrity": "sha1-8shUBoALmw90yfdGW4HqrSQSUvg=", - "dev": true - }, - "node_modules/ts-pnp": { - "version": "1.2.0", - "resolved": "https://registry.npm.taobao.org/ts-pnp/download/ts-pnp-1.2.0.tgz", - "integrity": "sha1-pQCtCEsHmPHDBxrzkeZZEshrypI=", - "dev": true, - "engines": { - "node": ">=6" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npm.taobao.org/tslib/download/tslib-1.14.1.tgz", - "integrity": "sha1-zy04vcNKE0vK8QkcQfZhni9nLQA=" - }, - "node_modules/tty-browserify": { - "version": "0.0.0", - "resolved": "https://registry.npm.taobao.org/tty-browserify/download/tty-browserify-0.0.0.tgz", - "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=" - }, - "node_modules/tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npm.taobao.org/tunnel-agent/download/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", - "dev": true, - "dependencies": { - "safe-buffer": "^5.0.1" - }, - "engines": { - "node": "*" - } - }, - "node_modules/tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npm.taobao.org/tweetnacl/download/tweetnacl-0.14.5.tgz?cache=0&sync_timestamp=1581364203962&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ftweetnacl%2Fdownload%2Ftweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", - "dev": true - }, - "node_modules/type-fest": { - "version": "0.6.0", - "resolved": "https://registry.npm.taobao.org/type-fest/download/type-fest-0.6.0.tgz?cache=0&sync_timestamp=1602623859603&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ftype-fest%2Fdownload%2Ftype-fest-0.6.0.tgz", - "integrity": "sha1-jSojcNPfiG61yQraHFv2GIrPg4s=", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/type-is": { - "version": "1.6.18", - "resolved": "https://registry.npm.taobao.org/type-is/download/type-is-1.6.18.tgz", - "integrity": "sha1-TlUs0F3wlGfcvE73Od6J8s83wTE=", - "dev": true, - "dependencies": { - "media-typer": "0.3.0", - "mime-types": "~2.1.24" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npm.taobao.org/typedarray/download/typedarray-0.0.6.tgz", - "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" - }, - "node_modules/uglify-js": { - "version": "3.4.10", - "resolved": "https://registry.npm.taobao.org/uglify-js/download/uglify-js-3.4.10.tgz?cache=0&sync_timestamp=1603670355885&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fuglify-js%2Fdownload%2Fuglify-js-3.4.10.tgz", - "integrity": "sha1-mtlWPY6zrN+404WX0q8dgV9qdV8=", - "dev": true, - "dependencies": { - "commander": "~2.19.0", - "source-map": "~0.6.1" - }, - "bin": { - "uglifyjs": "bin/uglifyjs" - }, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/uglify-js/node_modules/commander": { - "version": "2.19.0", - "resolved": "https://registry.npm.taobao.org/commander/download/commander-2.19.0.tgz?cache=0&sync_timestamp=1603599636161&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcommander%2Fdownload%2Fcommander-2.19.0.tgz", - "integrity": "sha1-9hmKqE5bg8RgVLlN3tv+1e6f8So=", - "dev": true - }, - "node_modules/uglify-js/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz?cache=0&sync_timestamp=1571657176668&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsource-map%2Fdownload%2Fsource-map-0.6.1.tgz", - "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/uglifyjs-webpack-plugin": { - "version": "2.2.0", - "resolved": "https://registry.npm.taobao.org/uglifyjs-webpack-plugin/download/uglifyjs-webpack-plugin-2.2.0.tgz", - "integrity": "sha1-51vIDn8ZN/cllUybTFoeln6p0Nc=", - "dev": true, - "dependencies": { - "cacache": "^12.0.2", - "find-cache-dir": "^2.1.0", - "is-wsl": "^1.1.0", - "schema-utils": "^1.0.0", - "serialize-javascript": "^1.7.0", - "source-map": "^0.6.1", - "uglify-js": "^3.6.0", - "webpack-sources": "^1.4.0", - "worker-farm": "^1.7.0" - }, - "engines": { - "node": ">= 6.9.0" - }, - "peerDependencies": { - "webpack": "^4.0.0" - } - }, - "node_modules/uglifyjs-webpack-plugin/node_modules/schema-utils": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/schema-utils/download/schema-utils-1.0.0.tgz", - "integrity": "sha1-C3mpMgTXtgDUsoUNH2bCo0lRx3A=", - "dev": true, - "dependencies": { - "ajv": "^6.1.0", - "ajv-errors": "^1.0.0", - "ajv-keywords": "^3.1.0" - }, - "engines": { - "node": ">= 4" - } - }, - "node_modules/uglifyjs-webpack-plugin/node_modules/serialize-javascript": { - "version": "1.9.1", - "resolved": "https://registry.npm.taobao.org/serialize-javascript/download/serialize-javascript-1.9.1.tgz?cache=0&sync_timestamp=1599740650381&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fserialize-javascript%2Fdownload%2Fserialize-javascript-1.9.1.tgz", - "integrity": "sha1-z8IArvd7YAxH2pu4FJyUPnmML9s=", - "dev": true - }, - "node_modules/uglifyjs-webpack-plugin/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz", - "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/uglifyjs-webpack-plugin/node_modules/uglify-js": { - "version": "3.13.3", - "resolved": "https://registry.npm.taobao.org/uglify-js/download/uglify-js-3.13.3.tgz?cache=0&sync_timestamp=1616975983207&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fuglify-js%2Fdownload%2Fuglify-js-3.13.3.tgz", - "integrity": "sha1-znKhrRVDSOoq9h9Qkzx2zIgCJ24=", - "dev": true, - "bin": { - "uglifyjs": "bin/uglifyjs" - }, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/unicode-canonical-property-names-ecmascript": { - "version": "1.0.4", - "resolved": "https://registry.npm.taobao.org/unicode-canonical-property-names-ecmascript/download/unicode-canonical-property-names-ecmascript-1.0.4.tgz", - "integrity": "sha1-JhmADEyCWADv3YNDr33Zkzy+KBg=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/unicode-match-property-ecmascript": { - "version": "1.0.4", - "resolved": "https://registry.npm.taobao.org/unicode-match-property-ecmascript/download/unicode-match-property-ecmascript-1.0.4.tgz", - "integrity": "sha1-jtKjJWmWG86SJ9Cc0/+7j+1fAgw=", - "dev": true, - "dependencies": { - "unicode-canonical-property-names-ecmascript": "^1.0.4", - "unicode-property-aliases-ecmascript": "^1.0.4" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/unicode-match-property-value-ecmascript": { - "version": "1.2.0", - "resolved": "https://registry.npm.taobao.org/unicode-match-property-value-ecmascript/download/unicode-match-property-value-ecmascript-1.2.0.tgz", - "integrity": "sha1-DZH2AO7rMJaqlisdb8iIduZOpTE=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/unicode-property-aliases-ecmascript": { - "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/unicode-property-aliases-ecmascript/download/unicode-property-aliases-ecmascript-1.1.0.tgz?cache=0&sync_timestamp=1583945910569&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Funicode-property-aliases-ecmascript%2Fdownload%2Funicode-property-aliases-ecmascript-1.1.0.tgz", - "integrity": "sha1-3Vepn2IHvt/0Yoq++5TFDblByPQ=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/union-value": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/union-value/download/union-value-1.0.1.tgz", - "integrity": "sha1-C2/nuDWuzaYcbqTU8CwUIh4QmEc=", - "dependencies": { - "arr-union": "^3.1.0", - "get-value": "^2.0.6", - "is-extendable": "^0.1.1", - "set-value": "^2.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/uniq": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/uniq/download/uniq-1.0.1.tgz", - "integrity": "sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=", - "dev": true - }, - "node_modules/uniqs": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/uniqs/download/uniqs-2.0.0.tgz", - "integrity": "sha1-/+3ks2slKQaW5uFl1KWe25mOawI=", - "dev": true - }, - "node_modules/unique-filename": { - "version": "1.1.1", - "resolved": "https://registry.npm.taobao.org/unique-filename/download/unique-filename-1.1.1.tgz", - "integrity": "sha1-HWl2k2mtoFgxA6HmrodoG1ZXMjA=", - "dependencies": { - "unique-slug": "^2.0.0" - } - }, - "node_modules/unique-slug": { - "version": "2.0.2", - "resolved": "https://registry.npm.taobao.org/unique-slug/download/unique-slug-2.0.2.tgz", - "integrity": "sha1-uqvOkQg/xk6UWw861hPiZPfNTmw=", - "dependencies": { - "imurmurhash": "^0.1.4" - } - }, - "node_modules/universalify": { - "version": "0.1.2", - "resolved": "https://registry.npm.taobao.org/universalify/download/universalify-0.1.2.tgz?cache=0&sync_timestamp=1603179967633&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Funiversalify%2Fdownload%2Funiversalify-0.1.2.tgz", - "integrity": "sha1-tkb2m+OULavOzJ1mOcgNwQXvqmY=", - "dev": true, - "engines": { - "node": ">= 4.0.0" - } - }, - "node_modules/unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/unpipe/download/unpipe-1.0.0.tgz", - "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/unquote": { - "version": "1.1.1", - "resolved": "https://registry.npm.taobao.org/unquote/download/unquote-1.1.1.tgz", - "integrity": "sha1-j97XMk7G6IoP+LkF58CYzcCG1UQ=", - "dev": true - }, - "node_modules/unset-value": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/unset-value/download/unset-value-1.0.0.tgz", - "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", - "dependencies": { - "has-value": "^0.3.1", - "isobject": "^3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/unset-value/node_modules/has-value": { - "version": "0.3.1", - "resolved": "https://registry.npm.taobao.org/has-value/download/has-value-0.3.1.tgz", - "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", - "dependencies": { - "get-value": "^2.0.3", - "has-values": "^0.1.4", - "isobject": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/unset-value/node_modules/has-value/node_modules/isobject": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/isobject/download/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "dependencies": { - "isarray": "1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/unset-value/node_modules/has-values": { - "version": "0.1.4", - "resolved": "https://registry.npm.taobao.org/has-values/download/has-values-0.1.4.tgz", - "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/upath": { - "version": "1.2.0", - "resolved": "https://registry.npm.taobao.org/upath/download/upath-1.2.0.tgz?cache=0&sync_timestamp=1602008334498&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fupath%2Fdownload%2Fupath-1.2.0.tgz", - "integrity": "sha1-j2bbzVWog6za5ECK+LA1pQRMGJQ=", - "devOptional": true, - "engines": { - "node": ">=4", - "yarn": "*" - } - }, - "node_modules/upper-case": { - "version": "1.1.3", - "resolved": "https://registry.npm.taobao.org/upper-case/download/upper-case-1.1.3.tgz", - "integrity": "sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg=", - "dev": true - }, - "node_modules/uri-js": { - "version": "4.4.0", - "resolved": "https://registry.npm.taobao.org/uri-js/download/uri-js-4.4.0.tgz", - "integrity": "sha1-qnFCYd55PoqCNHp7zJznTobyhgI=", - "dependencies": { - "punycode": "^2.1.0" - } - }, - "node_modules/urix": { - "version": "0.1.0", - "resolved": "https://registry.npm.taobao.org/urix/download/urix-0.1.0.tgz", - "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", - "deprecated": "Please see https://github.com/lydell/urix#deprecated" - }, - "node_modules/url": { - "version": "0.11.0", - "resolved": "https://registry.npm.taobao.org/url/download/url-0.11.0.tgz", - "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", - "dependencies": { - "punycode": "1.3.2", - "querystring": "0.2.0" - } - }, - "node_modules/url-loader": { - "version": "2.3.0", - "resolved": "https://registry.npm.taobao.org/url-loader/download/url-loader-2.3.0.tgz?cache=0&sync_timestamp=1602252626029&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Furl-loader%2Fdownload%2Furl-loader-2.3.0.tgz", - "integrity": "sha1-4OLvZY8APvuMpBsPP/v3a6uIZYs=", - "dev": true, - "dependencies": { - "loader-utils": "^1.2.3", - "mime": "^2.4.4", - "schema-utils": "^2.5.0" - }, - "engines": { - "node": ">= 8.9.0" - }, - "peerDependencies": { - "file-loader": "*", - "webpack": "^4.0.0" - }, - "peerDependenciesMeta": { - "file-loader": { - "optional": true - } - } - }, - "node_modules/url-parse": { - "version": "1.4.7", - "resolved": "https://registry.npm.taobao.org/url-parse/download/url-parse-1.4.7.tgz", - "integrity": "sha1-qKg1NejACjFuQDpdtKwbm4U64ng=", - "dev": true, - "dependencies": { - "querystringify": "^2.1.1", - "requires-port": "^1.0.0" - } - }, - "node_modules/url/node_modules/punycode": { - "version": "1.3.2", - "resolved": "https://registry.npm.taobao.org/punycode/download/punycode-1.3.2.tgz", - "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=" - }, - "node_modules/use": { - "version": "3.1.1", - "resolved": "https://registry.npm.taobao.org/use/download/use-3.1.1.tgz", - "integrity": "sha1-1QyMrHmhn7wg8pEfVuuXP04QBw8=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/util": { - "version": "0.11.1", - "resolved": "https://registry.npm.taobao.org/util/download/util-0.11.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Futil%2Fdownload%2Futil-0.11.1.tgz", - "integrity": "sha1-MjZzNyDsZLsn9uJvQhqqLhtYjWE=", - "dependencies": { - "inherits": "2.0.3" - } - }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/util-deprecate/download/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" - }, - "node_modules/util.promisify": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/util.promisify/download/util.promisify-1.0.1.tgz", - "integrity": "sha1-a693dLgO6w91INi4HQeYKlmruu4=", - "dev": true, - "dependencies": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.2", - "has-symbols": "^1.0.1", - "object.getownpropertydescriptors": "^2.1.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/util.promisify/node_modules/es-abstract": { - "version": "1.17.7", - "resolved": "https://registry.npm.taobao.org/es-abstract/download/es-abstract-1.17.7.tgz?cache=0&sync_timestamp=1601502719982&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fes-abstract%2Fdownload%2Fes-abstract-1.17.7.tgz", - "integrity": "sha1-pN5hsvZpifx0IWdsHLl4dXOs5Uw=", - "dev": true, - "dependencies": { - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.2.2", - "is-regex": "^1.1.1", - "object-inspect": "^1.8.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.1", - "string.prototype.trimend": "^1.0.1", - "string.prototype.trimstart": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/util/node_modules/inherits": { - "version": "2.0.3", - "resolved": "https://registry.npm.taobao.org/inherits/download/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" - }, - "node_modules/utila": { - "version": "0.4.0", - "resolved": "https://registry.npm.taobao.org/utila/download/utila-0.4.0.tgz", - "integrity": "sha1-ihagXURWV6Oupe7MWxKk+lN5dyw=", - "dev": true - }, - "node_modules/utils-merge": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/utils-merge/download/utils-merge-1.0.1.tgz", - "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=", - "dev": true, - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/uuid": { - "version": "3.4.0", - "resolved": "https://registry.npm.taobao.org/uuid/download/uuid-3.4.0.tgz", - "integrity": "sha1-sj5DWK+oogL+ehAK8fX4g/AgB+4=", - "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", - "dev": true, - "bin": { - "uuid": "bin/uuid" - } - }, - "node_modules/v-tooltip": { - "version": "2.1.3", - "resolved": "https://registry.npmmirror.com/v-tooltip/-/v-tooltip-2.1.3.tgz", - "integrity": "sha512-xXngyxLQTOx/yUEy50thb8te7Qo4XU6h4LZB6cvEfVd9mnysUxLEoYwGWDdqR+l69liKsy3IPkdYff3J1gAJ5w==", - "dependencies": { - "@babel/runtime": "^7.13.10", - "lodash": "^4.17.21", - "popper.js": "^1.16.1", - "vue-resize": "^1.0.1" - } - }, - "node_modules/validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npm.taobao.org/validate-npm-package-license/download/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha1-/JH2uce6FchX9MssXe/uw51PQQo=", - "dev": true, - "dependencies": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, - "node_modules/vary": { - "version": "1.1.2", - "resolved": "https://registry.npm.taobao.org/vary/download/vary-1.1.2.tgz", - "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/vendors": { - "version": "1.0.4", - "resolved": "https://registry.npm.taobao.org/vendors/download/vendors-1.0.4.tgz?cache=0&sync_timestamp=1579857147055&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fvendors%2Fdownload%2Fvendors-1.0.4.tgz", - "integrity": "sha1-4rgApT56Kbk1BsPPQRANFsTErY4=", - "dev": true, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/verror": { - "version": "1.10.0", - "resolved": "https://registry.npm.taobao.org/verror/download/verror-1.10.0.tgz", - "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", - "dev": true, - "engines": [ - "node >=0.6.0" - ], - "dependencies": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - } - }, - "node_modules/vm-browserify": { - "version": "1.1.2", - "resolved": "https://registry.npm.taobao.org/vm-browserify/download/vm-browserify-1.1.2.tgz?cache=0&sync_timestamp=1572870717730&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fvm-browserify%2Fdownload%2Fvm-browserify-1.1.2.tgz", - "integrity": "sha1-eGQcSIuObKkadfUR56OzKobl3aA=" - }, - "node_modules/vue": { - "version": "2.6.12", - "resolved": "https://registry.npm.taobao.org/vue/download/vue-2.6.12.tgz", - "integrity": "sha1-9evU+mvShpQD4pqJau1JBEVskSM=" - }, - "node_modules/vue-avatar": { - "version": "2.3.3", - "resolved": "https://registry.npm.taobao.org/vue-avatar/download/vue-avatar-2.3.3.tgz", - "integrity": "sha1-4SW/T0pvT5SA2gxSICAmaoYJ0qg=", - "engines": { - "node": ">= 4.0.0", - "npm": ">= 3.0.0" - } - }, - "node_modules/vue-calendar-heatmap": { - "version": "0.8.4", - "resolved": "https://registry.npmmirror.com/vue-calendar-heatmap/-/vue-calendar-heatmap-0.8.4.tgz", - "integrity": "sha512-Hx7OYBY1ghUIxKmFIIzpLT4XlcrwnI3WpadJEj/sKj5quoxwEuSDKmf94v0zWOHeQ/2CrB1G66geaKR/O56+OQ==", - "dependencies": { - "v-tooltip": "^2.0.0-rc.32" - } - }, - "node_modules/vue-clipboard2": { - "version": "0.3.1", - "resolved": "https://registry.npm.taobao.org/vue-clipboard2/download/vue-clipboard2-0.3.1.tgz", - "integrity": "sha1-blUft704SImyiw2jsSKJ7WvKSJQ=", - "dependencies": { - "clipboard": "^2.0.0" - } - }, - "node_modules/vue-codemirror-lite": { - "version": "1.0.4", - "resolved": "https://registry.npm.taobao.org/vue-codemirror-lite/download/vue-codemirror-lite-1.0.4.tgz", - "integrity": "sha1-SKXNfRfAkUUDyM2dm1a0OOScNBA=", - "dependencies": { - "codemirror": "^5.22.0" - } - }, - "node_modules/vue-cropper": { - "version": "0.5.5", - "resolved": "https://registry.npm.taobao.org/vue-cropper/download/vue-cropper-0.5.5.tgz", - "integrity": "sha1-m9G6Vjx/qiaKvVL7KvTGwo0zyWI=" - }, - "node_modules/vue-dompurify-html": { - "version": "2.5.0", - "resolved": "https://registry.npmmirror.com/vue-dompurify-html/-/vue-dompurify-html-2.5.0.tgz", - "integrity": "sha512-k2ejMJmsCsREGtJFDXNwqMvvek447id5ZAOU10jm2+cmsZHXgFIEdlwDam4cU4wh0iOZM+uDmkwbVJAJtmgeVQ==", - "dependencies": { - "dompurify": "^2.3.4" - }, - "peerDependencies": { - "vue": "^2.0.0" - } - }, - "node_modules/vue-echarts": { - "version": "5.0.0-beta.0", - "resolved": "https://registry.npm.taobao.org/vue-echarts/download/vue-echarts-5.0.0-beta.0.tgz", - "integrity": "sha1-Q43UsPxczqKBcJwffGMhsFNSvfQ=", - "dependencies": { - "core-js": "^3.4.4", - "lodash": "^4.17.15", - "resize-detector": "^0.1.10" - }, - "peerDependencies": { - "echarts": "^4.1.0", - "vue": "^2.4.0" - } - }, - "node_modules/vue-hot-reload-api": { - "version": "2.3.4", - "resolved": "https://registry.npm.taobao.org/vue-hot-reload-api/download/vue-hot-reload-api-2.3.4.tgz", - "integrity": "sha1-UylVzB6yCKPZkLOp+acFdGV+CPI=", - "dev": true - }, - "node_modules/vue-i18n": { - "version": "8.24.4", - "resolved": "https://registry.nlark.com/vue-i18n/download/vue-i18n-8.24.4.tgz", - "integrity": "sha1-sVhhTB332xg9nK3du3Ph1UAmlJI=" - }, - "node_modules/vue-katex-auto-render": { - "version": "0.1.3", - "resolved": "https://registry.npmmirror.com/vue-katex-auto-render/download/vue-katex-auto-render-0.1.3.tgz", - "integrity": "sha1-a2RYX9aiX6PDtwyxOiI6251CwZQ=", - "dependencies": { - "katex": "^0.11.1" - } - }, - "node_modules/vue-katex-auto-render/node_modules/katex": { - "version": "0.11.1", - "resolved": "https://registry.npmmirror.com/katex/download/katex-0.11.1.tgz", - "integrity": "sha512-5oANDICCTX0NqYIyAiFCCwjQ7ERu3DQG2JFHLbYOf+fXaMoH8eg/zOq5WSYJsKMi/QebW+Eh3gSM+oss1H/bww==", - "dependencies": { - "commander": "^2.19.0" - }, - "bin": { - "katex": "cli.js" - } - }, - "node_modules/vue-loader": { - "version": "15.9.4", - "resolved": "https://registry.npm.taobao.org/vue-loader/download/vue-loader-15.9.4.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fvue-loader%2Fdownload%2Fvue-loader-15.9.4.tgz", - "integrity": "sha1-wuzvihoIAqx2xtaGZBtd3lIq4mc=", - "dev": true, - "dependencies": { - "@vue/component-compiler-utils": "^3.1.0", - "hash-sum": "^1.0.2", - "loader-utils": "^1.1.0", - "vue-hot-reload-api": "^2.3.0", - "vue-style-loader": "^4.1.0" - }, - "peerDependencies": { - "css-loader": "*", - "webpack": "^3.0.0 || ^4.1.0 || ^5.0.0-0" - }, - "peerDependenciesMeta": { - "cache-loader": { - "optional": true - }, - "vue-template-compiler": { - "optional": true - } - } - }, - "node_modules/vue-loader/node_modules/hash-sum": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/hash-sum/download/hash-sum-1.0.2.tgz", - "integrity": "sha1-M7QHd3VMZDJXPBIMw4CLvRDUfwQ=", - "dev": true - }, - "node_modules/vue-m-message": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/vue-m-message/download/vue-m-message-3.0.0.tgz", - "integrity": "sha1-D93EdZEovPO0iolxDl4jZoH2xpA=" - }, - "node_modules/vue-monoplasty-slide-verify": { - "version": "1.1.3", - "resolved": "https://registry.npm.taobao.org/vue-monoplasty-slide-verify/download/vue-monoplasty-slide-verify-1.1.3.tgz", - "integrity": "sha1-cKOlaeMuwO2VthHWdUv1I8JJmjw=", - "dependencies": { - "vue": "^2.5.11" - }, - "engines": { - "node": ">= 6.0.0", - "npm": ">= 3.0.0" - } - }, - "node_modules/vue-particles": { - "version": "1.0.9", - "resolved": "https://registry.npm.taobao.org/vue-particles/download/vue-particles-1.0.9.tgz", - "integrity": "sha1-KdnMK+AVffHAqH7DuWyW8zJ5Um4=", - "dependencies": { - "particles.js": "^2.0.0", - "vue": "^2.2.6" - }, - "engines": { - "node": ">= 4.0.0", - "npm": ">= 3.0.0" - } - }, - "node_modules/vue-resize": { - "version": "1.0.1", - "resolved": "https://registry.npmmirror.com/vue-resize/-/vue-resize-1.0.1.tgz", - "integrity": "sha512-z5M7lJs0QluJnaoMFTIeGx6dIkYxOwHThlZDeQnWZBizKblb99GSejPnK37ZbNE/rVwDcYcHY+Io+AxdpY952w==", - "dependencies": { - "@babel/runtime": "^7.13.10" - }, - "peerDependencies": { - "vue": "^2.6.0" - } - }, - "node_modules/vue-router": { - "version": "3.4.8", - "resolved": "https://registry.npm.taobao.org/vue-router/download/vue-router-3.4.8.tgz?cache=0&sync_timestamp=1603710629657&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fvue-router%2Fdownload%2Fvue-router-3.4.8.tgz", - "integrity": "sha1-LAYmHTXYB1iTRwNS1C1wtih7gZQ=" - }, - "node_modules/vue-style-loader": { - "version": "4.1.2", - "resolved": "https://registry.npm.taobao.org/vue-style-loader/download/vue-style-loader-4.1.2.tgz", - "integrity": "sha1-3t80mAbyXOtOZPOtfApE+6c1/Pg=", - "dev": true, - "dependencies": { - "hash-sum": "^1.0.2", - "loader-utils": "^1.0.2" - } - }, - "node_modules/vue-style-loader/node_modules/hash-sum": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/hash-sum/download/hash-sum-1.0.2.tgz", - "integrity": "sha1-M7QHd3VMZDJXPBIMw4CLvRDUfwQ=", - "dev": true - }, - "node_modules/vue-template-compiler": { - "version": "2.6.12", - "resolved": "https://registry.npm.taobao.org/vue-template-compiler/download/vue-template-compiler-2.6.12.tgz?cache=0&sync_timestamp=1597927407682&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fvue-template-compiler%2Fdownload%2Fvue-template-compiler-2.6.12.tgz", - "integrity": "sha1-lH7XGWdEyKUoXr4SM/6WBDf8xX4=", - "dependencies": { - "de-indent": "^1.0.2", - "he": "^1.1.0" - } - }, - "node_modules/vue-template-es2015-compiler": { - "version": "1.9.1", - "resolved": "https://registry.npm.taobao.org/vue-template-es2015-compiler/download/vue-template-es2015-compiler-1.9.1.tgz", - "integrity": "sha1-HuO8mhbsv1EYvjNLsV+cRvgvWCU=", - "dev": true - }, - "node_modules/vuex": { - "version": "3.5.1", - "resolved": "https://registry.npm.taobao.org/vuex/download/vuex-3.5.1.tgz", - "integrity": "sha1-8bjc6mSbwlJUz09DWAgdv12hiz0=", - "peerDependencies": { - "vue": "^2.0.0" - } - }, - "node_modules/vuex-router-sync": { - "version": "5.0.0", - "resolved": "https://registry.npm.taobao.org/vuex-router-sync/download/vuex-router-sync-5.0.0.tgz", - "integrity": "sha1-GiJcF6Hdni90rwobLGIHLpSSswU=", - "peerDependencies": { - "vue-router": "^3.0.0", - "vuex": "^3.0.0" - } - }, - "node_modules/vxe-table": { - "version": "2.9.26", - "resolved": "https://registry.npm.taobao.org/vxe-table/download/vxe-table-2.9.26.tgz", - "integrity": "sha1-0Ox2z/Mp1np4m6+Rl0yIprdq0Yo=", - "hasInstallScript": true, - "peerDependencies": { - "vue": ">= 2.6.0 < 3", - "xe-utils": ">= 2.7.10 < 3" - } - }, - "node_modules/watchpack": { - "version": "1.7.4", - "resolved": "https://registry.npm.taobao.org/watchpack/download/watchpack-1.7.4.tgz?cache=0&sync_timestamp=1600385568268&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fwatchpack%2Fdownload%2Fwatchpack-1.7.4.tgz", - "integrity": "sha1-bp2lOzyAuy1lCBiPWyAEEIZs0ws=", - "dependencies": { - "graceful-fs": "^4.1.2", - "neo-async": "^2.5.0" - }, - "optionalDependencies": { - "chokidar": "^3.4.1", - "watchpack-chokidar2": "^2.0.0" - } - }, - "node_modules/watchpack-chokidar2": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/watchpack-chokidar2/download/watchpack-chokidar2-2.0.0.tgz", - "integrity": "sha1-mUihhmy71suCTeoTp+1pH2yN3/A=", - "optional": true, - "dependencies": { - "chokidar": "^2.1.8" - }, - "engines": { - "node": "<8.10.0" - } - }, - "node_modules/watchpack-chokidar2/node_modules/anymatch": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/anymatch/download/anymatch-2.0.0.tgz", - "integrity": "sha1-vLJLTzeTTZqnrBe0ra+J58du8us=", - "optional": true, - "dependencies": { - "micromatch": "^3.1.4", - "normalize-path": "^2.1.1" - } - }, - "node_modules/watchpack-chokidar2/node_modules/anymatch/node_modules/normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npm.taobao.org/normalize-path/download/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", - "optional": true, - "dependencies": { - "remove-trailing-separator": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/watchpack-chokidar2/node_modules/binary-extensions": { - "version": "1.13.1", - "resolved": "https://registry.npm.taobao.org/binary-extensions/download/binary-extensions-1.13.1.tgz", - "integrity": "sha1-WYr+VHVbKGilMw0q/51Ou1Mgm2U=", - "optional": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/watchpack-chokidar2/node_modules/chokidar": { - "version": "2.1.8", - "resolved": "https://registry.npm.taobao.org/chokidar/download/chokidar-2.1.8.tgz?cache=0&sync_timestamp=1602585381749&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fchokidar%2Fdownload%2Fchokidar-2.1.8.tgz", - "integrity": "sha1-gEs6e2qZNYw8XGHnHYco8EHP+Rc=", - "deprecated": "Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies", - "optional": true, - "dependencies": { - "anymatch": "^2.0.0", - "async-each": "^1.0.1", - "braces": "^2.3.2", - "glob-parent": "^3.1.0", - "inherits": "^2.0.3", - "is-binary-path": "^1.0.0", - "is-glob": "^4.0.0", - "normalize-path": "^3.0.0", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.2.1", - "upath": "^1.1.1" - }, - "optionalDependencies": { - "fsevents": "^1.2.7" - } - }, - "node_modules/watchpack-chokidar2/node_modules/fsevents": { - "version": "1.2.13", - "resolved": "https://registry.npm.taobao.org/fsevents/download/fsevents-1.2.13.tgz?cache=0&sync_timestamp=1588787369955&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffsevents%2Fdownload%2Ffsevents-1.2.13.tgz", - "integrity": "sha1-8yXLBFVZJCi88Rs4M3DvcOO/zDg=", - "deprecated": "fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.", - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "dependencies": { - "bindings": "^1.5.0", - "nan": "^2.12.1" - }, - "engines": { - "node": ">= 4.0" - } - }, - "node_modules/watchpack-chokidar2/node_modules/glob-parent": { - "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/glob-parent/download/glob-parent-3.1.0.tgz", - "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", - "optional": true, - "dependencies": { - "is-glob": "^3.1.0", - "path-dirname": "^1.0.0" - } - }, - "node_modules/watchpack-chokidar2/node_modules/glob-parent/node_modules/is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/is-glob/download/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "optional": true, - "dependencies": { - "is-extglob": "^2.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/watchpack-chokidar2/node_modules/is-binary-path": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/is-binary-path/download/is-binary-path-1.0.1.tgz", - "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", - "optional": true, - "dependencies": { - "binary-extensions": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/watchpack-chokidar2/node_modules/readdirp": { - "version": "2.2.1", - "resolved": "https://registry.npm.taobao.org/readdirp/download/readdirp-2.2.1.tgz?cache=0&sync_timestamp=1602584331621&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Freaddirp%2Fdownload%2Freaddirp-2.2.1.tgz", - "integrity": "sha1-DodiKjMlqjPokihcr4tOhGUppSU=", - "optional": true, - "dependencies": { - "graceful-fs": "^4.1.11", - "micromatch": "^3.1.10", - "readable-stream": "^2.0.2" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/wbuf": { - "version": "1.7.3", - "resolved": "https://registry.npm.taobao.org/wbuf/download/wbuf-1.7.3.tgz", - "integrity": "sha1-wdjRSTFtPqhShIiVy2oL/oh7h98=", - "dev": true, - "dependencies": { - "minimalistic-assert": "^1.0.0" - } - }, - "node_modules/wcwidth": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/wcwidth/download/wcwidth-1.0.1.tgz", - "integrity": "sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g=", - "dev": true, - "dependencies": { - "defaults": "^1.0.3" - } - }, - "node_modules/webpack": { - "version": "4.44.2", - "resolved": "https://registry.npm.taobao.org/webpack/download/webpack-4.44.2.tgz?cache=0&sync_timestamp=1603999440291&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fwebpack%2Fdownload%2Fwebpack-4.44.2.tgz", - "integrity": "sha1-a/4rCvBVyLLR6Q7SzZNj+EEma3I=", - "dependencies": { - "@webassemblyjs/ast": "1.9.0", - "@webassemblyjs/helper-module-context": "1.9.0", - "@webassemblyjs/wasm-edit": "1.9.0", - "@webassemblyjs/wasm-parser": "1.9.0", - "acorn": "^6.4.1", - "ajv": "^6.10.2", - "ajv-keywords": "^3.4.1", - "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^4.3.0", - "eslint-scope": "^4.0.3", - "json-parse-better-errors": "^1.0.2", - "loader-runner": "^2.4.0", - "loader-utils": "^1.2.3", - "memory-fs": "^0.4.1", - "micromatch": "^3.1.10", - "mkdirp": "^0.5.3", - "neo-async": "^2.6.1", - "node-libs-browser": "^2.2.1", - "schema-utils": "^1.0.0", - "tapable": "^1.1.3", - "terser-webpack-plugin": "^1.4.3", - "watchpack": "^1.7.4", - "webpack-sources": "^1.4.1" - }, - "bin": { - "webpack": "bin/webpack.js" - }, - "engines": { - "node": ">=6.11.5" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependenciesMeta": { - "webpack-cli": { - "optional": true - }, - "webpack-command": { - "optional": true - } - } - }, - "node_modules/webpack-bundle-analyzer": { - "version": "4.4.0", - "resolved": "https://registry.npm.taobao.org/webpack-bundle-analyzer/download/webpack-bundle-analyzer-4.4.0.tgz?cache=0&sync_timestamp=1611221513167&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fwebpack-bundle-analyzer%2Fdownload%2Fwebpack-bundle-analyzer-4.4.0.tgz", - "integrity": "sha1-dAExBufisHy9ZPOlroR/foFIAsc=", - "dev": true, - "dependencies": { - "acorn": "^8.0.4", - "acorn-walk": "^8.0.0", - "chalk": "^4.1.0", - "commander": "^6.2.0", - "gzip-size": "^6.0.0", - "lodash": "^4.17.20", - "opener": "^1.5.2", - "sirv": "^1.0.7", - "ws": "^7.3.1" - }, - "bin": { - "webpack-bundle-analyzer": "lib/bin/analyzer.js" - }, - "engines": { - "node": ">= 10.13.0" - } - }, - "node_modules/webpack-bundle-analyzer/node_modules/acorn": { - "version": "8.1.0", - "resolved": "https://registry.npm.taobao.org/acorn/download/acorn-8.1.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Facorn%2Fdownload%2Facorn-8.1.0.tgz", - "integrity": "sha1-UjEf1wN64RnLsTQwnpAapGKVs/4=", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/webpack-bundle-analyzer/node_modules/acorn-walk": { - "version": "8.0.2", - "resolved": "https://registry.npm.taobao.org/acorn-walk/download/acorn-walk-8.0.2.tgz?cache=0&sync_timestamp=1611560713023&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Facorn-walk%2Fdownload%2Facorn-walk-8.0.2.tgz", - "integrity": "sha1-1GMr/GP9k9DxX9BeoOmE/9P1qMM=", - "dev": true, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/webpack-bundle-analyzer/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npm.taobao.org/ansi-styles/download/ansi-styles-4.3.0.tgz?cache=0&sync_timestamp=1617175602652&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fansi-styles%2Fdownload%2Fansi-styles-4.3.0.tgz", - "integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/webpack-bundle-analyzer/node_modules/chalk": { - "version": "4.1.0", - "resolved": "https://registry.npm.taobao.org/chalk/download/chalk-4.1.0.tgz", - "integrity": "sha1-ThSHCmGNni7dl92DRf2dncMVZGo=", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/webpack-bundle-analyzer/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/color-convert/download/color-convert-2.0.1.tgz", - "integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/webpack-bundle-analyzer/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npm.taobao.org/color-name/download/color-name-1.1.4.tgz", - "integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=", - "dev": true - }, - "node_modules/webpack-bundle-analyzer/node_modules/commander": { - "version": "6.2.1", - "resolved": "https://registry.npm.taobao.org/commander/download/commander-6.2.1.tgz?cache=0&sync_timestamp=1616363849438&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcommander%2Fdownload%2Fcommander-6.2.1.tgz", - "integrity": "sha1-B5LraC37wyWZm7K4T93duhEKxzw=", - "dev": true, - "engines": { - "node": ">= 6" - } - }, - "node_modules/webpack-bundle-analyzer/node_modules/gzip-size": { - "version": "6.0.0", - "resolved": "https://registry.npm.taobao.org/gzip-size/download/gzip-size-6.0.0.tgz?cache=0&sync_timestamp=1605523244597&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fgzip-size%2Fdownload%2Fgzip-size-6.0.0.tgz", - "integrity": "sha1-BlNn/VDCOcBnHLy61b4+LusQ5GI=", - "dev": true, - "dependencies": { - "duplexer": "^0.1.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/webpack-bundle-analyzer/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/has-flag/download/has-flag-4.0.0.tgz", - "integrity": "sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/webpack-bundle-analyzer/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-7.2.0.tgz?cache=0&sync_timestamp=1611393963969&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsupports-color%2Fdownload%2Fsupports-color-7.2.0.tgz", - "integrity": "sha1-G33NyzK4E4gBs+R4umpRyqiWSNo=", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/webpack-bundle-analyzer/node_modules/ws": { - "version": "7.4.4", - "resolved": "https://registry.npm.taobao.org/ws/download/ws-7.4.4.tgz?cache=0&sync_timestamp=1615063746103&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fws%2Fdownload%2Fws-7.4.4.tgz", - "integrity": "sha1-ODvJdCyyAikskHfOq29gR7F/LVk=", - "dev": true, - "engines": { - "node": ">=8.3.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, - "node_modules/webpack-chain": { - "version": "6.5.1", - "resolved": "https://registry.npm.taobao.org/webpack-chain/download/webpack-chain-6.5.1.tgz?cache=0&sync_timestamp=1595814928534&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fwebpack-chain%2Fdownload%2Fwebpack-chain-6.5.1.tgz", - "integrity": "sha1-TycoTLu2N+PI+970Pu9YjU2GEgY=", - "dev": true, - "dependencies": { - "deepmerge": "^1.5.2", - "javascript-stringify": "^2.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/webpack-dev-middleware": { - "version": "3.7.2", - "resolved": "https://registry.npm.taobao.org/webpack-dev-middleware/download/webpack-dev-middleware-3.7.2.tgz?cache=0&sync_timestamp=1603894555091&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fwebpack-dev-middleware%2Fdownload%2Fwebpack-dev-middleware-3.7.2.tgz", - "integrity": "sha1-ABnD23FuP6XOy/ZPKriKdLqzMfM=", - "dev": true, - "dependencies": { - "memory-fs": "^0.4.1", - "mime": "^2.4.4", - "mkdirp": "^0.5.1", - "range-parser": "^1.2.1", - "webpack-log": "^2.0.0" - }, - "engines": { - "node": ">= 6" - }, - "peerDependencies": { - "webpack": "^4.0.0" - } - }, - "node_modules/webpack-dev-server": { - "version": "3.11.0", - "resolved": "https://registry.npm.taobao.org/webpack-dev-server/download/webpack-dev-server-3.11.0.tgz", - "integrity": "sha1-jxVKO84bz9HMYY705wMniFXn/4w=", - "dev": true, - "dependencies": { - "ansi-html": "0.0.7", - "bonjour": "^3.5.0", - "chokidar": "^2.1.8", - "compression": "^1.7.4", - "connect-history-api-fallback": "^1.6.0", - "debug": "^4.1.1", - "del": "^4.1.1", - "express": "^4.17.1", - "html-entities": "^1.3.1", - "http-proxy-middleware": "0.19.1", - "import-local": "^2.0.0", - "internal-ip": "^4.3.0", - "ip": "^1.1.5", - "is-absolute-url": "^3.0.3", - "killable": "^1.0.1", - "loglevel": "^1.6.8", - "opn": "^5.5.0", - "p-retry": "^3.0.1", - "portfinder": "^1.0.26", - "schema-utils": "^1.0.0", - "selfsigned": "^1.10.7", - "semver": "^6.3.0", - "serve-index": "^1.9.1", - "sockjs": "0.3.20", - "sockjs-client": "1.4.0", - "spdy": "^4.0.2", - "strip-ansi": "^3.0.1", - "supports-color": "^6.1.0", - "url": "^0.11.0", - "webpack-dev-middleware": "^3.7.2", - "webpack-log": "^2.0.0", - "ws": "^6.2.1", - "yargs": "^13.3.2" - }, - "bin": { - "webpack-dev-server": "bin/webpack-dev-server.js" - }, - "engines": { - "node": ">= 6.11.5" - }, - "peerDependencies": { - "webpack": "^4.0.0 || ^5.0.0" - }, - "peerDependenciesMeta": { - "webpack-cli": { - "optional": true - } - } - }, - "node_modules/webpack-dev-server/node_modules/ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npm.taobao.org/ansi-regex/download/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/webpack-dev-server/node_modules/anymatch": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/anymatch/download/anymatch-2.0.0.tgz", - "integrity": "sha1-vLJLTzeTTZqnrBe0ra+J58du8us=", - "dev": true, - "dependencies": { - "micromatch": "^3.1.4", - "normalize-path": "^2.1.1" - } - }, - "node_modules/webpack-dev-server/node_modules/anymatch/node_modules/normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npm.taobao.org/normalize-path/download/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", - "dev": true, - "dependencies": { - "remove-trailing-separator": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/webpack-dev-server/node_modules/binary-extensions": { - "version": "1.13.1", - "resolved": "https://registry.npm.taobao.org/binary-extensions/download/binary-extensions-1.13.1.tgz", - "integrity": "sha1-WYr+VHVbKGilMw0q/51Ou1Mgm2U=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/webpack-dev-server/node_modules/camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npm.taobao.org/camelcase/download/camelcase-5.3.1.tgz?cache=0&sync_timestamp=1603923709404&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcamelcase%2Fdownload%2Fcamelcase-5.3.1.tgz", - "integrity": "sha1-48mzFWnhBoEd8kL3FXJaH0xJQyA=", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/webpack-dev-server/node_modules/chokidar": { - "version": "2.1.8", - "resolved": "https://registry.npm.taobao.org/chokidar/download/chokidar-2.1.8.tgz?cache=0&sync_timestamp=1602585381749&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fchokidar%2Fdownload%2Fchokidar-2.1.8.tgz", - "integrity": "sha1-gEs6e2qZNYw8XGHnHYco8EHP+Rc=", - "deprecated": "Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies", - "dev": true, - "dependencies": { - "anymatch": "^2.0.0", - "async-each": "^1.0.1", - "braces": "^2.3.2", - "glob-parent": "^3.1.0", - "inherits": "^2.0.3", - "is-binary-path": "^1.0.0", - "is-glob": "^4.0.0", - "normalize-path": "^3.0.0", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.2.1", - "upath": "^1.1.1" - }, - "optionalDependencies": { - "fsevents": "^1.2.7" - } - }, - "node_modules/webpack-dev-server/node_modules/cliui": { - "version": "5.0.0", - "resolved": "https://registry.npm.taobao.org/cliui/download/cliui-5.0.0.tgz?cache=0&sync_timestamp=1602861367442&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcliui%2Fdownload%2Fcliui-5.0.0.tgz", - "integrity": "sha1-3u/P2y6AB4SqNPRvoI4GhRx7u8U=", - "dev": true, - "dependencies": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" - } - }, - "node_modules/webpack-dev-server/node_modules/cliui/node_modules/ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npm.taobao.org/ansi-regex/download/ansi-regex-4.1.0.tgz", - "integrity": "sha1-i5+PCM8ay4Q3Vqg5yox+MWjFGZc=", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/webpack-dev-server/node_modules/cliui/node_modules/strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npm.taobao.org/strip-ansi/download/strip-ansi-5.2.0.tgz?cache=0&sync_timestamp=1573280518303&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstrip-ansi%2Fdownload%2Fstrip-ansi-5.2.0.tgz", - "integrity": "sha1-jJpTb+tq/JYr36WxBKUJHBrZwK4=", - "dev": true, - "dependencies": { - "ansi-regex": "^4.1.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/webpack-dev-server/node_modules/emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npm.taobao.org/emoji-regex/download/emoji-regex-7.0.3.tgz?cache=0&sync_timestamp=1603212180491&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Femoji-regex%2Fdownload%2Femoji-regex-7.0.3.tgz", - "integrity": "sha1-kzoEBShgyF6DwSJHnEdIqOTHIVY=", - "dev": true - }, - "node_modules/webpack-dev-server/node_modules/fsevents": { - "version": "1.2.13", - "resolved": "https://registry.npm.taobao.org/fsevents/download/fsevents-1.2.13.tgz?cache=0&sync_timestamp=1588787369955&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffsevents%2Fdownload%2Ffsevents-1.2.13.tgz", - "integrity": "sha1-8yXLBFVZJCi88Rs4M3DvcOO/zDg=", - "deprecated": "fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.", - "dev": true, - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "dependencies": { - "bindings": "^1.5.0", - "nan": "^2.12.1" - }, - "engines": { - "node": ">= 4.0" - } - }, - "node_modules/webpack-dev-server/node_modules/glob-parent": { - "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/glob-parent/download/glob-parent-3.1.0.tgz", - "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", - "dev": true, - "dependencies": { - "is-glob": "^3.1.0", - "path-dirname": "^1.0.0" - } - }, - "node_modules/webpack-dev-server/node_modules/glob-parent/node_modules/is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/is-glob/download/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "dev": true, - "dependencies": { - "is-extglob": "^2.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/webpack-dev-server/node_modules/is-absolute-url": { - "version": "3.0.3", - "resolved": "https://registry.npm.taobao.org/is-absolute-url/download/is-absolute-url-3.0.3.tgz", - "integrity": "sha1-lsaiK2ojkpsR6gr7GDbDatSl1pg=", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/webpack-dev-server/node_modules/is-binary-path": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/is-binary-path/download/is-binary-path-1.0.1.tgz", - "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", - "dev": true, - "dependencies": { - "binary-extensions": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/webpack-dev-server/node_modules/readdirp": { - "version": "2.2.1", - "resolved": "https://registry.npm.taobao.org/readdirp/download/readdirp-2.2.1.tgz?cache=0&sync_timestamp=1602584331621&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Freaddirp%2Fdownload%2Freaddirp-2.2.1.tgz", - "integrity": "sha1-DodiKjMlqjPokihcr4tOhGUppSU=", - "dev": true, - "dependencies": { - "graceful-fs": "^4.1.11", - "micromatch": "^3.1.10", - "readable-stream": "^2.0.2" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/webpack-dev-server/node_modules/schema-utils": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/schema-utils/download/schema-utils-1.0.0.tgz", - "integrity": "sha1-C3mpMgTXtgDUsoUNH2bCo0lRx3A=", - "dev": true, - "dependencies": { - "ajv": "^6.1.0", - "ajv-errors": "^1.0.0", - "ajv-keywords": "^3.1.0" - }, - "engines": { - "node": ">= 4" - } - }, - "node_modules/webpack-dev-server/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npm.taobao.org/semver/download/semver-6.3.0.tgz", - "integrity": "sha1-7gpkyK9ejO6mdoexM3YeG+y9HT0=", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/webpack-dev-server/node_modules/string-width": { - "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/string-width/download/string-width-3.1.0.tgz", - "integrity": "sha1-InZ74htirxCBV0MG9prFG2IgOWE=", - "dev": true, - "dependencies": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/webpack-dev-server/node_modules/string-width/node_modules/ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npm.taobao.org/ansi-regex/download/ansi-regex-4.1.0.tgz", - "integrity": "sha1-i5+PCM8ay4Q3Vqg5yox+MWjFGZc=", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/webpack-dev-server/node_modules/string-width/node_modules/strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npm.taobao.org/strip-ansi/download/strip-ansi-5.2.0.tgz?cache=0&sync_timestamp=1573280518303&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstrip-ansi%2Fdownload%2Fstrip-ansi-5.2.0.tgz", - "integrity": "sha1-jJpTb+tq/JYr36WxBKUJHBrZwK4=", - "dev": true, - "dependencies": { - "ansi-regex": "^4.1.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/webpack-dev-server/node_modules/strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npm.taobao.org/strip-ansi/download/strip-ansi-3.0.1.tgz?cache=0&sync_timestamp=1573280518303&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstrip-ansi%2Fdownload%2Fstrip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, - "dependencies": { - "ansi-regex": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/webpack-dev-server/node_modules/supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-6.1.0.tgz?cache=0&sync_timestamp=1598611709087&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsupports-color%2Fdownload%2Fsupports-color-6.1.0.tgz", - "integrity": "sha1-B2Srxpxj1ayELdSGfo0CXogN+PM=", - "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/webpack-dev-server/node_modules/wrap-ansi": { - "version": "5.1.0", - "resolved": "https://registry.npm.taobao.org/wrap-ansi/download/wrap-ansi-5.1.0.tgz", - "integrity": "sha1-H9H2cjXVttD+54EFYAG/tpTAOwk=", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/webpack-dev-server/node_modules/wrap-ansi/node_modules/ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npm.taobao.org/ansi-regex/download/ansi-regex-4.1.0.tgz", - "integrity": "sha1-i5+PCM8ay4Q3Vqg5yox+MWjFGZc=", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/webpack-dev-server/node_modules/wrap-ansi/node_modules/strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npm.taobao.org/strip-ansi/download/strip-ansi-5.2.0.tgz?cache=0&sync_timestamp=1573280518303&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstrip-ansi%2Fdownload%2Fstrip-ansi-5.2.0.tgz", - "integrity": "sha1-jJpTb+tq/JYr36WxBKUJHBrZwK4=", - "dev": true, - "dependencies": { - "ansi-regex": "^4.1.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/webpack-dev-server/node_modules/yargs": { - "version": "13.3.2", - "resolved": "https://registry.npm.taobao.org/yargs/download/yargs-13.3.2.tgz?cache=0&sync_timestamp=1602805561021&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fyargs%2Fdownload%2Fyargs-13.3.2.tgz", - "integrity": "sha1-rX/+/sGqWVZayRX4Lcyzipwxot0=", - "dev": true, - "dependencies": { - "cliui": "^5.0.0", - "find-up": "^3.0.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^3.0.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^13.1.2" - } - }, - "node_modules/webpack-dev-server/node_modules/yargs-parser": { - "version": "13.1.2", - "resolved": "https://registry.npm.taobao.org/yargs-parser/download/yargs-parser-13.1.2.tgz?cache=0&sync_timestamp=1602861397132&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fyargs-parser%2Fdownload%2Fyargs-parser-13.1.2.tgz", - "integrity": "sha1-Ew8JcC667vJlDVTObj5XBvek+zg=", - "dev": true, - "dependencies": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } - }, - "node_modules/webpack-log": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/webpack-log/download/webpack-log-2.0.0.tgz", - "integrity": "sha1-W3ko4GN1k/EZ0y9iJ8HgrDHhtH8=", - "dev": true, - "dependencies": { - "ansi-colors": "^3.0.0", - "uuid": "^3.3.2" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/webpack-merge": { - "version": "4.2.2", - "resolved": "https://registry.npm.taobao.org/webpack-merge/download/webpack-merge-4.2.2.tgz?cache=0&sync_timestamp=1602063120051&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fwebpack-merge%2Fdownload%2Fwebpack-merge-4.2.2.tgz", - "integrity": "sha1-onxS6ng9E5iv0gh/VH17nS9DY00=", - "dev": true, - "dependencies": { - "lodash": "^4.17.15" - } - }, - "node_modules/webpack-sources": { - "version": "1.4.3", - "resolved": "https://registry.npm.taobao.org/webpack-sources/download/webpack-sources-1.4.3.tgz?cache=0&sync_timestamp=1603965311142&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fwebpack-sources%2Fdownload%2Fwebpack-sources-1.4.3.tgz", - "integrity": "sha1-7t2OwLko+/HL/plOItLYkPMwqTM=", - "dependencies": { - "source-list-map": "^2.0.0", - "source-map": "~0.6.1" - } - }, - "node_modules/webpack-sources/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz?cache=0&sync_timestamp=1571657176668&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsource-map%2Fdownload%2Fsource-map-0.6.1.tgz", - "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/webpack/node_modules/schema-utils": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/schema-utils/download/schema-utils-1.0.0.tgz", - "integrity": "sha1-C3mpMgTXtgDUsoUNH2bCo0lRx3A=", - "dependencies": { - "ajv": "^6.1.0", - "ajv-errors": "^1.0.0", - "ajv-keywords": "^3.1.0" - }, - "engines": { - "node": ">= 4" - } - }, - "node_modules/websocket-driver": { - "version": "0.6.5", - "resolved": "https://registry.npm.taobao.org/websocket-driver/download/websocket-driver-0.6.5.tgz?cache=0&sync_timestamp=1591288600527&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fwebsocket-driver%2Fdownload%2Fwebsocket-driver-0.6.5.tgz", - "integrity": "sha1-XLJVbOuF9Dc8bYI4qmkchFThOjY=", - "dev": true, - "dependencies": { - "websocket-extensions": ">=0.1.1" - }, - "engines": { - "node": ">=0.6.0" - } - }, - "node_modules/websocket-extensions": { - "version": "0.1.4", - "resolved": "https://registry.npm.taobao.org/websocket-extensions/download/websocket-extensions-0.1.4.tgz?cache=0&sync_timestamp=1591103014229&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fwebsocket-extensions%2Fdownload%2Fwebsocket-extensions-0.1.4.tgz", - "integrity": "sha1-f4RzvIOd/YdgituV1+sHUhFXikI=", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/which": { - "version": "1.3.1", - "resolved": "https://registry.npm.taobao.org/which/download/which-1.3.1.tgz?cache=0&sync_timestamp=1574116720213&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fwhich%2Fdownload%2Fwhich-1.3.1.tgz", - "integrity": "sha1-pFBD1U9YBTFtqNYvn1CRjT2nCwo=", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "which": "bin/which" - } - }, - "node_modules/which-module": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/which-module/download/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", - "dev": true - }, - "node_modules/worker-farm": { - "version": "1.7.0", - "resolved": "https://registry.npm.taobao.org/worker-farm/download/worker-farm-1.7.0.tgz", - "integrity": "sha1-JqlMU5G7ypJhUgAvabhKS/dy5ag=", - "dependencies": { - "errno": "~0.1.7" - } - }, - "node_modules/wrap-ansi": { - "version": "6.2.0", - "resolved": "https://registry.npm.taobao.org/wrap-ansi/download/wrap-ansi-6.2.0.tgz", - "integrity": "sha1-6Tk7oHEC5skaOyIUePAlfNKFblM=", - "dev": true, - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/wrap-ansi/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npm.taobao.org/ansi-styles/download/ansi-styles-4.3.0.tgz?cache=0&sync_timestamp=1601839122515&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fansi-styles%2Fdownload%2Fansi-styles-4.3.0.tgz", - "integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/wrap-ansi/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/color-convert/download/color-convert-2.0.1.tgz", - "integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/wrap-ansi/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npm.taobao.org/color-name/download/color-name-1.1.4.tgz", - "integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=", - "dev": true - }, - "node_modules/wrap-ansi/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/is-fullwidth-code-point/download/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha1-8Rb4Bk/pCz94RKOJl8C3UFEmnx0=", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/wrap-ansi/node_modules/string-width": { - "version": "4.2.0", - "resolved": "https://registry.npm.taobao.org/string-width/download/string-width-4.2.0.tgz", - "integrity": "sha1-lSGCxGzHssMT0VluYjmSvRY7crU=", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/wrappy/download/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" - }, - "node_modules/ws": { - "version": "6.2.1", - "resolved": "https://registry.npm.taobao.org/ws/download/ws-6.2.1.tgz?cache=0&sync_timestamp=1593925439808&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fws%2Fdownload%2Fws-6.2.1.tgz", - "integrity": "sha1-RC/fCkftZPWbal2P8TD0dI7VJPs=", - "dev": true, - "dependencies": { - "async-limiter": "~1.0.0" - } - }, - "node_modules/xe-utils": { - "version": "2.8.1", - "resolved": "https://registry.npm.taobao.org/xe-utils/download/xe-utils-2.8.1.tgz?cache=0&sync_timestamp=1604659233906&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fxe-utils%2Fdownload%2Fxe-utils-2.8.1.tgz", - "integrity": "sha1-PtUX1BdzGoKgGoyam6sk9JCb6IY=" - }, - "node_modules/xss": { - "version": "1.0.10", - "resolved": "https://registry.npmmirror.com/xss/-/xss-1.0.10.tgz", - "integrity": "sha512-qmoqrRksmzqSKvgqzN0055UFWY7OKx1/9JWeRswwEVX9fCG5jcYRxa/A2DHcmZX6VJvjzHRQ2STeeVcQkrmLSw==", - "dependencies": { - "commander": "^2.20.3", - "cssfilter": "0.0.10" - }, - "bin": { - "xss": "bin/xss" - }, - "engines": { - "node": ">= 0.10.0" - } - }, - "node_modules/xtend": { - "version": "4.0.2", - "resolved": "https://registry.npm.taobao.org/xtend/download/xtend-4.0.2.tgz", - "integrity": "sha1-u3J3n1+kZRhrH0OPZ0+jR/2121Q=", - "engines": { - "node": ">=0.4" - } - }, - "node_modules/y18n": { - "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/y18n/download/y18n-4.0.0.tgz?cache=0&sync_timestamp=1603637417853&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fy18n%2Fdownload%2Fy18n-4.0.0.tgz", - "integrity": "sha1-le+U+F7MgdAHwmThkKEg8KPIVms=" - }, - "node_modules/yallist": { - "version": "3.1.1", - "resolved": "https://registry.npm.taobao.org/yallist/download/yallist-3.1.1.tgz", - "integrity": "sha1-27fa+b/YusmrRev2ArjLrQ1dCP0=" - }, - "node_modules/yargs": { - "version": "15.4.1", - "resolved": "https://registry.npm.taobao.org/yargs/download/yargs-15.4.1.tgz?cache=0&sync_timestamp=1602805561021&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fyargs%2Fdownload%2Fyargs-15.4.1.tgz", - "integrity": "sha1-DYehbeAa7p2L7Cv7909nhRcw9Pg=", - "dev": true, - "dependencies": { - "cliui": "^6.0.0", - "decamelize": "^1.2.0", - "find-up": "^4.1.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^4.2.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^18.1.2" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/yargs-parser": { - "version": "18.1.3", - "resolved": "https://registry.npm.taobao.org/yargs-parser/download/yargs-parser-18.1.3.tgz?cache=0&sync_timestamp=1602861397132&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fyargs-parser%2Fdownload%2Fyargs-parser-18.1.3.tgz", - "integrity": "sha1-vmjEl1xrKr9GkjawyHA2L6sJp7A=", - "dev": true, - "dependencies": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/yargs-parser/node_modules/camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npm.taobao.org/camelcase/download/camelcase-5.3.1.tgz?cache=0&sync_timestamp=1603923709404&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcamelcase%2Fdownload%2Fcamelcase-5.3.1.tgz", - "integrity": "sha1-48mzFWnhBoEd8kL3FXJaH0xJQyA=", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/yargs/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npm.taobao.org/find-up/download/find-up-4.1.0.tgz?cache=0&sync_timestamp=1597169842138&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffind-up%2Fdownload%2Ffind-up-4.1.0.tgz", - "integrity": "sha1-l6/n1s3AvFkoWEt8jXsW6KmqXRk=", - "dev": true, - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/yargs/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/is-fullwidth-code-point/download/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha1-8Rb4Bk/pCz94RKOJl8C3UFEmnx0=", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/yargs/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npm.taobao.org/locate-path/download/locate-path-5.0.0.tgz", - "integrity": "sha1-Gvujlq/WdqbUJQTQpno6frn2KqA=", - "dev": true, - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/yargs/node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npm.taobao.org/p-locate/download/p-locate-4.1.0.tgz", - "integrity": "sha1-o0KLtwiLOmApL2aRkni3wpetTwc=", - "dev": true, - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/yargs/node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/path-exists/download/path-exists-4.0.0.tgz", - "integrity": "sha1-UTvb4tO5XXdi6METfvoZXGxhtbM=", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/yargs/node_modules/string-width": { - "version": "4.2.0", - "resolved": "https://registry.npm.taobao.org/string-width/download/string-width-4.2.0.tgz", - "integrity": "sha1-lSGCxGzHssMT0VluYjmSvRY7crU=", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/zrender": { - "version": "4.3.2", - "resolved": "https://registry.npm.taobao.org/zrender/download/zrender-4.3.2.tgz?cache=0&sync_timestamp=1605029444182&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fzrender%2Fdownload%2Fzrender-4.3.2.tgz", - "integrity": "sha1-7HQy+UFcgsc1hLa3uMR+GwFiCcY=" - } - }, - "dependencies": { - "@babel/code-frame": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/code-frame/download/@babel/code-frame-7.10.4.tgz?cache=0&sync_timestamp=1593529659031&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fcode-frame%2Fdownload%2F%40babel%2Fcode-frame-7.10.4.tgz", - "integrity": "sha1-Fo2ho26Q2miujUnA8bSMfGJJITo=", - "dev": true, - "requires": { - "@babel/highlight": "^7.10.4" - } - }, - "@babel/compat-data": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/compat-data/download/@babel/compat-data-7.12.1.tgz?cache=0&sync_timestamp=1602801772375&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fcompat-data%2Fdownload%2F%40babel%2Fcompat-data-7.12.1.tgz", - "integrity": "sha1-1zhqaJqg3fBiVQBbS5kZiAIRAaA=", - "dev": true - }, - "@babel/core": { - "version": "7.12.3", - "resolved": "https://registry.npm.taobao.org/@babel/core/download/@babel/core-7.12.3.tgz?cache=0&sync_timestamp=1602881203345&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fcore%2Fdownload%2F%40babel%2Fcore-7.12.3.tgz", - "integrity": "sha1-G0NohOHjv/b7EyjcArIIdZ3pKtg=", - "dev": true, - "requires": { - "@babel/code-frame": "^7.10.4", - "@babel/generator": "^7.12.1", - "@babel/helper-module-transforms": "^7.12.1", - "@babel/helpers": "^7.12.1", - "@babel/parser": "^7.12.3", - "@babel/template": "^7.10.4", - "@babel/traverse": "^7.12.1", - "@babel/types": "^7.12.1", - "convert-source-map": "^1.7.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.1", - "json5": "^2.1.2", - "lodash": "^4.17.19", - "resolve": "^1.3.2", - "semver": "^5.4.1", - "source-map": "^0.5.0" - } - }, - "@babel/generator": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/generator/download/@babel/generator-7.12.1.tgz?cache=0&sync_timestamp=1602799917077&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fgenerator%2Fdownload%2F%40babel%2Fgenerator-7.12.1.tgz", - "integrity": "sha1-DXC+Mr2qA9fFHIWX3aduDfHxVGg=", - "dev": true, - "requires": { - "@babel/types": "^7.12.1", - "jsesc": "^2.5.1", - "source-map": "^0.5.0" - } - }, - "@babel/helper-annotate-as-pure": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/helper-annotate-as-pure/download/@babel/helper-annotate-as-pure-7.10.4.tgz", - "integrity": "sha1-W/DUlaP3V6w72ki1vzs7ownHK6M=", - "dev": true, - "requires": { - "@babel/types": "^7.10.4" - } - }, - "@babel/helper-builder-binary-assignment-operator-visitor": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/helper-builder-binary-assignment-operator-visitor/download/@babel/helper-builder-binary-assignment-operator-visitor-7.10.4.tgz", - "integrity": "sha1-uwt18xv5jL+f8UPBrleLhydK4aM=", - "dev": true, - "requires": { - "@babel/helper-explode-assignable-expression": "^7.10.4", - "@babel/types": "^7.10.4" - } - }, - "@babel/helper-compilation-targets": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/helper-compilation-targets/download/@babel/helper-compilation-targets-7.12.1.tgz?cache=0&sync_timestamp=1602799917475&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fhelper-compilation-targets%2Fdownload%2F%40babel%2Fhelper-compilation-targets-7.12.1.tgz", - "integrity": "sha1-MQ41KIj7292Fd76N/dKvueetz1A=", - "dev": true, - "requires": { - "@babel/compat-data": "^7.12.1", - "@babel/helper-validator-option": "^7.12.1", - "browserslist": "^4.12.0", - "semver": "^5.5.0" - } - }, - "@babel/helper-create-class-features-plugin": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/helper-create-class-features-plugin/download/@babel/helper-create-class-features-plugin-7.12.1.tgz?cache=0&sync_timestamp=1602799938240&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fhelper-create-class-features-plugin%2Fdownload%2F%40babel%2Fhelper-create-class-features-plugin-7.12.1.tgz", - "integrity": "sha1-PEWZj0Me3UqSFMXx060USKYTf24=", - "dev": true, - "requires": { - "@babel/helper-function-name": "^7.10.4", - "@babel/helper-member-expression-to-functions": "^7.12.1", - "@babel/helper-optimise-call-expression": "^7.10.4", - "@babel/helper-replace-supers": "^7.12.1", - "@babel/helper-split-export-declaration": "^7.10.4" - } - }, - "@babel/helper-create-regexp-features-plugin": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/helper-create-regexp-features-plugin/download/@babel/helper-create-regexp-features-plugin-7.12.1.tgz?cache=0&sync_timestamp=1602799980691&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fhelper-create-regexp-features-plugin%2Fdownload%2F%40babel%2Fhelper-create-regexp-features-plugin-7.12.1.tgz", - "integrity": "sha1-GLEwLUZ3+dxHQP6MntlmgOKdN+g=", - "dev": true, - "requires": { - "@babel/helper-annotate-as-pure": "^7.10.4", - "@babel/helper-regex": "^7.10.4", - "regexpu-core": "^4.7.1" - } - }, - "@babel/helper-define-map": { - "version": "7.10.5", - "resolved": "https://registry.npm.taobao.org/@babel/helper-define-map/download/@babel/helper-define-map-7.10.5.tgz", - "integrity": "sha1-tTwQ23imQIABUmkrEzkxR6y5uzA=", - "dev": true, - "requires": { - "@babel/helper-function-name": "^7.10.4", - "@babel/types": "^7.10.5", - "lodash": "^4.17.19" - } - }, - "@babel/helper-explode-assignable-expression": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/helper-explode-assignable-expression/download/@babel/helper-explode-assignable-expression-7.12.1.tgz?cache=0&sync_timestamp=1602801819900&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fhelper-explode-assignable-expression%2Fdownload%2F%40babel%2Fhelper-explode-assignable-expression-7.12.1.tgz", - "integrity": "sha1-gAakZmlcSthqKl8vsVtfLDGtVjM=", - "dev": true, - "requires": { - "@babel/types": "^7.12.1" - } - }, - "@babel/helper-function-name": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/helper-function-name/download/@babel/helper-function-name-7.10.4.tgz", - "integrity": "sha1-0tOyDFmtjEcRL6fSqUvAnV74Lxo=", - "dev": true, - "requires": { - "@babel/helper-get-function-arity": "^7.10.4", - "@babel/template": "^7.10.4", - "@babel/types": "^7.10.4" - } - }, - "@babel/helper-get-function-arity": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/helper-get-function-arity/download/@babel/helper-get-function-arity-7.10.4.tgz", - "integrity": "sha1-mMHL6g4jMvM/mkZhuM4VBbLBm6I=", - "dev": true, - "requires": { - "@babel/types": "^7.10.4" - } - }, - "@babel/helper-hoist-variables": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/helper-hoist-variables/download/@babel/helper-hoist-variables-7.10.4.tgz", - "integrity": "sha1-1JsAHR1aaMpeZgTdoBpil/fJOB4=", - "dev": true, - "requires": { - "@babel/types": "^7.10.4" - } - }, - "@babel/helper-member-expression-to-functions": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/helper-member-expression-to-functions/download/@babel/helper-member-expression-to-functions-7.12.1.tgz", - "integrity": "sha1-+6Dy/P8/ugDm7LZku15uJuLWFlw=", - "dev": true, - "requires": { - "@babel/types": "^7.12.1" - } - }, - "@babel/helper-module-imports": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/helper-module-imports/download/@babel/helper-module-imports-7.12.1.tgz?cache=0&sync_timestamp=1602799917569&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fhelper-module-imports%2Fdownload%2F%40babel%2Fhelper-module-imports-7.12.1.tgz", - "integrity": "sha1-FkTAFZGhWi8ITdbQktlDDrHRIWw=", - "dev": true, - "requires": { - "@babel/types": "^7.12.1" - } - }, - "@babel/helper-module-transforms": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/helper-module-transforms/download/@babel/helper-module-transforms-7.12.1.tgz?cache=0&sync_timestamp=1602799922305&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fhelper-module-transforms%2Fdownload%2F%40babel%2Fhelper-module-transforms-7.12.1.tgz", - "integrity": "sha1-eVT+xx9bMsSOSzA7Q3w0RT/XJHw=", - "dev": true, - "requires": { - "@babel/helper-module-imports": "^7.12.1", - "@babel/helper-replace-supers": "^7.12.1", - "@babel/helper-simple-access": "^7.12.1", - "@babel/helper-split-export-declaration": "^7.11.0", - "@babel/helper-validator-identifier": "^7.10.4", - "@babel/template": "^7.10.4", - "@babel/traverse": "^7.12.1", - "@babel/types": "^7.12.1", - "lodash": "^4.17.19" - } - }, - "@babel/helper-optimise-call-expression": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/helper-optimise-call-expression/download/@babel/helper-optimise-call-expression-7.10.4.tgz", - "integrity": "sha1-UNyWQT1ZT5lad5BZBbBYk813lnM=", - "dev": true, - "requires": { - "@babel/types": "^7.10.4" - } - }, - "@babel/helper-plugin-utils": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/helper-plugin-utils/download/@babel/helper-plugin-utils-7.10.4.tgz", - "integrity": "sha1-L3WoMSadT2d95JmG3/WZJ1M883U=", - "dev": true - }, - "@babel/helper-regex": { - "version": "7.10.5", - "resolved": "https://registry.npm.taobao.org/@babel/helper-regex/download/@babel/helper-regex-7.10.5.tgz?cache=0&sync_timestamp=1594750677873&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fhelper-regex%2Fdownload%2F%40babel%2Fhelper-regex-7.10.5.tgz", - "integrity": "sha1-Mt+7eYmQc8QVVXBToZvQVarlCuA=", - "dev": true, - "requires": { - "lodash": "^4.17.19" - } - }, - "@babel/helper-remap-async-to-generator": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/helper-remap-async-to-generator/download/@babel/helper-remap-async-to-generator-7.12.1.tgz", - "integrity": "sha1-jE27+RYxT2BH3AXmoiFwdCODR/0=", - "dev": true, - "requires": { - "@babel/helper-annotate-as-pure": "^7.10.4", - "@babel/helper-wrap-function": "^7.10.4", - "@babel/types": "^7.12.1" - } - }, - "@babel/helper-replace-supers": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/helper-replace-supers/download/@babel/helper-replace-supers-7.12.1.tgz?cache=0&sync_timestamp=1602799937610&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fhelper-replace-supers%2Fdownload%2F%40babel%2Fhelper-replace-supers-7.12.1.tgz", - "integrity": "sha1-8VycyJdDkoGJHhHVzhJWKsDPP6k=", - "dev": true, - "requires": { - "@babel/helper-member-expression-to-functions": "^7.12.1", - "@babel/helper-optimise-call-expression": "^7.10.4", - "@babel/traverse": "^7.12.1", - "@babel/types": "^7.12.1" - } - }, - "@babel/helper-simple-access": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/helper-simple-access/download/@babel/helper-simple-access-7.12.1.tgz?cache=0&sync_timestamp=1602799955395&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fhelper-simple-access%2Fdownload%2F%40babel%2Fhelper-simple-access-7.12.1.tgz", - "integrity": "sha1-MkJ+WqYVR9OOsebq9f0UJv2tkTY=", - "dev": true, - "requires": { - "@babel/types": "^7.12.1" - } - }, - "@babel/helper-skip-transparent-expression-wrappers": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/helper-skip-transparent-expression-wrappers/download/@babel/helper-skip-transparent-expression-wrappers-7.12.1.tgz", - "integrity": "sha1-Ri3GOn5DWt6EaDhcY9K4TM5LPL8=", - "dev": true, - "requires": { - "@babel/types": "^7.12.1" - } - }, - "@babel/helper-split-export-declaration": { - "version": "7.11.0", - "resolved": "https://registry.npm.taobao.org/@babel/helper-split-export-declaration/download/@babel/helper-split-export-declaration-7.11.0.tgz", - "integrity": "sha1-+KSRJErPamdhWKxCBykRuoOtCZ8=", - "dev": true, - "requires": { - "@babel/types": "^7.11.0" - } - }, - "@babel/helper-validator-identifier": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/helper-validator-identifier/download/@babel/helper-validator-identifier-7.10.4.tgz", - "integrity": "sha1-p4x6clHgH2FlEtMbEK3PUq2l4NI=", - "dev": true - }, - "@babel/helper-validator-option": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/helper-validator-option/download/@babel/helper-validator-option-7.12.1.tgz?cache=0&sync_timestamp=1602801773085&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fhelper-validator-option%2Fdownload%2F%40babel%2Fhelper-validator-option-7.12.1.tgz", - "integrity": "sha1-F1VnOAw+d9YP+YpUuwFf548heNk=", - "dev": true - }, - "@babel/helper-wrap-function": { - "version": "7.12.3", - "resolved": "https://registry.npm.taobao.org/@babel/helper-wrap-function/download/@babel/helper-wrap-function-7.12.3.tgz?cache=0&sync_timestamp=1602881330831&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fhelper-wrap-function%2Fdownload%2F%40babel%2Fhelper-wrap-function-7.12.3.tgz", - "integrity": "sha1-MzIzn8TR+78cJ9eVjCfTRwjpkNk=", - "dev": true, - "requires": { - "@babel/helper-function-name": "^7.10.4", - "@babel/template": "^7.10.4", - "@babel/traverse": "^7.10.4", - "@babel/types": "^7.10.4" - } - }, - "@babel/helpers": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/helpers/download/@babel/helpers-7.12.1.tgz?cache=0&sync_timestamp=1602799921702&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fhelpers%2Fdownload%2F%40babel%2Fhelpers-7.12.1.tgz", - "integrity": "sha1-ioJhwdQ47BjLiQQ0307HaHNMHnk=", - "dev": true, - "requires": { - "@babel/template": "^7.10.4", - "@babel/traverse": "^7.12.1", - "@babel/types": "^7.12.1" - } - }, - "@babel/highlight": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/highlight/download/@babel/highlight-7.10.4.tgz", - "integrity": "sha1-fRvf1ldTU4+r5sOFls23bZrGAUM=", - "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.10.4", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - } - }, - "@babel/parser": { - "version": "7.12.3", - "resolved": "https://registry.npm.taobao.org/@babel/parser/download/@babel/parser-7.12.3.tgz?cache=0&sync_timestamp=1602881242014&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fparser%2Fdownload%2F%40babel%2Fparser-7.12.3.tgz", - "integrity": "sha1-owVBXr56bHAjtAtRIqBmLZKDNM0=", - "dev": true - }, - "@babel/plugin-proposal-async-generator-functions": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-proposal-async-generator-functions/download/@babel/plugin-proposal-async-generator-functions-7.12.1.tgz?cache=0&sync_timestamp=1602799957225&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-proposal-async-generator-functions%2Fdownload%2F%40babel%2Fplugin-proposal-async-generator-functions-7.12.1.tgz", - "integrity": "sha1-3GwRcOJ9isqZ/2X0klvQaxyQVQ4=", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4", - "@babel/helper-remap-async-to-generator": "^7.12.1", - "@babel/plugin-syntax-async-generators": "^7.8.0" - } - }, - "@babel/plugin-proposal-class-properties": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-proposal-class-properties/download/@babel/plugin-proposal-class-properties-7.12.1.tgz?cache=0&sync_timestamp=1602801742700&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-proposal-class-properties%2Fdownload%2F%40babel%2Fplugin-proposal-class-properties-7.12.1.tgz", - "integrity": "sha1-oIL/VB8qKaSCEGW4rdk0bAwW5d4=", - "dev": true, - "requires": { - "@babel/helper-create-class-features-plugin": "^7.12.1", - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-proposal-decorators": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-proposal-decorators/download/@babel/plugin-proposal-decorators-7.12.1.tgz", - "integrity": "sha1-WScUOf7UFFRWxBBnRQVDruMy0V8=", - "dev": true, - "requires": { - "@babel/helper-create-class-features-plugin": "^7.12.1", - "@babel/helper-plugin-utils": "^7.10.4", - "@babel/plugin-syntax-decorators": "^7.12.1" - } - }, - "@babel/plugin-proposal-dynamic-import": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-proposal-dynamic-import/download/@babel/plugin-proposal-dynamic-import-7.12.1.tgz?cache=0&sync_timestamp=1602801779067&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-proposal-dynamic-import%2Fdownload%2F%40babel%2Fplugin-proposal-dynamic-import-7.12.1.tgz", - "integrity": "sha1-Q+tcKjSH7NmMXI6otf22midJstw=", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4", - "@babel/plugin-syntax-dynamic-import": "^7.8.0" - } - }, - "@babel/plugin-proposal-export-namespace-from": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-proposal-export-namespace-from/download/@babel/plugin-proposal-export-namespace-from-7.12.1.tgz?cache=0&sync_timestamp=1602801775633&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-proposal-export-namespace-from%2Fdownload%2F%40babel%2Fplugin-proposal-export-namespace-from-7.12.1.tgz", - "integrity": "sha1-i5uPN2stiPXdd05NJKXMLjZ5ttQ=", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4", - "@babel/plugin-syntax-export-namespace-from": "^7.8.3" - } - }, - "@babel/plugin-proposal-json-strings": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-proposal-json-strings/download/@babel/plugin-proposal-json-strings-7.12.1.tgz?cache=0&sync_timestamp=1602801778453&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-proposal-json-strings%2Fdownload%2F%40babel%2Fplugin-proposal-json-strings-7.12.1.tgz", - "integrity": "sha1-1FQjtRdxTu3VYhqd/cA/qfTrJBw=", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4", - "@babel/plugin-syntax-json-strings": "^7.8.0" - } - }, - "@babel/plugin-proposal-logical-assignment-operators": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-proposal-logical-assignment-operators/download/@babel/plugin-proposal-logical-assignment-operators-7.12.1.tgz?cache=0&sync_timestamp=1602801777850&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-proposal-logical-assignment-operators%2Fdownload%2F%40babel%2Fplugin-proposal-logical-assignment-operators-7.12.1.tgz", - "integrity": "sha1-8sSQ024bPJZZJBA0pdLNUCY6J1E=", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4", - "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" - } - }, - "@babel/plugin-proposal-nullish-coalescing-operator": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-proposal-nullish-coalescing-operator/download/@babel/plugin-proposal-nullish-coalescing-operator-7.12.1.tgz?cache=0&sync_timestamp=1602801777104&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-proposal-nullish-coalescing-operator%2Fdownload%2F%40babel%2Fplugin-proposal-nullish-coalescing-operator-7.12.1.tgz", - "integrity": "sha1-PtT/8xwBXn8/FGfxkNvlRc17BGw=", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0" - } - }, - "@babel/plugin-proposal-numeric-separator": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-proposal-numeric-separator/download/@babel/plugin-proposal-numeric-separator-7.12.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-proposal-numeric-separator%2Fdownload%2F%40babel%2Fplugin-proposal-numeric-separator-7.12.1.tgz", - "integrity": "sha1-DixndMTOSL5BIRm01pOsd392haY=", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4", - "@babel/plugin-syntax-numeric-separator": "^7.10.4" - } - }, - "@babel/plugin-proposal-object-rest-spread": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-proposal-object-rest-spread/download/@babel/plugin-proposal-object-rest-spread-7.12.1.tgz?cache=0&sync_timestamp=1602799956368&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-proposal-object-rest-spread%2Fdownload%2F%40babel%2Fplugin-proposal-object-rest-spread-7.12.1.tgz", - "integrity": "sha1-3vm9A86g+bcig9rA7CLSicdpEGk=", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4", - "@babel/plugin-syntax-object-rest-spread": "^7.8.0", - "@babel/plugin-transform-parameters": "^7.12.1" - } - }, - "@babel/plugin-proposal-optional-catch-binding": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-proposal-optional-catch-binding/download/@babel/plugin-proposal-optional-catch-binding-7.12.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-proposal-optional-catch-binding%2Fdownload%2F%40babel%2Fplugin-proposal-optional-catch-binding-7.12.1.tgz", - "integrity": "sha1-zMJCGvZNOq5QtVinHO3pKaWrKUI=", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.0" - } - }, - "@babel/plugin-proposal-optional-chaining": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-proposal-optional-chaining/download/@babel/plugin-proposal-optional-chaining-7.12.1.tgz?cache=0&sync_timestamp=1602799957375&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-proposal-optional-chaining%2Fdownload%2F%40babel%2Fplugin-proposal-optional-chaining-7.12.1.tgz", - "integrity": "sha1-zOEiID/IoyeUKW/Dd8be2vQ2N5c=", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4", - "@babel/helper-skip-transparent-expression-wrappers": "^7.12.1", - "@babel/plugin-syntax-optional-chaining": "^7.8.0" - } - }, - "@babel/plugin-proposal-private-methods": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-proposal-private-methods/download/@babel/plugin-proposal-private-methods-7.12.1.tgz?cache=0&sync_timestamp=1602801864793&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-proposal-private-methods%2Fdownload%2F%40babel%2Fplugin-proposal-private-methods-7.12.1.tgz", - "integrity": "sha1-hoFPbnohN0yYDBDTi0ST5wP0o4k=", - "dev": true, - "requires": { - "@babel/helper-create-class-features-plugin": "^7.12.1", - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-proposal-unicode-property-regex": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-proposal-unicode-property-regex/download/@babel/plugin-proposal-unicode-property-regex-7.12.1.tgz?cache=0&sync_timestamp=1602799956486&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-proposal-unicode-property-regex%2Fdownload%2F%40babel%2Fplugin-proposal-unicode-property-regex-7.12.1.tgz", - "integrity": "sha1-Khg5WNQXdluerjNPR3WOXWqC4HI=", - "dev": true, - "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.12.1", - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-syntax-async-generators": { - "version": "7.8.4", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-syntax-async-generators/download/@babel/plugin-syntax-async-generators-7.8.4.tgz", - "integrity": "sha1-qYP7Gusuw/btBCohD2QOkOeG/g0=", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-class-properties": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-syntax-class-properties/download/@babel/plugin-syntax-class-properties-7.12.1.tgz?cache=0&sync_timestamp=1602801779713&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-syntax-class-properties%2Fdownload%2F%40babel%2Fplugin-syntax-class-properties-7.12.1.tgz", - "integrity": "sha1-vLKXxTZueb663vUJVJzZOwTxmXg=", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-syntax-decorators": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-syntax-decorators/download/@babel/plugin-syntax-decorators-7.12.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-syntax-decorators%2Fdownload%2F%40babel%2Fplugin-syntax-decorators-7.12.1.tgz", - "integrity": "sha1-gai1NbKER2xBvm3gaFOogCuYxd0=", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-syntax-dynamic-import": { - "version": "7.8.3", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-syntax-dynamic-import/download/@babel/plugin-syntax-dynamic-import-7.8.3.tgz", - "integrity": "sha1-Yr+Ysto80h1iYVT8lu5bPLaOrLM=", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-export-namespace-from": { - "version": "7.8.3", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-syntax-export-namespace-from/download/@babel/plugin-syntax-export-namespace-from-7.8.3.tgz", - "integrity": "sha1-AolkqbqA28CUyRXEh618TnpmRlo=", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.3" - } - }, - "@babel/plugin-syntax-json-strings": { - "version": "7.8.3", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-syntax-json-strings/download/@babel/plugin-syntax-json-strings-7.8.3.tgz", - "integrity": "sha1-AcohtmjNghjJ5kDLbdiMVBKyyWo=", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-jsx": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-syntax-jsx/download/@babel/plugin-syntax-jsx-7.12.1.tgz?cache=0&sync_timestamp=1602799927826&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-syntax-jsx%2Fdownload%2F%40babel%2Fplugin-syntax-jsx-7.12.1.tgz", - "integrity": "sha1-nZ01fMgYqnrnk1kXwSV/Z2d6CSY=", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-syntax-logical-assignment-operators": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-syntax-logical-assignment-operators/download/@babel/plugin-syntax-logical-assignment-operators-7.10.4.tgz", - "integrity": "sha1-ypHvRjA1MESLkGZSusLp/plB9pk=", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-syntax-nullish-coalescing-operator": { - "version": "7.8.3", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-syntax-nullish-coalescing-operator/download/@babel/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", - "integrity": "sha1-Fn7XA2iIYIH3S1w2xlqIwDtm0ak=", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-numeric-separator": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-syntax-numeric-separator/download/@babel/plugin-syntax-numeric-separator-7.10.4.tgz", - "integrity": "sha1-ubBws+M1cM2f0Hun+pHA3Te5r5c=", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-syntax-object-rest-spread": { - "version": "7.8.3", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-syntax-object-rest-spread/download/@babel/plugin-syntax-object-rest-spread-7.8.3.tgz", - "integrity": "sha1-YOIl7cvZimQDMqLnLdPmbxr1WHE=", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-optional-catch-binding": { - "version": "7.8.3", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-syntax-optional-catch-binding/download/@babel/plugin-syntax-optional-catch-binding-7.8.3.tgz", - "integrity": "sha1-YRGiZbz7Ag6579D9/X0mQCue1sE=", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-optional-chaining": { - "version": "7.8.3", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-syntax-optional-chaining/download/@babel/plugin-syntax-optional-chaining-7.8.3.tgz", - "integrity": "sha1-T2nCq5UWfgGAzVM2YT+MV4j31Io=", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-top-level-await": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-syntax-top-level-await/download/@babel/plugin-syntax-top-level-await-7.12.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-syntax-top-level-await%2Fdownload%2F%40babel%2Fplugin-syntax-top-level-await-7.12.1.tgz", - "integrity": "sha1-3WwLNXrBuxQtmFN0UKMZYl0T0qA=", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-transform-arrow-functions": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-arrow-functions/download/@babel/plugin-transform-arrow-functions-7.12.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-arrow-functions%2Fdownload%2F%40babel%2Fplugin-transform-arrow-functions-7.12.1.tgz", - "integrity": "sha1-gIP/yGrI53f74ktZZ8SyUh88srM=", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-transform-async-to-generator": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-async-to-generator/download/@babel/plugin-transform-async-to-generator-7.12.1.tgz?cache=0&sync_timestamp=1602799957601&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-async-to-generator%2Fdownload%2F%40babel%2Fplugin-transform-async-to-generator-7.12.1.tgz", - "integrity": "sha1-OEmknMKiLpdDy9a1KSbTAzcimvE=", - "dev": true, - "requires": { - "@babel/helper-module-imports": "^7.12.1", - "@babel/helper-plugin-utils": "^7.10.4", - "@babel/helper-remap-async-to-generator": "^7.12.1" - } - }, - "@babel/plugin-transform-block-scoped-functions": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-block-scoped-functions/download/@babel/plugin-transform-block-scoped-functions-7.12.1.tgz?cache=0&sync_timestamp=1602801921176&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-block-scoped-functions%2Fdownload%2F%40babel%2Fplugin-transform-block-scoped-functions-7.12.1.tgz", - "integrity": "sha1-8qGjZb3itxEuCm3tkGf918B5Bdk=", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-transform-block-scoping": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-block-scoping/download/@babel/plugin-transform-block-scoping-7.12.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-block-scoping%2Fdownload%2F%40babel%2Fplugin-transform-block-scoping-7.12.1.tgz", - "integrity": "sha1-8O5yeHS0KiCKSKWGuEw9IiwrvvE=", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-transform-classes": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-classes/download/@babel/plugin-transform-classes-7.12.1.tgz?cache=0&sync_timestamp=1602801866220&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-classes%2Fdownload%2F%40babel%2Fplugin-transform-classes-7.12.1.tgz", - "integrity": "sha1-ZeZQ/K3dPYjdzmfA+DSj1DajLbY=", - "dev": true, - "requires": { - "@babel/helper-annotate-as-pure": "^7.10.4", - "@babel/helper-define-map": "^7.10.4", - "@babel/helper-function-name": "^7.10.4", - "@babel/helper-optimise-call-expression": "^7.10.4", - "@babel/helper-plugin-utils": "^7.10.4", - "@babel/helper-replace-supers": "^7.12.1", - "@babel/helper-split-export-declaration": "^7.10.4", - "globals": "^11.1.0" - } - }, - "@babel/plugin-transform-computed-properties": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-computed-properties/download/@babel/plugin-transform-computed-properties-7.12.1.tgz?cache=0&sync_timestamp=1602801922882&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-computed-properties%2Fdownload%2F%40babel%2Fplugin-transform-computed-properties-7.12.1.tgz", - "integrity": "sha1-1oz2ybf4OKikFEutvpdUHqCQSFI=", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-transform-destructuring": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-destructuring/download/@babel/plugin-transform-destructuring-7.12.1.tgz?cache=0&sync_timestamp=1602801919435&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-destructuring%2Fdownload%2F%40babel%2Fplugin-transform-destructuring-7.12.1.tgz", - "integrity": "sha1-uaVw/g0KjUYBFkE8tPl+jgiy+Ec=", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-transform-dotall-regex": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-dotall-regex/download/@babel/plugin-transform-dotall-regex-7.12.1.tgz?cache=0&sync_timestamp=1602799956601&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-dotall-regex%2Fdownload%2F%40babel%2Fplugin-transform-dotall-regex-7.12.1.tgz", - "integrity": "sha1-odFsFIYoF7ZAnApnjW+Tc8qc2XU=", - "dev": true, - "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.12.1", - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-transform-duplicate-keys": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-duplicate-keys/download/@babel/plugin-transform-duplicate-keys-7.12.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-duplicate-keys%2Fdownload%2F%40babel%2Fplugin-transform-duplicate-keys-7.12.1.tgz", - "integrity": "sha1-dFZhuropWsBuaGgieXpp+6osoig=", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-transform-exponentiation-operator": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-exponentiation-operator/download/@babel/plugin-transform-exponentiation-operator-7.12.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-exponentiation-operator%2Fdownload%2F%40babel%2Fplugin-transform-exponentiation-operator-7.12.1.tgz", - "integrity": "sha1-sPLtNWuhvhQo7K8Sj/iiTwKDCuA=", - "dev": true, - "requires": { - "@babel/helper-builder-binary-assignment-operator-visitor": "^7.10.4", - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-transform-for-of": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-for-of/download/@babel/plugin-transform-for-of-7.12.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-for-of%2Fdownload%2F%40babel%2Fplugin-transform-for-of-7.12.1.tgz", - "integrity": "sha1-B2QPKIZ+0W+VEcmciIKR9WCSHPo=", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-transform-function-name": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-function-name/download/@babel/plugin-transform-function-name-7.12.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-function-name%2Fdownload%2F%40babel%2Fplugin-transform-function-name-7.12.1.tgz", - "integrity": "sha1-LsdiWMcP4IxtfaFUADpIBiDrpmc=", - "dev": true, - "requires": { - "@babel/helper-function-name": "^7.10.4", - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-transform-literals": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-literals/download/@babel/plugin-transform-literals-7.12.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-literals%2Fdownload%2F%40babel%2Fplugin-transform-literals-7.12.1.tgz", - "integrity": "sha1-1zuAOiazcBfd+dO7j03Fi/uAb1c=", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-transform-member-expression-literals": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-member-expression-literals/download/@babel/plugin-transform-member-expression-literals-7.12.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-member-expression-literals%2Fdownload%2F%40babel%2Fplugin-transform-member-expression-literals-7.12.1.tgz", - "integrity": "sha1-SWA4YC2vFRSmTUPY4Xy7J1Xgw60=", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-transform-modules-amd": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-modules-amd/download/@babel/plugin-transform-modules-amd-7.12.1.tgz?cache=0&sync_timestamp=1602801866519&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-modules-amd%2Fdownload%2F%40babel%2Fplugin-transform-modules-amd-7.12.1.tgz", - "integrity": "sha1-MVQwCwJhhWZu67DA7X+EFf789vk=", - "dev": true, - "requires": { - "@babel/helper-module-transforms": "^7.12.1", - "@babel/helper-plugin-utils": "^7.10.4", - "babel-plugin-dynamic-import-node": "^2.3.3" - } - }, - "@babel/plugin-transform-modules-commonjs": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-modules-commonjs/download/@babel/plugin-transform-modules-commonjs-7.12.1.tgz?cache=0&sync_timestamp=1602801780277&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-modules-commonjs%2Fdownload%2F%40babel%2Fplugin-transform-modules-commonjs-7.12.1.tgz", - "integrity": "sha1-+kAxJFQmNseGz5tGCg/7tIqG5kg=", - "dev": true, - "requires": { - "@babel/helper-module-transforms": "^7.12.1", - "@babel/helper-plugin-utils": "^7.10.4", - "@babel/helper-simple-access": "^7.12.1", - "babel-plugin-dynamic-import-node": "^2.3.3" - } - }, - "@babel/plugin-transform-modules-systemjs": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-modules-systemjs/download/@babel/plugin-transform-modules-systemjs-7.12.1.tgz?cache=0&sync_timestamp=1602799960092&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-modules-systemjs%2Fdownload%2F%40babel%2Fplugin-transform-modules-systemjs-7.12.1.tgz", - "integrity": "sha1-Zj/qYg1ZPJPyFKRkzTmb9txoMIY=", - "dev": true, - "requires": { - "@babel/helper-hoist-variables": "^7.10.4", - "@babel/helper-module-transforms": "^7.12.1", - "@babel/helper-plugin-utils": "^7.10.4", - "@babel/helper-validator-identifier": "^7.10.4", - "babel-plugin-dynamic-import-node": "^2.3.3" - } - }, - "@babel/plugin-transform-modules-umd": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-modules-umd/download/@babel/plugin-transform-modules-umd-7.12.1.tgz?cache=0&sync_timestamp=1602801867203&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-modules-umd%2Fdownload%2F%40babel%2Fplugin-transform-modules-umd-7.12.1.tgz", - "integrity": "sha1-61ohjWscaPPWIXuPosyC/sZUeQI=", - "dev": true, - "requires": { - "@babel/helper-module-transforms": "^7.12.1", - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-transform-named-capturing-groups-regex": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-named-capturing-groups-regex/download/@babel/plugin-transform-named-capturing-groups-regex-7.12.1.tgz?cache=0&sync_timestamp=1602799956689&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-named-capturing-groups-regex%2Fdownload%2F%40babel%2Fplugin-transform-named-capturing-groups-regex-7.12.1.tgz", - "integrity": "sha1-tAf1yWvg2fX4hGdJf6grMKw+h1M=", - "dev": true, - "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.12.1" - } - }, - "@babel/plugin-transform-new-target": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-new-target/download/@babel/plugin-transform-new-target-7.12.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-new-target%2Fdownload%2F%40babel%2Fplugin-transform-new-target-7.12.1.tgz", - "integrity": "sha1-gAc/Au4bstNlw0FkkOCFyVdZ3sA=", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-transform-object-super": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-object-super/download/@babel/plugin-transform-object-super-7.12.1.tgz?cache=0&sync_timestamp=1602799958437&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-object-super%2Fdownload%2F%40babel%2Fplugin-transform-object-super-7.12.1.tgz", - "integrity": "sha1-TqCGlrjS5lhB0MdwZIKwSL7RBm4=", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4", - "@babel/helper-replace-supers": "^7.12.1" - } - }, - "@babel/plugin-transform-parameters": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-parameters/download/@babel/plugin-transform-parameters-7.12.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-parameters%2Fdownload%2F%40babel%2Fplugin-transform-parameters-7.12.1.tgz", - "integrity": "sha1-0uljsDh3FlDJIu/1k3mclthTJV0=", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-transform-property-literals": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-property-literals/download/@babel/plugin-transform-property-literals-7.12.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-property-literals%2Fdownload%2F%40babel%2Fplugin-transform-property-literals-7.12.1.tgz", - "integrity": "sha1-QbyBIA1zCrtEVquLP71VN7Wa3s0=", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-transform-regenerator": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-regenerator/download/@babel/plugin-transform-regenerator-7.12.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-regenerator%2Fdownload%2F%40babel%2Fplugin-transform-regenerator-7.12.1.tgz", - "integrity": "sha1-Xwoo2EL2RiKB8GqWToi6jXq0l1M=", - "dev": true, - "requires": { - "regenerator-transform": "^0.14.2" - } - }, - "@babel/plugin-transform-reserved-words": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-reserved-words/download/@babel/plugin-transform-reserved-words-7.12.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-reserved-words%2Fdownload%2F%40babel%2Fplugin-transform-reserved-words-7.12.1.tgz", - "integrity": "sha1-b9/IzH7cxCs2p8EhiMZ4fIc63Ng=", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-transform-runtime": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-runtime/download/@babel/plugin-transform-runtime-7.12.1.tgz", - "integrity": "sha1-BLeSBX60YDif9qQZjjd2FOoee6U=", - "dev": true, - "requires": { - "@babel/helper-module-imports": "^7.12.1", - "@babel/helper-plugin-utils": "^7.10.4", - "resolve": "^1.8.1", - "semver": "^5.5.1" - } - }, - "@babel/plugin-transform-shorthand-properties": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-shorthand-properties/download/@babel/plugin-transform-shorthand-properties-7.12.1.tgz?cache=0&sync_timestamp=1602799951645&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-shorthand-properties%2Fdownload%2F%40babel%2Fplugin-transform-shorthand-properties-7.12.1.tgz", - "integrity": "sha1-C/nKxVUPzgz98ENCD2YdZF/cdeM=", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-transform-spread": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-spread/download/@babel/plugin-transform-spread-7.12.1.tgz?cache=0&sync_timestamp=1602799957708&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-spread%2Fdownload%2F%40babel%2Fplugin-transform-spread-7.12.1.tgz", - "integrity": "sha1-Un+fMRvk7H/cK3m7ife/iEs+Hh4=", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4", - "@babel/helper-skip-transparent-expression-wrappers": "^7.12.1" - } - }, - "@babel/plugin-transform-sticky-regex": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-sticky-regex/download/@babel/plugin-transform-sticky-regex-7.12.1.tgz?cache=0&sync_timestamp=1602799951745&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-sticky-regex%2Fdownload%2F%40babel%2Fplugin-transform-sticky-regex-7.12.1.tgz", - "integrity": "sha1-XCTPUN45bTDpmvyNHHAOi84PXK8=", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4", - "@babel/helper-regex": "^7.10.4" - } - }, - "@babel/plugin-transform-template-literals": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-template-literals/download/@babel/plugin-transform-template-literals-7.12.1.tgz?cache=0&sync_timestamp=1602799951964&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-template-literals%2Fdownload%2F%40babel%2Fplugin-transform-template-literals-7.12.1.tgz", - "integrity": "sha1-tD7ObtmnnAxxEZ9XbSme8J2UKEM=", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-transform-typeof-symbol": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-typeof-symbol/download/@babel/plugin-transform-typeof-symbol-7.12.1.tgz?cache=0&sync_timestamp=1602799953235&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-typeof-symbol%2Fdownload%2F%40babel%2Fplugin-transform-typeof-symbol-7.12.1.tgz", - "integrity": "sha1-nKa+ND1CUS+8LmgjaoKuZLx694o=", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-transform-unicode-escapes": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-unicode-escapes/download/@babel/plugin-transform-unicode-escapes-7.12.1.tgz?cache=0&sync_timestamp=1602799952036&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-unicode-escapes%2Fdownload%2F%40babel%2Fplugin-transform-unicode-escapes-7.12.1.tgz", - "integrity": "sha1-UjK5+BzLBwcLfDw2xnobePGEVwk=", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-transform-unicode-regex": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-unicode-regex/download/@babel/plugin-transform-unicode-regex-7.12.1.tgz?cache=0&sync_timestamp=1602799957036&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-unicode-regex%2Fdownload%2F%40babel%2Fplugin-transform-unicode-regex-7.12.1.tgz", - "integrity": "sha1-zJZh9hOQ21xl4/66zO/Vxqw/rss=", - "dev": true, - "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.12.1", - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/preset-env": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/preset-env/download/@babel/preset-env-7.12.1.tgz?cache=0&sync_timestamp=1602801753046&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fpreset-env%2Fdownload%2F%40babel%2Fpreset-env-7.12.1.tgz", - "integrity": "sha1-nH5cqCoZ78hlOEu0mJFI0u5desI=", - "dev": true, - "requires": { - "@babel/compat-data": "^7.12.1", - "@babel/helper-compilation-targets": "^7.12.1", - "@babel/helper-module-imports": "^7.12.1", - "@babel/helper-plugin-utils": "^7.10.4", - "@babel/helper-validator-option": "^7.12.1", - "@babel/plugin-proposal-async-generator-functions": "^7.12.1", - "@babel/plugin-proposal-class-properties": "^7.12.1", - "@babel/plugin-proposal-dynamic-import": "^7.12.1", - "@babel/plugin-proposal-export-namespace-from": "^7.12.1", - "@babel/plugin-proposal-json-strings": "^7.12.1", - "@babel/plugin-proposal-logical-assignment-operators": "^7.12.1", - "@babel/plugin-proposal-nullish-coalescing-operator": "^7.12.1", - "@babel/plugin-proposal-numeric-separator": "^7.12.1", - "@babel/plugin-proposal-object-rest-spread": "^7.12.1", - "@babel/plugin-proposal-optional-catch-binding": "^7.12.1", - "@babel/plugin-proposal-optional-chaining": "^7.12.1", - "@babel/plugin-proposal-private-methods": "^7.12.1", - "@babel/plugin-proposal-unicode-property-regex": "^7.12.1", - "@babel/plugin-syntax-async-generators": "^7.8.0", - "@babel/plugin-syntax-class-properties": "^7.12.1", - "@babel/plugin-syntax-dynamic-import": "^7.8.0", - "@babel/plugin-syntax-export-namespace-from": "^7.8.3", - "@babel/plugin-syntax-json-strings": "^7.8.0", - "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0", - "@babel/plugin-syntax-numeric-separator": "^7.10.4", - "@babel/plugin-syntax-object-rest-spread": "^7.8.0", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.0", - "@babel/plugin-syntax-optional-chaining": "^7.8.0", - "@babel/plugin-syntax-top-level-await": "^7.12.1", - "@babel/plugin-transform-arrow-functions": "^7.12.1", - "@babel/plugin-transform-async-to-generator": "^7.12.1", - "@babel/plugin-transform-block-scoped-functions": "^7.12.1", - "@babel/plugin-transform-block-scoping": "^7.12.1", - "@babel/plugin-transform-classes": "^7.12.1", - "@babel/plugin-transform-computed-properties": "^7.12.1", - "@babel/plugin-transform-destructuring": "^7.12.1", - "@babel/plugin-transform-dotall-regex": "^7.12.1", - "@babel/plugin-transform-duplicate-keys": "^7.12.1", - "@babel/plugin-transform-exponentiation-operator": "^7.12.1", - "@babel/plugin-transform-for-of": "^7.12.1", - "@babel/plugin-transform-function-name": "^7.12.1", - "@babel/plugin-transform-literals": "^7.12.1", - "@babel/plugin-transform-member-expression-literals": "^7.12.1", - "@babel/plugin-transform-modules-amd": "^7.12.1", - "@babel/plugin-transform-modules-commonjs": "^7.12.1", - "@babel/plugin-transform-modules-systemjs": "^7.12.1", - "@babel/plugin-transform-modules-umd": "^7.12.1", - "@babel/plugin-transform-named-capturing-groups-regex": "^7.12.1", - "@babel/plugin-transform-new-target": "^7.12.1", - "@babel/plugin-transform-object-super": "^7.12.1", - "@babel/plugin-transform-parameters": "^7.12.1", - "@babel/plugin-transform-property-literals": "^7.12.1", - "@babel/plugin-transform-regenerator": "^7.12.1", - "@babel/plugin-transform-reserved-words": "^7.12.1", - "@babel/plugin-transform-shorthand-properties": "^7.12.1", - "@babel/plugin-transform-spread": "^7.12.1", - "@babel/plugin-transform-sticky-regex": "^7.12.1", - "@babel/plugin-transform-template-literals": "^7.12.1", - "@babel/plugin-transform-typeof-symbol": "^7.12.1", - "@babel/plugin-transform-unicode-escapes": "^7.12.1", - "@babel/plugin-transform-unicode-regex": "^7.12.1", - "@babel/preset-modules": "^0.1.3", - "@babel/types": "^7.12.1", - "core-js-compat": "^3.6.2", - "semver": "^5.5.0" - } - }, - "@babel/preset-modules": { - "version": "0.1.4", - "resolved": "https://registry.npm.taobao.org/@babel/preset-modules/download/@babel/preset-modules-0.1.4.tgz?cache=0&sync_timestamp=1598549925898&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fpreset-modules%2Fdownload%2F%40babel%2Fpreset-modules-0.1.4.tgz", - "integrity": "sha1-Ni8raMZihClw/bXiVP/I/BwuQV4=", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-proposal-unicode-property-regex": "^7.4.4", - "@babel/plugin-transform-dotall-regex": "^7.4.4", - "@babel/types": "^7.4.4", - "esutils": "^2.0.2" - } - }, - "@babel/runtime": { - "version": "7.18.3", - "resolved": "https://registry.npmmirror.com/@babel/runtime/-/runtime-7.18.3.tgz", - "integrity": "sha512-38Y8f7YUhce/K7RMwTp7m0uCumpv9hZkitCbBClqQIow1qSbCvGkcegKOXpEWCQLfWmevgRiWokZ1GkpfhbZug==", - "requires": { - "regenerator-runtime": "^0.13.4" - } - }, - "@babel/template": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/template/download/@babel/template-7.10.4.tgz", - "integrity": "sha1-MlGZbEIA68cdGo/EBfupQPNrong=", - "dev": true, - "requires": { - "@babel/code-frame": "^7.10.4", - "@babel/parser": "^7.10.4", - "@babel/types": "^7.10.4" - } - }, - "@babel/traverse": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/traverse/download/@babel/traverse-7.12.1.tgz?cache=0&sync_timestamp=1602801751997&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Ftraverse%2Fdownload%2F%40babel%2Ftraverse-7.12.1.tgz", - "integrity": "sha1-lBOV4MXMhtXT51yqCV05JFJvDB4=", - "dev": true, - "requires": { - "@babel/code-frame": "^7.10.4", - "@babel/generator": "^7.12.1", - "@babel/helper-function-name": "^7.10.4", - "@babel/helper-split-export-declaration": "^7.11.0", - "@babel/parser": "^7.12.1", - "@babel/types": "^7.12.1", - "debug": "^4.1.0", - "globals": "^11.1.0", - "lodash": "^4.17.19" - } - }, - "@babel/types": { - "version": "7.12.1", - "resolved": "https://registry.npm.taobao.org/@babel/types/download/@babel/types-7.12.1.tgz?cache=0&sync_timestamp=1602799916513&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Ftypes%2Fdownload%2F%40babel%2Ftypes-7.12.1.tgz", - "integrity": "sha1-4QnZq5mo3nNb4ofuPWqZR6GQxK4=", - "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.10.4", - "lodash": "^4.17.19", - "to-fast-properties": "^2.0.0" - } - }, - "@hapi/address": { - "version": "2.1.4", - "resolved": "https://registry.npm.taobao.org/@hapi/address/download/@hapi/address-2.1.4.tgz?cache=0&sync_timestamp=1603524710662&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40hapi%2Faddress%2Fdownload%2F%40hapi%2Faddress-2.1.4.tgz", - "integrity": "sha1-XWftQ/P9QaadS5/3tW58DR0KgeU=", - "dev": true - }, - "@hapi/bourne": { - "version": "1.3.2", - "resolved": "https://registry.npm.taobao.org/@hapi/bourne/download/@hapi/bourne-1.3.2.tgz", - "integrity": "sha1-CnCVreoGckPOMoPhtWuKj0U7JCo=", - "dev": true - }, - "@hapi/hoek": { - "version": "8.5.1", - "resolved": "https://registry.npm.taobao.org/@hapi/hoek/download/@hapi/hoek-8.5.1.tgz?cache=0&sync_timestamp=1599008894201&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40hapi%2Fhoek%2Fdownload%2F%40hapi%2Fhoek-8.5.1.tgz", - "integrity": "sha1-/elgZMpEbeyMVajC8TCVewcMbgY=", - "dev": true - }, - "@hapi/joi": { - "version": "15.1.1", - "resolved": "https://registry.npm.taobao.org/@hapi/joi/download/@hapi/joi-15.1.1.tgz?cache=0&sync_timestamp=1603524515155&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40hapi%2Fjoi%2Fdownload%2F%40hapi%2Fjoi-15.1.1.tgz", - "integrity": "sha1-xnW4pxKW8Cgz+NbSQ7NMV7jOGdc=", - "dev": true, - "requires": { - "@hapi/address": "2.x.x", - "@hapi/bourne": "1.x.x", - "@hapi/hoek": "8.x.x", - "@hapi/topo": "3.x.x" - } - }, - "@hapi/topo": { - "version": "3.1.6", - "resolved": "https://registry.npm.taobao.org/@hapi/topo/download/@hapi/topo-3.1.6.tgz", - "integrity": "sha1-aNk1+j6uf91asNf5U/MgXYsr/Ck=", - "dev": true, - "requires": { - "@hapi/hoek": "^8.3.0" - } - }, - "@iktakahiro/markdown-it-katex": { - "version": "4.0.1", - "resolved": "https://registry.npm.taobao.org/@iktakahiro/markdown-it-katex/download/@iktakahiro/markdown-it-katex-4.0.1.tgz", - "integrity": "sha1-Zf+dEq/UwLdoTdJHq+fOQvwe2sM=", - "requires": { - "katex": "^0.12.0" - } - }, - "@intervolga/optimize-cssnano-plugin": { - "version": "1.0.6", - "resolved": "https://registry.npm.taobao.org/@intervolga/optimize-cssnano-plugin/download/@intervolga/optimize-cssnano-plugin-1.0.6.tgz", - "integrity": "sha1-vnx4RhKLiPapsdEmGgrQbrXA/fg=", - "dev": true, - "requires": { - "cssnano": "^4.0.0", - "cssnano-preset-default": "^4.0.0", - "postcss": "^7.0.0" - } - }, - "@mrmlnc/readdir-enhanced": { - "version": "2.2.1", - "resolved": "https://registry.npm.taobao.org/@mrmlnc/readdir-enhanced/download/@mrmlnc/readdir-enhanced-2.2.1.tgz", - "integrity": "sha1-UkryQNGjYFJ7cwR17PoTRKpUDd4=", - "dev": true, - "requires": { - "call-me-maybe": "^1.0.1", - "glob-to-regexp": "^0.3.0" - } - }, - "@nodelib/fs.stat": { - "version": "1.1.3", - "resolved": "https://registry.npm.taobao.org/@nodelib/fs.stat/download/@nodelib/fs.stat-1.1.3.tgz", - "integrity": "sha1-K1o6s/kYzKSKjHVMCBaOPwPrphs=", - "dev": true - }, - "@npmcli/move-file": { - "version": "1.1.2", - "resolved": "https://registry.npm.taobao.org/@npmcli/move-file/download/@npmcli/move-file-1.1.2.tgz?cache=0&sync_timestamp=1613068732526&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40npmcli%2Fmove-file%2Fdownload%2F%40npmcli%2Fmove-file-1.1.2.tgz", - "integrity": "sha1-GoLD43L3yuklPrZtclQ9a4aFxnQ=", - "requires": { - "mkdirp": "^1.0.4", - "rimraf": "^3.0.2" - }, - "dependencies": { - "mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npm.taobao.org/mkdirp/download/mkdirp-1.0.4.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmkdirp%2Fdownload%2Fmkdirp-1.0.4.tgz", - "integrity": "sha1-PrXtYmInVteaXw4qIh3+utdcL34=" - }, - "rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npm.taobao.org/rimraf/download/rimraf-3.0.2.tgz?cache=0&sync_timestamp=1599054104695&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Frimraf%2Fdownload%2Frimraf-3.0.2.tgz", - "integrity": "sha1-8aVAK6YiCtUswSgrrBrjqkn9Bho=", - "requires": { - "glob": "^7.1.3" - } - } - } - }, - "@polka/url": { - "version": "1.0.0-next.12", - "resolved": "https://registry.npm.taobao.org/@polka/url/download/@polka/url-1.0.0-next.12.tgz", - "integrity": "sha1-Qx7DQqcZViL4Zoi72oLjFmzoyyg=", - "dev": true - }, - "@soda/friendly-errors-webpack-plugin": { - "version": "1.7.1", - "resolved": "https://registry.npm.taobao.org/@soda/friendly-errors-webpack-plugin/download/@soda/friendly-errors-webpack-plugin-1.7.1.tgz", - "integrity": "sha1-cG9kvLSouWQrSK46zkRMcDNNYV0=", - "dev": true, - "requires": { - "chalk": "^1.1.3", - "error-stack-parser": "^2.0.0", - "string-width": "^2.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npm.taobao.org/ansi-regex/download/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - }, - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npm.taobao.org/ansi-styles/download/ansi-styles-2.2.1.tgz?cache=0&sync_timestamp=1601839122515&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fansi-styles%2Fdownload%2Fansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npm.taobao.org/chalk/download/chalk-1.1.3.tgz?cache=0&sync_timestamp=1591687070184&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fchalk%2Fdownload%2Fchalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npm.taobao.org/strip-ansi/download/strip-ansi-3.0.1.tgz?cache=0&sync_timestamp=1573280518303&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstrip-ansi%2Fdownload%2Fstrip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-2.0.0.tgz?cache=0&sync_timestamp=1598611709087&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsupports-color%2Fdownload%2Fsupports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true - } - } - }, - "@soda/get-current-script": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/@soda/get-current-script/download/@soda/get-current-script-1.0.2.tgz", - "integrity": "sha1-pTUV2yXYA4N0OBtzryC7Ty5QjYc=", - "dev": true - }, - "@types/anymatch": { - "version": "1.3.1", - "resolved": "https://registry.npm.taobao.org/@types/anymatch/download/@types/anymatch-1.3.1.tgz", - "integrity": "sha1-M2utwb7sudrMOL6izzKt9ieoQho=", - "dev": true - }, - "@types/body-parser": { - "version": "1.19.0", - "resolved": "https://registry.npm.taobao.org/@types/body-parser/download/@types/body-parser-1.19.0.tgz", - "integrity": "sha1-BoWzxH6zAG/+0RfN1VFkth+AU48=", - "dev": true, - "requires": { - "@types/connect": "*", - "@types/node": "*" - } - }, - "@types/connect": { - "version": "3.4.33", - "resolved": "https://registry.npm.taobao.org/@types/connect/download/@types/connect-3.4.33.tgz?cache=0&sync_timestamp=1596837850490&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fconnect%2Fdownload%2F%40types%2Fconnect-3.4.33.tgz", - "integrity": "sha1-MWEMkB7KVzuHE8MzCrxua59YhUY=", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "@types/connect-history-api-fallback": { - "version": "1.3.3", - "resolved": "https://registry.npm.taobao.org/@types/connect-history-api-fallback/download/@types/connect-history-api-fallback-1.3.3.tgz", - "integrity": "sha1-R3K3m4tTGF8PTJ3qsJI2uvdu47Q=", - "dev": true, - "requires": { - "@types/express-serve-static-core": "*", - "@types/node": "*" - } - }, - "@types/express": { - "version": "4.17.8", - "resolved": "https://registry.npm.taobao.org/@types/express/download/@types/express-4.17.8.tgz?cache=0&sync_timestamp=1598966318122&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fexpress%2Fdownload%2F%40types%2Fexpress-4.17.8.tgz", - "integrity": "sha1-PfQpMpMxfmHGATfSc6LpbNjV8no=", - "dev": true, - "requires": { - "@types/body-parser": "*", - "@types/express-serve-static-core": "*", - "@types/qs": "*", - "@types/serve-static": "*" - } - }, - "@types/express-serve-static-core": { - "version": "4.17.13", - "resolved": "https://registry.npm.taobao.org/@types/express-serve-static-core/download/@types/express-serve-static-core-4.17.13.tgz?cache=0&sync_timestamp=1600734282121&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fexpress-serve-static-core%2Fdownload%2F%40types%2Fexpress-serve-static-core-4.17.13.tgz", - "integrity": "sha1-2a8CXpJfyLCJvjdCO40erHgb4IQ=", - "dev": true, - "requires": { - "@types/node": "*", - "@types/qs": "*", - "@types/range-parser": "*" - } - }, - "@types/glob": { - "version": "7.1.3", - "resolved": "https://registry.npm.taobao.org/@types/glob/download/@types/glob-7.1.3.tgz?cache=0&sync_timestamp=1596838206290&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fglob%2Fdownload%2F%40types%2Fglob-7.1.3.tgz", - "integrity": "sha1-5rqA82t9qtLGhazZJmOC5omFwYM=", - "dev": true, - "requires": { - "@types/minimatch": "*", - "@types/node": "*" - } - }, - "@types/highlight.js": { - "version": "10.1.0", - "resolved": "https://registry.npm.taobao.org/@types/highlight.js/download/@types/highlight.js-10.1.0.tgz", - "integrity": "sha1-ibsMICmX16kKB70uwffQDFa7kLQ=", - "dev": true, - "requires": { - "highlight.js": "*" - } - }, - "@types/http-proxy": { - "version": "1.17.4", - "resolved": "https://registry.npm.taobao.org/@types/http-proxy/download/@types/http-proxy-1.17.4.tgz?cache=0&sync_timestamp=1596839386031&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fhttp-proxy%2Fdownload%2F%40types%2Fhttp-proxy-1.17.4.tgz", - "integrity": "sha1-58kuPb4+E6p5lED/QubToXqdBFs=", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "@types/http-proxy-middleware": { - "version": "0.19.3", - "resolved": "https://registry.npm.taobao.org/@types/http-proxy-middleware/download/@types/http-proxy-middleware-0.19.3.tgz?cache=0&sync_timestamp=1596839386511&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fhttp-proxy-middleware%2Fdownload%2F%40types%2Fhttp-proxy-middleware-0.19.3.tgz", - "integrity": "sha1-suuW+8D5rHJQtdnExTqt4ElJfQM=", - "dev": true, - "requires": { - "@types/connect": "*", - "@types/http-proxy": "*", - "@types/node": "*" - } - }, - "@types/json-schema": { - "version": "7.0.6", - "resolved": "https://registry.npm.taobao.org/@types/json-schema/download/@types/json-schema-7.0.6.tgz?cache=0&sync_timestamp=1598910403749&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fjson-schema%2Fdownload%2F%40types%2Fjson-schema-7.0.6.tgz", - "integrity": "sha1-9MfsQ+gbMZqYFRFQMXCfJph4kfA=" - }, - "@types/mime": { - "version": "2.0.3", - "resolved": "https://registry.npm.taobao.org/@types/mime/download/@types/mime-2.0.3.tgz", - "integrity": "sha1-yJO3NyHbc2mZQ7/DZTsd63+qSjo=", - "dev": true - }, - "@types/minimatch": { - "version": "3.0.3", - "resolved": "https://registry.npm.taobao.org/@types/minimatch/download/@types/minimatch-3.0.3.tgz?cache=0&sync_timestamp=1596839141589&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fminimatch%2Fdownload%2F%40types%2Fminimatch-3.0.3.tgz", - "integrity": "sha1-PcoOPzOyAPx9ETnAzZbBJoyt/Z0=", - "dev": true - }, - "@types/minimist": { - "version": "1.2.0", - "resolved": "https://registry.npm.taobao.org/@types/minimist/download/@types/minimist-1.2.0.tgz", - "integrity": "sha1-aaI6OtKcrwCX8G7aWbNh7i8GOfY=", - "dev": true - }, - "@types/node": { - "version": "14.14.6", - "resolved": "https://registry.npm.taobao.org/@types/node/download/@types/node-14.14.6.tgz?cache=0&sync_timestamp=1603910973093&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fnode%2Fdownload%2F%40types%2Fnode-14.14.6.tgz", - "integrity": "sha1-FG09pXs8Y2zA0XaTls4c+omRFH8=", - "dev": true - }, - "@types/normalize-package-data": { - "version": "2.4.0", - "resolved": "https://registry.npm.taobao.org/@types/normalize-package-data/download/@types/normalize-package-data-2.4.0.tgz?cache=0&sync_timestamp=1596839391651&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fnormalize-package-data%2Fdownload%2F%40types%2Fnormalize-package-data-2.4.0.tgz", - "integrity": "sha1-5IbQ2XOW15vu3QpuM/RTT/a0lz4=", - "dev": true - }, - "@types/q": { - "version": "1.5.4", - "resolved": "https://registry.npm.taobao.org/@types/q/download/@types/q-1.5.4.tgz", - "integrity": "sha1-FZJUFOCtLNdlv+9YhC9+JqesyyQ=", - "dev": true - }, - "@types/qs": { - "version": "6.9.5", - "resolved": "https://registry.npm.taobao.org/@types/qs/download/@types/qs-6.9.5.tgz?cache=0&sync_timestamp=1600295893721&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fqs%2Fdownload%2F%40types%2Fqs-6.9.5.tgz", - "integrity": "sha1-Q0cRvdSete5p2QwdZ8NUqajssYs=", - "dev": true - }, - "@types/range-parser": { - "version": "1.2.3", - "resolved": "https://registry.npm.taobao.org/@types/range-parser/download/@types/range-parser-1.2.3.tgz", - "integrity": "sha1-fuMwunyq+5gJC+zoal7kQRWQTCw=", - "dev": true - }, - "@types/serve-static": { - "version": "1.13.6", - "resolved": "https://registry.npm.taobao.org/@types/serve-static/download/@types/serve-static-1.13.6.tgz?cache=0&sync_timestamp=1603136972762&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fserve-static%2Fdownload%2F%40types%2Fserve-static-1.13.6.tgz", - "integrity": "sha1-hmsbjexBw24ox75ArHJbiL5DxcE=", - "dev": true, - "requires": { - "@types/mime": "*", - "@types/node": "*" - } - }, - "@types/source-list-map": { - "version": "0.1.2", - "resolved": "https://registry.npm.taobao.org/@types/source-list-map/download/@types/source-list-map-0.1.2.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fsource-list-map%2Fdownload%2F%40types%2Fsource-list-map-0.1.2.tgz", - "integrity": "sha1-AHiDYGP/rxdBI0m7o2QIfgrALsk=", - "dev": true - }, - "@types/tapable": { - "version": "1.0.6", - "resolved": "https://registry.npm.taobao.org/@types/tapable/download/@types/tapable-1.0.6.tgz", - "integrity": "sha1-qcpLcKGLJwzLK8Cqr+/R1Ia36nQ=", - "dev": true - }, - "@types/uglify-js": { - "version": "3.11.1", - "resolved": "https://registry.npm.taobao.org/@types/uglify-js/download/@types/uglify-js-3.11.1.tgz?cache=0&sync_timestamp=1603833602967&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fuglify-js%2Fdownload%2F%40types%2Fuglify-js-3.11.1.tgz", - "integrity": "sha1-l/8w5hoKpodsJwtfU4c34tarjOs=", - "dev": true, - "requires": { - "source-map": "^0.6.1" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz?cache=0&sync_timestamp=1571657176668&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsource-map%2Fdownload%2Fsource-map-0.6.1.tgz", - "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", - "dev": true - } - } - }, - "@types/webpack": { - "version": "4.41.24", - "resolved": "https://registry.npm.taobao.org/@types/webpack/download/@types/webpack-4.41.24.tgz?cache=0&sync_timestamp=1603911290982&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fwebpack%2Fdownload%2F%40types%2Fwebpack-4.41.24.tgz", - "integrity": "sha1-dbZkq+PVvP5U5kMTyjtD5JhVBCI=", - "dev": true, - "requires": { - "@types/anymatch": "*", - "@types/node": "*", - "@types/tapable": "*", - "@types/uglify-js": "*", - "@types/webpack-sources": "*", - "source-map": "^0.6.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz?cache=0&sync_timestamp=1571657176668&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsource-map%2Fdownload%2Fsource-map-0.6.1.tgz", - "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", - "dev": true - } - } - }, - "@types/webpack-dev-server": { - "version": "3.11.1", - "resolved": "https://registry.npm.taobao.org/@types/webpack-dev-server/download/@types/webpack-dev-server-3.11.1.tgz?cache=0&sync_timestamp=1604039710913&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fwebpack-dev-server%2Fdownload%2F%40types%2Fwebpack-dev-server-3.11.1.tgz", - "integrity": "sha1-+PTawdoibVML0VodXcNLI7p2bMs=", - "dev": true, - "requires": { - "@types/connect-history-api-fallback": "*", - "@types/express": "*", - "@types/http-proxy-middleware": "*", - "@types/serve-static": "*", - "@types/webpack": "*" - } - }, - "@types/webpack-sources": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/@types/webpack-sources/download/@types/webpack-sources-2.0.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fwebpack-sources%2Fdownload%2F%40types%2Fwebpack-sources-2.0.0.tgz", - "integrity": "sha1-CCFqub4r4uFJm+rrxNRpzsgegqc=", - "dev": true, - "requires": { - "@types/node": "*", - "@types/source-list-map": "*", - "source-map": "^0.7.3" - }, - "dependencies": { - "source-map": { - "version": "0.7.3", - "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.7.3.tgz?cache=0&sync_timestamp=1571657176668&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsource-map%2Fdownload%2Fsource-map-0.7.3.tgz", - "integrity": "sha1-UwL4FpAxc1ImVECS5kmB91F1A4M=", - "dev": true - } - } - }, - "@vue/babel-helper-vue-jsx-merge-props": { - "version": "1.2.1", - "resolved": "https://registry.npm.taobao.org/@vue/babel-helper-vue-jsx-merge-props/download/@vue/babel-helper-vue-jsx-merge-props-1.2.1.tgz?cache=0&sync_timestamp=1602851122331&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40vue%2Fbabel-helper-vue-jsx-merge-props%2Fdownload%2F%40vue%2Fbabel-helper-vue-jsx-merge-props-1.2.1.tgz", - "integrity": "sha1-MWJKelBfsU2h1YAjclpMXycOaoE=", - "dev": true - }, - "@vue/babel-helper-vue-transform-on": { - "version": "1.0.0-rc.2", - "resolved": "https://registry.npm.taobao.org/@vue/babel-helper-vue-transform-on/download/@vue/babel-helper-vue-transform-on-1.0.0-rc.2.tgz", - "integrity": "sha1-ckY0H2ZufG5lsT2kIOLOhXFPu8o=", - "dev": true - }, - "@vue/babel-plugin-jsx": { - "version": "1.0.0-rc.3", - "resolved": "https://registry.npm.taobao.org/@vue/babel-plugin-jsx/download/@vue/babel-plugin-jsx-1.0.0-rc.3.tgz?cache=0&sync_timestamp=1600074484657&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40vue%2Fbabel-plugin-jsx%2Fdownload%2F%40vue%2Fbabel-plugin-jsx-1.0.0-rc.3.tgz", - "integrity": "sha1-q0d+6Vx2T75ohCou3dR08SLnCsY=", - "dev": true, - "requires": { - "@babel/helper-module-imports": "^7.0.0", - "@babel/plugin-syntax-jsx": "^7.0.0", - "@babel/traverse": "^7.0.0", - "@babel/types": "^7.0.0", - "@vue/babel-helper-vue-transform-on": "^1.0.0-rc.2", - "camelcase": "^6.0.0", - "html-tags": "^3.1.0", - "svg-tags": "^1.0.0" - } - }, - "@vue/babel-plugin-transform-vue-jsx": { - "version": "1.2.1", - "resolved": "https://registry.npm.taobao.org/@vue/babel-plugin-transform-vue-jsx/download/@vue/babel-plugin-transform-vue-jsx-1.2.1.tgz?cache=0&sync_timestamp=1602851121024&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40vue%2Fbabel-plugin-transform-vue-jsx%2Fdownload%2F%40vue%2Fbabel-plugin-transform-vue-jsx-1.2.1.tgz", - "integrity": "sha1-ZGBGxlLC8CQnJ/NFGdkXsGQEHtc=", - "dev": true, - "requires": { - "@babel/helper-module-imports": "^7.0.0", - "@babel/plugin-syntax-jsx": "^7.2.0", - "@vue/babel-helper-vue-jsx-merge-props": "^1.2.1", - "html-tags": "^2.0.0", - "lodash.kebabcase": "^4.1.1", - "svg-tags": "^1.0.0" - }, - "dependencies": { - "html-tags": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/html-tags/download/html-tags-2.0.0.tgz", - "integrity": "sha1-ELMKOGCF9Dzt41PMj6fLDe7qZos=", - "dev": true - } - } - }, - "@vue/babel-preset-app": { - "version": "4.5.8", - "resolved": "https://registry.npm.taobao.org/@vue/babel-preset-app/download/@vue/babel-preset-app-4.5.8.tgz", - "integrity": "sha1-P8X1IYHbdgVOzAhWIvPLBmwkL20=", - "dev": true, - "requires": { - "@babel/core": "^7.11.0", - "@babel/helper-compilation-targets": "^7.9.6", - "@babel/helper-module-imports": "^7.8.3", - "@babel/plugin-proposal-class-properties": "^7.8.3", - "@babel/plugin-proposal-decorators": "^7.8.3", - "@babel/plugin-syntax-dynamic-import": "^7.8.3", - "@babel/plugin-syntax-jsx": "^7.8.3", - "@babel/plugin-transform-runtime": "^7.11.0", - "@babel/preset-env": "^7.11.0", - "@babel/runtime": "^7.11.0", - "@vue/babel-plugin-jsx": "^1.0.0-0", - "@vue/babel-preset-jsx": "^1.1.2", - "babel-plugin-dynamic-import-node": "^2.3.3", - "core-js": "^3.6.5", - "core-js-compat": "^3.6.5", - "semver": "^6.1.0" - }, - "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npm.taobao.org/semver/download/semver-6.3.0.tgz", - "integrity": "sha1-7gpkyK9ejO6mdoexM3YeG+y9HT0=", - "dev": true - } - } - }, - "@vue/babel-preset-jsx": { - "version": "1.2.4", - "resolved": "https://registry.npm.taobao.org/@vue/babel-preset-jsx/download/@vue/babel-preset-jsx-1.2.4.tgz?cache=0&sync_timestamp=1603806772378&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40vue%2Fbabel-preset-jsx%2Fdownload%2F%40vue%2Fbabel-preset-jsx-1.2.4.tgz", - "integrity": "sha1-kv6nnbbxOwHoDToAmeKSS9y+Toc=", - "dev": true, - "requires": { - "@vue/babel-helper-vue-jsx-merge-props": "^1.2.1", - "@vue/babel-plugin-transform-vue-jsx": "^1.2.1", - "@vue/babel-sugar-composition-api-inject-h": "^1.2.1", - "@vue/babel-sugar-composition-api-render-instance": "^1.2.4", - "@vue/babel-sugar-functional-vue": "^1.2.2", - "@vue/babel-sugar-inject-h": "^1.2.2", - "@vue/babel-sugar-v-model": "^1.2.3", - "@vue/babel-sugar-v-on": "^1.2.3" - } - }, - "@vue/babel-sugar-composition-api-inject-h": { - "version": "1.2.1", - "resolved": "https://registry.npm.taobao.org/@vue/babel-sugar-composition-api-inject-h/download/@vue/babel-sugar-composition-api-inject-h-1.2.1.tgz?cache=0&sync_timestamp=1602851211529&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40vue%2Fbabel-sugar-composition-api-inject-h%2Fdownload%2F%40vue%2Fbabel-sugar-composition-api-inject-h-1.2.1.tgz", - "integrity": "sha1-BdbgxDJxDjdYKyvppgSbaJtvA+s=", - "dev": true, - "requires": { - "@babel/plugin-syntax-jsx": "^7.2.0" - } - }, - "@vue/babel-sugar-composition-api-render-instance": { - "version": "1.2.4", - "resolved": "https://registry.npm.taobao.org/@vue/babel-sugar-composition-api-render-instance/download/@vue/babel-sugar-composition-api-render-instance-1.2.4.tgz?cache=0&sync_timestamp=1603806780231&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40vue%2Fbabel-sugar-composition-api-render-instance%2Fdownload%2F%40vue%2Fbabel-sugar-composition-api-render-instance-1.2.4.tgz", - "integrity": "sha1-5MvGmXw0T6wnF4WteikyXFHWjRk=", - "dev": true, - "requires": { - "@babel/plugin-syntax-jsx": "^7.2.0" - } - }, - "@vue/babel-sugar-functional-vue": { - "version": "1.2.2", - "resolved": "https://registry.npm.taobao.org/@vue/babel-sugar-functional-vue/download/@vue/babel-sugar-functional-vue-1.2.2.tgz?cache=0&sync_timestamp=1602929533577&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40vue%2Fbabel-sugar-functional-vue%2Fdownload%2F%40vue%2Fbabel-sugar-functional-vue-1.2.2.tgz", - "integrity": "sha1-JnqayNeHyW7b8Dzj85LEnam9Jlg=", - "dev": true, - "requires": { - "@babel/plugin-syntax-jsx": "^7.2.0" - } - }, - "@vue/babel-sugar-inject-h": { - "version": "1.2.2", - "resolved": "https://registry.npm.taobao.org/@vue/babel-sugar-inject-h/download/@vue/babel-sugar-inject-h-1.2.2.tgz?cache=0&sync_timestamp=1602929533397&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40vue%2Fbabel-sugar-inject-h%2Fdownload%2F%40vue%2Fbabel-sugar-inject-h-1.2.2.tgz", - "integrity": "sha1-1zjTyJM2fshJHcu2abAAkZKT46o=", - "dev": true, - "requires": { - "@babel/plugin-syntax-jsx": "^7.2.0" - } - }, - "@vue/babel-sugar-v-model": { - "version": "1.2.3", - "resolved": "https://registry.npm.taobao.org/@vue/babel-sugar-v-model/download/@vue/babel-sugar-v-model-1.2.3.tgz?cache=0&sync_timestamp=1603182488740&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40vue%2Fbabel-sugar-v-model%2Fdownload%2F%40vue%2Fbabel-sugar-v-model-1.2.3.tgz", - "integrity": "sha1-+h8pulHr8KoabDX6ZtU5vEWaGPI=", - "dev": true, - "requires": { - "@babel/plugin-syntax-jsx": "^7.2.0", - "@vue/babel-helper-vue-jsx-merge-props": "^1.2.1", - "@vue/babel-plugin-transform-vue-jsx": "^1.2.1", - "camelcase": "^5.0.0", - "html-tags": "^2.0.0", - "svg-tags": "^1.0.0" - }, - "dependencies": { - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npm.taobao.org/camelcase/download/camelcase-5.3.1.tgz?cache=0&sync_timestamp=1603923709404&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcamelcase%2Fdownload%2Fcamelcase-5.3.1.tgz", - "integrity": "sha1-48mzFWnhBoEd8kL3FXJaH0xJQyA=", - "dev": true - }, - "html-tags": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/html-tags/download/html-tags-2.0.0.tgz", - "integrity": "sha1-ELMKOGCF9Dzt41PMj6fLDe7qZos=", - "dev": true - } - } - }, - "@vue/babel-sugar-v-on": { - "version": "1.2.3", - "resolved": "https://registry.npm.taobao.org/@vue/babel-sugar-v-on/download/@vue/babel-sugar-v-on-1.2.3.tgz?cache=0&sync_timestamp=1603181872606&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40vue%2Fbabel-sugar-v-on%2Fdownload%2F%40vue%2Fbabel-sugar-v-on-1.2.3.tgz", - "integrity": "sha1-NCNnF4WGpp85LwS/ujICHQKROto=", - "dev": true, - "requires": { - "@babel/plugin-syntax-jsx": "^7.2.0", - "@vue/babel-plugin-transform-vue-jsx": "^1.2.1", - "camelcase": "^5.0.0" - }, - "dependencies": { - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npm.taobao.org/camelcase/download/camelcase-5.3.1.tgz?cache=0&sync_timestamp=1603923709404&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcamelcase%2Fdownload%2Fcamelcase-5.3.1.tgz", - "integrity": "sha1-48mzFWnhBoEd8kL3FXJaH0xJQyA=", - "dev": true - } - } - }, - "@vue/cli-overlay": { - "version": "4.5.8", - "resolved": "https://registry.npm.taobao.org/@vue/cli-overlay/download/@vue/cli-overlay-4.5.8.tgz?cache=0&sync_timestamp=1603102330205&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40vue%2Fcli-overlay%2Fdownload%2F%40vue%2Fcli-overlay-4.5.8.tgz", - "integrity": "sha1-W3G4G9SQubWWz92nj5AVVkPgN9Q=", - "dev": true - }, - "@vue/cli-plugin-babel": { - "version": "4.5.8", - "resolved": "https://registry.npm.taobao.org/@vue/cli-plugin-babel/download/@vue/cli-plugin-babel-4.5.8.tgz?cache=0&sync_timestamp=1603102349671&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40vue%2Fcli-plugin-babel%2Fdownload%2F%40vue%2Fcli-plugin-babel-4.5.8.tgz", - "integrity": "sha1-V1ng0kxWjLFF59CzB0l85k9HLLA=", - "dev": true, - "requires": { - "@babel/core": "^7.11.0", - "@vue/babel-preset-app": "^4.5.8", - "@vue/cli-shared-utils": "^4.5.8", - "babel-loader": "^8.1.0", - "cache-loader": "^4.1.0", - "thread-loader": "^2.1.3", - "webpack": "^4.0.0" - } - }, - "@vue/cli-plugin-router": { - "version": "4.5.8", - "resolved": "https://registry.npm.taobao.org/@vue/cli-plugin-router/download/@vue/cli-plugin-router-4.5.8.tgz", - "integrity": "sha1-23CmnfTtyQaQdl+MJXSaaLIN2FA=", - "dev": true, - "requires": { - "@vue/cli-shared-utils": "^4.5.8" - } - }, - "@vue/cli-plugin-vuex": { - "version": "4.5.8", - "resolved": "https://registry.npm.taobao.org/@vue/cli-plugin-vuex/download/@vue/cli-plugin-vuex-4.5.8.tgz?cache=0&sync_timestamp=1603102281094&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40vue%2Fcli-plugin-vuex%2Fdownload%2F%40vue%2Fcli-plugin-vuex-4.5.8.tgz", - "integrity": "sha1-gSKuk79ZMn06AGPAxtpRUToeJFY=", - "dev": true, - "requires": {} - }, - "@vue/cli-service": { - "version": "4.5.8", - "resolved": "https://registry.npm.taobao.org/@vue/cli-service/download/@vue/cli-service-4.5.8.tgz?cache=0&sync_timestamp=1603104183081&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40vue%2Fcli-service%2Fdownload%2F%40vue%2Fcli-service-4.5.8.tgz", - "integrity": "sha1-n+WLx8d8USHqu5QPgOBsGNqxI+o=", - "dev": true, - "requires": { - "@intervolga/optimize-cssnano-plugin": "^1.0.5", - "@soda/friendly-errors-webpack-plugin": "^1.7.1", - "@soda/get-current-script": "^1.0.0", - "@types/minimist": "^1.2.0", - "@types/webpack": "^4.0.0", - "@types/webpack-dev-server": "^3.11.0", - "@vue/cli-overlay": "^4.5.8", - "@vue/cli-plugin-router": "^4.5.8", - "@vue/cli-plugin-vuex": "^4.5.8", - "@vue/cli-shared-utils": "^4.5.8", - "@vue/component-compiler-utils": "^3.1.2", - "@vue/preload-webpack-plugin": "^1.1.0", - "@vue/web-component-wrapper": "^1.2.0", - "acorn": "^7.4.0", - "acorn-walk": "^7.1.1", - "address": "^1.1.2", - "autoprefixer": "^9.8.6", - "browserslist": "^4.12.0", - "cache-loader": "^4.1.0", - "case-sensitive-paths-webpack-plugin": "^2.3.0", - "cli-highlight": "^2.1.4", - "clipboardy": "^2.3.0", - "cliui": "^6.0.0", - "copy-webpack-plugin": "^5.1.1", - "css-loader": "^3.5.3", - "cssnano": "^4.1.10", - "debug": "^4.1.1", - "default-gateway": "^5.0.5", - "dotenv": "^8.2.0", - "dotenv-expand": "^5.1.0", - "file-loader": "^4.2.0", - "fs-extra": "^7.0.1", - "globby": "^9.2.0", - "hash-sum": "^2.0.0", - "html-webpack-plugin": "^3.2.0", - "launch-editor-middleware": "^2.2.1", - "lodash.defaultsdeep": "^4.6.1", - "lodash.mapvalues": "^4.6.0", - "lodash.transform": "^4.6.0", - "mini-css-extract-plugin": "^0.9.0", - "minimist": "^1.2.5", - "pnp-webpack-plugin": "^1.6.4", - "portfinder": "^1.0.26", - "postcss-loader": "^3.0.0", - "ssri": "^7.1.0", - "terser-webpack-plugin": "^2.3.6", - "thread-loader": "^2.1.3", - "url-loader": "^2.2.0", - "vue-loader": "^15.9.2", - "vue-loader-v16": "npm:vue-loader@^16.0.0-beta.7", - "vue-style-loader": "^4.1.2", - "webpack": "^4.0.0", - "webpack-bundle-analyzer": "^3.8.0", - "webpack-chain": "^6.4.0", - "webpack-dev-server": "^3.11.0", - "webpack-merge": "^4.2.2" - }, - "dependencies": { - "acorn": { - "version": "7.4.1", - "resolved": "https://registry.npm.taobao.org/acorn/download/acorn-7.4.1.tgz", - "integrity": "sha1-/q7SVZc9LndVW4PbwIhRpsY1IPo=", - "dev": true - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npm.taobao.org/ansi-styles/download/ansi-styles-4.3.0.tgz?cache=0&sync_timestamp=1601839122515&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fansi-styles%2Fdownload%2Fansi-styles-4.3.0.tgz", - "integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=", - "dev": true, - "optional": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "cacache": { - "version": "13.0.1", - "resolved": "https://registry.npm.taobao.org/cacache/download/cacache-13.0.1.tgz?cache=0&sync_timestamp=1594429684526&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcacache%2Fdownload%2Fcacache-13.0.1.tgz", - "integrity": "sha1-qAAMIWlwiQgvhSh6GuxuOCAkpxw=", - "dev": true, - "requires": { - "chownr": "^1.1.2", - "figgy-pudding": "^3.5.1", - "fs-minipass": "^2.0.0", - "glob": "^7.1.4", - "graceful-fs": "^4.2.2", - "infer-owner": "^1.0.4", - "lru-cache": "^5.1.1", - "minipass": "^3.0.0", - "minipass-collect": "^1.0.2", - "minipass-flush": "^1.0.5", - "minipass-pipeline": "^1.2.2", - "mkdirp": "^0.5.1", - "move-concurrently": "^1.0.1", - "p-map": "^3.0.0", - "promise-inflight": "^1.0.1", - "rimraf": "^2.7.1", - "ssri": "^7.0.0", - "unique-filename": "^1.1.1" - } - }, - "chalk": { - "version": "4.1.0", - "resolved": "https://registry.npm.taobao.org/chalk/download/chalk-4.1.0.tgz?cache=0&sync_timestamp=1591687070184&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fchalk%2Fdownload%2Fchalk-4.1.0.tgz", - "integrity": "sha1-ThSHCmGNni7dl92DRf2dncMVZGo=", - "dev": true, - "optional": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/color-convert/download/color-convert-2.0.1.tgz", - "integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=", - "dev": true, - "optional": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npm.taobao.org/color-name/download/color-name-1.1.4.tgz", - "integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=", - "dev": true, - "optional": true - }, - "find-cache-dir": { - "version": "3.3.1", - "resolved": "https://registry.npm.taobao.org/find-cache-dir/download/find-cache-dir-3.3.1.tgz", - "integrity": "sha1-ibM/rUpGcNqpT4Vff74x1thP6IA=", - "dev": true, - "requires": { - "commondir": "^1.0.1", - "make-dir": "^3.0.2", - "pkg-dir": "^4.1.0" - } - }, - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npm.taobao.org/find-up/download/find-up-4.1.0.tgz?cache=0&sync_timestamp=1597169842138&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffind-up%2Fdownload%2Ffind-up-4.1.0.tgz", - "integrity": "sha1-l6/n1s3AvFkoWEt8jXsW6KmqXRk=", - "dev": true, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/has-flag/download/has-flag-4.0.0.tgz", - "integrity": "sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=", - "dev": true, - "optional": true - }, - "loader-utils": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/loader-utils/download/loader-utils-2.0.0.tgz?cache=0&sync_timestamp=1584445207623&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Floader-utils%2Fdownload%2Floader-utils-2.0.0.tgz", - "integrity": "sha1-5MrOW4FtQloWa18JfhDNErNgZLA=", - "dev": true, - "optional": true, - "requires": { - "big.js": "^5.2.2", - "emojis-list": "^3.0.0", - "json5": "^2.1.2" - } - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npm.taobao.org/locate-path/download/locate-path-5.0.0.tgz", - "integrity": "sha1-Gvujlq/WdqbUJQTQpno6frn2KqA=", - "dev": true, - "requires": { - "p-locate": "^4.1.0" - } - }, - "make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/make-dir/download/make-dir-3.1.0.tgz?cache=0&sync_timestamp=1587567572251&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmake-dir%2Fdownload%2Fmake-dir-3.1.0.tgz", - "integrity": "sha1-QV6WcEazp/HRhSd9hKpYIDcmoT8=", - "dev": true, - "requires": { - "semver": "^6.0.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npm.taobao.org/p-locate/download/p-locate-4.1.0.tgz", - "integrity": "sha1-o0KLtwiLOmApL2aRkni3wpetTwc=", - "dev": true, - "requires": { - "p-limit": "^2.2.0" - } - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/path-exists/download/path-exists-4.0.0.tgz", - "integrity": "sha1-UTvb4tO5XXdi6METfvoZXGxhtbM=", - "dev": true - }, - "pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npm.taobao.org/pkg-dir/download/pkg-dir-4.2.0.tgz?cache=0&sync_timestamp=1602859045787&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpkg-dir%2Fdownload%2Fpkg-dir-4.2.0.tgz", - "integrity": "sha1-8JkTPfft5CLoHR2ESCcO6z5CYfM=", - "dev": true, - "requires": { - "find-up": "^4.0.0" - } - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npm.taobao.org/semver/download/semver-6.3.0.tgz", - "integrity": "sha1-7gpkyK9ejO6mdoexM3YeG+y9HT0=", - "dev": true - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz?cache=0&sync_timestamp=1571657176668&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsource-map%2Fdownload%2Fsource-map-0.6.1.tgz", - "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", - "dev": true - }, - "ssri": { - "version": "7.1.0", - "resolved": "https://registry.npm.taobao.org/ssri/download/ssri-7.1.0.tgz", - "integrity": "sha1-ksJBv23oI2W1x/tL126XVSLhKU0=", - "dev": true, - "requires": { - "figgy-pudding": "^3.5.1", - "minipass": "^3.1.1" - } - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-7.2.0.tgz?cache=0&sync_timestamp=1606205035829&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsupports-color%2Fdownload%2Fsupports-color-7.2.0.tgz", - "integrity": "sha1-G33NyzK4E4gBs+R4umpRyqiWSNo=", - "dev": true, - "optional": true, - "requires": { - "has-flag": "^4.0.0" - } - }, - "terser-webpack-plugin": { - "version": "2.3.8", - "resolved": "https://registry.npm.taobao.org/terser-webpack-plugin/download/terser-webpack-plugin-2.3.8.tgz?cache=0&sync_timestamp=1603881713213&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fterser-webpack-plugin%2Fdownload%2Fterser-webpack-plugin-2.3.8.tgz", - "integrity": "sha1-iUdkoZsHQ/L3BOfCqEjFKDppZyQ=", - "dev": true, - "requires": { - "cacache": "^13.0.1", - "find-cache-dir": "^3.3.1", - "jest-worker": "^25.4.0", - "p-limit": "^2.3.0", - "schema-utils": "^2.6.6", - "serialize-javascript": "^4.0.0", - "source-map": "^0.6.1", - "terser": "^4.6.12", - "webpack-sources": "^1.4.3" - } - }, - "vue-loader-v16": { - "version": "npm:vue-loader@16.1.2", - "resolved": "https://registry.npm.taobao.org/vue-loader/download/vue-loader-16.1.2.tgz?cache=0&sync_timestamp=1608188009078&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fvue-loader%2Fdownload%2Fvue-loader-16.1.2.tgz", - "integrity": "sha1-XAO2xQ0qX5g8fOuhXFDXjKKymPQ=", - "dev": true, - "optional": true, - "requires": { - "chalk": "^4.1.0", - "hash-sum": "^2.0.0", - "loader-utils": "^2.0.0" - } - }, - "webpack-bundle-analyzer": { - "version": "3.9.0", - "resolved": "https://registry.npm.taobao.org/webpack-bundle-analyzer/download/webpack-bundle-analyzer-3.9.0.tgz?cache=0&sync_timestamp=1611221513167&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fwebpack-bundle-analyzer%2Fdownload%2Fwebpack-bundle-analyzer-3.9.0.tgz", - "integrity": "sha1-9vlNsQj7V05BWtMT3kGicH0z7zw=", - "dev": true, - "requires": { - "acorn": "^7.1.1", - "acorn-walk": "^7.1.1", - "bfj": "^6.1.1", - "chalk": "^2.4.1", - "commander": "^2.18.0", - "ejs": "^2.6.1", - "express": "^4.16.3", - "filesize": "^3.6.1", - "gzip-size": "^5.0.0", - "lodash": "^4.17.19", - "mkdirp": "^0.5.1", - "opener": "^1.5.1", - "ws": "^6.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npm.taobao.org/ansi-styles/download/ansi-styles-3.2.1.tgz?cache=0&sync_timestamp=1617175602652&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fansi-styles%2Fdownload%2Fansi-styles-3.2.1.tgz", - "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npm.taobao.org/chalk/download/chalk-2.4.2.tgz", - "integrity": "sha1-zUJUFnelQzPPVBpJEIwUMrRMlCQ=", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npm.taobao.org/color-convert/download/color-convert-1.9.3.tgz", - "integrity": "sha1-u3GFBpDh8TZWfeYp0tVHHe2kweg=", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npm.taobao.org/color-name/download/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/has-flag/download/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-5.5.0.tgz?cache=0&sync_timestamp=1611393963969&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsupports-color%2Fdownload%2Fsupports-color-5.5.0.tgz", - "integrity": "sha1-4uaaRKyHcveKHsCzW2id9lMO/I8=", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - } - } - }, - "@vue/cli-shared-utils": { - "version": "4.5.8", - "resolved": "https://registry.npm.taobao.org/@vue/cli-shared-utils/download/@vue/cli-shared-utils-4.5.8.tgz?cache=0&sync_timestamp=1603102380635&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40vue%2Fcli-shared-utils%2Fdownload%2F%40vue%2Fcli-shared-utils-4.5.8.tgz", - "integrity": "sha1-1FQwaqpRDmZqNLFEr8gYMPwjrMk=", - "dev": true, - "requires": { - "@hapi/joi": "^15.0.1", - "chalk": "^2.4.2", - "execa": "^1.0.0", - "launch-editor": "^2.2.1", - "lru-cache": "^5.1.1", - "node-ipc": "^9.1.1", - "open": "^6.3.0", - "ora": "^3.4.0", - "read-pkg": "^5.1.1", - "request": "^2.88.2", - "semver": "^6.1.0", - "strip-ansi": "^6.0.0" - }, - "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npm.taobao.org/semver/download/semver-6.3.0.tgz", - "integrity": "sha1-7gpkyK9ejO6mdoexM3YeG+y9HT0=", - "dev": true - } - } - }, - "@vue/component-compiler-utils": { - "version": "3.2.0", - "resolved": "https://registry.npm.taobao.org/@vue/component-compiler-utils/download/@vue/component-compiler-utils-3.2.0.tgz?cache=0&sync_timestamp=1595427628913&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40vue%2Fcomponent-compiler-utils%2Fdownload%2F%40vue%2Fcomponent-compiler-utils-3.2.0.tgz", - "integrity": "sha1-j4UYLO7Sjps8dTE95mn4MWbRHl0=", - "dev": true, - "requires": { - "consolidate": "^0.15.1", - "hash-sum": "^1.0.2", - "lru-cache": "^4.1.2", - "merge-source-map": "^1.1.0", - "postcss": "^7.0.14", - "postcss-selector-parser": "^6.0.2", - "prettier": "^1.18.2", - "source-map": "~0.6.1", - "vue-template-es2015-compiler": "^1.9.0" - }, - "dependencies": { - "hash-sum": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/hash-sum/download/hash-sum-1.0.2.tgz", - "integrity": "sha1-M7QHd3VMZDJXPBIMw4CLvRDUfwQ=", - "dev": true - }, - "lru-cache": { - "version": "4.1.5", - "resolved": "https://registry.npm.taobao.org/lru-cache/download/lru-cache-4.1.5.tgz?cache=0&sync_timestamp=1594427567713&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Flru-cache%2Fdownload%2Flru-cache-4.1.5.tgz", - "integrity": "sha1-i75Q6oW+1ZvJ4z3KuCNe6bz0Q80=", - "dev": true, - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz?cache=0&sync_timestamp=1571657176668&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsource-map%2Fdownload%2Fsource-map-0.6.1.tgz", - "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", - "dev": true - }, - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npm.taobao.org/yallist/download/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", - "dev": true - } - } - }, - "@vue/preload-webpack-plugin": { - "version": "1.1.2", - "resolved": "https://registry.npm.taobao.org/@vue/preload-webpack-plugin/download/@vue/preload-webpack-plugin-1.1.2.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40vue%2Fpreload-webpack-plugin%2Fdownload%2F%40vue%2Fpreload-webpack-plugin-1.1.2.tgz", - "integrity": "sha1-zrkktOyzucQ4ccekKaAvhCPmIas=", - "dev": true, - "requires": {} - }, - "@vue/web-component-wrapper": { - "version": "1.2.0", - "resolved": "https://registry.npm.taobao.org/@vue/web-component-wrapper/download/@vue/web-component-wrapper-1.2.0.tgz", - "integrity": "sha1-uw5G8VhafiibTuYGfcxaauYvHdE=", - "dev": true - }, - "@webassemblyjs/ast": { - "version": "1.9.0", - "resolved": "https://registry.npm.taobao.org/@webassemblyjs/ast/download/@webassemblyjs/ast-1.9.0.tgz", - "integrity": "sha1-vYUGBLQEJFmlpBzX0zjL7Wle2WQ=", - "requires": { - "@webassemblyjs/helper-module-context": "1.9.0", - "@webassemblyjs/helper-wasm-bytecode": "1.9.0", - "@webassemblyjs/wast-parser": "1.9.0" - } - }, - "@webassemblyjs/floating-point-hex-parser": { - "version": "1.9.0", - "resolved": "https://registry.npm.taobao.org/@webassemblyjs/floating-point-hex-parser/download/@webassemblyjs/floating-point-hex-parser-1.9.0.tgz", - "integrity": "sha1-PD07Jxvd/ITesA9xNEQ4MR1S/7Q=" - }, - "@webassemblyjs/helper-api-error": { - "version": "1.9.0", - "resolved": "https://registry.npm.taobao.org/@webassemblyjs/helper-api-error/download/@webassemblyjs/helper-api-error-1.9.0.tgz", - "integrity": "sha1-ID9nbjM7lsnaLuqzzO8zxFkotqI=" - }, - "@webassemblyjs/helper-buffer": { - "version": "1.9.0", - "resolved": "https://registry.npm.taobao.org/@webassemblyjs/helper-buffer/download/@webassemblyjs/helper-buffer-1.9.0.tgz", - "integrity": "sha1-oUQtJpxf6yP8vJ73WdrDVH8p3gA=" - }, - "@webassemblyjs/helper-code-frame": { - "version": "1.9.0", - "resolved": "https://registry.npm.taobao.org/@webassemblyjs/helper-code-frame/download/@webassemblyjs/helper-code-frame-1.9.0.tgz", - "integrity": "sha1-ZH+Iks0gQ6gqwMjF51w28dkVnyc=", - "requires": { - "@webassemblyjs/wast-printer": "1.9.0" - } - }, - "@webassemblyjs/helper-fsm": { - "version": "1.9.0", - "resolved": "https://registry.npm.taobao.org/@webassemblyjs/helper-fsm/download/@webassemblyjs/helper-fsm-1.9.0.tgz", - "integrity": "sha1-wFJWtxJEIUZx9LCOwQitY7cO3bg=" - }, - "@webassemblyjs/helper-module-context": { - "version": "1.9.0", - "resolved": "https://registry.npm.taobao.org/@webassemblyjs/helper-module-context/download/@webassemblyjs/helper-module-context-1.9.0.tgz", - "integrity": "sha1-JdiIS3aDmHGgimxvgGw5ee9xLwc=", - "requires": { - "@webassemblyjs/ast": "1.9.0" - } - }, - "@webassemblyjs/helper-wasm-bytecode": { - "version": "1.9.0", - "resolved": "https://registry.npm.taobao.org/@webassemblyjs/helper-wasm-bytecode/download/@webassemblyjs/helper-wasm-bytecode-1.9.0.tgz", - "integrity": "sha1-T+2L6sm4wU+MWLcNEk1UndH+V5A=" - }, - "@webassemblyjs/helper-wasm-section": { - "version": "1.9.0", - "resolved": "https://registry.npm.taobao.org/@webassemblyjs/helper-wasm-section/download/@webassemblyjs/helper-wasm-section-1.9.0.tgz", - "integrity": "sha1-WkE41aYpK6GLBMWuSXF+QWeWU0Y=", - "requires": { - "@webassemblyjs/ast": "1.9.0", - "@webassemblyjs/helper-buffer": "1.9.0", - "@webassemblyjs/helper-wasm-bytecode": "1.9.0", - "@webassemblyjs/wasm-gen": "1.9.0" - } - }, - "@webassemblyjs/ieee754": { - "version": "1.9.0", - "resolved": "https://registry.npm.taobao.org/@webassemblyjs/ieee754/download/@webassemblyjs/ieee754-1.9.0.tgz", - "integrity": "sha1-Fceg+6roP7JhQ7us9tbfFwKtOeQ=", - "requires": { - "@xtuc/ieee754": "^1.2.0" - } - }, - "@webassemblyjs/leb128": { - "version": "1.9.0", - "resolved": "https://registry.npm.taobao.org/@webassemblyjs/leb128/download/@webassemblyjs/leb128-1.9.0.tgz", - "integrity": "sha1-8Zygt2ptxVYjoJz/p2noOPoeHJU=", - "requires": { - "@xtuc/long": "4.2.2" - } - }, - "@webassemblyjs/utf8": { - "version": "1.9.0", - "resolved": "https://registry.npm.taobao.org/@webassemblyjs/utf8/download/@webassemblyjs/utf8-1.9.0.tgz", - "integrity": "sha1-BNM7Y2945qaBMifoJAL3Y3tiKas=" - }, - "@webassemblyjs/wasm-edit": { - "version": "1.9.0", - "resolved": "https://registry.npm.taobao.org/@webassemblyjs/wasm-edit/download/@webassemblyjs/wasm-edit-1.9.0.tgz", - "integrity": "sha1-P+bXnT8PkiGDqoYALELdJWz+6c8=", - "requires": { - "@webassemblyjs/ast": "1.9.0", - "@webassemblyjs/helper-buffer": "1.9.0", - "@webassemblyjs/helper-wasm-bytecode": "1.9.0", - "@webassemblyjs/helper-wasm-section": "1.9.0", - "@webassemblyjs/wasm-gen": "1.9.0", - "@webassemblyjs/wasm-opt": "1.9.0", - "@webassemblyjs/wasm-parser": "1.9.0", - "@webassemblyjs/wast-printer": "1.9.0" - } - }, - "@webassemblyjs/wasm-gen": { - "version": "1.9.0", - "resolved": "https://registry.npm.taobao.org/@webassemblyjs/wasm-gen/download/@webassemblyjs/wasm-gen-1.9.0.tgz", - "integrity": "sha1-ULxw7Gje2OJ2OwGhQYv0NJGnpJw=", - "requires": { - "@webassemblyjs/ast": "1.9.0", - "@webassemblyjs/helper-wasm-bytecode": "1.9.0", - "@webassemblyjs/ieee754": "1.9.0", - "@webassemblyjs/leb128": "1.9.0", - "@webassemblyjs/utf8": "1.9.0" - } - }, - "@webassemblyjs/wasm-opt": { - "version": "1.9.0", - "resolved": "https://registry.npm.taobao.org/@webassemblyjs/wasm-opt/download/@webassemblyjs/wasm-opt-1.9.0.tgz", - "integrity": "sha1-IhEYHlsxMmRDzIES658LkChyGmE=", - "requires": { - "@webassemblyjs/ast": "1.9.0", - "@webassemblyjs/helper-buffer": "1.9.0", - "@webassemblyjs/wasm-gen": "1.9.0", - "@webassemblyjs/wasm-parser": "1.9.0" - } - }, - "@webassemblyjs/wasm-parser": { - "version": "1.9.0", - "resolved": "https://registry.npm.taobao.org/@webassemblyjs/wasm-parser/download/@webassemblyjs/wasm-parser-1.9.0.tgz", - "integrity": "sha1-nUjkSCbfSmWYKUqmyHRp1kL/9l4=", - "requires": { - "@webassemblyjs/ast": "1.9.0", - "@webassemblyjs/helper-api-error": "1.9.0", - "@webassemblyjs/helper-wasm-bytecode": "1.9.0", - "@webassemblyjs/ieee754": "1.9.0", - "@webassemblyjs/leb128": "1.9.0", - "@webassemblyjs/utf8": "1.9.0" - } - }, - "@webassemblyjs/wast-parser": { - "version": "1.9.0", - "resolved": "https://registry.npm.taobao.org/@webassemblyjs/wast-parser/download/@webassemblyjs/wast-parser-1.9.0.tgz", - "integrity": "sha1-MDERXXmsW9JhVWzsw/qQo+9FGRQ=", - "requires": { - "@webassemblyjs/ast": "1.9.0", - "@webassemblyjs/floating-point-hex-parser": "1.9.0", - "@webassemblyjs/helper-api-error": "1.9.0", - "@webassemblyjs/helper-code-frame": "1.9.0", - "@webassemblyjs/helper-fsm": "1.9.0", - "@xtuc/long": "4.2.2" - } - }, - "@webassemblyjs/wast-printer": { - "version": "1.9.0", - "resolved": "https://registry.npm.taobao.org/@webassemblyjs/wast-printer/download/@webassemblyjs/wast-printer-1.9.0.tgz", - "integrity": "sha1-STXVTIX+9jewDOn1I3dFHQDUeJk=", - "requires": { - "@webassemblyjs/ast": "1.9.0", - "@webassemblyjs/wast-parser": "1.9.0", - "@xtuc/long": "4.2.2" - } - }, - "@xtuc/ieee754": { - "version": "1.2.0", - "resolved": "https://registry.npm.taobao.org/@xtuc/ieee754/download/@xtuc/ieee754-1.2.0.tgz", - "integrity": "sha1-7vAUoxRa5Hehy8AM0eVSM23Ot5A=" - }, - "@xtuc/long": { - "version": "4.2.2", - "resolved": "https://registry.npm.taobao.org/@xtuc/long/download/@xtuc/long-4.2.2.tgz", - "integrity": "sha1-0pHGpOl5ibXGHZrPOWrk/hM6cY0=" - }, - "accepts": { - "version": "1.3.7", - "resolved": "https://registry.npm.taobao.org/accepts/download/accepts-1.3.7.tgz", - "integrity": "sha1-UxvHJlF6OytB+FACHGzBXqq1B80=", - "dev": true, - "requires": { - "mime-types": "~2.1.24", - "negotiator": "0.6.2" - } - }, - "acorn": { - "version": "6.4.2", - "resolved": "https://registry.npm.taobao.org/acorn/download/acorn-6.4.2.tgz", - "integrity": "sha1-NYZv1xBSjpLeEM8GAWSY5H454eY=" - }, - "acorn-walk": { - "version": "7.2.0", - "resolved": "https://registry.npm.taobao.org/acorn-walk/download/acorn-walk-7.2.0.tgz?cache=0&sync_timestamp=1597235855275&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Facorn-walk%2Fdownload%2Facorn-walk-7.2.0.tgz", - "integrity": "sha1-DeiJpgEgOQmw++B7iTjcIdLpZ7w=", - "dev": true - }, - "address": { - "version": "1.1.2", - "resolved": "https://registry.npm.taobao.org/address/download/address-1.1.2.tgz", - "integrity": "sha1-vxEWycdYxRt6kz0pa3LCIe2UKLY=", - "dev": true - }, - "aggregate-error": { - "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/aggregate-error/download/aggregate-error-3.1.0.tgz?cache=0&sync_timestamp=1598049717562&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Faggregate-error%2Fdownload%2Faggregate-error-3.1.0.tgz", - "integrity": "sha1-kmcP9Q9TWb23o+DUDQ7DDFc3aHo=", - "requires": { - "clean-stack": "^2.0.0", - "indent-string": "^4.0.0" - } - }, - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npm.taobao.org/ajv/download/ajv-6.12.6.tgz?cache=0&sync_timestamp=1603561547443&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fajv%2Fdownload%2Fajv-6.12.6.tgz", - "integrity": "sha1-uvWmLoArB9l3A0WG+MO69a3ybfQ=", - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "ajv-errors": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/ajv-errors/download/ajv-errors-1.0.1.tgz", - "integrity": "sha1-81mGrOuRr63sQQL72FAUlQzvpk0=", - "requires": {} - }, - "ajv-keywords": { - "version": "3.5.2", - "resolved": "https://registry.npm.taobao.org/ajv-keywords/download/ajv-keywords-3.5.2.tgz?cache=0&sync_timestamp=1603566069729&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fajv-keywords%2Fdownload%2Fajv-keywords-3.5.2.tgz", - "integrity": "sha1-MfKdpatuANHC0yms97WSlhTVAU0=", - "requires": {} - }, - "alphanum-sort": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/alphanum-sort/download/alphanum-sort-1.0.2.tgz", - "integrity": "sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM=", - "dev": true - }, - "ansi-colors": { - "version": "3.2.4", - "resolved": "https://registry.npm.taobao.org/ansi-colors/download/ansi-colors-3.2.4.tgz?cache=0&sync_timestamp=1593529711167&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fansi-colors%2Fdownload%2Fansi-colors-3.2.4.tgz", - "integrity": "sha1-46PaS/uubIapwoViXeEkojQCb78=", - "dev": true - }, - "ansi-html": { - "version": "0.0.7", - "resolved": "https://registry.npm.taobao.org/ansi-html/download/ansi-html-0.0.7.tgz", - "integrity": "sha1-gTWEAhliqenm/QOflA0S9WynhZ4=", - "dev": true - }, - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npm.taobao.org/ansi-regex/download/ansi-regex-4.1.0.tgz", - "integrity": "sha1-i5+PCM8ay4Q3Vqg5yox+MWjFGZc=", - "dev": true - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npm.taobao.org/ansi-styles/download/ansi-styles-3.2.1.tgz?cache=0&sync_timestamp=1601839122515&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fansi-styles%2Fdownload%2Fansi-styles-3.2.1.tgz", - "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "any-promise": { - "version": "1.3.0", - "resolved": "https://registry.npm.taobao.org/any-promise/download/any-promise-1.3.0.tgz", - "integrity": "sha1-q8av7tzqUugJzcA3au0845Y10X8=", - "dev": true - }, - "anymatch": { - "version": "3.1.1", - "resolved": "https://registry.npm.taobao.org/anymatch/download/anymatch-3.1.1.tgz", - "integrity": "sha1-xV7PAhheJGklk5kxDBc84xIzsUI=", - "optional": true, - "requires": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - } - }, - "aproba": { - "version": "1.2.0", - "resolved": "https://registry.npm.taobao.org/aproba/download/aproba-1.2.0.tgz", - "integrity": "sha1-aALmJk79GMeQobDVF/DyYnvyyUo=" - }, - "arch": { - "version": "2.2.0", - "resolved": "https://registry.npm.taobao.org/arch/download/arch-2.2.0.tgz?cache=0&sync_timestamp=1603836487323&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Farch%2Fdownload%2Farch-2.2.0.tgz", - "integrity": "sha1-G8R4GPMFdk8jqzMGsL/AhsWinRE=", - "dev": true - }, - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npm.taobao.org/argparse/download/argparse-1.0.10.tgz?cache=0&sync_timestamp=1598649734444&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fargparse%2Fdownload%2Fargparse-1.0.10.tgz", - "integrity": "sha1-vNZ5HqWuCXJeF+WtmIE0zUCz2RE=", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } - }, - "arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/arr-diff/download/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=" - }, - "arr-flatten": { - "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/arr-flatten/download/arr-flatten-1.1.0.tgz", - "integrity": "sha1-NgSLv/TntH4TZkQxbJlmnqWukfE=" - }, - "arr-union": { - "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/arr-union/download/arr-union-3.1.0.tgz", - "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=" - }, - "array-flatten": { - "version": "1.1.1", - "resolved": "https://registry.npm.taobao.org/array-flatten/download/array-flatten-1.1.1.tgz?cache=0&sync_timestamp=1574313384951&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Farray-flatten%2Fdownload%2Farray-flatten-1.1.1.tgz", - "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=", - "dev": true - }, - "array-union": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/array-union/download/array-union-1.0.2.tgz", - "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", - "dev": true, - "requires": { - "array-uniq": "^1.0.1" - } - }, - "array-uniq": { - "version": "1.0.3", - "resolved": "https://registry.npm.taobao.org/array-uniq/download/array-uniq-1.0.3.tgz", - "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", - "dev": true - }, - "array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npm.taobao.org/array-unique/download/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=" - }, - "asn1": { - "version": "0.2.4", - "resolved": "https://registry.npm.taobao.org/asn1/download/asn1-0.2.4.tgz", - "integrity": "sha1-jSR136tVO7M+d7VOWeiAu4ziMTY=", - "dev": true, - "requires": { - "safer-buffer": "~2.1.0" - } - }, - "asn1.js": { - "version": "5.4.1", - "resolved": "https://registry.npm.taobao.org/asn1.js/download/asn1.js-5.4.1.tgz", - "integrity": "sha1-EamAuE67kXgc41sP3C7ilON4Pwc=", - "requires": { - "bn.js": "^4.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "safer-buffer": "^2.1.0" - }, - "dependencies": { - "bn.js": { - "version": "4.11.9", - "resolved": "https://registry.npm.taobao.org/bn.js/download/bn.js-4.11.9.tgz", - "integrity": "sha1-JtVWgpRY+dHoH8SJUkk9C6NQeCg=" - } - } - }, - "assert": { - "version": "1.5.0", - "resolved": "https://registry.npm.taobao.org/assert/download/assert-1.5.0.tgz", - "integrity": "sha1-VcEJqvbgrv2z3EtxJAxwv1dLGOs=", - "requires": { - "object-assign": "^4.1.1", - "util": "0.10.3" - }, - "dependencies": { - "inherits": { - "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/inherits/download/inherits-2.0.1.tgz", - "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=" - }, - "util": { - "version": "0.10.3", - "resolved": "https://registry.npm.taobao.org/util/download/util-0.10.3.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Futil%2Fdownload%2Futil-0.10.3.tgz", - "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", - "requires": { - "inherits": "2.0.1" - } - } - } - }, - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/assert-plus/download/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "dev": true - }, - "assign-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/assign-symbols/download/assign-symbols-1.0.0.tgz", - "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=" - }, - "async": { - "version": "2.6.3", - "resolved": "https://registry.npm.taobao.org/async/download/async-2.6.3.tgz", - "integrity": "sha1-1yYl4jRKNlbjo61Pp0n6gymdgv8=", - "dev": true, - "requires": { - "lodash": "^4.17.14" - } - }, - "async-each": { - "version": "1.0.3", - "resolved": "https://registry.npm.taobao.org/async-each/download/async-each-1.0.3.tgz", - "integrity": "sha1-tyfb+H12UWAvBvTUrDh/R9kbDL8=", - "devOptional": true - }, - "async-limiter": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/async-limiter/download/async-limiter-1.0.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fasync-limiter%2Fdownload%2Fasync-limiter-1.0.1.tgz", - "integrity": "sha1-3TeelPDbgxCwgpH51kwyCXZmF/0=", - "dev": true - }, - "async-validator": { - "version": "1.8.5", - "resolved": "https://registry.npm.taobao.org/async-validator/download/async-validator-1.8.5.tgz?cache=0&sync_timestamp=1596623572478&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fasync-validator%2Fdownload%2Fasync-validator-1.8.5.tgz", - "integrity": "sha1-3D4I7B/Q3dtn5ghC8CwM0c7G1/A=", - "requires": { - "babel-runtime": "6.x" - } - }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npm.taobao.org/asynckit/download/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", - "dev": true - }, - "atob": { - "version": "2.1.2", - "resolved": "https://registry.npm.taobao.org/atob/download/atob-2.1.2.tgz", - "integrity": "sha1-bZUX654DDSQ2ZmZR6GvZ9vE1M8k=" - }, - "autoprefixer": { - "version": "9.8.6", - "resolved": "https://registry.npm.taobao.org/autoprefixer/download/autoprefixer-9.8.6.tgz?cache=0&sync_timestamp=1601167582745&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fautoprefixer%2Fdownload%2Fautoprefixer-9.8.6.tgz", - "integrity": "sha1-O3NZTKG/kmYyDFrPFYjXTep0IQ8=", - "dev": true, - "requires": { - "browserslist": "^4.12.0", - "caniuse-lite": "^1.0.30001109", - "colorette": "^1.2.1", - "normalize-range": "^0.1.2", - "num2fraction": "^1.2.2", - "postcss": "^7.0.32", - "postcss-value-parser": "^4.1.0" - } - }, - "aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npm.taobao.org/aws-sign2/download/aws-sign2-0.7.0.tgz", - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", - "dev": true - }, - "aws4": { - "version": "1.10.1", - "resolved": "https://registry.npm.taobao.org/aws4/download/aws4-1.10.1.tgz?cache=0&sync_timestamp=1597236947743&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Faws4%2Fdownload%2Faws4-1.10.1.tgz", - "integrity": "sha1-4eguTz6Zniz9YbFhKA0WoRH4ZCg=", - "dev": true - }, - "axios": { - "version": "0.21.0", - "resolved": "https://registry.npm.taobao.org/axios/download/axios-0.21.0.tgz", - "integrity": "sha1-Jt8IiAOiNQ3/LCf5b++Z/klEKso=", - "requires": { - "follow-redirects": "^1.10.0" - } - }, - "babel-helper-vue-jsx-merge-props": { - "version": "2.0.3", - "resolved": "https://registry.npm.taobao.org/babel-helper-vue-jsx-merge-props/download/babel-helper-vue-jsx-merge-props-2.0.3.tgz", - "integrity": "sha1-Iq69OzOQIyjlEyk6jkmSs4T58bY=" - }, - "babel-loader": { - "version": "8.1.0", - "resolved": "https://registry.npm.taobao.org/babel-loader/download/babel-loader-8.1.0.tgz?cache=0&sync_timestamp=1584715910722&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fbabel-loader%2Fdownload%2Fbabel-loader-8.1.0.tgz", - "integrity": "sha1-xhHVESvVIJq+i5+oTD5NolJ18cM=", - "dev": true, - "requires": { - "find-cache-dir": "^2.1.0", - "loader-utils": "^1.4.0", - "mkdirp": "^0.5.3", - "pify": "^4.0.1", - "schema-utils": "^2.6.5" - } - }, - "babel-plugin-dynamic-import-node": { - "version": "2.3.3", - "resolved": "https://registry.npm.taobao.org/babel-plugin-dynamic-import-node/download/babel-plugin-dynamic-import-node-2.3.3.tgz", - "integrity": "sha1-hP2hnJduxcbe/vV/lCez3vZuF6M=", - "dev": true, - "requires": { - "object.assign": "^4.1.0" - } - }, - "babel-runtime": { - "version": "6.26.0", - "resolved": "https://registry.npm.taobao.org/babel-runtime/download/babel-runtime-6.26.0.tgz", - "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", - "requires": { - "core-js": "^2.4.0", - "regenerator-runtime": "^0.11.0" - }, - "dependencies": { - "core-js": { - "version": "2.6.12", - "resolved": "https://registry.npmmirror.com/core-js/download/core-js-2.6.12.tgz", - "integrity": "sha1-2TM9+nsGXjR8xWgiGdb2kIWcwuw=" - }, - "regenerator-runtime": { - "version": "0.11.1", - "resolved": "https://registry.npm.taobao.org/regenerator-runtime/download/regenerator-runtime-0.11.1.tgz?cache=0&sync_timestamp=1595456311465&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fregenerator-runtime%2Fdownload%2Fregenerator-runtime-0.11.1.tgz", - "integrity": "sha1-vgWtf5v30i4Fb5cmzuUBf78Z4uk=" - } - } - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/balanced-match/download/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" - }, - "base": { - "version": "0.11.2", - "resolved": "https://registry.npm.taobao.org/base/download/base-0.11.2.tgz", - "integrity": "sha1-e95c7RRbbVUakNuH+DxVi060io8=", - "requires": { - "cache-base": "^1.0.1", - "class-utils": "^0.3.5", - "component-emitter": "^1.2.1", - "define-property": "^1.0.0", - "isobject": "^3.0.1", - "mixin-deep": "^1.2.0", - "pascalcase": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/define-property/download/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/is-accessor-descriptor/download/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY=", - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/is-data-descriptor/download/is-data-descriptor-1.0.0.tgz", - "integrity": "sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc=", - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/is-descriptor/download/is-descriptor-1.0.2.tgz", - "integrity": "sha1-OxWXRqZmBLBPjIFSS6NlxfFNhuw=", - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "base64-js": { - "version": "1.3.1", - "resolved": "https://registry.npm.taobao.org/base64-js/download/base64-js-1.3.1.tgz", - "integrity": "sha1-WOzoy3XdB+ce0IxzarxfrE2/jfE=" - }, - "batch": { - "version": "0.6.1", - "resolved": "https://registry.npm.taobao.org/batch/download/batch-0.6.1.tgz", - "integrity": "sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY=", - "dev": true - }, - "bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/bcrypt-pbkdf/download/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", - "dev": true, - "requires": { - "tweetnacl": "^0.14.3" - } - }, - "bfj": { - "version": "6.1.2", - "resolved": "https://registry.npm.taobao.org/bfj/download/bfj-6.1.2.tgz", - "integrity": "sha1-MlyGGoIryzWKQceKM7jm4ght3n8=", - "dev": true, - "requires": { - "bluebird": "^3.5.5", - "check-types": "^8.0.3", - "hoopy": "^0.1.4", - "tryer": "^1.0.1" - } - }, - "big.js": { - "version": "5.2.2", - "resolved": "https://registry.npm.taobao.org/big.js/download/big.js-5.2.2.tgz", - "integrity": "sha1-ZfCvOC9Xi83HQr2cKB6cstd2gyg=" - }, - "binary-extensions": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/binary-extensions/download/binary-extensions-2.1.0.tgz", - "integrity": "sha1-MPpAyef+B9vIlWeM0ocCTeokHdk=", - "optional": true - }, - "bindings": { - "version": "1.5.0", - "resolved": "https://registry.npm.taobao.org/bindings/download/bindings-1.5.0.tgz", - "integrity": "sha1-EDU8npRTNLwFEabZCzj7x8nFBN8=", - "optional": true, - "requires": { - "file-uri-to-path": "1.0.0" - } - }, - "bluebird": { - "version": "3.7.2", - "resolved": "https://registry.npm.taobao.org/bluebird/download/bluebird-3.7.2.tgz", - "integrity": "sha1-nyKcFb4nJFT/qXOs4NvueaGww28=" - }, - "bn.js": { - "version": "5.1.3", - "resolved": "https://registry.npm.taobao.org/bn.js/download/bn.js-5.1.3.tgz", - "integrity": "sha1-vsoAVAj2Quvr6oCwQrTRjSrA7ms=" - }, - "body-parser": { - "version": "1.19.0", - "resolved": "https://registry.npm.taobao.org/body-parser/download/body-parser-1.19.0.tgz", - "integrity": "sha1-lrJwnlfJxOCab9Zqj9l5hE9p8Io=", - "dev": true, - "requires": { - "bytes": "3.1.0", - "content-type": "~1.0.4", - "debug": "2.6.9", - "depd": "~1.1.2", - "http-errors": "1.7.2", - "iconv-lite": "0.4.24", - "on-finished": "~2.3.0", - "qs": "6.7.0", - "raw-body": "2.4.0", - "type-is": "~1.6.17" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npm.taobao.org/debug/download/debug-2.6.9.tgz?cache=0&sync_timestamp=1600502894812&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdebug%2Fdownload%2Fdebug-2.6.9.tgz", - "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/ms/download/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, - "qs": { - "version": "6.7.0", - "resolved": "https://registry.npm.taobao.org/qs/download/qs-6.7.0.tgz", - "integrity": "sha1-QdwaAV49WB8WIXdr4xr7KHapsbw=", - "dev": true - } - } - }, - "body-scroll-lock": { - "version": "2.7.1", - "resolved": "https://registry.npm.taobao.org/body-scroll-lock/download/body-scroll-lock-2.7.1.tgz", - "integrity": "sha1-yvP5yRdzrx/7aEzWbtkTe1tzcBQ=" - }, - "bonjour": { - "version": "3.5.0", - "resolved": "https://registry.npm.taobao.org/bonjour/download/bonjour-3.5.0.tgz", - "integrity": "sha1-jokKGD2O6aI5OzhExpGkK897yfU=", - "dev": true, - "requires": { - "array-flatten": "^2.1.0", - "deep-equal": "^1.0.1", - "dns-equal": "^1.0.0", - "dns-txt": "^2.0.2", - "multicast-dns": "^6.0.1", - "multicast-dns-service-types": "^1.1.0" - }, - "dependencies": { - "array-flatten": { - "version": "2.1.2", - "resolved": "https://registry.npm.taobao.org/array-flatten/download/array-flatten-2.1.2.tgz?cache=0&sync_timestamp=1574313384951&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Farray-flatten%2Fdownload%2Farray-flatten-2.1.2.tgz", - "integrity": "sha1-JO+AoowaiTYX4hSbDG0NeIKTsJk=", - "dev": true - } - } - }, - "boolbase": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/boolbase/download/boolbase-1.0.0.tgz", - "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=", - "dev": true - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npm.taobao.org/brace-expansion/download/brace-expansion-1.1.11.tgz?cache=0&sync_timestamp=1601898189928&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fbrace-expansion%2Fdownload%2Fbrace-expansion-1.1.11.tgz", - "integrity": "sha1-PH/L9SnYcibz0vUrlm/1Jx60Qd0=", - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "2.3.2", - "resolved": "https://registry.npm.taobao.org/braces/download/braces-2.3.2.tgz", - "integrity": "sha1-WXn9PxTNUxVl5fot8av/8d+u5yk=", - "requires": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/extend-shallow/download/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "brorand": { - "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/brorand/download/brorand-1.1.0.tgz", - "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" - }, - "browser-detect": { - "version": "0.2.28", - "resolved": "https://registry.npm.taobao.org/browser-detect/download/browser-detect-0.2.28.tgz", - "integrity": "sha1-Voj8IvY4OQYU6+pGRkg0A/sg6/s=", - "requires": { - "core-js": "^2.5.7" - }, - "dependencies": { - "core-js": { - "version": "2.6.12", - "resolved": "https://registry.npm.taobao.org/core-js/download/core-js-2.6.12.tgz?cache=0&sync_timestamp=1606326891071&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcore-js%2Fdownload%2Fcore-js-2.6.12.tgz", - "integrity": "sha1-2TM9+nsGXjR8xWgiGdb2kIWcwuw=" - } - } - }, - "browserify-aes": { - "version": "1.2.0", - "resolved": "https://registry.npm.taobao.org/browserify-aes/download/browserify-aes-1.2.0.tgz", - "integrity": "sha1-Mmc0ZC9APavDADIJhTu3CtQo70g=", - "requires": { - "buffer-xor": "^1.0.3", - "cipher-base": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.3", - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "browserify-cipher": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/browserify-cipher/download/browserify-cipher-1.0.1.tgz", - "integrity": "sha1-jWR0wbhwv9q807z8wZNKEOlPFfA=", - "requires": { - "browserify-aes": "^1.0.4", - "browserify-des": "^1.0.0", - "evp_bytestokey": "^1.0.0" - } - }, - "browserify-des": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/browserify-des/download/browserify-des-1.0.2.tgz", - "integrity": "sha1-OvTx9Zg5QDVy8cZiBDdfen9wPpw=", - "requires": { - "cipher-base": "^1.0.1", - "des.js": "^1.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "browserify-rsa": { - "version": "4.0.1", - "resolved": "https://registry.npm.taobao.org/browserify-rsa/download/browserify-rsa-4.0.1.tgz", - "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", - "requires": { - "bn.js": "^4.1.0", - "randombytes": "^2.0.1" - }, - "dependencies": { - "bn.js": { - "version": "4.11.9", - "resolved": "https://registry.npm.taobao.org/bn.js/download/bn.js-4.11.9.tgz", - "integrity": "sha1-JtVWgpRY+dHoH8SJUkk9C6NQeCg=" - } - } - }, - "browserify-sign": { - "version": "4.2.1", - "resolved": "https://registry.npm.taobao.org/browserify-sign/download/browserify-sign-4.2.1.tgz", - "integrity": "sha1-6vSt1G3VS+O7OzbAzxWrvrp5VsM=", - "requires": { - "bn.js": "^5.1.1", - "browserify-rsa": "^4.0.1", - "create-hash": "^1.2.0", - "create-hmac": "^1.1.7", - "elliptic": "^6.5.3", - "inherits": "^2.0.4", - "parse-asn1": "^5.1.5", - "readable-stream": "^3.6.0", - "safe-buffer": "^5.2.0" - }, - "dependencies": { - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npm.taobao.org/readable-stream/download/readable-stream-3.6.0.tgz?cache=0&sync_timestamp=1581624324274&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Freadable-stream%2Fdownload%2Freadable-stream-3.6.0.tgz", - "integrity": "sha1-M3u9o63AcGvT4CRCaihtS0sskZg=", - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - }, - "safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npm.taobao.org/safe-buffer/download/safe-buffer-5.2.1.tgz", - "integrity": "sha1-Hq+fqb2x/dTsdfWPnNtOa3gn7sY=" - } - } - }, - "browserify-zlib": { - "version": "0.2.0", - "resolved": "https://registry.npm.taobao.org/browserify-zlib/download/browserify-zlib-0.2.0.tgz", - "integrity": "sha1-KGlFnZqjviRf6P4sofRuLn9U1z8=", - "requires": { - "pako": "~1.0.5" - } - }, - "browserslist": { - "version": "4.14.5", - "resolved": "https://registry.npm.taobao.org/browserslist/download/browserslist-4.14.5.tgz?cache=0&sync_timestamp=1600993129773&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fbrowserslist%2Fdownload%2Fbrowserslist-4.14.5.tgz", - "integrity": "sha1-HHUUYaEC3cYOQJk2ObcJvn8sQBU=", - "dev": true, - "requires": { - "caniuse-lite": "^1.0.30001135", - "electron-to-chromium": "^1.3.571", - "escalade": "^3.1.0", - "node-releases": "^1.1.61" - } - }, - "buffer": { - "version": "4.9.2", - "resolved": "https://registry.npm.taobao.org/buffer/download/buffer-4.9.2.tgz?cache=0&sync_timestamp=1603834228181&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fbuffer%2Fdownload%2Fbuffer-4.9.2.tgz", - "integrity": "sha1-Iw6tNEACmIZEhBqwJEr4xEu+Pvg=", - "requires": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4", - "isarray": "^1.0.0" - } - }, - "buffer-from": { - "version": "1.1.1", - "resolved": "https://registry.npm.taobao.org/buffer-from/download/buffer-from-1.1.1.tgz", - "integrity": "sha1-MnE7wCj3XAL9txDXx7zsHyxgcO8=" - }, - "buffer-indexof": { - "version": "1.1.1", - "resolved": "https://registry.npm.taobao.org/buffer-indexof/download/buffer-indexof-1.1.1.tgz", - "integrity": "sha1-Uvq8xqYG0aADAoAmSO9o9jnaJow=", - "dev": true - }, - "buffer-json": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/buffer-json/download/buffer-json-2.0.0.tgz", - "integrity": "sha1-9z4TseQvGW/i/WfQAcfXEH7dfCM=", - "dev": true - }, - "buffer-xor": { - "version": "1.0.3", - "resolved": "https://registry.npm.taobao.org/buffer-xor/download/buffer-xor-1.0.3.tgz", - "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=" - }, - "builtin-status-codes": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/builtin-status-codes/download/builtin-status-codes-3.0.0.tgz", - "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=" - }, - "bytes": { - "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/bytes/download/bytes-3.1.0.tgz", - "integrity": "sha1-9s95M6Ng4FiPqf3oVlHNx/gF0fY=", - "dev": true - }, - "cacache": { - "version": "12.0.4", - "resolved": "https://registry.npm.taobao.org/cacache/download/cacache-12.0.4.tgz?cache=0&sync_timestamp=1594429684526&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcacache%2Fdownload%2Fcacache-12.0.4.tgz", - "integrity": "sha1-ZovL0QWutfHZL+JVcOyVJcj6pAw=", - "requires": { - "bluebird": "^3.5.5", - "chownr": "^1.1.1", - "figgy-pudding": "^3.5.1", - "glob": "^7.1.4", - "graceful-fs": "^4.1.15", - "infer-owner": "^1.0.3", - "lru-cache": "^5.1.1", - "mississippi": "^3.0.0", - "mkdirp": "^0.5.1", - "move-concurrently": "^1.0.1", - "promise-inflight": "^1.0.1", - "rimraf": "^2.6.3", - "ssri": "^6.0.1", - "unique-filename": "^1.1.1", - "y18n": "^4.0.0" - } - }, - "cache-base": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/cache-base/download/cache-base-1.0.1.tgz", - "integrity": "sha1-Cn9GQWgxyLZi7jb+TnxZ129marI=", - "requires": { - "collection-visit": "^1.0.0", - "component-emitter": "^1.2.1", - "get-value": "^2.0.6", - "has-value": "^1.0.0", - "isobject": "^3.0.1", - "set-value": "^2.0.0", - "to-object-path": "^0.3.0", - "union-value": "^1.0.0", - "unset-value": "^1.0.0" - } - }, - "cache-loader": { - "version": "4.1.0", - "resolved": "https://registry.npm.taobao.org/cache-loader/download/cache-loader-4.1.0.tgz", - "integrity": "sha1-mUjK41OuwKH8ser9ojAIFuyFOH4=", - "dev": true, - "requires": { - "buffer-json": "^2.0.0", - "find-cache-dir": "^3.0.0", - "loader-utils": "^1.2.3", - "mkdirp": "^0.5.1", - "neo-async": "^2.6.1", - "schema-utils": "^2.0.0" - }, - "dependencies": { - "find-cache-dir": { - "version": "3.3.1", - "resolved": "https://registry.npm.taobao.org/find-cache-dir/download/find-cache-dir-3.3.1.tgz", - "integrity": "sha1-ibM/rUpGcNqpT4Vff74x1thP6IA=", - "dev": true, - "requires": { - "commondir": "^1.0.1", - "make-dir": "^3.0.2", - "pkg-dir": "^4.1.0" - } - }, - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npm.taobao.org/find-up/download/find-up-4.1.0.tgz?cache=0&sync_timestamp=1597169842138&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffind-up%2Fdownload%2Ffind-up-4.1.0.tgz", - "integrity": "sha1-l6/n1s3AvFkoWEt8jXsW6KmqXRk=", - "dev": true, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npm.taobao.org/locate-path/download/locate-path-5.0.0.tgz", - "integrity": "sha1-Gvujlq/WdqbUJQTQpno6frn2KqA=", - "dev": true, - "requires": { - "p-locate": "^4.1.0" - } - }, - "make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/make-dir/download/make-dir-3.1.0.tgz?cache=0&sync_timestamp=1587567572251&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmake-dir%2Fdownload%2Fmake-dir-3.1.0.tgz", - "integrity": "sha1-QV6WcEazp/HRhSd9hKpYIDcmoT8=", - "dev": true, - "requires": { - "semver": "^6.0.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npm.taobao.org/p-locate/download/p-locate-4.1.0.tgz", - "integrity": "sha1-o0KLtwiLOmApL2aRkni3wpetTwc=", - "dev": true, - "requires": { - "p-limit": "^2.2.0" - } - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/path-exists/download/path-exists-4.0.0.tgz", - "integrity": "sha1-UTvb4tO5XXdi6METfvoZXGxhtbM=", - "dev": true - }, - "pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npm.taobao.org/pkg-dir/download/pkg-dir-4.2.0.tgz?cache=0&sync_timestamp=1602859045787&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpkg-dir%2Fdownload%2Fpkg-dir-4.2.0.tgz", - "integrity": "sha1-8JkTPfft5CLoHR2ESCcO6z5CYfM=", - "dev": true, - "requires": { - "find-up": "^4.0.0" - } - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npm.taobao.org/semver/download/semver-6.3.0.tgz", - "integrity": "sha1-7gpkyK9ejO6mdoexM3YeG+y9HT0=", - "dev": true - } - } - }, - "call-me-maybe": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/call-me-maybe/download/call-me-maybe-1.0.1.tgz", - "integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms=", - "dev": true - }, - "caller-callsite": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/caller-callsite/download/caller-callsite-2.0.0.tgz", - "integrity": "sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ=", - "dev": true, - "requires": { - "callsites": "^2.0.0" - } - }, - "caller-path": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/caller-path/download/caller-path-2.0.0.tgz", - "integrity": "sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ=", - "dev": true, - "requires": { - "caller-callsite": "^2.0.0" - } - }, - "callsites": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/callsites/download/callsites-2.0.0.tgz", - "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=", - "dev": true - }, - "camel-case": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/camel-case/download/camel-case-3.0.0.tgz", - "integrity": "sha1-yjw2iKTpzzpM2nd9xNy8cTJJz3M=", - "dev": true, - "requires": { - "no-case": "^2.2.0", - "upper-case": "^1.1.1" - } - }, - "camelcase": { - "version": "6.2.0", - "resolved": "https://registry.npm.taobao.org/camelcase/download/camelcase-6.2.0.tgz?cache=0&sync_timestamp=1603923709404&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcamelcase%2Fdownload%2Fcamelcase-6.2.0.tgz", - "integrity": "sha1-kkr4gcnVJaydh/QNlk5c6pgqGAk=", - "dev": true - }, - "caniuse-api": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/caniuse-api/download/caniuse-api-3.0.0.tgz", - "integrity": "sha1-Xk2Q4idJYdRikZl99Znj7QCO5MA=", - "dev": true, - "requires": { - "browserslist": "^4.0.0", - "caniuse-lite": "^1.0.0", - "lodash.memoize": "^4.1.2", - "lodash.uniq": "^4.5.0" - } - }, - "caniuse-lite": { - "version": "1.0.30001154", - "resolved": "https://registry.npm.taobao.org/caniuse-lite/download/caniuse-lite-1.0.30001154.tgz?cache=0&sync_timestamp=1604001843079&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcaniuse-lite%2Fdownload%2Fcaniuse-lite-1.0.30001154.tgz", - "integrity": "sha1-87vCRc5V5MHNIPpzGwl4gBgafxc=", - "dev": true - }, - "case-sensitive-paths-webpack-plugin": { - "version": "2.3.0", - "resolved": "https://registry.npm.taobao.org/case-sensitive-paths-webpack-plugin/download/case-sensitive-paths-webpack-plugin-2.3.0.tgz", - "integrity": "sha1-I6xhPMmoVuT4j/i7c7u16YmCXPc=", - "dev": true - }, - "caseless": { - "version": "0.12.0", - "resolved": "https://registry.npm.taobao.org/caseless/download/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", - "dev": true - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npm.taobao.org/chalk/download/chalk-2.4.2.tgz?cache=0&sync_timestamp=1591687070184&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fchalk%2Fdownload%2Fchalk-2.4.2.tgz", - "integrity": "sha1-zUJUFnelQzPPVBpJEIwUMrRMlCQ=", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "check-types": { - "version": "8.0.3", - "resolved": "https://registry.npm.taobao.org/check-types/download/check-types-8.0.3.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcheck-types%2Fdownload%2Fcheck-types-8.0.3.tgz", - "integrity": "sha1-M1bMoZyIlUTy16le1JzlCKDs9VI=", - "dev": true - }, - "chokidar": { - "version": "3.4.3", - "resolved": "https://registry.npm.taobao.org/chokidar/download/chokidar-3.4.3.tgz?cache=0&sync_timestamp=1602585381749&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fchokidar%2Fdownload%2Fchokidar-3.4.3.tgz", - "integrity": "sha1-wd84IxRI5FykrFiObHlXO6alfVs=", - "optional": true, - "requires": { - "anymatch": "~3.1.1", - "braces": "~3.0.2", - "fsevents": "~2.1.2", - "glob-parent": "~5.1.0", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.5.0" - }, - "dependencies": { - "braces": { - "version": "3.0.2", - "resolved": "https://registry.npm.taobao.org/braces/download/braces-3.0.2.tgz", - "integrity": "sha1-NFThpGLujVmeI23zNs2epPiv4Qc=", - "optional": true, - "requires": { - "fill-range": "^7.0.1" - } - }, - "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npm.taobao.org/fill-range/download/fill-range-7.0.1.tgz", - "integrity": "sha1-GRmmp8df44ssfHflGYU12prN2kA=", - "optional": true, - "requires": { - "to-regex-range": "^5.0.1" - } - }, - "is-number": { - "version": "7.0.0", - "resolved": "https://registry.npm.taobao.org/is-number/download/is-number-7.0.0.tgz", - "integrity": "sha1-dTU0W4lnNNX4DE0GxQlVUnoU8Ss=", - "optional": true - }, - "to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npm.taobao.org/to-regex-range/download/to-regex-range-5.0.1.tgz", - "integrity": "sha1-FkjESq58jZiKMmAY7XL1tN0DkuQ=", - "optional": true, - "requires": { - "is-number": "^7.0.0" - } - } - } - }, - "chownr": { - "version": "1.1.4", - "resolved": "https://registry.npm.taobao.org/chownr/download/chownr-1.1.4.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fchownr%2Fdownload%2Fchownr-1.1.4.tgz", - "integrity": "sha1-b8nXtC0ypYNZYzdmbn0ICE2izGs=" - }, - "chrome-trace-event": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/chrome-trace-event/download/chrome-trace-event-1.0.2.tgz", - "integrity": "sha1-I0CQ7pfH1K0aLEvq4nUF3v/GCKQ=", - "requires": { - "tslib": "^1.9.0" - } - }, - "cipher-base": { - "version": "1.0.4", - "resolved": "https://registry.npm.taobao.org/cipher-base/download/cipher-base-1.0.4.tgz", - "integrity": "sha1-h2Dk7MJy9MNjUy+SbYdKriwTl94=", - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "class-utils": { - "version": "0.3.6", - "resolved": "https://registry.npm.taobao.org/class-utils/download/class-utils-0.3.6.tgz", - "integrity": "sha1-+TNprouafOAv1B+q0MqDAzGQxGM=", - "requires": { - "arr-union": "^3.1.0", - "define-property": "^0.2.5", - "isobject": "^3.0.0", - "static-extend": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npm.taobao.org/define-property/download/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "requires": { - "is-descriptor": "^0.1.0" - } - } - } - }, - "clean-css": { - "version": "4.2.3", - "resolved": "https://registry.npm.taobao.org/clean-css/download/clean-css-4.2.3.tgz", - "integrity": "sha1-UHtd59l7SO5T2ErbAWD/YhY4D3g=", - "dev": true, - "requires": { - "source-map": "~0.6.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz?cache=0&sync_timestamp=1571657176668&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsource-map%2Fdownload%2Fsource-map-0.6.1.tgz", - "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", - "dev": true - } - } - }, - "clean-stack": { - "version": "2.2.0", - "resolved": "https://registry.npm.taobao.org/clean-stack/download/clean-stack-2.2.0.tgz", - "integrity": "sha1-7oRy27Ep5yezHooQpCfe6d/kAIs=" - }, - "cli-cursor": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/cli-cursor/download/cli-cursor-2.1.0.tgz", - "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", - "dev": true, - "requires": { - "restore-cursor": "^2.0.0" - } - }, - "cli-highlight": { - "version": "2.1.4", - "resolved": "https://registry.npm.taobao.org/cli-highlight/download/cli-highlight-2.1.4.tgz", - "integrity": "sha1-CYy2Qs8X9CrcHBFF4H+WDsTXUis=", - "dev": true, - "requires": { - "chalk": "^3.0.0", - "highlight.js": "^9.6.0", - "mz": "^2.4.0", - "parse5": "^5.1.1", - "parse5-htmlparser2-tree-adapter": "^5.1.1", - "yargs": "^15.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npm.taobao.org/ansi-styles/download/ansi-styles-4.3.0.tgz?cache=0&sync_timestamp=1601839122515&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fansi-styles%2Fdownload%2Fansi-styles-4.3.0.tgz", - "integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/chalk/download/chalk-3.0.0.tgz?cache=0&sync_timestamp=1591687070184&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fchalk%2Fdownload%2Fchalk-3.0.0.tgz", - "integrity": "sha1-P3PCv1JlkfV0zEksUeJFY0n4ROQ=", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/color-convert/download/color-convert-2.0.1.tgz", - "integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npm.taobao.org/color-name/download/color-name-1.1.4.tgz", - "integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/has-flag/download/has-flag-4.0.0.tgz", - "integrity": "sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=", - "dev": true - }, - "highlight.js": { - "version": "9.18.3", - "resolved": "https://registry.npm.taobao.org/highlight.js/download/highlight.js-9.18.3.tgz", - "integrity": "sha1-oaCiAo1eMUniOA+Khl7oUWcD1jQ=", - "dev": true - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-7.2.0.tgz?cache=0&sync_timestamp=1598611709087&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsupports-color%2Fdownload%2Fsupports-color-7.2.0.tgz", - "integrity": "sha1-G33NyzK4E4gBs+R4umpRyqiWSNo=", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, - "cli-spinners": { - "version": "2.5.0", - "resolved": "https://registry.npm.taobao.org/cli-spinners/download/cli-spinners-2.5.0.tgz?cache=0&sync_timestamp=1602505826257&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcli-spinners%2Fdownload%2Fcli-spinners-2.5.0.tgz", - "integrity": "sha1-EnY+RyUb+VHLdcIB36WP8byy0Ec=", - "dev": true - }, - "clipboard": { - "version": "2.0.6", - "resolved": "https://registry.npm.taobao.org/clipboard/download/clipboard-2.0.6.tgz?cache=0&sync_timestamp=1599054235610&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fclipboard%2Fdownload%2Fclipboard-2.0.6.tgz", - "integrity": "sha1-UpISlu7A/fd+rRdJQhshyWhkc3Y=", - "requires": { - "good-listener": "^1.2.2", - "select": "^1.1.2", - "tiny-emitter": "^2.0.0" - } - }, - "clipboardy": { - "version": "2.3.0", - "resolved": "https://registry.npm.taobao.org/clipboardy/download/clipboardy-2.3.0.tgz", - "integrity": "sha1-PCkDZQxo5GqRs4iYW8J3QofbopA=", - "dev": true, - "requires": { - "arch": "^2.1.1", - "execa": "^1.0.0", - "is-wsl": "^2.1.1" - }, - "dependencies": { - "is-wsl": { - "version": "2.2.0", - "resolved": "https://registry.npm.taobao.org/is-wsl/download/is-wsl-2.2.0.tgz", - "integrity": "sha1-dKTHbnfKn9P5MvKQwX6jJs0VcnE=", - "dev": true, - "requires": { - "is-docker": "^2.0.0" - } - } - } - }, - "cliui": { - "version": "6.0.0", - "resolved": "https://registry.npm.taobao.org/cliui/download/cliui-6.0.0.tgz?cache=0&sync_timestamp=1602861367442&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcliui%2Fdownload%2Fcliui-6.0.0.tgz", - "integrity": "sha1-UR1wLAxOQcoVbX0OlgIfI+EyJbE=", - "dev": true, - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^6.2.0" - }, - "dependencies": { - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/is-fullwidth-code-point/download/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha1-8Rb4Bk/pCz94RKOJl8C3UFEmnx0=", - "dev": true - }, - "string-width": { - "version": "4.2.0", - "resolved": "https://registry.npm.taobao.org/string-width/download/string-width-4.2.0.tgz", - "integrity": "sha1-lSGCxGzHssMT0VluYjmSvRY7crU=", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" - } - } - } - }, - "clone": { - "version": "1.0.4", - "resolved": "https://registry.npm.taobao.org/clone/download/clone-1.0.4.tgz", - "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=", - "dev": true - }, - "coa": { - "version": "2.0.2", - "resolved": "https://registry.npm.taobao.org/coa/download/coa-2.0.2.tgz", - "integrity": "sha1-Q/bCEVG07yv1cYfbDXPeIp4+fsM=", - "dev": true, - "requires": { - "@types/q": "^1.5.1", - "chalk": "^2.4.1", - "q": "^1.1.2" - } - }, - "codemirror": { - "version": "5.59.3", - "resolved": "https://registry.npm.taobao.org/codemirror/download/codemirror-5.59.3.tgz", - "integrity": "sha1-I37DrA45/uUNbxphlsgXKnx8K6E=" - }, - "collection-visit": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/collection-visit/download/collection-visit-1.0.0.tgz", - "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", - "requires": { - "map-visit": "^1.0.0", - "object-visit": "^1.0.0" - } - }, - "color": { - "version": "3.1.3", - "resolved": "https://registry.npm.taobao.org/color/download/color-3.1.3.tgz?cache=0&sync_timestamp=1602228883047&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcolor%2Fdownload%2Fcolor-3.1.3.tgz", - "integrity": "sha1-ymf7TnuX1hHc3jns7tQiBn2RWW4=", - "dev": true, - "requires": { - "color-convert": "^1.9.1", - "color-string": "^1.5.4" - } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npm.taobao.org/color-convert/download/color-convert-1.9.3.tgz", - "integrity": "sha1-u3GFBpDh8TZWfeYp0tVHHe2kweg=", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npm.taobao.org/color-name/download/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true - }, - "color-string": { - "version": "1.5.4", - "resolved": "https://registry.npm.taobao.org/color-string/download/color-string-1.5.4.tgz?cache=0&sync_timestamp=1602228106182&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcolor-string%2Fdownload%2Fcolor-string-1.5.4.tgz", - "integrity": "sha1-3VHNJc/ulT0Tj+QAI3LMPQ5QTLY=", - "dev": true, - "requires": { - "color-name": "^1.0.0", - "simple-swizzle": "^0.2.2" - } - }, - "colorette": { - "version": "1.2.1", - "resolved": "https://registry.npm.taobao.org/colorette/download/colorette-1.2.1.tgz?cache=0&sync_timestamp=1593955804228&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcolorette%2Fdownload%2Fcolorette-1.2.1.tgz", - "integrity": "sha1-TQuSEyXBT6+SYzCGpTbbbolWSxs=", - "dev": true - }, - "combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npm.taobao.org/combined-stream/download/combined-stream-1.0.8.tgz", - "integrity": "sha1-w9RaizT9cwYxoRCoolIGgrMdWn8=", - "dev": true, - "requires": { - "delayed-stream": "~1.0.0" - } - }, - "commander": { - "version": "2.20.3", - "resolved": "https://registry.npm.taobao.org/commander/download/commander-2.20.3.tgz?cache=0&sync_timestamp=1603599636161&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcommander%2Fdownload%2Fcommander-2.20.3.tgz", - "integrity": "sha1-/UhehMA+tIgcIHIrpIA16FMa6zM=" - }, - "commondir": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/commondir/download/commondir-1.0.1.tgz", - "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=" - }, - "component-emitter": { - "version": "1.3.0", - "resolved": "https://registry.npm.taobao.org/component-emitter/download/component-emitter-1.3.0.tgz", - "integrity": "sha1-FuQHD7qK4ptnnyIVhT7hgasuq8A=" - }, - "compressible": { - "version": "2.0.18", - "resolved": "https://registry.npm.taobao.org/compressible/download/compressible-2.0.18.tgz?cache=0&sync_timestamp=1578286264482&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcompressible%2Fdownload%2Fcompressible-2.0.18.tgz", - "integrity": "sha1-r1PMprBw1MPAdQ+9dyhqbXzEb7o=", - "dev": true, - "requires": { - "mime-db": ">= 1.43.0 < 2" - } - }, - "compression": { - "version": "1.7.4", - "resolved": "https://registry.npm.taobao.org/compression/download/compression-1.7.4.tgz", - "integrity": "sha1-lVI+/xcMpXwpoMpB5v4TH0Hlu48=", - "dev": true, - "requires": { - "accepts": "~1.3.5", - "bytes": "3.0.0", - "compressible": "~2.0.16", - "debug": "2.6.9", - "on-headers": "~1.0.2", - "safe-buffer": "5.1.2", - "vary": "~1.1.2" - }, - "dependencies": { - "bytes": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/bytes/download/bytes-3.0.0.tgz", - "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=", - "dev": true - }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npm.taobao.org/debug/download/debug-2.6.9.tgz?cache=0&sync_timestamp=1600502894812&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdebug%2Fdownload%2Fdebug-2.6.9.tgz", - "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/ms/download/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } - } - }, - "compression-webpack-plugin": { - "version": "5.0.1", - "resolved": "https://registry.npm.taobao.org/compression-webpack-plugin/download/compression-webpack-plugin-5.0.1.tgz?cache=0&sync_timestamp=1610367177662&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcompression-webpack-plugin%2Fdownload%2Fcompression-webpack-plugin-5.0.1.tgz", - "integrity": "sha1-MWwaTkzMlFEKl4yWf8FDWB0eNkM=", - "requires": { - "cacache": "^15.0.5", - "find-cache-dir": "^3.3.1", - "schema-utils": "^2.7.0", - "serialize-javascript": "^4.0.0", - "webpack-sources": "^1.4.3" - }, - "dependencies": { - "cacache": { - "version": "15.0.6", - "resolved": "https://registry.npm.taobao.org/cacache/download/cacache-15.0.6.tgz?cache=0&sync_timestamp=1616431156987&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcacache%2Fdownload%2Fcacache-15.0.6.tgz", - "integrity": "sha1-ZajFgP2hW1kVD7dr8/Oo5F1YMJk=", - "requires": { - "@npmcli/move-file": "^1.0.1", - "chownr": "^2.0.0", - "fs-minipass": "^2.0.0", - "glob": "^7.1.4", - "infer-owner": "^1.0.4", - "lru-cache": "^6.0.0", - "minipass": "^3.1.1", - "minipass-collect": "^1.0.2", - "minipass-flush": "^1.0.5", - "minipass-pipeline": "^1.2.2", - "mkdirp": "^1.0.3", - "p-map": "^4.0.0", - "promise-inflight": "^1.0.1", - "rimraf": "^3.0.2", - "ssri": "^8.0.1", - "tar": "^6.0.2", - "unique-filename": "^1.1.1" - } - }, - "chownr": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/chownr/download/chownr-2.0.0.tgz", - "integrity": "sha1-Fb++U9LqtM9w8YqM1o6+Wzyx3s4=" - }, - "find-cache-dir": { - "version": "3.3.1", - "resolved": "https://registry.npm.taobao.org/find-cache-dir/download/find-cache-dir-3.3.1.tgz", - "integrity": "sha1-ibM/rUpGcNqpT4Vff74x1thP6IA=", - "requires": { - "commondir": "^1.0.1", - "make-dir": "^3.0.2", - "pkg-dir": "^4.1.0" - } - }, - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npm.taobao.org/find-up/download/find-up-4.1.0.tgz?cache=0&sync_timestamp=1599054261724&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffind-up%2Fdownload%2Ffind-up-4.1.0.tgz", - "integrity": "sha1-l6/n1s3AvFkoWEt8jXsW6KmqXRk=", - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npm.taobao.org/locate-path/download/locate-path-5.0.0.tgz", - "integrity": "sha1-Gvujlq/WdqbUJQTQpno6frn2KqA=", - "requires": { - "p-locate": "^4.1.0" - } - }, - "lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npm.taobao.org/lru-cache/download/lru-cache-6.0.0.tgz", - "integrity": "sha1-bW/mVw69lqr5D8rR2vo7JWbbOpQ=", - "requires": { - "yallist": "^4.0.0" - } - }, - "make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/make-dir/download/make-dir-3.1.0.tgz", - "integrity": "sha1-QV6WcEazp/HRhSd9hKpYIDcmoT8=", - "requires": { - "semver": "^6.0.0" - } - }, - "mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npm.taobao.org/mkdirp/download/mkdirp-1.0.4.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmkdirp%2Fdownload%2Fmkdirp-1.0.4.tgz", - "integrity": "sha1-PrXtYmInVteaXw4qIh3+utdcL34=" - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npm.taobao.org/p-locate/download/p-locate-4.1.0.tgz", - "integrity": "sha1-o0KLtwiLOmApL2aRkni3wpetTwc=", - "requires": { - "p-limit": "^2.2.0" - } - }, - "p-map": { - "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/p-map/download/p-map-4.0.0.tgz?cache=0&sync_timestamp=1599054263097&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fp-map%2Fdownload%2Fp-map-4.0.0.tgz", - "integrity": "sha1-uy+Vpe2i7BaOySdOBqdHw+KQTSs=", - "requires": { - "aggregate-error": "^3.0.0" - } - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/path-exists/download/path-exists-4.0.0.tgz", - "integrity": "sha1-UTvb4tO5XXdi6METfvoZXGxhtbM=" - }, - "pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npm.taobao.org/pkg-dir/download/pkg-dir-4.2.0.tgz?cache=0&sync_timestamp=1602859045787&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpkg-dir%2Fdownload%2Fpkg-dir-4.2.0.tgz", - "integrity": "sha1-8JkTPfft5CLoHR2ESCcO6z5CYfM=", - "requires": { - "find-up": "^4.0.0" - } - }, - "rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npm.taobao.org/rimraf/download/rimraf-3.0.2.tgz?cache=0&sync_timestamp=1599054104695&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Frimraf%2Fdownload%2Frimraf-3.0.2.tgz", - "integrity": "sha1-8aVAK6YiCtUswSgrrBrjqkn9Bho=", - "requires": { - "glob": "^7.1.3" - } - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npm.taobao.org/semver/download/semver-6.3.0.tgz", - "integrity": "sha1-7gpkyK9ejO6mdoexM3YeG+y9HT0=" - }, - "ssri": { - "version": "8.0.1", - "resolved": "https://registry.npm.taobao.org/ssri/download/ssri-8.0.1.tgz?cache=0&sync_timestamp=1617826295004&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fssri%2Fdownload%2Fssri-8.0.1.tgz", - "integrity": "sha1-Y45OQ54v+9LNKJd21cpFfE9Roq8=", - "requires": { - "minipass": "^3.1.1" - } - }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/yallist/download/yallist-4.0.0.tgz", - "integrity": "sha1-m7knkNnA7/7GO+c1GeEaNQGaOnI=" - } - } - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npm.taobao.org/concat-map/download/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" - }, - "concat-stream": { - "version": "1.6.2", - "resolved": "https://registry.npm.taobao.org/concat-stream/download/concat-stream-1.6.2.tgz", - "integrity": "sha1-kEvfGUzTEi/Gdcd/xKw9T/D9GjQ=", - "requires": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" - } - }, - "connect-history-api-fallback": { - "version": "1.6.0", - "resolved": "https://registry.npm.taobao.org/connect-history-api-fallback/download/connect-history-api-fallback-1.6.0.tgz", - "integrity": "sha1-izIIk1kwjRERFdgcrT/Oq4iPl7w=", - "dev": true - }, - "console-browserify": { - "version": "1.2.0", - "resolved": "https://registry.npm.taobao.org/console-browserify/download/console-browserify-1.2.0.tgz", - "integrity": "sha1-ZwY871fOts9Jk6KrOlWECujEkzY=" - }, - "consolidate": { - "version": "0.15.1", - "resolved": "https://registry.npm.taobao.org/consolidate/download/consolidate-0.15.1.tgz?cache=0&sync_timestamp=1599596647062&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fconsolidate%2Fdownload%2Fconsolidate-0.15.1.tgz", - "integrity": "sha1-IasEMjXHGgfUXZqtmFk7DbpWurc=", - "dev": true, - "requires": { - "bluebird": "^3.1.1" - } - }, - "constants-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/constants-browserify/download/constants-browserify-1.0.0.tgz", - "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=" - }, - "content-disposition": { - "version": "0.5.3", - "resolved": "https://registry.npm.taobao.org/content-disposition/download/content-disposition-0.5.3.tgz", - "integrity": "sha1-4TDK9+cnkIfFYWwgB9BIVpiYT70=", - "dev": true, - "requires": { - "safe-buffer": "5.1.2" - } - }, - "content-type": { - "version": "1.0.4", - "resolved": "https://registry.npm.taobao.org/content-type/download/content-type-1.0.4.tgz", - "integrity": "sha1-4TjMdeBAxyexlm/l5fjJruJW/js=", - "dev": true - }, - "convert-source-map": { - "version": "1.7.0", - "resolved": "https://registry.npm.taobao.org/convert-source-map/download/convert-source-map-1.7.0.tgz?cache=0&sync_timestamp=1573003637425&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fconvert-source-map%2Fdownload%2Fconvert-source-map-1.7.0.tgz", - "integrity": "sha1-F6LLiC1/d9NJBYXizmxSRCSjpEI=", - "dev": true, - "requires": { - "safe-buffer": "~5.1.1" - } - }, - "cookie": { - "version": "0.4.0", - "resolved": "https://registry.npm.taobao.org/cookie/download/cookie-0.4.0.tgz?cache=0&sync_timestamp=1587525865178&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcookie%2Fdownload%2Fcookie-0.4.0.tgz", - "integrity": "sha1-vrQ35wIrO21JAZ0IhmUwPr6cFLo=", - "dev": true - }, - "cookie-signature": { - "version": "1.0.6", - "resolved": "https://registry.npm.taobao.org/cookie-signature/download/cookie-signature-1.0.6.tgz", - "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=", - "dev": true - }, - "copy-concurrently": { - "version": "1.0.5", - "resolved": "https://registry.npm.taobao.org/copy-concurrently/download/copy-concurrently-1.0.5.tgz", - "integrity": "sha1-kilzmMrjSTf8r9bsgTnBgFHwteA=", - "requires": { - "aproba": "^1.1.1", - "fs-write-stream-atomic": "^1.0.8", - "iferr": "^0.1.5", - "mkdirp": "^0.5.1", - "rimraf": "^2.5.4", - "run-queue": "^1.0.0" - } - }, - "copy-descriptor": { - "version": "0.1.1", - "resolved": "https://registry.npm.taobao.org/copy-descriptor/download/copy-descriptor-0.1.1.tgz", - "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=" - }, - "copy-webpack-plugin": { - "version": "5.1.2", - "resolved": "https://registry.npm.taobao.org/copy-webpack-plugin/download/copy-webpack-plugin-5.1.2.tgz", - "integrity": "sha1-ioieHcr6bJHGzUvhrRWPHTgjuuI=", - "dev": true, - "requires": { - "cacache": "^12.0.3", - "find-cache-dir": "^2.1.0", - "glob-parent": "^3.1.0", - "globby": "^7.1.1", - "is-glob": "^4.0.1", - "loader-utils": "^1.2.3", - "minimatch": "^3.0.4", - "normalize-path": "^3.0.0", - "p-limit": "^2.2.1", - "schema-utils": "^1.0.0", - "serialize-javascript": "^4.0.0", - "webpack-log": "^2.0.0" - }, - "dependencies": { - "glob-parent": { - "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/glob-parent/download/glob-parent-3.1.0.tgz", - "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", - "dev": true, - "requires": { - "is-glob": "^3.1.0", - "path-dirname": "^1.0.0" - }, - "dependencies": { - "is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/is-glob/download/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "dev": true, - "requires": { - "is-extglob": "^2.1.0" - } - } - } - }, - "globby": { - "version": "7.1.1", - "resolved": "https://registry.npm.taobao.org/globby/download/globby-7.1.1.tgz?cache=0&sync_timestamp=1591083783605&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fglobby%2Fdownload%2Fglobby-7.1.1.tgz", - "integrity": "sha1-+yzP+UAfhgCUXfral0QMypcrhoA=", - "dev": true, - "requires": { - "array-union": "^1.0.1", - "dir-glob": "^2.0.0", - "glob": "^7.1.2", - "ignore": "^3.3.5", - "pify": "^3.0.0", - "slash": "^1.0.0" - } - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/pify/download/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - }, - "schema-utils": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/schema-utils/download/schema-utils-1.0.0.tgz", - "integrity": "sha1-C3mpMgTXtgDUsoUNH2bCo0lRx3A=", - "dev": true, - "requires": { - "ajv": "^6.1.0", - "ajv-errors": "^1.0.0", - "ajv-keywords": "^3.1.0" - } - } - } - }, - "core-js": { - "version": "3.6.5", - "resolved": "https://registry.npm.taobao.org/core-js/download/core-js-3.6.5.tgz?cache=0&sync_timestamp=1586450269267&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcore-js%2Fdownload%2Fcore-js-3.6.5.tgz", - "integrity": "sha1-c5XcJzrzf7LlDpvT2f6EEoUjHRo=" - }, - "core-js-compat": { - "version": "3.6.5", - "resolved": "https://registry.npm.taobao.org/core-js-compat/download/core-js-compat-3.6.5.tgz", - "integrity": "sha1-KlHZpOJd/W5pAlGqgfmePAVIHxw=", - "dev": true, - "requires": { - "browserslist": "^4.8.5", - "semver": "7.0.0" - }, - "dependencies": { - "semver": { - "version": "7.0.0", - "resolved": "https://registry.npm.taobao.org/semver/download/semver-7.0.0.tgz", - "integrity": "sha1-XzyjV2HkfgWyBsba/yz4FPAxa44=", - "dev": true - } - } - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/core-util-is/download/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" - }, - "cosmiconfig": { - "version": "5.2.1", - "resolved": "https://registry.npm.taobao.org/cosmiconfig/download/cosmiconfig-5.2.1.tgz?cache=0&sync_timestamp=1596310819353&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcosmiconfig%2Fdownload%2Fcosmiconfig-5.2.1.tgz", - "integrity": "sha1-BA9yaAnFked6F8CjYmykW08Wixo=", - "dev": true, - "requires": { - "import-fresh": "^2.0.0", - "is-directory": "^0.3.1", - "js-yaml": "^3.13.1", - "parse-json": "^4.0.0" - }, - "dependencies": { - "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/parse-json/download/parse-json-4.0.0.tgz?cache=0&sync_timestamp=1598129182781&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fparse-json%2Fdownload%2Fparse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", - "dev": true, - "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - } - } - } - }, - "create-ecdh": { - "version": "4.0.4", - "resolved": "https://registry.npm.taobao.org/create-ecdh/download/create-ecdh-4.0.4.tgz", - "integrity": "sha1-1uf0v/pmc2CFoHYv06YyaE2rzE4=", - "requires": { - "bn.js": "^4.1.0", - "elliptic": "^6.5.3" - }, - "dependencies": { - "bn.js": { - "version": "4.11.9", - "resolved": "https://registry.npm.taobao.org/bn.js/download/bn.js-4.11.9.tgz", - "integrity": "sha1-JtVWgpRY+dHoH8SJUkk9C6NQeCg=" - } - } - }, - "create-hash": { - "version": "1.2.0", - "resolved": "https://registry.npm.taobao.org/create-hash/download/create-hash-1.2.0.tgz", - "integrity": "sha1-iJB4rxGmN1a8+1m9IhmWvjqe8ZY=", - "requires": { - "cipher-base": "^1.0.1", - "inherits": "^2.0.1", - "md5.js": "^1.3.4", - "ripemd160": "^2.0.1", - "sha.js": "^2.4.0" - } - }, - "create-hmac": { - "version": "1.1.7", - "resolved": "https://registry.npm.taobao.org/create-hmac/download/create-hmac-1.1.7.tgz", - "integrity": "sha1-aRcMeLOrlXFHsriwRXLkfq0iQ/8=", - "requires": { - "cipher-base": "^1.0.3", - "create-hash": "^1.1.0", - "inherits": "^2.0.1", - "ripemd160": "^2.0.0", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npm.taobao.org/cross-spawn/download/cross-spawn-6.0.5.tgz", - "integrity": "sha1-Sl7Hxk364iw6FBJNus3uhG2Ay8Q=", - "dev": true, - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "crypto-browserify": { - "version": "3.12.0", - "resolved": "https://registry.npm.taobao.org/crypto-browserify/download/crypto-browserify-3.12.0.tgz", - "integrity": "sha1-OWz58xN/A+S45TLFj2mCVOAPgOw=", - "requires": { - "browserify-cipher": "^1.0.0", - "browserify-sign": "^4.0.0", - "create-ecdh": "^4.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.0", - "diffie-hellman": "^5.0.0", - "inherits": "^2.0.1", - "pbkdf2": "^3.0.3", - "public-encrypt": "^4.0.0", - "randombytes": "^2.0.0", - "randomfill": "^1.0.3" - } - }, - "css-color-names": { - "version": "0.0.4", - "resolved": "https://registry.npm.taobao.org/css-color-names/download/css-color-names-0.0.4.tgz", - "integrity": "sha1-gIrcLnnPhHOAabZGyyDsJ762KeA=", - "dev": true - }, - "css-declaration-sorter": { - "version": "4.0.1", - "resolved": "https://registry.npm.taobao.org/css-declaration-sorter/download/css-declaration-sorter-4.0.1.tgz?cache=0&sync_timestamp=1603749642748&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcss-declaration-sorter%2Fdownload%2Fcss-declaration-sorter-4.0.1.tgz", - "integrity": "sha1-wZiUD2OnbX42wecQGLABchBUyyI=", - "dev": true, - "requires": { - "postcss": "^7.0.1", - "timsort": "^0.3.0" - } - }, - "css-loader": { - "version": "3.6.0", - "resolved": "https://registry.npm.taobao.org/css-loader/download/css-loader-3.6.0.tgz?cache=0&sync_timestamp=1602609200442&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcss-loader%2Fdownload%2Fcss-loader-3.6.0.tgz", - "integrity": "sha1-Lkssfm4tJ/jI8o9hv/zS5ske9kU=", - "dev": true, - "requires": { - "camelcase": "^5.3.1", - "cssesc": "^3.0.0", - "icss-utils": "^4.1.1", - "loader-utils": "^1.2.3", - "normalize-path": "^3.0.0", - "postcss": "^7.0.32", - "postcss-modules-extract-imports": "^2.0.0", - "postcss-modules-local-by-default": "^3.0.2", - "postcss-modules-scope": "^2.2.0", - "postcss-modules-values": "^3.0.0", - "postcss-value-parser": "^4.1.0", - "schema-utils": "^2.7.0", - "semver": "^6.3.0" - }, - "dependencies": { - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npm.taobao.org/camelcase/download/camelcase-5.3.1.tgz?cache=0&sync_timestamp=1603923709404&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcamelcase%2Fdownload%2Fcamelcase-5.3.1.tgz", - "integrity": "sha1-48mzFWnhBoEd8kL3FXJaH0xJQyA=", - "dev": true - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npm.taobao.org/semver/download/semver-6.3.0.tgz", - "integrity": "sha1-7gpkyK9ejO6mdoexM3YeG+y9HT0=", - "dev": true - } - } - }, - "css-select": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/css-select/download/css-select-2.1.0.tgz", - "integrity": "sha1-ajRlM1ZjWTSoG6ymjQJVQyEF2+8=", - "dev": true, - "requires": { - "boolbase": "^1.0.0", - "css-what": "^3.2.1", - "domutils": "^1.7.0", - "nth-check": "^1.0.2" - } - }, - "css-select-base-adapter": { - "version": "0.1.1", - "resolved": "https://registry.npm.taobao.org/css-select-base-adapter/download/css-select-base-adapter-0.1.1.tgz", - "integrity": "sha1-Oy/0lyzDYquIVhUHqVQIoUMhNdc=", - "dev": true - }, - "css-tree": { - "version": "1.0.0-alpha.37", - "resolved": "https://registry.npm.taobao.org/css-tree/download/css-tree-1.0.0-alpha.37.tgz?cache=0&sync_timestamp=1603806516773&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcss-tree%2Fdownload%2Fcss-tree-1.0.0-alpha.37.tgz", - "integrity": "sha1-mL69YsTB2flg7DQM+fdSLjBwmiI=", - "dev": true, - "requires": { - "mdn-data": "2.0.4", - "source-map": "^0.6.1" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz?cache=0&sync_timestamp=1571657176668&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsource-map%2Fdownload%2Fsource-map-0.6.1.tgz", - "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", - "dev": true - } - } - }, - "css-what": { - "version": "3.4.2", - "resolved": "https://registry.npm.taobao.org/css-what/download/css-what-3.4.2.tgz?cache=0&sync_timestamp=1602571001952&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcss-what%2Fdownload%2Fcss-what-3.4.2.tgz", - "integrity": "sha1-6nAm/LAXd+295SEk4h8yfnrpUOQ=", - "dev": true - }, - "cssesc": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/cssesc/download/cssesc-3.0.0.tgz", - "integrity": "sha1-N3QZGZA7hoVl4cCep0dEXNGJg+4=", - "dev": true - }, - "cssfilter": { - "version": "0.0.10", - "resolved": "https://registry.npmmirror.com/cssfilter/-/cssfilter-0.0.10.tgz", - "integrity": "sha512-FAaLDaplstoRsDR8XGYH51znUN0UY7nMc6Z9/fvE8EXGwvJE9hu7W2vHwx1+bd6gCYnln9nLbzxFTrcO9YQDZw==" - }, - "cssnano": { - "version": "4.1.10", - "resolved": "https://registry.npm.taobao.org/cssnano/download/cssnano-4.1.10.tgz?cache=0&sync_timestamp=1603212729205&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcssnano%2Fdownload%2Fcssnano-4.1.10.tgz", - "integrity": "sha1-CsQfCxPRPUZUh+ERt3jULaYxuLI=", - "dev": true, - "requires": { - "cosmiconfig": "^5.0.0", - "cssnano-preset-default": "^4.0.7", - "is-resolvable": "^1.0.0", - "postcss": "^7.0.0" - } - }, - "cssnano-preset-default": { - "version": "4.0.7", - "resolved": "https://registry.npm.taobao.org/cssnano-preset-default/download/cssnano-preset-default-4.0.7.tgz?cache=0&sync_timestamp=1603212741552&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcssnano-preset-default%2Fdownload%2Fcssnano-preset-default-4.0.7.tgz", - "integrity": "sha1-UexmLM/KD4izltzZZ5zbkxvhf3Y=", - "dev": true, - "requires": { - "css-declaration-sorter": "^4.0.1", - "cssnano-util-raw-cache": "^4.0.1", - "postcss": "^7.0.0", - "postcss-calc": "^7.0.1", - "postcss-colormin": "^4.0.3", - "postcss-convert-values": "^4.0.1", - "postcss-discard-comments": "^4.0.2", - "postcss-discard-duplicates": "^4.0.2", - "postcss-discard-empty": "^4.0.1", - "postcss-discard-overridden": "^4.0.1", - "postcss-merge-longhand": "^4.0.11", - "postcss-merge-rules": "^4.0.3", - "postcss-minify-font-values": "^4.0.2", - "postcss-minify-gradients": "^4.0.2", - "postcss-minify-params": "^4.0.2", - "postcss-minify-selectors": "^4.0.2", - "postcss-normalize-charset": "^4.0.1", - "postcss-normalize-display-values": "^4.0.2", - "postcss-normalize-positions": "^4.0.2", - "postcss-normalize-repeat-style": "^4.0.2", - "postcss-normalize-string": "^4.0.2", - "postcss-normalize-timing-functions": "^4.0.2", - "postcss-normalize-unicode": "^4.0.1", - "postcss-normalize-url": "^4.0.1", - "postcss-normalize-whitespace": "^4.0.2", - "postcss-ordered-values": "^4.1.2", - "postcss-reduce-initial": "^4.0.3", - "postcss-reduce-transforms": "^4.0.2", - "postcss-svgo": "^4.0.2", - "postcss-unique-selectors": "^4.0.1" - } - }, - "cssnano-util-get-arguments": { - "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/cssnano-util-get-arguments/download/cssnano-util-get-arguments-4.0.0.tgz", - "integrity": "sha1-7ToIKZ8h11dBsg87gfGU7UnMFQ8=", - "dev": true - }, - "cssnano-util-get-match": { - "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/cssnano-util-get-match/download/cssnano-util-get-match-4.0.0.tgz", - "integrity": "sha1-wOTKB/U4a7F+xeUiULT1lhNlFW0=", - "dev": true - }, - "cssnano-util-raw-cache": { - "version": "4.0.1", - "resolved": "https://registry.npm.taobao.org/cssnano-util-raw-cache/download/cssnano-util-raw-cache-4.0.1.tgz", - "integrity": "sha1-sm1f1fcqEd/np4RvtMZyYPlr8oI=", - "dev": true, - "requires": { - "postcss": "^7.0.0" - } - }, - "cssnano-util-same-parent": { - "version": "4.0.1", - "resolved": "https://registry.npm.taobao.org/cssnano-util-same-parent/download/cssnano-util-same-parent-4.0.1.tgz", - "integrity": "sha1-V0CC+yhZ0ttDOFWDXZqEVuoYu/M=", - "dev": true - }, - "csso": { - "version": "4.1.0", - "resolved": "https://registry.npm.taobao.org/csso/download/csso-4.1.0.tgz?cache=0&sync_timestamp=1603840362568&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcsso%2Fdownload%2Fcsso-4.1.0.tgz", - "integrity": "sha1-HTEZPvqZuHqmutbAzvFV5UPQnos=", - "dev": true, - "requires": { - "css-tree": "^1.0.0" - }, - "dependencies": { - "css-tree": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/css-tree/download/css-tree-1.0.0.tgz?cache=0&sync_timestamp=1603806516773&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcss-tree%2Fdownload%2Fcss-tree-1.0.0.tgz", - "integrity": "sha1-IZk/onDXQmQqkECaLAyzrAKYrfY=", - "dev": true, - "requires": { - "mdn-data": "2.0.12", - "source-map": "^0.6.1" - } - }, - "mdn-data": { - "version": "2.0.12", - "resolved": "https://registry.npm.taobao.org/mdn-data/download/mdn-data-2.0.12.tgz?cache=0&sync_timestamp=1602987212845&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmdn-data%2Fdownload%2Fmdn-data-2.0.12.tgz", - "integrity": "sha1-u7ZY0Is49XS7uI97g3A979zEaEQ=", - "dev": true - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz?cache=0&sync_timestamp=1571657176668&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsource-map%2Fdownload%2Fsource-map-0.6.1.tgz", - "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", - "dev": true - } - } - }, - "cyclist": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/cyclist/download/cyclist-1.0.1.tgz", - "integrity": "sha1-WW6WmP0MgOEgOMK4LW6xs1tiJNk=" - }, - "dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npm.taobao.org/dashdash/download/dashdash-1.14.1.tgz?cache=0&sync_timestamp=1601073454623&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdashdash%2Fdownload%2Fdashdash-1.14.1.tgz", - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0" - } - }, - "dayjs": { - "version": "1.9.6", - "resolved": "https://registry.npm.taobao.org/dayjs/download/dayjs-1.9.6.tgz?cache=0&sync_timestamp=1604990508741&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdayjs%2Fdownload%2Fdayjs-1.9.6.tgz", - "integrity": "sha1-bwx312rB/2NyDdEZfly4e2eUPXA=" - }, - "de-indent": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/de-indent/download/de-indent-1.0.2.tgz", - "integrity": "sha1-sgOOhG3DO6pXlhKNCAS0VbjB4h0=" - }, - "debug": { - "version": "4.2.0", - "resolved": "https://registry.npm.taobao.org/debug/download/debug-4.2.0.tgz?cache=0&sync_timestamp=1600502894812&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdebug%2Fdownload%2Fdebug-4.2.0.tgz", - "integrity": "sha1-fxUPk5IOlMWPVXTC/QGjEQ7/5/E=", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npm.taobao.org/decamelize/download/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", - "dev": true - }, - "decode-uri-component": { - "version": "0.2.0", - "resolved": "https://registry.npm.taobao.org/decode-uri-component/download/decode-uri-component-0.2.0.tgz", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" - }, - "deep-equal": { - "version": "1.1.1", - "resolved": "https://registry.npm.taobao.org/deep-equal/download/deep-equal-1.1.1.tgz", - "integrity": "sha1-tcmMlCzv+vfLBR4k4UNKJaLmB2o=", - "dev": true, - "requires": { - "is-arguments": "^1.0.4", - "is-date-object": "^1.0.1", - "is-regex": "^1.0.4", - "object-is": "^1.0.1", - "object-keys": "^1.1.1", - "regexp.prototype.flags": "^1.2.0" - } - }, - "deepmerge": { - "version": "1.5.2", - "resolved": "https://registry.npm.taobao.org/deepmerge/download/deepmerge-1.5.2.tgz?cache=0&sync_timestamp=1572279720382&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdeepmerge%2Fdownload%2Fdeepmerge-1.5.2.tgz", - "integrity": "sha1-EEmdhohEza1P7ghC34x/bwyVp1M=" - }, - "default-gateway": { - "version": "5.0.5", - "resolved": "https://registry.npm.taobao.org/default-gateway/download/default-gateway-5.0.5.tgz", - "integrity": "sha1-T9a9XShV05s0zFpZUFSG6ar8mxA=", - "dev": true, - "requires": { - "execa": "^3.3.0" - }, - "dependencies": { - "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npm.taobao.org/cross-spawn/download/cross-spawn-7.0.3.tgz", - "integrity": "sha1-9zqFudXUHQRVUcF34ogtSshXKKY=", - "dev": true, - "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - } - }, - "execa": { - "version": "3.4.0", - "resolved": "https://registry.npm.taobao.org/execa/download/execa-3.4.0.tgz?cache=0&sync_timestamp=1603882912233&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fexeca%2Fdownload%2Fexeca-3.4.0.tgz", - "integrity": "sha1-wI7UVQ72XYWPrCaf/IVyRG8364k=", - "dev": true, - "requires": { - "cross-spawn": "^7.0.0", - "get-stream": "^5.0.0", - "human-signals": "^1.1.1", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.0", - "onetime": "^5.1.0", - "p-finally": "^2.0.0", - "signal-exit": "^3.0.2", - "strip-final-newline": "^2.0.0" - } - }, - "get-stream": { - "version": "5.2.0", - "resolved": "https://registry.npm.taobao.org/get-stream/download/get-stream-5.2.0.tgz?cache=0&sync_timestamp=1597056502934&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fget-stream%2Fdownload%2Fget-stream-5.2.0.tgz", - "integrity": "sha1-SWaheV7lrOZecGxLe+txJX1uItM=", - "dev": true, - "requires": { - "pump": "^3.0.0" - } - }, - "is-stream": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/is-stream/download/is-stream-2.0.0.tgz", - "integrity": "sha1-venDJoDW+uBBKdasnZIc54FfeOM=", - "dev": true - }, - "mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/mimic-fn/download/mimic-fn-2.1.0.tgz?cache=0&sync_timestamp=1596095644798&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmimic-fn%2Fdownload%2Fmimic-fn-2.1.0.tgz", - "integrity": "sha1-ftLCzMyvhNP/y3pptXcR/CCDQBs=", - "dev": true - }, - "npm-run-path": { - "version": "4.0.1", - "resolved": "https://registry.npm.taobao.org/npm-run-path/download/npm-run-path-4.0.1.tgz", - "integrity": "sha1-t+zR5e1T2o43pV4cImnguX7XSOo=", - "dev": true, - "requires": { - "path-key": "^3.0.0" - } - }, - "onetime": { - "version": "5.1.2", - "resolved": "https://registry.npm.taobao.org/onetime/download/onetime-5.1.2.tgz?cache=0&sync_timestamp=1597005345612&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fonetime%2Fdownload%2Fonetime-5.1.2.tgz", - "integrity": "sha1-0Oluu1awdHbfHdnEgG5SN5hcpF4=", - "dev": true, - "requires": { - "mimic-fn": "^2.1.0" - } - }, - "p-finally": { - "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/p-finally/download/p-finally-2.0.1.tgz", - "integrity": "sha1-vW/KqcVZoJa2gIBvTWV7Pw8kBWE=", - "dev": true - }, - "path-key": { - "version": "3.1.1", - "resolved": "https://registry.npm.taobao.org/path-key/download/path-key-3.1.1.tgz", - "integrity": "sha1-WB9q3mWMu6ZaDTOA3ndTKVBU83U=", - "dev": true - }, - "shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/shebang-command/download/shebang-command-2.0.0.tgz", - "integrity": "sha1-zNCvT4g1+9wmW4JGGq8MNmY/NOo=", - "dev": true, - "requires": { - "shebang-regex": "^3.0.0" - } - }, - "shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/shebang-regex/download/shebang-regex-3.0.0.tgz", - "integrity": "sha1-rhbxZE2HPsrYQ7AwexQzYtTEIXI=", - "dev": true - }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npm.taobao.org/which/download/which-2.0.2.tgz?cache=0&sync_timestamp=1574116720213&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fwhich%2Fdownload%2Fwhich-2.0.2.tgz", - "integrity": "sha1-fGqN0KY2oDJ+ELWckobu6T8/UbE=", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - } - } - }, - "defaults": { - "version": "1.0.3", - "resolved": "https://registry.npm.taobao.org/defaults/download/defaults-1.0.3.tgz", - "integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=", - "dev": true, - "requires": { - "clone": "^1.0.2" - } - }, - "define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npm.taobao.org/define-properties/download/define-properties-1.1.3.tgz", - "integrity": "sha1-z4jabL7ib+bbcJT2HYcMvYTO6fE=", - "dev": true, - "requires": { - "object-keys": "^1.0.12" - } - }, - "define-property": { - "version": "2.0.2", - "resolved": "https://registry.npm.taobao.org/define-property/download/define-property-2.0.2.tgz", - "integrity": "sha1-1Flono1lS6d+AqgX+HENcCyxbp0=", - "requires": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" - }, - "dependencies": { - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/is-accessor-descriptor/download/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY=", - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/is-data-descriptor/download/is-data-descriptor-1.0.0.tgz", - "integrity": "sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc=", - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/is-descriptor/download/is-descriptor-1.0.2.tgz", - "integrity": "sha1-OxWXRqZmBLBPjIFSS6NlxfFNhuw=", - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "del": { - "version": "4.1.1", - "resolved": "https://registry.npm.taobao.org/del/download/del-4.1.1.tgz?cache=0&sync_timestamp=1601076882347&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdel%2Fdownload%2Fdel-4.1.1.tgz", - "integrity": "sha1-no8RciLqRKMf86FWwEm5kFKp8LQ=", - "dev": true, - "requires": { - "@types/glob": "^7.1.1", - "globby": "^6.1.0", - "is-path-cwd": "^2.0.0", - "is-path-in-cwd": "^2.0.0", - "p-map": "^2.0.0", - "pify": "^4.0.1", - "rimraf": "^2.6.3" - }, - "dependencies": { - "globby": { - "version": "6.1.0", - "resolved": "https://registry.npm.taobao.org/globby/download/globby-6.1.0.tgz?cache=0&sync_timestamp=1591083783605&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fglobby%2Fdownload%2Fglobby-6.1.0.tgz", - "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", - "dev": true, - "requires": { - "array-union": "^1.0.1", - "glob": "^7.0.3", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - }, - "dependencies": { - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npm.taobao.org/pify/download/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - } - } - }, - "p-map": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/p-map/download/p-map-2.1.0.tgz", - "integrity": "sha1-MQko/u+cnsxltosXaTAYpmXOoXU=", - "dev": true - } - } - }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/delayed-stream/download/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", - "dev": true - }, - "delegate": { - "version": "3.2.0", - "resolved": "https://registry.npm.taobao.org/delegate/download/delegate-3.2.0.tgz", - "integrity": "sha1-tmtxwxWFIuirV0T3INjKDCr1kWY=" - }, - "depd": { - "version": "1.1.2", - "resolved": "https://registry.npm.taobao.org/depd/download/depd-1.1.2.tgz", - "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", - "dev": true - }, - "des.js": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/des.js/download/des.js-1.0.1.tgz", - "integrity": "sha1-U4IULhvcU/hdhtU+X0qn3rkeCEM=", - "requires": { - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" - } - }, - "destroy": { - "version": "1.0.4", - "resolved": "https://registry.npm.taobao.org/destroy/download/destroy-1.0.4.tgz", - "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=", - "dev": true - }, - "detect-node": { - "version": "2.0.4", - "resolved": "https://registry.npm.taobao.org/detect-node/download/detect-node-2.0.4.tgz", - "integrity": "sha1-AU7o+PZpxcWAI9pkuBecCDooxGw=", - "dev": true - }, - "diffie-hellman": { - "version": "5.0.3", - "resolved": "https://registry.npm.taobao.org/diffie-hellman/download/diffie-hellman-5.0.3.tgz", - "integrity": "sha1-QOjumPVaIUlgcUaSHGPhrl89KHU=", - "requires": { - "bn.js": "^4.1.0", - "miller-rabin": "^4.0.0", - "randombytes": "^2.0.0" - }, - "dependencies": { - "bn.js": { - "version": "4.11.9", - "resolved": "https://registry.npm.taobao.org/bn.js/download/bn.js-4.11.9.tgz", - "integrity": "sha1-JtVWgpRY+dHoH8SJUkk9C6NQeCg=" - } - } - }, - "dir-glob": { - "version": "2.2.2", - "resolved": "https://registry.npm.taobao.org/dir-glob/download/dir-glob-2.2.2.tgz", - "integrity": "sha1-+gnwaUFTyJGLGLoN6vrpR2n8UMQ=", - "dev": true, - "requires": { - "path-type": "^3.0.0" - } - }, - "dns-equal": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/dns-equal/download/dns-equal-1.0.0.tgz", - "integrity": "sha1-s55/HabrCnW6nBcySzR1PEfgZU0=", - "dev": true - }, - "dns-packet": { - "version": "1.3.1", - "resolved": "https://registry.npm.taobao.org/dns-packet/download/dns-packet-1.3.1.tgz", - "integrity": "sha1-EqpCaYEHW+UAuRDu3NC0fdfe2lo=", - "dev": true, - "requires": { - "ip": "^1.1.0", - "safe-buffer": "^5.0.1" - } - }, - "dns-txt": { - "version": "2.0.2", - "resolved": "https://registry.npm.taobao.org/dns-txt/download/dns-txt-2.0.2.tgz", - "integrity": "sha1-uR2Ab10nGI5Ks+fRB9iBocxGQrY=", - "dev": true, - "requires": { - "buffer-indexof": "^1.0.0" - } - }, - "dom-converter": { - "version": "0.2.0", - "resolved": "https://registry.npm.taobao.org/dom-converter/download/dom-converter-0.2.0.tgz", - "integrity": "sha1-ZyGp2u4uKTaClVtq/kFncWJ7t2g=", - "dev": true, - "requires": { - "utila": "~0.4" - } - }, - "dom-serializer": { - "version": "0.2.2", - "resolved": "https://registry.npm.taobao.org/dom-serializer/download/dom-serializer-0.2.2.tgz", - "integrity": "sha1-GvuB9TNxcXXUeGVd68XjMtn5u1E=", - "dev": true, - "requires": { - "domelementtype": "^2.0.1", - "entities": "^2.0.0" - }, - "dependencies": { - "domelementtype": { - "version": "2.0.2", - "resolved": "https://registry.npm.taobao.org/domelementtype/download/domelementtype-2.0.2.tgz?cache=0&sync_timestamp=1600028495728&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdomelementtype%2Fdownload%2Fdomelementtype-2.0.2.tgz", - "integrity": "sha1-87blSSAeRvWItZRj3XcYcTH+aXE=", - "dev": true - } - } - }, - "domain-browser": { - "version": "1.2.0", - "resolved": "https://registry.npm.taobao.org/domain-browser/download/domain-browser-1.2.0.tgz", - "integrity": "sha1-PTH1AZGmdJ3RN1p/Ui6CPULlTto=" - }, - "domelementtype": { - "version": "1.3.1", - "resolved": "https://registry.npm.taobao.org/domelementtype/download/domelementtype-1.3.1.tgz?cache=0&sync_timestamp=1600028495728&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdomelementtype%2Fdownload%2Fdomelementtype-1.3.1.tgz", - "integrity": "sha1-0EjESzew0Qp/Kj1f7j9DM9eQSB8=", - "dev": true - }, - "domhandler": { - "version": "2.4.2", - "resolved": "https://registry.npm.taobao.org/domhandler/download/domhandler-2.4.2.tgz", - "integrity": "sha1-iAUJfpM9ZehVRvcm1g9euItE+AM=", - "dev": true, - "requires": { - "domelementtype": "1" - } - }, - "dompurify": { - "version": "2.3.6", - "resolved": "https://registry.npmmirror.com/dompurify/-/dompurify-2.3.6.tgz", - "integrity": "sha512-OFP2u/3T1R5CEgWCEONuJ1a5+MFKnOYpkywpUSxv/dj1LeBT1erK+JwM7zK0ROy2BRhqVCf0LRw/kHqKuMkVGg==" - }, - "domutils": { - "version": "1.7.0", - "resolved": "https://registry.npm.taobao.org/domutils/download/domutils-1.7.0.tgz", - "integrity": "sha1-Vuo0HoNOBuZ0ivehyyXaZ+qfjCo=", - "dev": true, - "requires": { - "dom-serializer": "0", - "domelementtype": "1" - } - }, - "dot-prop": { - "version": "5.3.0", - "resolved": "https://registry.npm.taobao.org/dot-prop/download/dot-prop-5.3.0.tgz", - "integrity": "sha1-kMzOcIzZzYLMTcjD3dmr3VWyDog=", - "dev": true, - "requires": { - "is-obj": "^2.0.0" - } - }, - "dotenv": { - "version": "8.2.0", - "resolved": "https://registry.npm.taobao.org/dotenv/download/dotenv-8.2.0.tgz", - "integrity": "sha1-l+YZJZradQ7qPk6j4mvO6lQksWo=", - "dev": true - }, - "dotenv-expand": { - "version": "5.1.0", - "resolved": "https://registry.npm.taobao.org/dotenv-expand/download/dotenv-expand-5.1.0.tgz", - "integrity": "sha1-P7rwIL/XlIhAcuomsel5HUWmKfA=", - "dev": true - }, - "duplexer": { - "version": "0.1.2", - "resolved": "https://registry.npm.taobao.org/duplexer/download/duplexer-0.1.2.tgz", - "integrity": "sha1-Or5DrvODX4rgd9E23c4PJ2sEAOY=", - "dev": true - }, - "duplexify": { - "version": "3.7.1", - "resolved": "https://registry.npm.taobao.org/duplexify/download/duplexify-3.7.1.tgz", - "integrity": "sha1-Kk31MX9sz9kfhtb9JdjYoQO4gwk=", - "requires": { - "end-of-stream": "^1.0.0", - "inherits": "^2.0.1", - "readable-stream": "^2.0.0", - "stream-shift": "^1.0.0" - } - }, - "easy-stack": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/easy-stack/download/easy-stack-1.0.0.tgz", - "integrity": "sha1-EskbMIWjfwuqM26UhurEv5Tj54g=", - "dev": true - }, - "ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npm.taobao.org/ecc-jsbn/download/ecc-jsbn-0.1.2.tgz", - "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", - "dev": true, - "requires": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" - } - }, - "echarts": { - "version": "4.9.0", - "resolved": "https://registry.npm.taobao.org/echarts/download/echarts-4.9.0.tgz?cache=0&sync_timestamp=1605024811446&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fecharts%2Fdownload%2Fecharts-4.9.0.tgz", - "integrity": "sha1-qbm6oD8Doqcx5jQMVb77V6nhNH0=", - "requires": { - "zrender": "4.3.2" - } - }, - "ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npm.taobao.org/ee-first/download/ee-first-1.1.1.tgz", - "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=", - "dev": true - }, - "ejs": { - "version": "2.7.4", - "resolved": "https://registry.npm.taobao.org/ejs/download/ejs-2.7.4.tgz?cache=0&sync_timestamp=1597678506855&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fejs%2Fdownload%2Fejs-2.7.4.tgz", - "integrity": "sha1-SGYSh1c9zFPjZsehrlLDoSDuybo=", - "dev": true - }, - "electron-to-chromium": { - "version": "1.3.584", - "resolved": "https://registry.npm.taobao.org/electron-to-chromium/download/electron-to-chromium-1.3.584.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Felectron-to-chromium%2Fdownload%2Felectron-to-chromium-1.3.584.tgz", - "integrity": "sha1-UGz3uliVqvqCQYdqsChlS2H9nOs=", - "dev": true - }, - "element-ui": { - "version": "2.15.6", - "resolved": "https://registry.nlark.com/element-ui/download/element-ui-2.15.6.tgz", - "integrity": "sha1-yWCa3TWvWmhqS3aF3B11fHXgHfM=", - "requires": { - "async-validator": "~1.8.1", - "babel-helper-vue-jsx-merge-props": "^2.0.0", - "deepmerge": "^1.2.0", - "normalize-wheel": "^1.0.1", - "resize-observer-polyfill": "^1.5.0", - "throttle-debounce": "^1.0.1" - } - }, - "elliptic": { - "version": "6.5.3", - "resolved": "https://registry.npm.taobao.org/elliptic/download/elliptic-6.5.3.tgz?cache=0&sync_timestamp=1592492805287&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Felliptic%2Fdownload%2Felliptic-6.5.3.tgz", - "integrity": "sha1-y1nrLv2vc6C9eMzXAVpirW4Pk9Y=", - "requires": { - "bn.js": "^4.4.0", - "brorand": "^1.0.1", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.0" - }, - "dependencies": { - "bn.js": { - "version": "4.11.9", - "resolved": "https://registry.npm.taobao.org/bn.js/download/bn.js-4.11.9.tgz", - "integrity": "sha1-JtVWgpRY+dHoH8SJUkk9C6NQeCg=" - } - } - }, - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npm.taobao.org/emoji-regex/download/emoji-regex-8.0.0.tgz?cache=0&sync_timestamp=1603212180491&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Femoji-regex%2Fdownload%2Femoji-regex-8.0.0.tgz", - "integrity": "sha1-6Bj9ac5cz8tARZT4QpY79TFkzDc=", - "dev": true - }, - "emojis-list": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/emojis-list/download/emojis-list-3.0.0.tgz", - "integrity": "sha1-VXBmIEatKeLpFucariYKvf9Pang=" - }, - "encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/encodeurl/download/encodeurl-1.0.2.tgz", - "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", - "dev": true - }, - "end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npm.taobao.org/end-of-stream/download/end-of-stream-1.4.4.tgz", - "integrity": "sha1-WuZKX0UFe682JuwU2gyl5LJDHrA=", - "requires": { - "once": "^1.4.0" - } - }, - "enhanced-resolve": { - "version": "4.3.0", - "resolved": "https://registry.npm.taobao.org/enhanced-resolve/download/enhanced-resolve-4.3.0.tgz", - "integrity": "sha1-O4BvO/r8HsfeaVUe+TzKRsFwQSY=", - "requires": { - "graceful-fs": "^4.1.2", - "memory-fs": "^0.5.0", - "tapable": "^1.0.0" - }, - "dependencies": { - "memory-fs": { - "version": "0.5.0", - "resolved": "https://registry.npm.taobao.org/memory-fs/download/memory-fs-0.5.0.tgz", - "integrity": "sha1-MkwBKIuIZSlm0WHbd4OHIIRajjw=", - "requires": { - "errno": "^0.1.3", - "readable-stream": "^2.0.1" - } - } - } - }, - "entities": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/entities/download/entities-2.1.0.tgz?cache=0&sync_timestamp=1602897029273&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fentities%2Fdownload%2Fentities-2.1.0.tgz", - "integrity": "sha1-mS0xKc999ocLlsV4WMJJoSD4uLU=", - "dev": true - }, - "errno": { - "version": "0.1.7", - "resolved": "https://registry.npm.taobao.org/errno/download/errno-0.1.7.tgz", - "integrity": "sha1-RoTXF3mtOa8Xfj8AeZb3xnyFJhg=", - "requires": { - "prr": "~1.0.1" - } - }, - "error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npm.taobao.org/error-ex/download/error-ex-1.3.2.tgz", - "integrity": "sha1-tKxAZIEH/c3PriQvQovqihTU8b8=", - "dev": true, - "requires": { - "is-arrayish": "^0.2.1" - } - }, - "error-stack-parser": { - "version": "2.0.6", - "resolved": "https://registry.npm.taobao.org/error-stack-parser/download/error-stack-parser-2.0.6.tgz?cache=0&sync_timestamp=1578288503034&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ferror-stack-parser%2Fdownload%2Ferror-stack-parser-2.0.6.tgz", - "integrity": "sha1-WpmnB716TFinl5AtSNgoA+3mqtg=", - "dev": true, - "requires": { - "stackframe": "^1.1.1" - } - }, - "es-abstract": { - "version": "1.18.0-next.1", - "resolved": "https://registry.npm.taobao.org/es-abstract/download/es-abstract-1.18.0-next.1.tgz?cache=0&sync_timestamp=1601502719982&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fes-abstract%2Fdownload%2Fes-abstract-1.18.0-next.1.tgz", - "integrity": "sha1-bjoKS9pxflAjqzuOkL7DYQjSLGg=", - "dev": true, - "requires": { - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.2.2", - "is-negative-zero": "^2.0.0", - "is-regex": "^1.1.1", - "object-inspect": "^1.8.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.1", - "string.prototype.trimend": "^1.0.1", - "string.prototype.trimstart": "^1.0.1" - } - }, - "es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npm.taobao.org/es-to-primitive/download/es-to-primitive-1.2.1.tgz", - "integrity": "sha1-5VzUyc3BiLzvsDs2bHNjI/xciYo=", - "dev": true, - "requires": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - } - }, - "escalade": { - "version": "3.1.1", - "resolved": "https://registry.npm.taobao.org/escalade/download/escalade-3.1.1.tgz?cache=0&sync_timestamp=1602567224085&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fescalade%2Fdownload%2Fescalade-3.1.1.tgz", - "integrity": "sha1-2M/ccACWXFoBdLSoLqpcBVJ0LkA=", - "dev": true - }, - "escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npm.taobao.org/escape-html/download/escape-html-1.0.3.tgz", - "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=", - "dev": true - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npm.taobao.org/escape-string-regexp/download/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - }, - "eslint-scope": { - "version": "4.0.3", - "resolved": "https://registry.npm.taobao.org/eslint-scope/download/eslint-scope-4.0.3.tgz?cache=0&sync_timestamp=1599933651660&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Feslint-scope%2Fdownload%2Feslint-scope-4.0.3.tgz", - "integrity": "sha1-ygODMxD2iJoyZHgaqC5j65z+eEg=", - "requires": { - "esrecurse": "^4.1.0", - "estraverse": "^4.1.1" - } - }, - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npm.taobao.org/esprima/download/esprima-4.0.1.tgz", - "integrity": "sha1-E7BM2z5sXRnfkatph6hpVhmwqnE=", - "dev": true - }, - "esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npm.taobao.org/esrecurse/download/esrecurse-4.3.0.tgz?cache=0&sync_timestamp=1598898255610&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fesrecurse%2Fdownload%2Fesrecurse-4.3.0.tgz", - "integrity": "sha1-eteWTWeauyi+5yzsY3WLHF0smSE=", - "requires": { - "estraverse": "^5.2.0" - }, - "dependencies": { - "estraverse": { - "version": "5.2.0", - "resolved": "https://registry.npm.taobao.org/estraverse/download/estraverse-5.2.0.tgz?cache=0&sync_timestamp=1596642998635&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Festraverse%2Fdownload%2Festraverse-5.2.0.tgz", - "integrity": "sha1-MH30JUfmzHMk088DwVXVzbjFOIA=" - } - } - }, - "estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npm.taobao.org/estraverse/download/estraverse-4.3.0.tgz?cache=0&sync_timestamp=1596642998635&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Festraverse%2Fdownload%2Festraverse-4.3.0.tgz", - "integrity": "sha1-OYrT88WiSUi+dyXoPRGn3ijNvR0=" - }, - "esutils": { - "version": "2.0.3", - "resolved": "https://registry.npm.taobao.org/esutils/download/esutils-2.0.3.tgz", - "integrity": "sha1-dNLrTeC42hKTcRkQ1Qd1ubcQ72Q=", - "dev": true - }, - "etag": { - "version": "1.8.1", - "resolved": "https://registry.npm.taobao.org/etag/download/etag-1.8.1.tgz", - "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=", - "dev": true - }, - "event-pubsub": { - "version": "4.3.0", - "resolved": "https://registry.npm.taobao.org/event-pubsub/download/event-pubsub-4.3.0.tgz", - "integrity": "sha1-9o2Ba8KfHsAsU53FjI3UDOcss24=", - "dev": true - }, - "eventemitter3": { - "version": "4.0.7", - "resolved": "https://registry.npm.taobao.org/eventemitter3/download/eventemitter3-4.0.7.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Feventemitter3%2Fdownload%2Feventemitter3-4.0.7.tgz", - "integrity": "sha1-Lem2j2Uo1WRO9cWVJqG0oHMGFp8=", - "dev": true - }, - "events": { - "version": "3.2.0", - "resolved": "https://registry.npm.taobao.org/events/download/events-3.2.0.tgz?cache=0&sync_timestamp=1595422595227&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fevents%2Fdownload%2Fevents-3.2.0.tgz", - "integrity": "sha1-k7h8GPjvzUICpGGuxN/AVWtjk3k=" - }, - "eventsource": { - "version": "1.0.7", - "resolved": "https://registry.npm.taobao.org/eventsource/download/eventsource-1.0.7.tgz", - "integrity": "sha1-j7xyyT/NNAiAkLwKTmT0tc7m2NA=", - "dev": true, - "requires": { - "original": "^1.0.0" - } - }, - "evp_bytestokey": { - "version": "1.0.3", - "resolved": "https://registry.npm.taobao.org/evp_bytestokey/download/evp_bytestokey-1.0.3.tgz", - "integrity": "sha1-f8vbGY3HGVlDLv4ThCaE4FJaywI=", - "requires": { - "md5.js": "^1.3.4", - "safe-buffer": "^5.1.1" - } - }, - "execa": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/execa/download/execa-1.0.0.tgz?cache=0&sync_timestamp=1603882912233&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fexeca%2Fdownload%2Fexeca-1.0.0.tgz", - "integrity": "sha1-xiNqW7TfbW8V6I5/AXeYIWdJ3dg=", - "dev": true, - "requires": { - "cross-spawn": "^6.0.0", - "get-stream": "^4.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } - }, - "expand-brackets": { - "version": "2.1.4", - "resolved": "https://registry.npm.taobao.org/expand-brackets/download/expand-brackets-2.1.4.tgz", - "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", - "requires": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npm.taobao.org/debug/download/debug-2.6.9.tgz?cache=0&sync_timestamp=1600502894812&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdebug%2Fdownload%2Fdebug-2.6.9.tgz", - "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", - "requires": { - "ms": "2.0.0" - } - }, - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npm.taobao.org/define-property/download/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/extend-shallow/download/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "requires": { - "is-extendable": "^0.1.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/ms/download/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - } - } - }, - "express": { - "version": "4.17.1", - "resolved": "https://registry.npm.taobao.org/express/download/express-4.17.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fexpress%2Fdownload%2Fexpress-4.17.1.tgz", - "integrity": "sha1-RJH8OGBc9R+GKdOcK10Cb5ikwTQ=", - "dev": true, - "requires": { - "accepts": "~1.3.7", - "array-flatten": "1.1.1", - "body-parser": "1.19.0", - "content-disposition": "0.5.3", - "content-type": "~1.0.4", - "cookie": "0.4.0", - "cookie-signature": "1.0.6", - "debug": "2.6.9", - "depd": "~1.1.2", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "~1.1.2", - "fresh": "0.5.2", - "merge-descriptors": "1.0.1", - "methods": "~1.1.2", - "on-finished": "~2.3.0", - "parseurl": "~1.3.3", - "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.5", - "qs": "6.7.0", - "range-parser": "~1.2.1", - "safe-buffer": "5.1.2", - "send": "0.17.1", - "serve-static": "1.14.1", - "setprototypeof": "1.1.1", - "statuses": "~1.5.0", - "type-is": "~1.6.18", - "utils-merge": "1.0.1", - "vary": "~1.1.2" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npm.taobao.org/debug/download/debug-2.6.9.tgz?cache=0&sync_timestamp=1600502894812&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdebug%2Fdownload%2Fdebug-2.6.9.tgz", - "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/ms/download/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, - "qs": { - "version": "6.7.0", - "resolved": "https://registry.npm.taobao.org/qs/download/qs-6.7.0.tgz", - "integrity": "sha1-QdwaAV49WB8WIXdr4xr7KHapsbw=", - "dev": true - } - } - }, - "extend": { - "version": "3.0.2", - "resolved": "https://registry.npm.taobao.org/extend/download/extend-3.0.2.tgz", - "integrity": "sha1-+LETa0Bx+9jrFAr/hYsQGewpFfo=", - "dev": true - }, - "extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npm.taobao.org/extend-shallow/download/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", - "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/is-extendable/download/is-extendable-1.0.1.tgz", - "integrity": "sha1-p0cPnkJnM9gb2B4RVSZOOjUHyrQ=", - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, - "extglob": { - "version": "2.0.4", - "resolved": "https://registry.npm.taobao.org/extglob/download/extglob-2.0.4.tgz", - "integrity": "sha1-rQD+TcYSqSMuhxhxHcXLWrAoVUM=", - "requires": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/define-property/download/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/extend-shallow/download/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/is-accessor-descriptor/download/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY=", - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/is-data-descriptor/download/is-data-descriptor-1.0.0.tgz", - "integrity": "sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc=", - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/is-descriptor/download/is-descriptor-1.0.2.tgz", - "integrity": "sha1-OxWXRqZmBLBPjIFSS6NlxfFNhuw=", - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npm.taobao.org/extsprintf/download/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", - "dev": true - }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npm.taobao.org/fast-deep-equal/download/fast-deep-equal-3.1.3.tgz?cache=0&sync_timestamp=1591599697571&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffast-deep-equal%2Fdownload%2Ffast-deep-equal-3.1.3.tgz", - "integrity": "sha1-On1WtVnWy8PrUSMlJE5hmmXGxSU=" - }, - "fast-glob": { - "version": "2.2.7", - "resolved": "https://registry.npm.taobao.org/fast-glob/download/fast-glob-2.2.7.tgz", - "integrity": "sha1-aVOFfDr6R1//ku5gFdUtpwpM050=", - "dev": true, - "requires": { - "@mrmlnc/readdir-enhanced": "^2.2.1", - "@nodelib/fs.stat": "^1.1.2", - "glob-parent": "^3.1.0", - "is-glob": "^4.0.0", - "merge2": "^1.2.3", - "micromatch": "^3.1.10" - }, - "dependencies": { - "glob-parent": { - "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/glob-parent/download/glob-parent-3.1.0.tgz", - "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", - "dev": true, - "requires": { - "is-glob": "^3.1.0", - "path-dirname": "^1.0.0" - }, - "dependencies": { - "is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/is-glob/download/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "dev": true, - "requires": { - "is-extglob": "^2.1.0" - } - } - } - } - } - }, - "fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/fast-json-stable-stringify/download/fast-json-stable-stringify-2.1.0.tgz?cache=0&sync_timestamp=1576340291001&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffast-json-stable-stringify%2Fdownload%2Ffast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha1-h0v2nG9ATCtdmcSBNBOZ/VWJJjM=" - }, - "faye-websocket": { - "version": "0.10.0", - "resolved": "https://registry.npm.taobao.org/faye-websocket/download/faye-websocket-0.10.0.tgz", - "integrity": "sha1-TkkvjQTftviQA1B/btvy1QHnxvQ=", - "dev": true, - "requires": { - "websocket-driver": ">=0.5.1" - } - }, - "figgy-pudding": { - "version": "3.5.2", - "resolved": "https://registry.npm.taobao.org/figgy-pudding/download/figgy-pudding-3.5.2.tgz", - "integrity": "sha1-tO7oFIq7Adzx0aw0Nn1Z4S+mHW4=" - }, - "file-loader": { - "version": "4.3.0", - "resolved": "https://registry.npm.taobao.org/file-loader/download/file-loader-4.3.0.tgz?cache=0&sync_timestamp=1603816843418&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffile-loader%2Fdownload%2Ffile-loader-4.3.0.tgz", - "integrity": "sha1-eA8ED3KbPRgBnyBgX3I+hEuKWK8=", - "dev": true, - "requires": { - "loader-utils": "^1.2.3", - "schema-utils": "^2.5.0" - } - }, - "file-uri-to-path": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/file-uri-to-path/download/file-uri-to-path-1.0.0.tgz", - "integrity": "sha1-VTp7hEb/b2hDWcRF8eN6BdrMM90=", - "optional": true - }, - "filesize": { - "version": "3.6.1", - "resolved": "https://registry.npm.taobao.org/filesize/download/filesize-3.6.1.tgz?cache=0&sync_timestamp=1582340569604&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffilesize%2Fdownload%2Ffilesize-3.6.1.tgz", - "integrity": "sha1-CQuz7gG2+AGoqL6Z0xcQs0Irsxc=", - "dev": true - }, - "fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/fill-range/download/fill-range-4.0.0.tgz", - "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", - "requires": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/extend-shallow/download/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "finalhandler": { - "version": "1.1.2", - "resolved": "https://registry.npm.taobao.org/finalhandler/download/finalhandler-1.1.2.tgz", - "integrity": "sha1-t+fQAP/RGTjQ/bBTUG9uur6fWH0=", - "dev": true, - "requires": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "~2.3.0", - "parseurl": "~1.3.3", - "statuses": "~1.5.0", - "unpipe": "~1.0.0" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npm.taobao.org/debug/download/debug-2.6.9.tgz?cache=0&sync_timestamp=1600502894812&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdebug%2Fdownload%2Fdebug-2.6.9.tgz", - "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/ms/download/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } - } - }, - "find-cache-dir": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/find-cache-dir/download/find-cache-dir-2.1.0.tgz", - "integrity": "sha1-jQ+UzRP+Q8bHwmGg2GEVypGMBfc=", - "requires": { - "commondir": "^1.0.1", - "make-dir": "^2.0.0", - "pkg-dir": "^3.0.0" - } - }, - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/find-up/download/find-up-3.0.0.tgz?cache=0&sync_timestamp=1597169842138&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffind-up%2Fdownload%2Ffind-up-3.0.0.tgz", - "integrity": "sha1-SRafHXmTQwZG2mHsxa41XCHJe3M=", - "requires": { - "locate-path": "^3.0.0" - } - }, - "flush-write-stream": { - "version": "1.1.1", - "resolved": "https://registry.npm.taobao.org/flush-write-stream/download/flush-write-stream-1.1.1.tgz", - "integrity": "sha1-jdfYc6G6vCB9lOrQwuDkQnbr8ug=", - "requires": { - "inherits": "^2.0.3", - "readable-stream": "^2.3.6" - } - }, - "follow-redirects": { - "version": "1.13.0", - "resolved": "https://registry.npm.taobao.org/follow-redirects/download/follow-redirects-1.13.0.tgz?cache=0&sync_timestamp=1597057976909&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffollow-redirects%2Fdownload%2Ffollow-redirects-1.13.0.tgz", - "integrity": "sha1-tC6Nk6Kn7qXtiGM2dtZZe8jjhNs=" - }, - "font-awesome": { - "version": "4.7.0", - "resolved": "https://registry.npm.taobao.org/font-awesome/download/font-awesome-4.7.0.tgz", - "integrity": "sha1-j6jPBBGhoxr9B7BtKQK7n8gVoTM=" - }, - "for-in": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/for-in/download/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=" - }, - "forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npm.taobao.org/forever-agent/download/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", - "dev": true - }, - "form-data": { - "version": "2.3.3", - "resolved": "https://registry.npm.taobao.org/form-data/download/form-data-2.3.3.tgz", - "integrity": "sha1-3M5SwF9kTymManq5Nr1yTO/786Y=", - "dev": true, - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - } - }, - "forwarded": { - "version": "0.1.2", - "resolved": "https://registry.npm.taobao.org/forwarded/download/forwarded-0.1.2.tgz", - "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=", - "dev": true - }, - "fragment-cache": { - "version": "0.2.1", - "resolved": "https://registry.npm.taobao.org/fragment-cache/download/fragment-cache-0.2.1.tgz", - "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", - "requires": { - "map-cache": "^0.2.2" - } - }, - "fresh": { - "version": "0.5.2", - "resolved": "https://registry.npm.taobao.org/fresh/download/fresh-0.5.2.tgz", - "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", - "dev": true - }, - "from2": { - "version": "2.3.0", - "resolved": "https://registry.npm.taobao.org/from2/download/from2-2.3.0.tgz", - "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", - "requires": { - "inherits": "^2.0.1", - "readable-stream": "^2.0.0" - } - }, - "fs-extra": { - "version": "7.0.1", - "resolved": "https://registry.npm.taobao.org/fs-extra/download/fs-extra-7.0.1.tgz", - "integrity": "sha1-TxicRKoSO4lfcigE9V6iPq3DSOk=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - }, - "fs-minipass": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/fs-minipass/download/fs-minipass-2.1.0.tgz", - "integrity": "sha1-f1A2/b8SxjwWkZDL5BmchSJx+fs=", - "requires": { - "minipass": "^3.0.0" - } - }, - "fs-write-stream-atomic": { - "version": "1.0.10", - "resolved": "https://registry.npm.taobao.org/fs-write-stream-atomic/download/fs-write-stream-atomic-1.0.10.tgz", - "integrity": "sha1-tH31NJPvkR33VzHnCp3tAYnbQMk=", - "requires": { - "graceful-fs": "^4.1.2", - "iferr": "^0.1.5", - "imurmurhash": "^0.1.4", - "readable-stream": "1 || 2" - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/fs.realpath/download/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" - }, - "fsevents": { - "version": "2.1.3", - "resolved": "https://registry.npm.taobao.org/fsevents/download/fsevents-2.1.3.tgz?cache=0&sync_timestamp=1588787369955&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffsevents%2Fdownload%2Ffsevents-2.1.3.tgz", - "integrity": "sha1-+3OHA66NL5/pAMM4Nt3r7ouX8j4=", - "optional": true - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npm.taobao.org/function-bind/download/function-bind-1.1.1.tgz", - "integrity": "sha1-pWiZ0+o8m6uHS7l3O3xe3pL0iV0=", - "dev": true - }, - "gensync": { - "version": "1.0.0-beta.2", - "resolved": "https://registry.npm.taobao.org/gensync/download/gensync-1.0.0-beta.2.tgz?cache=0&sync_timestamp=1603829773003&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fgensync%2Fdownload%2Fgensync-1.0.0-beta.2.tgz", - "integrity": "sha1-MqbudsPX9S1GsrGuXZP+qFgKJeA=", - "dev": true - }, - "get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npm.taobao.org/get-caller-file/download/get-caller-file-2.0.5.tgz", - "integrity": "sha1-T5RBKoLbMvNuOwuXQfipf+sDH34=", - "dev": true - }, - "get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npm.taobao.org/get-stream/download/get-stream-4.1.0.tgz?cache=0&sync_timestamp=1597056502934&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fget-stream%2Fdownload%2Fget-stream-4.1.0.tgz", - "integrity": "sha1-wbJVV189wh1Zv8ec09K0axw6VLU=", - "dev": true, - "requires": { - "pump": "^3.0.0" - } - }, - "get-value": { - "version": "2.0.6", - "resolved": "https://registry.npm.taobao.org/get-value/download/get-value-2.0.6.tgz", - "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=" - }, - "getpass": { - "version": "0.1.7", - "resolved": "https://registry.npm.taobao.org/getpass/download/getpass-0.1.7.tgz", - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0" - } - }, - "glob": { - "version": "7.1.6", - "resolved": "https://registry.npm.taobao.org/glob/download/glob-7.1.6.tgz", - "integrity": "sha1-FB8zuBp8JJLhJVlDB0gMRmeSeKY=", - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "glob-parent": { - "version": "5.1.1", - "resolved": "https://registry.npm.taobao.org/glob-parent/download/glob-parent-5.1.1.tgz", - "integrity": "sha1-tsHvQXxOVmPqSY8cRa+saRa7wik=", - "optional": true, - "requires": { - "is-glob": "^4.0.1" - } - }, - "glob-to-regexp": { - "version": "0.3.0", - "resolved": "https://registry.npm.taobao.org/glob-to-regexp/download/glob-to-regexp-0.3.0.tgz", - "integrity": "sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs=", - "dev": true - }, - "globals": { - "version": "11.12.0", - "resolved": "https://registry.npm.taobao.org/globals/download/globals-11.12.0.tgz?cache=0&sync_timestamp=1603664378253&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fglobals%2Fdownload%2Fglobals-11.12.0.tgz", - "integrity": "sha1-q4eVM4hooLq9hSV1gBjCp+uVxC4=", - "dev": true - }, - "globby": { - "version": "9.2.0", - "resolved": "https://registry.npm.taobao.org/globby/download/globby-9.2.0.tgz?cache=0&sync_timestamp=1591083783605&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fglobby%2Fdownload%2Fglobby-9.2.0.tgz", - "integrity": "sha1-/QKacGxwPSm90XD0tts6P3p8tj0=", - "dev": true, - "requires": { - "@types/glob": "^7.1.1", - "array-union": "^1.0.2", - "dir-glob": "^2.2.2", - "fast-glob": "^2.2.6", - "glob": "^7.1.3", - "ignore": "^4.0.3", - "pify": "^4.0.1", - "slash": "^2.0.0" - }, - "dependencies": { - "ignore": { - "version": "4.0.6", - "resolved": "https://registry.npm.taobao.org/ignore/download/ignore-4.0.6.tgz?cache=0&sync_timestamp=1590809289115&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fignore%2Fdownload%2Fignore-4.0.6.tgz", - "integrity": "sha1-dQ49tYYgh7RzfrrIIH/9HvJ7Jfw=", - "dev": true - }, - "slash": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/slash/download/slash-2.0.0.tgz", - "integrity": "sha1-3lUoUaF1nfOo8gZTVEL17E3eq0Q=", - "dev": true - } - } - }, - "good-listener": { - "version": "1.2.2", - "resolved": "https://registry.npm.taobao.org/good-listener/download/good-listener-1.2.2.tgz", - "integrity": "sha1-1TswzfkxPf+33JoNR3CWqm0UXFA=", - "requires": { - "delegate": "^3.1.2" - } - }, - "graceful-fs": { - "version": "4.2.4", - "resolved": "https://registry.npm.taobao.org/graceful-fs/download/graceful-fs-4.2.4.tgz", - "integrity": "sha1-Ila94U02MpWMRl68ltxGfKB6Kfs=" - }, - "gzip-size": { - "version": "5.1.1", - "resolved": "https://registry.npm.taobao.org/gzip-size/download/gzip-size-5.1.1.tgz", - "integrity": "sha1-y5vuaS+HwGErIyhAqHOQTkwTUnQ=", - "dev": true, - "requires": { - "duplexer": "^0.1.1", - "pify": "^4.0.1" - } - }, - "handle-thing": { - "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/handle-thing/download/handle-thing-2.0.1.tgz", - "integrity": "sha1-hX95zjWVgMNA1DCBzGSJcNC7I04=", - "dev": true - }, - "har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/har-schema/download/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", - "dev": true - }, - "har-validator": { - "version": "5.1.5", - "resolved": "https://registry.npm.taobao.org/har-validator/download/har-validator-5.1.5.tgz?cache=0&sync_timestamp=1596082584903&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fhar-validator%2Fdownload%2Fhar-validator-5.1.5.tgz", - "integrity": "sha1-HwgDufjLIMD6E4It8ezds2veHv0=", - "dev": true, - "requires": { - "ajv": "^6.12.3", - "har-schema": "^2.0.0" - } - }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npm.taobao.org/has/download/has-1.0.3.tgz", - "integrity": "sha1-ci18v8H2qoJB8W3YFOAR4fQeh5Y=", - "dev": true, - "requires": { - "function-bind": "^1.1.1" - } - }, - "has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/has-ansi/download/has-ansi-2.0.0.tgz", - "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npm.taobao.org/ansi-regex/download/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - } - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/has-flag/download/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "has-symbols": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/has-symbols/download/has-symbols-1.0.1.tgz", - "integrity": "sha1-n1IUdYpEGWxAbZvXbOv4HsLdMeg=", - "dev": true - }, - "has-value": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/has-value/download/has-value-1.0.0.tgz", - "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", - "requires": { - "get-value": "^2.0.6", - "has-values": "^1.0.0", - "isobject": "^3.0.0" - } - }, - "has-values": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/has-values/download/has-values-1.0.0.tgz", - "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", - "requires": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" - }, - "dependencies": { - "kind-of": { - "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/kind-of/download/kind-of-4.0.0.tgz", - "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "hash-base": { - "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/hash-base/download/hash-base-3.1.0.tgz", - "integrity": "sha1-VcOB2eBuHSmXqIO0o/3f5/DTrzM=", - "requires": { - "inherits": "^2.0.4", - "readable-stream": "^3.6.0", - "safe-buffer": "^5.2.0" - }, - "dependencies": { - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npm.taobao.org/readable-stream/download/readable-stream-3.6.0.tgz?cache=0&sync_timestamp=1581624324274&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Freadable-stream%2Fdownload%2Freadable-stream-3.6.0.tgz", - "integrity": "sha1-M3u9o63AcGvT4CRCaihtS0sskZg=", - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - }, - "safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npm.taobao.org/safe-buffer/download/safe-buffer-5.2.1.tgz", - "integrity": "sha1-Hq+fqb2x/dTsdfWPnNtOa3gn7sY=" - } - } - }, - "hash-sum": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/hash-sum/download/hash-sum-2.0.0.tgz", - "integrity": "sha1-gdAbtd6OpKIUrV1urRtSNGCwtFo=", - "dev": true - }, - "hash.js": { - "version": "1.1.7", - "resolved": "https://registry.npm.taobao.org/hash.js/download/hash.js-1.1.7.tgz", - "integrity": "sha1-C6vKU46NTuSg+JiNaIZlN6ADz0I=", - "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" - } - }, - "he": { - "version": "1.2.0", - "resolved": "https://registry.npm.taobao.org/he/download/he-1.2.0.tgz", - "integrity": "sha1-hK5l+n6vsWX922FWauFLrwVmTw8=" - }, - "hex-color-regex": { - "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/hex-color-regex/download/hex-color-regex-1.1.0.tgz", - "integrity": "sha1-TAb8y0YC/iYCs8k9+C1+fb8aio4=", - "dev": true - }, - "highlight.js": { - "version": "10.3.2", - "resolved": "https://registry.npm.taobao.org/highlight.js/download/highlight.js-10.3.2.tgz", - "integrity": "sha1-E1/TYZoAw8u4tM1tvHjVa/y8RvE=" - }, - "highlight.js-async-webpack": { - "version": "1.0.4", - "resolved": "https://registry.npmmirror.com/highlight.js-async-webpack/-/highlight.js-async-webpack-1.0.4.tgz", - "integrity": "sha512-IC0AwUgNr7BU8pqheaCEvOQvOtIZwO3I4rtbmT489Ndz8loE31IRmBmT6C4qDCbfZjzNO+k2w3VceZjTQ3JQ8Q==" - }, - "hmac-drbg": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/hmac-drbg/download/hmac-drbg-1.0.1.tgz", - "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", - "requires": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "hoopy": { - "version": "0.1.4", - "resolved": "https://registry.npm.taobao.org/hoopy/download/hoopy-0.1.4.tgz", - "integrity": "sha1-YJIH1mEQADOpqUAq096mdzgcGx0=", - "dev": true - }, - "hosted-git-info": { - "version": "2.8.8", - "resolved": "https://registry.npm.taobao.org/hosted-git-info/download/hosted-git-info-2.8.8.tgz?cache=0&sync_timestamp=1602803832496&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fhosted-git-info%2Fdownload%2Fhosted-git-info-2.8.8.tgz", - "integrity": "sha1-dTm9S8Hg4KiVgVouAmJCCxKFhIg=", - "dev": true - }, - "hpack.js": { - "version": "2.1.6", - "resolved": "https://registry.npm.taobao.org/hpack.js/download/hpack.js-2.1.6.tgz", - "integrity": "sha1-h3dMCUnlE/QuhFdbPEVoH63ioLI=", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "obuf": "^1.0.0", - "readable-stream": "^2.0.1", - "wbuf": "^1.1.0" - } - }, - "hsl-regex": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/hsl-regex/download/hsl-regex-1.0.0.tgz", - "integrity": "sha1-1JMwx4ntgZ4nakwNJy3/owsY/m4=", - "dev": true - }, - "hsla-regex": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/hsla-regex/download/hsla-regex-1.0.0.tgz", - "integrity": "sha1-wc56MWjIxmFAM6S194d/OyJfnDg=", - "dev": true - }, - "html-comment-regex": { - "version": "1.1.2", - "resolved": "https://registry.npm.taobao.org/html-comment-regex/download/html-comment-regex-1.1.2.tgz", - "integrity": "sha1-l9RoiutcgYhqNk+qDK0d2hTUM6c=", - "dev": true - }, - "html-entities": { - "version": "1.3.1", - "resolved": "https://registry.npm.taobao.org/html-entities/download/html-entities-1.3.1.tgz", - "integrity": "sha1-+5oaS1sUxdq6gtPjTGrk/nAaDkQ=", - "dev": true - }, - "html-minifier": { - "version": "3.5.21", - "resolved": "https://registry.npm.taobao.org/html-minifier/download/html-minifier-3.5.21.tgz", - "integrity": "sha1-0AQOBUcw41TbAIRjWTGUAVIS0gw=", - "dev": true, - "requires": { - "camel-case": "3.0.x", - "clean-css": "4.2.x", - "commander": "2.17.x", - "he": "1.2.x", - "param-case": "2.1.x", - "relateurl": "0.2.x", - "uglify-js": "3.4.x" - }, - "dependencies": { - "commander": { - "version": "2.17.1", - "resolved": "https://registry.npm.taobao.org/commander/download/commander-2.17.1.tgz?cache=0&sync_timestamp=1603599636161&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcommander%2Fdownload%2Fcommander-2.17.1.tgz", - "integrity": "sha1-vXerfebelCBc6sxy8XFtKfIKd78=", - "dev": true - } - } - }, - "html-tags": { - "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/html-tags/download/html-tags-3.1.0.tgz", - "integrity": "sha1-e15vfmZen7QfMAB+2eDUHpf7IUA=", - "dev": true - }, - "html-webpack-plugin": { - "version": "3.2.0", - "resolved": "https://registry.npm.taobao.org/html-webpack-plugin/download/html-webpack-plugin-3.2.0.tgz?cache=0&sync_timestamp=1603664396975&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fhtml-webpack-plugin%2Fdownload%2Fhtml-webpack-plugin-3.2.0.tgz", - "integrity": "sha1-sBq71yOsqqeze2r0SS69oD2d03s=", - "dev": true, - "requires": { - "html-minifier": "^3.2.3", - "loader-utils": "^0.2.16", - "lodash": "^4.17.3", - "pretty-error": "^2.0.2", - "tapable": "^1.0.0", - "toposort": "^1.0.0", - "util.promisify": "1.0.0" - }, - "dependencies": { - "big.js": { - "version": "3.2.0", - "resolved": "https://registry.npm.taobao.org/big.js/download/big.js-3.2.0.tgz", - "integrity": "sha1-pfwpi4G54Nyi5FiCR4S2XFK6WI4=", - "dev": true - }, - "emojis-list": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/emojis-list/download/emojis-list-2.1.0.tgz", - "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=", - "dev": true - }, - "json5": { - "version": "0.5.1", - "resolved": "https://registry.npm.taobao.org/json5/download/json5-0.5.1.tgz", - "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", - "dev": true - }, - "loader-utils": { - "version": "0.2.17", - "resolved": "https://registry.npm.taobao.org/loader-utils/download/loader-utils-0.2.17.tgz?cache=0&sync_timestamp=1584445207623&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Floader-utils%2Fdownload%2Floader-utils-0.2.17.tgz", - "integrity": "sha1-+G5jdNQyBabmxg6RlvF8Apm/s0g=", - "dev": true, - "requires": { - "big.js": "^3.1.3", - "emojis-list": "^2.0.0", - "json5": "^0.5.0", - "object-assign": "^4.0.1" - } - }, - "util.promisify": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/util.promisify/download/util.promisify-1.0.0.tgz", - "integrity": "sha1-RA9xZaRZyaFtwUXrjnLzVocJcDA=", - "dev": true, - "requires": { - "define-properties": "^1.1.2", - "object.getownpropertydescriptors": "^2.0.3" - } - } - } - }, - "htmlparser2": { - "version": "3.10.1", - "resolved": "https://registry.npm.taobao.org/htmlparser2/download/htmlparser2-3.10.1.tgz?cache=0&sync_timestamp=1603668161350&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fhtmlparser2%2Fdownload%2Fhtmlparser2-3.10.1.tgz", - "integrity": "sha1-vWedw/WYl7ajS7EHSchVu1OpOS8=", - "dev": true, - "requires": { - "domelementtype": "^1.3.1", - "domhandler": "^2.3.0", - "domutils": "^1.5.1", - "entities": "^1.1.1", - "inherits": "^2.0.1", - "readable-stream": "^3.1.1" - }, - "dependencies": { - "entities": { - "version": "1.1.2", - "resolved": "https://registry.npm.taobao.org/entities/download/entities-1.1.2.tgz?cache=0&sync_timestamp=1602897029273&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fentities%2Fdownload%2Fentities-1.1.2.tgz", - "integrity": "sha1-vfpzUplmTfr9NFKe1PhSKidf6lY=", - "dev": true - }, - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npm.taobao.org/readable-stream/download/readable-stream-3.6.0.tgz?cache=0&sync_timestamp=1581624324274&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Freadable-stream%2Fdownload%2Freadable-stream-3.6.0.tgz", - "integrity": "sha1-M3u9o63AcGvT4CRCaihtS0sskZg=", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - } - } - }, - "http-deceiver": { - "version": "1.2.7", - "resolved": "https://registry.npm.taobao.org/http-deceiver/download/http-deceiver-1.2.7.tgz", - "integrity": "sha1-+nFolEq5pRnTN8sL7HKE3D5yPYc=", - "dev": true - }, - "http-errors": { - "version": "1.7.2", - "resolved": "https://registry.npm.taobao.org/http-errors/download/http-errors-1.7.2.tgz", - "integrity": "sha1-T1ApzxMjnzEDblsuVSkrz7zIXI8=", - "dev": true, - "requires": { - "depd": "~1.1.2", - "inherits": "2.0.3", - "setprototypeof": "1.1.1", - "statuses": ">= 1.5.0 < 2", - "toidentifier": "1.0.0" - }, - "dependencies": { - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npm.taobao.org/inherits/download/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true - } - } - }, - "http-proxy": { - "version": "1.18.1", - "resolved": "https://registry.npm.taobao.org/http-proxy/download/http-proxy-1.18.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fhttp-proxy%2Fdownload%2Fhttp-proxy-1.18.1.tgz", - "integrity": "sha1-QBVB8FNIhLv5UmAzTnL4juOXZUk=", - "dev": true, - "requires": { - "eventemitter3": "^4.0.0", - "follow-redirects": "^1.0.0", - "requires-port": "^1.0.0" - } - }, - "http-proxy-middleware": { - "version": "0.19.1", - "resolved": "https://registry.npm.taobao.org/http-proxy-middleware/download/http-proxy-middleware-0.19.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fhttp-proxy-middleware%2Fdownload%2Fhttp-proxy-middleware-0.19.1.tgz", - "integrity": "sha1-GDx9xKoUeRUDBkmMIQza+WCApDo=", - "dev": true, - "requires": { - "http-proxy": "^1.17.0", - "is-glob": "^4.0.0", - "lodash": "^4.17.11", - "micromatch": "^3.1.10" - } - }, - "http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npm.taobao.org/http-signature/download/http-signature-1.2.0.tgz?cache=0&sync_timestamp=1600868452638&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fhttp-signature%2Fdownload%2Fhttp-signature-1.2.0.tgz", - "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - } - }, - "https-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/https-browserify/download/https-browserify-1.0.0.tgz", - "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=" - }, - "human-signals": { - "version": "1.1.1", - "resolved": "https://registry.npm.taobao.org/human-signals/download/human-signals-1.1.1.tgz", - "integrity": "sha1-xbHNFPUK6uCatsWf5jujOV/k36M=", - "dev": true - }, - "iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npm.taobao.org/iconv-lite/download/iconv-lite-0.4.24.tgz?cache=0&sync_timestamp=1594184250387&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ficonv-lite%2Fdownload%2Ficonv-lite-0.4.24.tgz", - "integrity": "sha1-ICK0sl+93CHS9SSXSkdKr+czkIs=", - "dev": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "icss-utils": { - "version": "4.1.1", - "resolved": "https://registry.npm.taobao.org/icss-utils/download/icss-utils-4.1.1.tgz?cache=0&sync_timestamp=1602526927264&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ficss-utils%2Fdownload%2Ficss-utils-4.1.1.tgz", - "integrity": "sha1-IRcLU3ie4nRHwvR91oMIFAP5pGc=", - "dev": true, - "requires": { - "postcss": "^7.0.14" - } - }, - "ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npm.taobao.org/ieee754/download/ieee754-1.2.1.tgz?cache=0&sync_timestamp=1603838208740&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fieee754%2Fdownload%2Fieee754-1.2.1.tgz", - "integrity": "sha1-jrehCmP/8l0VpXsAFYbRd9Gw01I=" - }, - "iferr": { - "version": "0.1.5", - "resolved": "https://registry.npm.taobao.org/iferr/download/iferr-0.1.5.tgz", - "integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=" - }, - "ignore": { - "version": "3.3.10", - "resolved": "https://registry.npm.taobao.org/ignore/download/ignore-3.3.10.tgz?cache=0&sync_timestamp=1590809289115&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fignore%2Fdownload%2Fignore-3.3.10.tgz", - "integrity": "sha1-Cpf7h2mG6AgcYxFg+PnziRV/AEM=", - "dev": true - }, - "import-cwd": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/import-cwd/download/import-cwd-2.1.0.tgz", - "integrity": "sha1-qmzzbnInYShcs3HsZRn1PiQ1sKk=", - "dev": true, - "requires": { - "import-from": "^2.1.0" - } - }, - "import-fresh": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/import-fresh/download/import-fresh-2.0.0.tgz", - "integrity": "sha1-2BNVwVYS04bGH53dOSLUMEgipUY=", - "dev": true, - "requires": { - "caller-path": "^2.0.0", - "resolve-from": "^3.0.0" - } - }, - "import-from": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/import-from/download/import-from-2.1.0.tgz", - "integrity": "sha1-M1238qev/VOqpHHUuAId7ja387E=", - "dev": true, - "requires": { - "resolve-from": "^3.0.0" - } - }, - "import-local": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/import-local/download/import-local-2.0.0.tgz", - "integrity": "sha1-VQcL44pZk88Y72236WH1vuXFoJ0=", - "dev": true, - "requires": { - "pkg-dir": "^3.0.0", - "resolve-cwd": "^2.0.0" - } - }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npm.taobao.org/imurmurhash/download/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=" - }, - "indent-string": { - "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/indent-string/download/indent-string-4.0.0.tgz", - "integrity": "sha1-Yk+PRJfWGbLZdoUx1Y9BIoVNclE=" - }, - "indexes-of": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/indexes-of/download/indexes-of-1.0.1.tgz", - "integrity": "sha1-8w9xbI4r00bHtn0985FVZqfAVgc=", - "dev": true - }, - "infer-owner": { - "version": "1.0.4", - "resolved": "https://registry.npm.taobao.org/infer-owner/download/infer-owner-1.0.4.tgz", - "integrity": "sha1-xM78qo5RBRwqQLos6KPScpWvlGc=" - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npm.taobao.org/inflight/download/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npm.taobao.org/inherits/download/inherits-2.0.4.tgz", - "integrity": "sha1-D6LGT5MpF8NDOg3tVTY6rjdBa3w=" - }, - "internal-ip": { - "version": "4.3.0", - "resolved": "https://registry.npm.taobao.org/internal-ip/download/internal-ip-4.3.0.tgz?cache=0&sync_timestamp=1596563037835&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Finternal-ip%2Fdownload%2Finternal-ip-4.3.0.tgz", - "integrity": "sha1-hFRSuq2dLKO2nGNaE3rLmg2tCQc=", - "dev": true, - "requires": { - "default-gateway": "^4.2.0", - "ipaddr.js": "^1.9.0" - }, - "dependencies": { - "default-gateway": { - "version": "4.2.0", - "resolved": "https://registry.npm.taobao.org/default-gateway/download/default-gateway-4.2.0.tgz", - "integrity": "sha1-FnEEx1AMIRX23WmwpTa7jtcgVSs=", - "dev": true, - "requires": { - "execa": "^1.0.0", - "ip-regex": "^2.1.0" - } - } - } - }, - "ip": { - "version": "1.1.5", - "resolved": "https://registry.npm.taobao.org/ip/download/ip-1.1.5.tgz", - "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=", - "dev": true - }, - "ip-regex": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/ip-regex/download/ip-regex-2.1.0.tgz", - "integrity": "sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk=", - "dev": true - }, - "ipaddr.js": { - "version": "1.9.1", - "resolved": "https://registry.npm.taobao.org/ipaddr.js/download/ipaddr.js-1.9.1.tgz", - "integrity": "sha1-v/OFQ+64mEglB5/zoqjmy9RngbM=", - "dev": true - }, - "is-absolute-url": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/is-absolute-url/download/is-absolute-url-2.1.0.tgz", - "integrity": "sha1-UFMN+4T8yap9vnhS6Do3uTufKqY=", - "dev": true - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npm.taobao.org/is-accessor-descriptor/download/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npm.taobao.org/kind-of/download/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-arguments": { - "version": "1.0.4", - "resolved": "https://registry.npm.taobao.org/is-arguments/download/is-arguments-1.0.4.tgz", - "integrity": "sha1-P6+WbHy6D/Q3+zH2JQCC/PBEjPM=", - "dev": true - }, - "is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npm.taobao.org/is-arrayish/download/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", - "dev": true - }, - "is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/is-binary-path/download/is-binary-path-2.1.0.tgz", - "integrity": "sha1-6h9/O4DwZCNug0cPhsCcJU+0Wwk=", - "optional": true, - "requires": { - "binary-extensions": "^2.0.0" - } - }, - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npm.taobao.org/is-buffer/download/is-buffer-1.1.6.tgz?cache=0&sync_timestamp=1588707106955&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fis-buffer%2Fdownload%2Fis-buffer-1.1.6.tgz", - "integrity": "sha1-76ouqdqg16suoTqXsritUf776L4=" - }, - "is-callable": { - "version": "1.2.2", - "resolved": "https://registry.npm.taobao.org/is-callable/download/is-callable-1.2.2.tgz?cache=0&sync_timestamp=1600719276620&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fis-callable%2Fdownload%2Fis-callable-1.2.2.tgz", - "integrity": "sha1-x8ZxXNItTdtI0+GZcCI6zquwgNk=", - "dev": true - }, - "is-color-stop": { - "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/is-color-stop/download/is-color-stop-1.1.0.tgz", - "integrity": "sha1-z/9HGu5N1cnhWFmPvhKWe1za00U=", - "dev": true, - "requires": { - "css-color-names": "^0.0.4", - "hex-color-regex": "^1.1.0", - "hsl-regex": "^1.0.0", - "hsla-regex": "^1.0.0", - "rgb-regex": "^1.0.1", - "rgba-regex": "^1.0.0" - } - }, - "is-core-module": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/is-core-module/download/is-core-module-2.0.0.tgz?cache=0&sync_timestamp=1603133391687&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fis-core-module%2Fdownload%2Fis-core-module-2.0.0.tgz", - "integrity": "sha1-WFMbcK7R23wOjU6xoKLR3dZL0S0=", - "dev": true, - "requires": { - "has": "^1.0.3" - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npm.taobao.org/is-data-descriptor/download/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npm.taobao.org/kind-of/download/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-date-object": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/is-date-object/download/is-date-object-1.0.2.tgz?cache=0&sync_timestamp=1576729165697&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fis-date-object%2Fdownload%2Fis-date-object-1.0.2.tgz", - "integrity": "sha1-vac28s2P0G0yhE53Q7+nSUw7/X4=", - "dev": true - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npm.taobao.org/is-descriptor/download/is-descriptor-0.1.6.tgz", - "integrity": "sha1-Nm2CQN3kh8pRgjsaufB6EKeCUco=", - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "dependencies": { - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npm.taobao.org/kind-of/download/kind-of-5.1.0.tgz", - "integrity": "sha1-cpyR4thXt6QZofmqZWhcTDP1hF0=" - } - } - }, - "is-directory": { - "version": "0.3.1", - "resolved": "https://registry.npm.taobao.org/is-directory/download/is-directory-0.3.1.tgz", - "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=", - "dev": true - }, - "is-docker": { - "version": "2.1.1", - "resolved": "https://registry.npm.taobao.org/is-docker/download/is-docker-2.1.1.tgz", - "integrity": "sha1-QSWojkTkUNOE4JBH7eca3C0UQVY=", - "dev": true - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npm.taobao.org/is-extendable/download/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=" - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npm.taobao.org/is-extglob/download/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "devOptional": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/is-fullwidth-code-point/download/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npm.taobao.org/is-glob/download/is-glob-4.0.1.tgz", - "integrity": "sha1-dWfb6fL14kZ7x3q4PEopSCQHpdw=", - "devOptional": true, - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-negative-zero": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/is-negative-zero/download/is-negative-zero-2.0.0.tgz", - "integrity": "sha1-lVOxIbD6wohp2p7UWeIMdUN4hGE=", - "dev": true - }, - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/is-number/download/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npm.taobao.org/kind-of/download/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-obj": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/is-obj/download/is-obj-2.0.0.tgz", - "integrity": "sha1-Rz+wXZc3BeP9liBUUBjKjiLvSYI=", - "dev": true - }, - "is-path-cwd": { - "version": "2.2.0", - "resolved": "https://registry.npm.taobao.org/is-path-cwd/download/is-path-cwd-2.2.0.tgz", - "integrity": "sha1-Z9Q7gmZKe1GR/ZEZEn6zAASKn9s=", - "dev": true - }, - "is-path-in-cwd": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/is-path-in-cwd/download/is-path-in-cwd-2.1.0.tgz", - "integrity": "sha1-v+Lcomxp85cmWkAJljYCk1oFOss=", - "dev": true, - "requires": { - "is-path-inside": "^2.1.0" - } - }, - "is-path-inside": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/is-path-inside/download/is-path-inside-2.1.0.tgz", - "integrity": "sha1-fJgQWH1lmkDSe8201WFuqwWUlLI=", - "dev": true, - "requires": { - "path-is-inside": "^1.0.2" - } - }, - "is-plain-obj": { - "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/is-plain-obj/download/is-plain-obj-1.1.0.tgz?cache=0&sync_timestamp=1602541451286&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fis-plain-obj%2Fdownload%2Fis-plain-obj-1.1.0.tgz", - "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", - "dev": true - }, - "is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npm.taobao.org/is-plain-object/download/is-plain-object-2.0.4.tgz", - "integrity": "sha1-LBY7P6+xtgbZ0Xko8FwqHDjgdnc=", - "requires": { - "isobject": "^3.0.1" - } - }, - "is-regex": { - "version": "1.1.1", - "resolved": "https://registry.npm.taobao.org/is-regex/download/is-regex-1.1.1.tgz?cache=0&sync_timestamp=1596555640677&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fis-regex%2Fdownload%2Fis-regex-1.1.1.tgz", - "integrity": "sha1-xvmKrMVG9s7FRooHt7FTq1ZKV7k=", - "dev": true, - "requires": { - "has-symbols": "^1.0.1" - } - }, - "is-resolvable": { - "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/is-resolvable/download/is-resolvable-1.1.0.tgz", - "integrity": "sha1-+xj4fOH+uSUWnJpAfBkxijIG7Yg=", - "dev": true - }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/is-stream/download/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", - "dev": true - }, - "is-svg": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/is-svg/download/is-svg-3.0.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fis-svg%2Fdownload%2Fis-svg-3.0.0.tgz", - "integrity": "sha1-kyHb0pwhLlypnE+peUxxS8r6L3U=", - "dev": true, - "requires": { - "html-comment-regex": "^1.1.0" - } - }, - "is-symbol": { - "version": "1.0.3", - "resolved": "https://registry.npm.taobao.org/is-symbol/download/is-symbol-1.0.3.tgz", - "integrity": "sha1-OOEBS55jKb4N6dJKQU/XRB7GGTc=", - "dev": true, - "requires": { - "has-symbols": "^1.0.1" - } - }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/is-typedarray/download/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", - "dev": true - }, - "is-windows": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/is-windows/download/is-windows-1.0.2.tgz", - "integrity": "sha1-0YUOuXkezRjmGCzhKjDzlmNLsZ0=" - }, - "is-wsl": { - "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/is-wsl/download/is-wsl-1.1.0.tgz", - "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=" - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/isarray/download/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/isexe/download/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npm.taobao.org/isobject/download/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" - }, - "isstream": { - "version": "0.1.2", - "resolved": "https://registry.npm.taobao.org/isstream/download/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", - "dev": true - }, - "javascript-stringify": { - "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/javascript-stringify/download/javascript-stringify-2.0.1.tgz", - "integrity": "sha1-bvNYA1MQ411mfGde1j0+t8GqGeU=", - "dev": true - }, - "jest-worker": { - "version": "25.5.0", - "resolved": "https://registry.npm.taobao.org/jest-worker/download/jest-worker-25.5.0.tgz?cache=0&sync_timestamp=1603442917089&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fjest-worker%2Fdownload%2Fjest-worker-25.5.0.tgz", - "integrity": "sha1-JhHQcbec6g9D7lej0RhZOsFUfbE=", - "dev": true, - "requires": { - "merge-stream": "^2.0.0", - "supports-color": "^7.0.0" - }, - "dependencies": { - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/has-flag/download/has-flag-4.0.0.tgz", - "integrity": "sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=", - "dev": true - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-7.2.0.tgz?cache=0&sync_timestamp=1598611709087&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsupports-color%2Fdownload%2Fsupports-color-7.2.0.tgz", - "integrity": "sha1-G33NyzK4E4gBs+R4umpRyqiWSNo=", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, - "jquery": { - "version": "3.5.1", - "resolved": "https://registry.npm.taobao.org/jquery/download/jquery-3.5.1.tgz", - "integrity": "sha1-17TQjhv9uGrS8aPQOeoXMEcXq7U=" - }, - "js-message": { - "version": "1.0.5", - "resolved": "https://registry.npm.taobao.org/js-message/download/js-message-1.0.5.tgz", - "integrity": "sha1-IwDSSxrwjondCVvBpMnJz8uJLRU=", - "dev": true - }, - "js-queue": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/js-queue/download/js-queue-2.0.0.tgz", - "integrity": "sha1-NiITz4YPRo8BJfxslqvBdCUx+Ug=", - "dev": true, - "requires": { - "easy-stack": "^1.0.0" - } - }, - "js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/js-tokens/download/js-tokens-4.0.0.tgz?cache=0&sync_timestamp=1586796260005&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fjs-tokens%2Fdownload%2Fjs-tokens-4.0.0.tgz", - "integrity": "sha1-GSA/tZmR35jjoocFDUZHzerzJJk=", - "dev": true - }, - "js-yaml": { - "version": "3.14.0", - "resolved": "https://registry.npm.taobao.org/js-yaml/download/js-yaml-3.14.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fjs-yaml%2Fdownload%2Fjs-yaml-3.14.0.tgz", - "integrity": "sha1-p6NBcPJqIbsWJCTYray0ETpp5II=", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, - "jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npm.taobao.org/jsbn/download/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", - "dev": true - }, - "jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npm.taobao.org/jsesc/download/jsesc-2.5.2.tgz?cache=0&sync_timestamp=1603891232110&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fjsesc%2Fdownload%2Fjsesc-2.5.2.tgz", - "integrity": "sha1-gFZNLkg9rPbo7yCWUKZ98/DCg6Q=", - "dev": true - }, - "json-parse-better-errors": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/json-parse-better-errors/download/json-parse-better-errors-1.0.2.tgz", - "integrity": "sha1-u4Z8+zRQ5pEHwTHRxRS6s9yLyqk=" - }, - "json-parse-even-better-errors": { - "version": "2.3.1", - "resolved": "https://registry.npm.taobao.org/json-parse-even-better-errors/download/json-parse-even-better-errors-2.3.1.tgz?cache=0&sync_timestamp=1599064788298&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fjson-parse-even-better-errors%2Fdownload%2Fjson-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha1-fEeAWpQxmSjgV3dAXcEuH3pO4C0=", - "dev": true - }, - "json-schema": { - "version": "0.2.3", - "resolved": "https://registry.npm.taobao.org/json-schema/download/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", - "dev": true - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npm.taobao.org/json-schema-traverse/download/json-schema-traverse-0.4.1.tgz?cache=0&sync_timestamp=1599333856086&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fjson-schema-traverse%2Fdownload%2Fjson-schema-traverse-0.4.1.tgz", - "integrity": "sha1-afaofZUTq4u4/mO9sJecRI5oRmA=" - }, - "json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npm.taobao.org/json-stringify-safe/download/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", - "dev": true - }, - "json3": { - "version": "3.3.3", - "resolved": "https://registry.npm.taobao.org/json3/download/json3-3.3.3.tgz", - "integrity": "sha1-f8EON1/FrkLEcFpcwKpvYr4wW4E=", - "dev": true - }, - "json5": { - "version": "2.1.3", - "resolved": "https://registry.npm.taobao.org/json5/download/json5-2.1.3.tgz", - "integrity": "sha1-ybD3+pIzv+WAf+ZvzzpWF+1ZfUM=", - "dev": true, - "requires": { - "minimist": "^1.2.5" - } - }, - "jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/jsonfile/download/jsonfile-4.0.0.tgz", - "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.6" - } - }, - "jsprim": { - "version": "1.4.1", - "resolved": "https://registry.npm.taobao.org/jsprim/download/jsprim-1.4.1.tgz", - "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", - "dev": true, - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.2.3", - "verror": "1.10.0" - } - }, - "katex": { - "version": "0.12.0", - "resolved": "https://registry.npm.taobao.org/katex/download/katex-0.12.0.tgz", - "integrity": "sha1-L7HGZdvSsEPtz4ofXFVfRr6qDLk=", - "requires": { - "commander": "^2.19.0" - } - }, - "keycode": { - "version": "2.2.0", - "resolved": "https://registry.npm.taobao.org/keycode/download/keycode-2.2.0.tgz", - "integrity": "sha1-PQr1bce4uOXLqNCpfxByBO7CKwQ=" - }, - "killable": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/killable/download/killable-1.0.1.tgz", - "integrity": "sha1-TIzkQRh6Bhx0dPuHygjipjgZSJI=", - "dev": true - }, - "kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npm.taobao.org/kind-of/download/kind-of-6.0.3.tgz", - "integrity": "sha1-B8BQNKbDSfoG4k+jWqdttFgM5N0=" - }, - "launch-editor": { - "version": "2.2.1", - "resolved": "https://registry.npm.taobao.org/launch-editor/download/launch-editor-2.2.1.tgz", - "integrity": "sha1-hxtaPuOdZoD8wm03kwtu7aidsMo=", - "dev": true, - "requires": { - "chalk": "^2.3.0", - "shell-quote": "^1.6.1" - } - }, - "launch-editor-middleware": { - "version": "2.2.1", - "resolved": "https://registry.npm.taobao.org/launch-editor-middleware/download/launch-editor-middleware-2.2.1.tgz", - "integrity": "sha1-4UsH5scVSwpLhqD9NFeE5FgEwVc=", - "dev": true, - "requires": { - "launch-editor": "^2.2.1" - } - }, - "lines-and-columns": { - "version": "1.1.6", - "resolved": "https://registry.npm.taobao.org/lines-and-columns/download/lines-and-columns-1.1.6.tgz", - "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=", - "dev": true - }, - "loader-runner": { - "version": "2.4.0", - "resolved": "https://registry.npm.taobao.org/loader-runner/download/loader-runner-2.4.0.tgz?cache=0&sync_timestamp=1601450715716&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Floader-runner%2Fdownload%2Floader-runner-2.4.0.tgz", - "integrity": "sha1-7UcGa/5TTX6ExMe5mYwqdWB9k1c=" - }, - "loader-utils": { - "version": "1.4.0", - "resolved": "https://registry.npm.taobao.org/loader-utils/download/loader-utils-1.4.0.tgz?cache=0&sync_timestamp=1584445207623&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Floader-utils%2Fdownload%2Floader-utils-1.4.0.tgz", - "integrity": "sha1-xXm140yzSxp07cbB+za/o3HVphM=", - "requires": { - "big.js": "^5.2.2", - "emojis-list": "^3.0.0", - "json5": "^1.0.1" - }, - "dependencies": { - "json5": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/json5/download/json5-1.0.1.tgz", - "integrity": "sha1-d5+wAYYE+oVOrL9iUhgNg1Q+Pb4=", - "requires": { - "minimist": "^1.2.0" - } - } - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/locate-path/download/locate-path-3.0.0.tgz", - "integrity": "sha1-2+w7OrdZdYBxtY/ln8QYca8hQA4=", - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmmirror.com/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" - }, - "lodash.defaultsdeep": { - "version": "4.6.1", - "resolved": "https://registry.npm.taobao.org/lodash.defaultsdeep/download/lodash.defaultsdeep-4.6.1.tgz", - "integrity": "sha1-US6b1yHSctlOPTpjZT+hdRZ0HKY=", - "dev": true - }, - "lodash.kebabcase": { - "version": "4.1.1", - "resolved": "https://registry.npm.taobao.org/lodash.kebabcase/download/lodash.kebabcase-4.1.1.tgz", - "integrity": "sha1-hImxyw0p/4gZXM7KRI/21swpXDY=", - "dev": true - }, - "lodash.mapvalues": { - "version": "4.6.0", - "resolved": "https://registry.npm.taobao.org/lodash.mapvalues/download/lodash.mapvalues-4.6.0.tgz", - "integrity": "sha1-G6+lAF3p3W9PJmaMMMo3IwzJaJw=", - "dev": true - }, - "lodash.memoize": { - "version": "4.1.2", - "resolved": "https://registry.npm.taobao.org/lodash.memoize/download/lodash.memoize-4.1.2.tgz", - "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=", - "dev": true - }, - "lodash.transform": { - "version": "4.6.0", - "resolved": "https://registry.npm.taobao.org/lodash.transform/download/lodash.transform-4.6.0.tgz", - "integrity": "sha1-EjBkIvYzJK7YSD0/ODMrX2cFR6A=", - "dev": true - }, - "lodash.uniq": { - "version": "4.5.0", - "resolved": "https://registry.npm.taobao.org/lodash.uniq/download/lodash.uniq-4.5.0.tgz", - "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=", - "dev": true - }, - "log-symbols": { - "version": "2.2.0", - "resolved": "https://registry.npm.taobao.org/log-symbols/download/log-symbols-2.2.0.tgz?cache=0&sync_timestamp=1587898912367&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Flog-symbols%2Fdownload%2Flog-symbols-2.2.0.tgz", - "integrity": "sha1-V0Dhxdbw39pK2TI7UzIQfva0xAo=", - "dev": true, - "requires": { - "chalk": "^2.0.1" - } - }, - "loglevel": { - "version": "1.7.0", - "resolved": "https://registry.npm.taobao.org/loglevel/download/loglevel-1.7.0.tgz", - "integrity": "sha1-coFmhVp0DVnTjbAc9G8ELKoEG7A=", - "dev": true - }, - "lower-case": { - "version": "1.1.4", - "resolved": "https://registry.npm.taobao.org/lower-case/download/lower-case-1.1.4.tgz", - "integrity": "sha1-miyr0bno4K6ZOkv31YdcOcQujqw=", - "dev": true - }, - "lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npm.taobao.org/lru-cache/download/lru-cache-5.1.1.tgz?cache=0&sync_timestamp=1594427567713&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Flru-cache%2Fdownload%2Flru-cache-5.1.1.tgz", - "integrity": "sha1-HaJ+ZxAnGUdpXa9oSOhH8B2EuSA=", - "requires": { - "yallist": "^3.0.2" - } - }, - "make-dir": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/make-dir/download/make-dir-2.1.0.tgz?cache=0&sync_timestamp=1587567572251&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmake-dir%2Fdownload%2Fmake-dir-2.1.0.tgz", - "integrity": "sha1-XwMQ4YuL6JjMBwCSlaMK5B6R5vU=", - "requires": { - "pify": "^4.0.1", - "semver": "^5.6.0" - } - }, - "map-cache": { - "version": "0.2.2", - "resolved": "https://registry.npm.taobao.org/map-cache/download/map-cache-0.2.2.tgz", - "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=" - }, - "map-visit": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/map-visit/download/map-visit-1.0.0.tgz", - "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", - "requires": { - "object-visit": "^1.0.0" - } - }, - "mavon-editor": { - "version": "2.9.1", - "resolved": "https://registry.npmmirror.com/mavon-editor/-/mavon-editor-2.9.1.tgz", - "integrity": "sha512-N42ZBBVjDOOmwwBKRLytItMGG9bR8KBZN4ZI8sxpHh3dqL6SF5HNhzn/sVHDctp9vxphO930a3zu4GFZWQwZ1Q==", - "requires": { - "highlight.js": "^9.11.0", - "highlight.js-async-webpack": "^1.0.4", - "xss": "^1.0.6" - }, - "dependencies": { - "highlight.js": { - "version": "9.18.5", - "resolved": "https://registry.npmmirror.com/highlight.js/-/highlight.js-9.18.5.tgz", - "integrity": "sha512-a5bFyofd/BHCX52/8i8uJkjr9DYwXIPnM/plwI6W7ezItLGqzt7X2G2nXuYSfsIJdkwwj/g9DG1LkcGJI/dDoA==" - } - } - }, - "md5.js": { - "version": "1.3.5", - "resolved": "https://registry.npm.taobao.org/md5.js/download/md5.js-1.3.5.tgz", - "integrity": "sha1-tdB7jjIW4+J81yjXL3DR5qNCAF8=", - "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "mdn-data": { - "version": "2.0.4", - "resolved": "https://registry.npm.taobao.org/mdn-data/download/mdn-data-2.0.4.tgz?cache=0&sync_timestamp=1602987212845&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmdn-data%2Fdownload%2Fmdn-data-2.0.4.tgz", - "integrity": "sha1-aZs8OKxvHXKAkaZGULZdOIUC/Vs=", - "dev": true - }, - "media-typer": { - "version": "0.3.0", - "resolved": "https://registry.npm.taobao.org/media-typer/download/media-typer-0.3.0.tgz", - "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", - "dev": true - }, - "memory-fs": { - "version": "0.4.1", - "resolved": "https://registry.npm.taobao.org/memory-fs/download/memory-fs-0.4.1.tgz", - "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=", - "requires": { - "errno": "^0.1.3", - "readable-stream": "^2.0.1" - } - }, - "merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/merge-descriptors/download/merge-descriptors-1.0.1.tgz", - "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=", - "dev": true - }, - "merge-source-map": { - "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/merge-source-map/download/merge-source-map-1.1.0.tgz", - "integrity": "sha1-L93n5gIJOfcJBqaPLXrmheTIxkY=", - "dev": true, - "requires": { - "source-map": "^0.6.1" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz?cache=0&sync_timestamp=1571657176668&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsource-map%2Fdownload%2Fsource-map-0.6.1.tgz", - "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", - "dev": true - } - } - }, - "merge-stream": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/merge-stream/download/merge-stream-2.0.0.tgz", - "integrity": "sha1-UoI2KaFN0AyXcPtq1H3GMQ8sH2A=", - "dev": true - }, - "merge2": { - "version": "1.4.1", - "resolved": "https://registry.npm.taobao.org/merge2/download/merge2-1.4.1.tgz", - "integrity": "sha1-Q2iJL4hekHRVpv19xVwMnUBJkK4=", - "dev": true - }, - "methods": { - "version": "1.1.2", - "resolved": "https://registry.npm.taobao.org/methods/download/methods-1.1.2.tgz", - "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", - "dev": true - }, - "micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npm.taobao.org/micromatch/download/micromatch-3.1.10.tgz", - "integrity": "sha1-cIWbyVyYQJUvNZoGij/En57PrCM=", - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" - } - }, - "miller-rabin": { - "version": "4.0.1", - "resolved": "https://registry.npm.taobao.org/miller-rabin/download/miller-rabin-4.0.1.tgz", - "integrity": "sha1-8IA1HIZbDcViqEYpZtqlNUPHik0=", - "requires": { - "bn.js": "^4.0.0", - "brorand": "^1.0.1" - }, - "dependencies": { - "bn.js": { - "version": "4.11.9", - "resolved": "https://registry.npm.taobao.org/bn.js/download/bn.js-4.11.9.tgz", - "integrity": "sha1-JtVWgpRY+dHoH8SJUkk9C6NQeCg=" - } - } - }, - "mime": { - "version": "2.4.6", - "resolved": "https://registry.npm.taobao.org/mime/download/mime-2.4.6.tgz?cache=0&sync_timestamp=1590596706367&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmime%2Fdownload%2Fmime-2.4.6.tgz", - "integrity": "sha1-5bQHyQ20QvK+tbFiNz0Htpr/pNE=", - "dev": true - }, - "mime-db": { - "version": "1.44.0", - "resolved": "https://registry.npm.taobao.org/mime-db/download/mime-db-1.44.0.tgz?cache=0&sync_timestamp=1600831210195&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmime-db%2Fdownload%2Fmime-db-1.44.0.tgz", - "integrity": "sha1-+hHF6wrKEzS0Izy01S8QxaYnL5I=", - "dev": true - }, - "mime-types": { - "version": "2.1.27", - "resolved": "https://registry.npm.taobao.org/mime-types/download/mime-types-2.1.27.tgz", - "integrity": "sha1-R5SfmOJ56lMRn1ci4PNOUpvsAJ8=", - "dev": true, - "requires": { - "mime-db": "1.44.0" - } - }, - "mimic-fn": { - "version": "1.2.0", - "resolved": "https://registry.npm.taobao.org/mimic-fn/download/mimic-fn-1.2.0.tgz?cache=0&sync_timestamp=1596095644798&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmimic-fn%2Fdownload%2Fmimic-fn-1.2.0.tgz", - "integrity": "sha1-ggyGo5M0ZA6ZUWkovQP8qIBX0CI=", - "dev": true - }, - "mini-css-extract-plugin": { - "version": "0.9.0", - "resolved": "https://registry.npm.taobao.org/mini-css-extract-plugin/download/mini-css-extract-plugin-0.9.0.tgz?cache=0&sync_timestamp=1603807566472&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmini-css-extract-plugin%2Fdownload%2Fmini-css-extract-plugin-0.9.0.tgz", - "integrity": "sha1-R/LPB6oWWrNXM7H8l9TEbAVkM54=", - "dev": true, - "requires": { - "loader-utils": "^1.1.0", - "normalize-url": "1.9.1", - "schema-utils": "^1.0.0", - "webpack-sources": "^1.1.0" - }, - "dependencies": { - "normalize-url": { - "version": "1.9.1", - "resolved": "https://registry.npm.taobao.org/normalize-url/download/normalize-url-1.9.1.tgz?cache=0&sync_timestamp=1602432435724&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fnormalize-url%2Fdownload%2Fnormalize-url-1.9.1.tgz", - "integrity": "sha1-LMDWazHqIwNkWENuNiDYWVTGbDw=", - "dev": true, - "requires": { - "object-assign": "^4.0.1", - "prepend-http": "^1.0.0", - "query-string": "^4.1.0", - "sort-keys": "^1.0.0" - } - }, - "schema-utils": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/schema-utils/download/schema-utils-1.0.0.tgz", - "integrity": "sha1-C3mpMgTXtgDUsoUNH2bCo0lRx3A=", - "dev": true, - "requires": { - "ajv": "^6.1.0", - "ajv-errors": "^1.0.0", - "ajv-keywords": "^3.1.0" - } - } - } - }, - "minimalistic-assert": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/minimalistic-assert/download/minimalistic-assert-1.0.1.tgz", - "integrity": "sha1-LhlN4ERibUoQ5/f7wAznPoPk1cc=" - }, - "minimalistic-crypto-utils": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/minimalistic-crypto-utils/download/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=" - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npm.taobao.org/minimatch/download/minimatch-3.0.4.tgz", - "integrity": "sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=", - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npm.taobao.org/minimist/download/minimist-1.2.5.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fminimist%2Fdownload%2Fminimist-1.2.5.tgz", - "integrity": "sha1-Z9ZgFLZqaoqqDAg8X9WN9OTpdgI=" - }, - "minipass": { - "version": "3.1.3", - "resolved": "https://registry.npm.taobao.org/minipass/download/minipass-3.1.3.tgz", - "integrity": "sha1-fUL/HzljVILhX5zbUxhN7r1YFf0=", - "requires": { - "yallist": "^4.0.0" - }, - "dependencies": { - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/yallist/download/yallist-4.0.0.tgz", - "integrity": "sha1-m7knkNnA7/7GO+c1GeEaNQGaOnI=" - } - } - }, - "minipass-collect": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/minipass-collect/download/minipass-collect-1.0.2.tgz", - "integrity": "sha1-IrgTv3Rdxu26JXa5QAIq1u3Ixhc=", - "requires": { - "minipass": "^3.0.0" - } - }, - "minipass-flush": { - "version": "1.0.5", - "resolved": "https://registry.npm.taobao.org/minipass-flush/download/minipass-flush-1.0.5.tgz", - "integrity": "sha1-gucTXX6JpQ/+ZGEKeHlTxMTLs3M=", - "requires": { - "minipass": "^3.0.0" - } - }, - "minipass-pipeline": { - "version": "1.2.4", - "resolved": "https://registry.npm.taobao.org/minipass-pipeline/download/minipass-pipeline-1.2.4.tgz?cache=0&sync_timestamp=1595998621838&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fminipass-pipeline%2Fdownload%2Fminipass-pipeline-1.2.4.tgz", - "integrity": "sha1-aEcveXEcCEZXwGfFxq2Tzd6oIUw=", - "requires": { - "minipass": "^3.0.0" - } - }, - "minizlib": { - "version": "2.1.2", - "resolved": "https://registry.npm.taobao.org/minizlib/download/minizlib-2.1.2.tgz", - "integrity": "sha1-6Q00Zrogm5MkUVCKEc49NjIUWTE=", - "requires": { - "minipass": "^3.0.0", - "yallist": "^4.0.0" - }, - "dependencies": { - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/yallist/download/yallist-4.0.0.tgz", - "integrity": "sha1-m7knkNnA7/7GO+c1GeEaNQGaOnI=" - } - } - }, - "mississippi": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/mississippi/download/mississippi-3.0.0.tgz", - "integrity": "sha1-6goykfl+C16HdrNj1fChLZTGcCI=", - "requires": { - "concat-stream": "^1.5.0", - "duplexify": "^3.4.2", - "end-of-stream": "^1.1.0", - "flush-write-stream": "^1.0.0", - "from2": "^2.1.0", - "parallel-transform": "^1.1.0", - "pump": "^3.0.0", - "pumpify": "^1.3.3", - "stream-each": "^1.1.0", - "through2": "^2.0.0" - } - }, - "mixin-deep": { - "version": "1.3.2", - "resolved": "https://registry.npm.taobao.org/mixin-deep/download/mixin-deep-1.3.2.tgz", - "integrity": "sha1-ESC0PcNZp4Xc5ltVuC4lfM9HlWY=", - "requires": { - "for-in": "^1.0.2", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/is-extendable/download/is-extendable-1.0.1.tgz", - "integrity": "sha1-p0cPnkJnM9gb2B4RVSZOOjUHyrQ=", - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, - "mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npm.taobao.org/mkdirp/download/mkdirp-0.5.5.tgz?cache=0&sync_timestamp=1587535418745&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmkdirp%2Fdownload%2Fmkdirp-0.5.5.tgz", - "integrity": "sha1-2Rzv1i0UNsoPQWIOJRKI1CAJne8=", - "requires": { - "minimist": "^1.2.5" - } - }, - "moment": { - "version": "2.29.1", - "resolved": "https://registry.npm.taobao.org/moment/download/moment-2.29.1.tgz", - "integrity": "sha1-sr52n6MZQL6e7qZGnAdeNQBvo9M=" - }, - "move-concurrently": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/move-concurrently/download/move-concurrently-1.0.1.tgz", - "integrity": "sha1-viwAX9oy4LKa8fBdfEszIUxwH5I=", - "requires": { - "aproba": "^1.1.1", - "copy-concurrently": "^1.0.0", - "fs-write-stream-atomic": "^1.0.8", - "mkdirp": "^0.5.1", - "rimraf": "^2.5.4", - "run-queue": "^1.0.3" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npm.taobao.org/ms/download/ms-2.1.2.tgz", - "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", - "dev": true - }, - "multicast-dns": { - "version": "6.2.3", - "resolved": "https://registry.npm.taobao.org/multicast-dns/download/multicast-dns-6.2.3.tgz", - "integrity": "sha1-oOx72QVcQoL3kMPIL04o2zsxsik=", - "dev": true, - "requires": { - "dns-packet": "^1.3.1", - "thunky": "^1.0.2" - } - }, - "multicast-dns-service-types": { - "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/multicast-dns-service-types/download/multicast-dns-service-types-1.1.0.tgz", - "integrity": "sha1-iZ8R2WhuXgXLkbNdXw5jt3PPyQE=", - "dev": true - }, - "muse-ui": { - "version": "3.0.2", - "resolved": "https://registry.npm.taobao.org/muse-ui/download/muse-ui-3.0.2.tgz", - "integrity": "sha1-8pLooGPWJdNbHc4bFQS8DMzXjmU=", - "requires": { - "body-scroll-lock": "^2.6.1", - "dayjs": "^1.8.2", - "keycode": "^2.1.9", - "normalize-wheel": "^1.0.1", - "resize-observer-polyfill": "^1.5.0" - } - }, - "mz": { - "version": "2.7.0", - "resolved": "https://registry.npm.taobao.org/mz/download/mz-2.7.0.tgz", - "integrity": "sha1-lQCAV6Vsr63CvGPd5/n/aVWUjjI=", - "dev": true, - "requires": { - "any-promise": "^1.0.0", - "object-assign": "^4.0.1", - "thenify-all": "^1.0.0" - } - }, - "nan": { - "version": "2.14.2", - "resolved": "https://registry.npm.taobao.org/nan/download/nan-2.14.2.tgz?cache=0&sync_timestamp=1602591684976&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fnan%2Fdownload%2Fnan-2.14.2.tgz", - "integrity": "sha1-9TdkAGlRaPTMaUrJOT0MlYXu6hk=", - "optional": true - }, - "nanomatch": { - "version": "1.2.13", - "resolved": "https://registry.npm.taobao.org/nanomatch/download/nanomatch-1.2.13.tgz", - "integrity": "sha1-uHqKpPwN6P5r6IiVs4mD/yZb0Rk=", - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "fragment-cache": "^0.2.1", - "is-windows": "^1.0.2", - "kind-of": "^6.0.2", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - } - }, - "negotiator": { - "version": "0.6.2", - "resolved": "https://registry.npm.taobao.org/negotiator/download/negotiator-0.6.2.tgz", - "integrity": "sha1-/qz3zPUlp3rpY0Q2pkiD/+yjRvs=", - "dev": true - }, - "neo-async": { - "version": "2.6.2", - "resolved": "https://registry.npm.taobao.org/neo-async/download/neo-async-2.6.2.tgz?cache=0&sync_timestamp=1594317447342&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fneo-async%2Fdownload%2Fneo-async-2.6.2.tgz", - "integrity": "sha1-tKr7k+OustgXTKU88WOrfXMIMF8=" - }, - "nice-try": { - "version": "1.0.5", - "resolved": "https://registry.npm.taobao.org/nice-try/download/nice-try-1.0.5.tgz", - "integrity": "sha1-ozeKdpbOfSI+iPybdkvX7xCJ42Y=", - "dev": true - }, - "no-case": { - "version": "2.3.2", - "resolved": "https://registry.npm.taobao.org/no-case/download/no-case-2.3.2.tgz?cache=0&sync_timestamp=1576721537540&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fno-case%2Fdownload%2Fno-case-2.3.2.tgz", - "integrity": "sha1-YLgTOWvjmz8SiKTB7V0efSi0ZKw=", - "dev": true, - "requires": { - "lower-case": "^1.1.1" - } - }, - "node-forge": { - "version": "0.10.0", - "resolved": "https://registry.npm.taobao.org/node-forge/download/node-forge-0.10.0.tgz?cache=0&sync_timestamp=1599010773454&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fnode-forge%2Fdownload%2Fnode-forge-0.10.0.tgz", - "integrity": "sha1-Mt6ir7Ppkm8C7lzoeUkCaRpna/M=", - "dev": true - }, - "node-ipc": { - "version": "9.1.1", - "resolved": "https://registry.npm.taobao.org/node-ipc/download/node-ipc-9.1.1.tgz", - "integrity": "sha1-TiRe1pOOZRAOWV68XcNLFujdXWk=", - "dev": true, - "requires": { - "event-pubsub": "4.3.0", - "js-message": "1.0.5", - "js-queue": "2.0.0" - } - }, - "node-libs-browser": { - "version": "2.2.1", - "resolved": "https://registry.npm.taobao.org/node-libs-browser/download/node-libs-browser-2.2.1.tgz", - "integrity": "sha1-tk9RPRgzhiX5A0bSew0jXmMfZCU=", - "requires": { - "assert": "^1.1.1", - "browserify-zlib": "^0.2.0", - "buffer": "^4.3.0", - "console-browserify": "^1.1.0", - "constants-browserify": "^1.0.0", - "crypto-browserify": "^3.11.0", - "domain-browser": "^1.1.1", - "events": "^3.0.0", - "https-browserify": "^1.0.0", - "os-browserify": "^0.3.0", - "path-browserify": "0.0.1", - "process": "^0.11.10", - "punycode": "^1.2.4", - "querystring-es3": "^0.2.0", - "readable-stream": "^2.3.3", - "stream-browserify": "^2.0.1", - "stream-http": "^2.7.2", - "string_decoder": "^1.0.0", - "timers-browserify": "^2.0.4", - "tty-browserify": "0.0.0", - "url": "^0.11.0", - "util": "^0.11.0", - "vm-browserify": "^1.0.1" - }, - "dependencies": { - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npm.taobao.org/punycode/download/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" - } - } - }, - "node-releases": { - "version": "1.1.65", - "resolved": "https://registry.npm.taobao.org/node-releases/download/node-releases-1.1.65.tgz", - "integrity": "sha1-UtlXkXa9YPI+ugXEQ4WD80GUS4E=", - "dev": true - }, - "normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npm.taobao.org/normalize-package-data/download/normalize-package-data-2.5.0.tgz?cache=0&sync_timestamp=1602547447569&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fnormalize-package-data%2Fdownload%2Fnormalize-package-data-2.5.0.tgz", - "integrity": "sha1-5m2xg4sgDB38IzIl0SyzZSDiNKg=", - "dev": true, - "requires": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/normalize-path/download/normalize-path-3.0.0.tgz", - "integrity": "sha1-Dc1p/yOhybEf0JeDFmRKA4ghamU=", - "devOptional": true - }, - "normalize-range": { - "version": "0.1.2", - "resolved": "https://registry.npm.taobao.org/normalize-range/download/normalize-range-0.1.2.tgz", - "integrity": "sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=", - "dev": true - }, - "normalize-url": { - "version": "3.3.0", - "resolved": "https://registry.npm.taobao.org/normalize-url/download/normalize-url-3.3.0.tgz?cache=0&sync_timestamp=1602432435724&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fnormalize-url%2Fdownload%2Fnormalize-url-3.3.0.tgz", - "integrity": "sha1-suHE3E98bVd0PfczpPWXjRhlBVk=", - "dev": true - }, - "normalize-wheel": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/normalize-wheel/download/normalize-wheel-1.0.1.tgz", - "integrity": "sha1-rsiGr/2wRQcNhWRH32Ls+GFG7EU=" - }, - "npm-run-path": { - "version": "2.0.2", - "resolved": "https://registry.npm.taobao.org/npm-run-path/download/npm-run-path-2.0.2.tgz", - "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", - "dev": true, - "requires": { - "path-key": "^2.0.0" - } - }, - "nprogress": { - "version": "0.2.0", - "resolved": "https://registry.npm.taobao.org/nprogress/download/nprogress-0.2.0.tgz?cache=0&sync_timestamp=1587262530340&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fnprogress%2Fdownload%2Fnprogress-0.2.0.tgz", - "integrity": "sha1-y480xTIT2JVyP8urkH6UIq28r7E=" - }, - "nth-check": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/nth-check/download/nth-check-1.0.2.tgz", - "integrity": "sha1-sr0pXDfj3VijvwcAN2Zjuk2c8Fw=", - "dev": true, - "requires": { - "boolbase": "~1.0.0" - } - }, - "num2fraction": { - "version": "1.2.2", - "resolved": "https://registry.npm.taobao.org/num2fraction/download/num2fraction-1.2.2.tgz", - "integrity": "sha1-b2gragJ6Tp3fpFZM0lidHU5mnt4=", - "dev": true - }, - "oauth-sign": { - "version": "0.9.0", - "resolved": "https://registry.npm.taobao.org/oauth-sign/download/oauth-sign-0.9.0.tgz", - "integrity": "sha1-R6ewFrqmi1+g7PPe4IqFxnmsZFU=", - "dev": true - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npm.taobao.org/object-assign/download/object-assign-4.1.1.tgz?cache=0&sync_timestamp=1571657171505&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fobject-assign%2Fdownload%2Fobject-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" - }, - "object-copy": { - "version": "0.1.0", - "resolved": "https://registry.npm.taobao.org/object-copy/download/object-copy-0.1.0.tgz", - "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", - "requires": { - "copy-descriptor": "^0.1.0", - "define-property": "^0.2.5", - "kind-of": "^3.0.3" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npm.taobao.org/define-property/download/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npm.taobao.org/kind-of/download/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "object-inspect": { - "version": "1.8.0", - "resolved": "https://registry.npm.taobao.org/object-inspect/download/object-inspect-1.8.0.tgz?cache=0&sync_timestamp=1592545149361&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fobject-inspect%2Fdownload%2Fobject-inspect-1.8.0.tgz", - "integrity": "sha1-34B+Xs9TpgnMa/6T6sPMe+WzqdA=", - "dev": true - }, - "object-is": { - "version": "1.1.3", - "resolved": "https://registry.npm.taobao.org/object-is/download/object-is-1.1.3.tgz?cache=0&sync_timestamp=1601502788762&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fobject-is%2Fdownload%2Fobject-is-1.1.3.tgz", - "integrity": "sha1-LjueZVYBN0Ve471irsTZCi6hzIE=", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.18.0-next.1" - } - }, - "object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npm.taobao.org/object-keys/download/object-keys-1.1.1.tgz", - "integrity": "sha1-HEfyct8nfzsdrwYWd9nILiMixg4=", - "dev": true - }, - "object-visit": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/object-visit/download/object-visit-1.0.1.tgz", - "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", - "requires": { - "isobject": "^3.0.0" - } - }, - "object.assign": { - "version": "4.1.1", - "resolved": "https://registry.npm.taobao.org/object.assign/download/object.assign-4.1.1.tgz?cache=0&sync_timestamp=1599844927493&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fobject.assign%2Fdownload%2Fobject.assign-4.1.1.tgz", - "integrity": "sha1-MDhnpmbN1Bk27N7fsfjz4ypHjN0=", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.18.0-next.0", - "has-symbols": "^1.0.1", - "object-keys": "^1.1.1" - } - }, - "object.getownpropertydescriptors": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/object.getownpropertydescriptors/download/object.getownpropertydescriptors-2.1.0.tgz", - "integrity": "sha1-Npvx+VktiridcS3O1cuBx8U1Jkk=", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1" - }, - "dependencies": { - "es-abstract": { - "version": "1.17.7", - "resolved": "https://registry.npm.taobao.org/es-abstract/download/es-abstract-1.17.7.tgz?cache=0&sync_timestamp=1601502719982&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fes-abstract%2Fdownload%2Fes-abstract-1.17.7.tgz", - "integrity": "sha1-pN5hsvZpifx0IWdsHLl4dXOs5Uw=", - "dev": true, - "requires": { - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.2.2", - "is-regex": "^1.1.1", - "object-inspect": "^1.8.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.1", - "string.prototype.trimend": "^1.0.1", - "string.prototype.trimstart": "^1.0.1" - } - } - } - }, - "object.pick": { - "version": "1.3.0", - "resolved": "https://registry.npm.taobao.org/object.pick/download/object.pick-1.3.0.tgz", - "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", - "requires": { - "isobject": "^3.0.1" - } - }, - "object.values": { - "version": "1.1.1", - "resolved": "https://registry.npm.taobao.org/object.values/download/object.values-1.1.1.tgz", - "integrity": "sha1-aKmezeNWt+kpWjxeDOMdyMlT3l4=", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1", - "function-bind": "^1.1.1", - "has": "^1.0.3" - }, - "dependencies": { - "es-abstract": { - "version": "1.17.7", - "resolved": "https://registry.npm.taobao.org/es-abstract/download/es-abstract-1.17.7.tgz?cache=0&sync_timestamp=1601502719982&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fes-abstract%2Fdownload%2Fes-abstract-1.17.7.tgz", - "integrity": "sha1-pN5hsvZpifx0IWdsHLl4dXOs5Uw=", - "dev": true, - "requires": { - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.2.2", - "is-regex": "^1.1.1", - "object-inspect": "^1.8.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.1", - "string.prototype.trimend": "^1.0.1", - "string.prototype.trimstart": "^1.0.1" - } - } - } - }, - "obuf": { - "version": "1.1.2", - "resolved": "https://registry.npm.taobao.org/obuf/download/obuf-1.1.2.tgz", - "integrity": "sha1-Cb6jND1BhZ69RGKS0RydTbYZCE4=", - "dev": true - }, - "on-finished": { - "version": "2.3.0", - "resolved": "https://registry.npm.taobao.org/on-finished/download/on-finished-2.3.0.tgz", - "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", - "dev": true, - "requires": { - "ee-first": "1.1.1" - } - }, - "on-headers": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/on-headers/download/on-headers-1.0.2.tgz", - "integrity": "sha1-dysK5qqlJcOZ5Imt+tkMQD6zwo8=", - "dev": true - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npm.taobao.org/once/download/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "requires": { - "wrappy": "1" - } - }, - "onetime": { - "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/onetime/download/onetime-2.0.1.tgz?cache=0&sync_timestamp=1597005345612&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fonetime%2Fdownload%2Fonetime-2.0.1.tgz", - "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", - "dev": true, - "requires": { - "mimic-fn": "^1.0.0" - } - }, - "open": { - "version": "6.4.0", - "resolved": "https://registry.npm.taobao.org/open/download/open-6.4.0.tgz", - "integrity": "sha1-XBPpbQ3IlGhhZPGJZez+iJ7PyKk=", - "dev": true, - "requires": { - "is-wsl": "^1.1.0" - } - }, - "opener": { - "version": "1.5.2", - "resolved": "https://registry.npm.taobao.org/opener/download/opener-1.5.2.tgz?cache=0&sync_timestamp=1598733244715&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fopener%2Fdownload%2Fopener-1.5.2.tgz", - "integrity": "sha1-XTfh81B3udysQwE3InGv3rKhNZg=", - "dev": true - }, - "opn": { - "version": "5.5.0", - "resolved": "https://registry.npm.taobao.org/opn/download/opn-5.5.0.tgz", - "integrity": "sha1-/HFk+rVtI1kExRw7J9pnWMo7m/w=", - "dev": true, - "requires": { - "is-wsl": "^1.1.0" - } - }, - "ora": { - "version": "3.4.0", - "resolved": "https://registry.npm.taobao.org/ora/download/ora-3.4.0.tgz?cache=0&sync_timestamp=1599424857800&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fora%2Fdownload%2Fora-3.4.0.tgz", - "integrity": "sha1-vwdSSRBZo+8+1MhQl1Md6f280xg=", - "dev": true, - "requires": { - "chalk": "^2.4.2", - "cli-cursor": "^2.1.0", - "cli-spinners": "^2.0.0", - "log-symbols": "^2.2.0", - "strip-ansi": "^5.2.0", - "wcwidth": "^1.0.1" - }, - "dependencies": { - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npm.taobao.org/strip-ansi/download/strip-ansi-5.2.0.tgz?cache=0&sync_timestamp=1573280518303&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstrip-ansi%2Fdownload%2Fstrip-ansi-5.2.0.tgz", - "integrity": "sha1-jJpTb+tq/JYr36WxBKUJHBrZwK4=", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - } - } - }, - "original": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/original/download/original-1.0.2.tgz", - "integrity": "sha1-5EKmHP/hxf0gpl8yYcJmY7MD8l8=", - "dev": true, - "requires": { - "url-parse": "^1.4.3" - } - }, - "os-browserify": { - "version": "0.3.0", - "resolved": "https://registry.npm.taobao.org/os-browserify/download/os-browserify-0.3.0.tgz", - "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=" - }, - "p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/p-finally/download/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", - "dev": true - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npm.taobao.org/p-limit/download/p-limit-2.3.0.tgz?cache=0&sync_timestamp=1594559856635&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fp-limit%2Fdownload%2Fp-limit-2.3.0.tgz", - "integrity": "sha1-PdM8ZHohT9//2DWTPrCG2g3CHbE=", - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/p-locate/download/p-locate-3.0.0.tgz", - "integrity": "sha1-Mi1poFwCZLJZl9n0DNiokasAZKQ=", - "requires": { - "p-limit": "^2.0.0" - } - }, - "p-map": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/p-map/download/p-map-3.0.0.tgz", - "integrity": "sha1-1wTZr4orpoTiYA2aIVmD1BQal50=", - "dev": true, - "requires": { - "aggregate-error": "^3.0.0" - } - }, - "p-retry": { - "version": "3.0.1", - "resolved": "https://registry.npm.taobao.org/p-retry/download/p-retry-3.0.1.tgz", - "integrity": "sha1-MWtMiJPiyNwc+okfQGxLQivr8yg=", - "dev": true, - "requires": { - "retry": "^0.12.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npm.taobao.org/p-try/download/p-try-2.2.0.tgz", - "integrity": "sha1-yyhoVA4xPWHeWPr741zpAE1VQOY=" - }, - "pako": { - "version": "1.0.11", - "resolved": "https://registry.npm.taobao.org/pako/download/pako-1.0.11.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpako%2Fdownload%2Fpako-1.0.11.tgz", - "integrity": "sha1-bJWZ00DVTf05RjgCUqNXBaa5kr8=" - }, - "papaparse": { - "version": "5.3.0", - "resolved": "https://registry.npm.taobao.org/papaparse/download/papaparse-5.3.0.tgz", - "integrity": "sha1-qxcC/rlueatDCWUvNtuVNlY60Fo=" - }, - "parallel-transform": { - "version": "1.2.0", - "resolved": "https://registry.npm.taobao.org/parallel-transform/download/parallel-transform-1.2.0.tgz", - "integrity": "sha1-kEnKN9bLIYLDsdLHIL6U0UpYFPw=", - "requires": { - "cyclist": "^1.0.1", - "inherits": "^2.0.3", - "readable-stream": "^2.1.5" - } - }, - "param-case": { - "version": "2.1.1", - "resolved": "https://registry.npm.taobao.org/param-case/download/param-case-2.1.1.tgz", - "integrity": "sha1-35T9jPZTHs915r75oIWPvHK+Ikc=", - "dev": true, - "requires": { - "no-case": "^2.2.0" - } - }, - "parse-asn1": { - "version": "5.1.6", - "resolved": "https://registry.npm.taobao.org/parse-asn1/download/parse-asn1-5.1.6.tgz?cache=0&sync_timestamp=1597167309380&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fparse-asn1%2Fdownload%2Fparse-asn1-5.1.6.tgz", - "integrity": "sha1-OFCAo+wTy2KmLTlAnLPoiETNrtQ=", - "requires": { - "asn1.js": "^5.2.0", - "browserify-aes": "^1.0.0", - "evp_bytestokey": "^1.0.0", - "pbkdf2": "^3.0.3", - "safe-buffer": "^5.1.1" - } - }, - "parse-json": { - "version": "5.1.0", - "resolved": "https://registry.npm.taobao.org/parse-json/download/parse-json-5.1.0.tgz?cache=0&sync_timestamp=1598129182781&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fparse-json%2Fdownload%2Fparse-json-5.1.0.tgz", - "integrity": "sha1-+WCIzfJKj6qa6poAny2dlCyZlkY=", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-even-better-errors": "^2.3.0", - "lines-and-columns": "^1.1.6" - } - }, - "parse5": { - "version": "5.1.1", - "resolved": "https://registry.npm.taobao.org/parse5/download/parse5-5.1.1.tgz?cache=0&sync_timestamp=1595849263958&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fparse5%2Fdownload%2Fparse5-5.1.1.tgz", - "integrity": "sha1-9o5OW6GFKsLK3AD0VV//bCq7YXg=", - "dev": true - }, - "parse5-htmlparser2-tree-adapter": { - "version": "5.1.1", - "resolved": "https://registry.npm.taobao.org/parse5-htmlparser2-tree-adapter/download/parse5-htmlparser2-tree-adapter-5.1.1.tgz?cache=0&sync_timestamp=1596089818598&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fparse5-htmlparser2-tree-adapter%2Fdownload%2Fparse5-htmlparser2-tree-adapter-5.1.1.tgz", - "integrity": "sha1-6MdD1OkhlNUpPs3isIvjHmdGHLw=", - "dev": true, - "requires": { - "parse5": "^5.1.1" - } - }, - "parseurl": { - "version": "1.3.3", - "resolved": "https://registry.npm.taobao.org/parseurl/download/parseurl-1.3.3.tgz", - "integrity": "sha1-naGee+6NEt/wUT7Vt2lXeTvC6NQ=", - "dev": true - }, - "particles.js": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/particles.js/download/particles.js-2.0.0.tgz", - "integrity": "sha1-IThsQyjWx/lngKIB6W7t/AnHNvY=" - }, - "pascalcase": { - "version": "0.1.1", - "resolved": "https://registry.npm.taobao.org/pascalcase/download/pascalcase-0.1.1.tgz", - "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=" - }, - "path-browserify": { - "version": "0.0.1", - "resolved": "https://registry.npm.taobao.org/path-browserify/download/path-browserify-0.0.1.tgz", - "integrity": "sha1-5sTd1+06onxoogzE5Q4aTug7vEo=" - }, - "path-dirname": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/path-dirname/download/path-dirname-1.0.2.tgz", - "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", - "devOptional": true - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/path-exists/download/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/path-is-absolute/download/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" - }, - "path-is-inside": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/path-is-inside/download/path-is-inside-1.0.2.tgz", - "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", - "dev": true - }, - "path-key": { - "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/path-key/download/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", - "dev": true - }, - "path-parse": { - "version": "1.0.6", - "resolved": "https://registry.npm.taobao.org/path-parse/download/path-parse-1.0.6.tgz", - "integrity": "sha1-1i27VnlAXXLEc37FhgDp3c8G0kw=", - "dev": true - }, - "path-to-regexp": { - "version": "0.1.7", - "resolved": "https://registry.npm.taobao.org/path-to-regexp/download/path-to-regexp-0.1.7.tgz", - "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=", - "dev": true - }, - "path-type": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/path-type/download/path-type-3.0.0.tgz", - "integrity": "sha1-zvMdyOCho7sNEFwM2Xzzv0f0428=", - "dev": true, - "requires": { - "pify": "^3.0.0" - }, - "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/pify/download/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - } - } - }, - "pbkdf2": { - "version": "3.1.1", - "resolved": "https://registry.npm.taobao.org/pbkdf2/download/pbkdf2-3.1.1.tgz", - "integrity": "sha1-y4cksPramEWWhW0abrr9NYRlS5Q=", - "requires": { - "create-hash": "^1.1.2", - "create-hmac": "^1.1.4", - "ripemd160": "^2.0.1", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, - "performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/performance-now/download/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", - "dev": true - }, - "picomatch": { - "version": "2.2.2", - "resolved": "https://registry.npm.taobao.org/picomatch/download/picomatch-2.2.2.tgz?cache=0&sync_timestamp=1584790434095&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpicomatch%2Fdownload%2Fpicomatch-2.2.2.tgz", - "integrity": "sha1-IfMz6ba46v8CRo9RRupAbTRfTa0=", - "optional": true - }, - "pify": { - "version": "4.0.1", - "resolved": "https://registry.npm.taobao.org/pify/download/pify-4.0.1.tgz", - "integrity": "sha1-SyzSXFDVmHNcUCkiJP2MbfQeMjE=" - }, - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npm.taobao.org/pinkie/download/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", - "dev": true - }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/pinkie-promise/download/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", - "dev": true, - "requires": { - "pinkie": "^2.0.0" - } - }, - "pkg-dir": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/pkg-dir/download/pkg-dir-3.0.0.tgz?cache=0&sync_timestamp=1602859045787&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpkg-dir%2Fdownload%2Fpkg-dir-3.0.0.tgz", - "integrity": "sha1-J0kCDyOe2ZCIGx9xIQ1R62UjvqM=", - "requires": { - "find-up": "^3.0.0" - } - }, - "pnp-webpack-plugin": { - "version": "1.6.4", - "resolved": "https://registry.npm.taobao.org/pnp-webpack-plugin/download/pnp-webpack-plugin-1.6.4.tgz?cache=0&sync_timestamp=1593529697659&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpnp-webpack-plugin%2Fdownload%2Fpnp-webpack-plugin-1.6.4.tgz", - "integrity": "sha1-yXEaxNxIpoXauvyG+Lbdn434QUk=", - "dev": true, - "requires": { - "ts-pnp": "^1.1.6" - } - }, - "popper.js": { - "version": "1.16.1", - "resolved": "https://registry.npmmirror.com/popper.js/-/popper.js-1.16.1.tgz", - "integrity": "sha512-Wb4p1J4zyFTbM+u6WuO4XstYx4Ky9Cewe4DWrel7B0w6VVICvPwdOpotjzcf6eD8TsckVnIMNONQyPIUFOUbCQ==" - }, - "portfinder": { - "version": "1.0.28", - "resolved": "https://registry.npm.taobao.org/portfinder/download/portfinder-1.0.28.tgz?cache=0&sync_timestamp=1596018176291&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fportfinder%2Fdownload%2Fportfinder-1.0.28.tgz", - "integrity": "sha1-Z8RiKFK9U3TdHdkA93n1NGL6x3g=", - "dev": true, - "requires": { - "async": "^2.6.2", - "debug": "^3.1.1", - "mkdirp": "^0.5.5" - }, - "dependencies": { - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npm.taobao.org/debug/download/debug-3.2.6.tgz?cache=0&sync_timestamp=1600502894812&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdebug%2Fdownload%2Fdebug-3.2.6.tgz", - "integrity": "sha1-6D0X3hbYp++3cX7b5fsQE17uYps=", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - } - } - }, - "posix-character-classes": { - "version": "0.1.1", - "resolved": "https://registry.npm.taobao.org/posix-character-classes/download/posix-character-classes-0.1.1.tgz", - "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=" - }, - "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npm.taobao.org/postcss/download/postcss-7.0.35.tgz?cache=0&sync_timestamp=1603496056144&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss%2Fdownload%2Fpostcss-7.0.35.tgz", - "integrity": "sha1-0r4AuZj38hHYonaXQHny6SuXDiQ=", - "dev": true, - "requires": { - "chalk": "^2.4.2", - "source-map": "^0.6.1", - "supports-color": "^6.1.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz?cache=0&sync_timestamp=1571657176668&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsource-map%2Fdownload%2Fsource-map-0.6.1.tgz", - "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", - "dev": true - }, - "supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-6.1.0.tgz?cache=0&sync_timestamp=1598611709087&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsupports-color%2Fdownload%2Fsupports-color-6.1.0.tgz", - "integrity": "sha1-B2Srxpxj1ayELdSGfo0CXogN+PM=", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "postcss-calc": { - "version": "7.0.5", - "resolved": "https://registry.npm.taobao.org/postcss-calc/download/postcss-calc-7.0.5.tgz?cache=0&sync_timestamp=1601732630249&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-calc%2Fdownload%2Fpostcss-calc-7.0.5.tgz", - "integrity": "sha1-+KbpnxLmGcLrwjz2xIb9wVhgkz4=", - "dev": true, - "requires": { - "postcss": "^7.0.27", - "postcss-selector-parser": "^6.0.2", - "postcss-value-parser": "^4.0.2" - } - }, - "postcss-colormin": { - "version": "4.0.3", - "resolved": "https://registry.npm.taobao.org/postcss-colormin/download/postcss-colormin-4.0.3.tgz?cache=0&sync_timestamp=1603212729528&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-colormin%2Fdownload%2Fpostcss-colormin-4.0.3.tgz", - "integrity": "sha1-rgYLzpPteUrHEmTwgTLVUJVr04E=", - "dev": true, - "requires": { - "browserslist": "^4.0.0", - "color": "^3.0.0", - "has": "^1.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npm.taobao.org/postcss-value-parser/download/postcss-value-parser-3.3.1.tgz", - "integrity": "sha1-n/giVH4okyE88cMO+lGsX9G6goE=", - "dev": true - } - } - }, - "postcss-convert-values": { - "version": "4.0.1", - "resolved": "https://registry.npm.taobao.org/postcss-convert-values/download/postcss-convert-values-4.0.1.tgz?cache=0&sync_timestamp=1603212729674&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-convert-values%2Fdownload%2Fpostcss-convert-values-4.0.1.tgz", - "integrity": "sha1-yjgT7U2g+BL51DcDWE5Enr4Ymn8=", - "dev": true, - "requires": { - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npm.taobao.org/postcss-value-parser/download/postcss-value-parser-3.3.1.tgz", - "integrity": "sha1-n/giVH4okyE88cMO+lGsX9G6goE=", - "dev": true - } - } - }, - "postcss-discard-comments": { - "version": "4.0.2", - "resolved": "https://registry.npm.taobao.org/postcss-discard-comments/download/postcss-discard-comments-4.0.2.tgz?cache=0&sync_timestamp=1603214702204&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-discard-comments%2Fdownload%2Fpostcss-discard-comments-4.0.2.tgz", - "integrity": "sha1-H7q9LCRr/2qq15l7KwkY9NevQDM=", - "dev": true, - "requires": { - "postcss": "^7.0.0" - } - }, - "postcss-discard-duplicates": { - "version": "4.0.2", - "resolved": "https://registry.npm.taobao.org/postcss-discard-duplicates/download/postcss-discard-duplicates-4.0.2.tgz?cache=0&sync_timestamp=1603214703212&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-discard-duplicates%2Fdownload%2Fpostcss-discard-duplicates-4.0.2.tgz", - "integrity": "sha1-P+EzzTyCKC5VD8myORdqkge3hOs=", - "dev": true, - "requires": { - "postcss": "^7.0.0" - } - }, - "postcss-discard-empty": { - "version": "4.0.1", - "resolved": "https://registry.npm.taobao.org/postcss-discard-empty/download/postcss-discard-empty-4.0.1.tgz?cache=0&sync_timestamp=1603212724216&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-discard-empty%2Fdownload%2Fpostcss-discard-empty-4.0.1.tgz", - "integrity": "sha1-yMlR6fc+2UKAGUWERKAq2Qu592U=", - "dev": true, - "requires": { - "postcss": "^7.0.0" - } - }, - "postcss-discard-overridden": { - "version": "4.0.1", - "resolved": "https://registry.npm.taobao.org/postcss-discard-overridden/download/postcss-discard-overridden-4.0.1.tgz?cache=0&sync_timestamp=1603212724307&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-discard-overridden%2Fdownload%2Fpostcss-discard-overridden-4.0.1.tgz", - "integrity": "sha1-ZSrvipZybwKfXj4AFG7npOdV/1c=", - "dev": true, - "requires": { - "postcss": "^7.0.0" - } - }, - "postcss-load-config": { - "version": "2.1.2", - "resolved": "https://registry.npm.taobao.org/postcss-load-config/download/postcss-load-config-2.1.2.tgz?cache=0&sync_timestamp=1601607876353&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-load-config%2Fdownload%2Fpostcss-load-config-2.1.2.tgz", - "integrity": "sha1-xepQTyxK7zPHNZo03jVzdyrXUCo=", - "dev": true, - "requires": { - "cosmiconfig": "^5.0.0", - "import-cwd": "^2.0.0" - } - }, - "postcss-loader": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/postcss-loader/download/postcss-loader-3.0.0.tgz", - "integrity": "sha1-a5eUPkfHLYRfqeA/Jzdz1OjdbC0=", - "dev": true, - "requires": { - "loader-utils": "^1.1.0", - "postcss": "^7.0.0", - "postcss-load-config": "^2.0.0", - "schema-utils": "^1.0.0" - }, - "dependencies": { - "schema-utils": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/schema-utils/download/schema-utils-1.0.0.tgz", - "integrity": "sha1-C3mpMgTXtgDUsoUNH2bCo0lRx3A=", - "dev": true, - "requires": { - "ajv": "^6.1.0", - "ajv-errors": "^1.0.0", - "ajv-keywords": "^3.1.0" - } - } - } - }, - "postcss-merge-longhand": { - "version": "4.0.11", - "resolved": "https://registry.npm.taobao.org/postcss-merge-longhand/download/postcss-merge-longhand-4.0.11.tgz?cache=0&sync_timestamp=1603212724836&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-merge-longhand%2Fdownload%2Fpostcss-merge-longhand-4.0.11.tgz", - "integrity": "sha1-YvSaE+Sg7gTnuY9CuxYGLKJUniQ=", - "dev": true, - "requires": { - "css-color-names": "0.0.4", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0", - "stylehacks": "^4.0.0" - }, - "dependencies": { - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npm.taobao.org/postcss-value-parser/download/postcss-value-parser-3.3.1.tgz", - "integrity": "sha1-n/giVH4okyE88cMO+lGsX9G6goE=", - "dev": true - } - } - }, - "postcss-merge-rules": { - "version": "4.0.3", - "resolved": "https://registry.npm.taobao.org/postcss-merge-rules/download/postcss-merge-rules-4.0.3.tgz?cache=0&sync_timestamp=1603212724951&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-merge-rules%2Fdownload%2Fpostcss-merge-rules-4.0.3.tgz", - "integrity": "sha1-NivqT/Wh+Y5AdacTxsslrv75plA=", - "dev": true, - "requires": { - "browserslist": "^4.0.0", - "caniuse-api": "^3.0.0", - "cssnano-util-same-parent": "^4.0.0", - "postcss": "^7.0.0", - "postcss-selector-parser": "^3.0.0", - "vendors": "^1.0.0" - }, - "dependencies": { - "postcss-selector-parser": { - "version": "3.1.2", - "resolved": "https://registry.npm.taobao.org/postcss-selector-parser/download/postcss-selector-parser-3.1.2.tgz?cache=0&sync_timestamp=1601045316432&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-selector-parser%2Fdownload%2Fpostcss-selector-parser-3.1.2.tgz", - "integrity": "sha1-sxD1xMD9r3b5SQK7qjDbaqhPUnA=", - "dev": true, - "requires": { - "dot-prop": "^5.2.0", - "indexes-of": "^1.0.1", - "uniq": "^1.0.1" - } - } - } - }, - "postcss-minify-font-values": { - "version": "4.0.2", - "resolved": "https://registry.npm.taobao.org/postcss-minify-font-values/download/postcss-minify-font-values-4.0.2.tgz?cache=0&sync_timestamp=1603212725064&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-minify-font-values%2Fdownload%2Fpostcss-minify-font-values-4.0.2.tgz", - "integrity": "sha1-zUw0TM5HQ0P6xdgiBqssvLiv1aY=", - "dev": true, - "requires": { - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npm.taobao.org/postcss-value-parser/download/postcss-value-parser-3.3.1.tgz", - "integrity": "sha1-n/giVH4okyE88cMO+lGsX9G6goE=", - "dev": true - } - } - }, - "postcss-minify-gradients": { - "version": "4.0.2", - "resolved": "https://registry.npm.taobao.org/postcss-minify-gradients/download/postcss-minify-gradients-4.0.2.tgz?cache=0&sync_timestamp=1603212725189&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-minify-gradients%2Fdownload%2Fpostcss-minify-gradients-4.0.2.tgz", - "integrity": "sha1-k7KcL/UJnFNe7NpWxKpuZlpmNHE=", - "dev": true, - "requires": { - "cssnano-util-get-arguments": "^4.0.0", - "is-color-stop": "^1.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npm.taobao.org/postcss-value-parser/download/postcss-value-parser-3.3.1.tgz", - "integrity": "sha1-n/giVH4okyE88cMO+lGsX9G6goE=", - "dev": true - } - } - }, - "postcss-minify-params": { - "version": "4.0.2", - "resolved": "https://registry.npm.taobao.org/postcss-minify-params/download/postcss-minify-params-4.0.2.tgz?cache=0&sync_timestamp=1603212725335&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-minify-params%2Fdownload%2Fpostcss-minify-params-4.0.2.tgz", - "integrity": "sha1-a5zvAwwR41Jh+V9hjJADbWgNuHQ=", - "dev": true, - "requires": { - "alphanum-sort": "^1.0.0", - "browserslist": "^4.0.0", - "cssnano-util-get-arguments": "^4.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0", - "uniqs": "^2.0.0" - }, - "dependencies": { - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npm.taobao.org/postcss-value-parser/download/postcss-value-parser-3.3.1.tgz", - "integrity": "sha1-n/giVH4okyE88cMO+lGsX9G6goE=", - "dev": true - } - } - }, - "postcss-minify-selectors": { - "version": "4.0.2", - "resolved": "https://registry.npm.taobao.org/postcss-minify-selectors/download/postcss-minify-selectors-4.0.2.tgz?cache=0&sync_timestamp=1603212725451&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-minify-selectors%2Fdownload%2Fpostcss-minify-selectors-4.0.2.tgz", - "integrity": "sha1-4uXrQL/uUA0M2SQ1APX46kJi+9g=", - "dev": true, - "requires": { - "alphanum-sort": "^1.0.0", - "has": "^1.0.0", - "postcss": "^7.0.0", - "postcss-selector-parser": "^3.0.0" - }, - "dependencies": { - "postcss-selector-parser": { - "version": "3.1.2", - "resolved": "https://registry.npm.taobao.org/postcss-selector-parser/download/postcss-selector-parser-3.1.2.tgz?cache=0&sync_timestamp=1601045316432&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-selector-parser%2Fdownload%2Fpostcss-selector-parser-3.1.2.tgz", - "integrity": "sha1-sxD1xMD9r3b5SQK7qjDbaqhPUnA=", - "dev": true, - "requires": { - "dot-prop": "^5.2.0", - "indexes-of": "^1.0.1", - "uniq": "^1.0.1" - } - } - } - }, - "postcss-modules-extract-imports": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/postcss-modules-extract-imports/download/postcss-modules-extract-imports-2.0.0.tgz?cache=0&sync_timestamp=1602588245463&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-modules-extract-imports%2Fdownload%2Fpostcss-modules-extract-imports-2.0.0.tgz", - "integrity": "sha1-gYcZoa4doyX5gyRGsBE27rSTzX4=", - "dev": true, - "requires": { - "postcss": "^7.0.5" - } - }, - "postcss-modules-local-by-default": { - "version": "3.0.3", - "resolved": "https://registry.npm.taobao.org/postcss-modules-local-by-default/download/postcss-modules-local-by-default-3.0.3.tgz?cache=0&sync_timestamp=1602587568476&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-modules-local-by-default%2Fdownload%2Fpostcss-modules-local-by-default-3.0.3.tgz", - "integrity": "sha1-uxTgzHgnnVBNvcv9fgyiiZP/u7A=", - "dev": true, - "requires": { - "icss-utils": "^4.1.1", - "postcss": "^7.0.32", - "postcss-selector-parser": "^6.0.2", - "postcss-value-parser": "^4.1.0" - } - }, - "postcss-modules-scope": { - "version": "2.2.0", - "resolved": "https://registry.npm.taobao.org/postcss-modules-scope/download/postcss-modules-scope-2.2.0.tgz?cache=0&sync_timestamp=1602593260387&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-modules-scope%2Fdownload%2Fpostcss-modules-scope-2.2.0.tgz", - "integrity": "sha1-OFyuATzHdD9afXYC0Qc6iequYu4=", - "dev": true, - "requires": { - "postcss": "^7.0.6", - "postcss-selector-parser": "^6.0.0" - } - }, - "postcss-modules-values": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/postcss-modules-values/download/postcss-modules-values-3.0.0.tgz?cache=0&sync_timestamp=1602586230505&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-modules-values%2Fdownload%2Fpostcss-modules-values-3.0.0.tgz", - "integrity": "sha1-W1AA1uuuKbQlUwG0o6VFdEI+fxA=", - "dev": true, - "requires": { - "icss-utils": "^4.0.0", - "postcss": "^7.0.6" - } - }, - "postcss-normalize-charset": { - "version": "4.0.1", - "resolved": "https://registry.npm.taobao.org/postcss-normalize-charset/download/postcss-normalize-charset-4.0.1.tgz?cache=0&sync_timestamp=1603212725539&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-normalize-charset%2Fdownload%2Fpostcss-normalize-charset-4.0.1.tgz", - "integrity": "sha1-izWt067oOhNrBHHg1ZvlilAoXdQ=", - "dev": true, - "requires": { - "postcss": "^7.0.0" - } - }, - "postcss-normalize-display-values": { - "version": "4.0.2", - "resolved": "https://registry.npm.taobao.org/postcss-normalize-display-values/download/postcss-normalize-display-values-4.0.2.tgz?cache=0&sync_timestamp=1603214719221&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-normalize-display-values%2Fdownload%2Fpostcss-normalize-display-values-4.0.2.tgz", - "integrity": "sha1-Db4EpM6QY9RmftK+R2u4MMglk1o=", - "dev": true, - "requires": { - "cssnano-util-get-match": "^4.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npm.taobao.org/postcss-value-parser/download/postcss-value-parser-3.3.1.tgz", - "integrity": "sha1-n/giVH4okyE88cMO+lGsX9G6goE=", - "dev": true - } - } - }, - "postcss-normalize-positions": { - "version": "4.0.2", - "resolved": "https://registry.npm.taobao.org/postcss-normalize-positions/download/postcss-normalize-positions-4.0.2.tgz?cache=0&sync_timestamp=1603212743465&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-normalize-positions%2Fdownload%2Fpostcss-normalize-positions-4.0.2.tgz", - "integrity": "sha1-BfdX+E8mBDc3g2ipH4ky1LECkX8=", - "dev": true, - "requires": { - "cssnano-util-get-arguments": "^4.0.0", - "has": "^1.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npm.taobao.org/postcss-value-parser/download/postcss-value-parser-3.3.1.tgz", - "integrity": "sha1-n/giVH4okyE88cMO+lGsX9G6goE=", - "dev": true - } - } - }, - "postcss-normalize-repeat-style": { - "version": "4.0.2", - "resolved": "https://registry.npm.taobao.org/postcss-normalize-repeat-style/download/postcss-normalize-repeat-style-4.0.2.tgz?cache=0&sync_timestamp=1603212744307&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-normalize-repeat-style%2Fdownload%2Fpostcss-normalize-repeat-style-4.0.2.tgz", - "integrity": "sha1-xOu8KJ85kaAo1EdRy90RkYsXkQw=", - "dev": true, - "requires": { - "cssnano-util-get-arguments": "^4.0.0", - "cssnano-util-get-match": "^4.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npm.taobao.org/postcss-value-parser/download/postcss-value-parser-3.3.1.tgz", - "integrity": "sha1-n/giVH4okyE88cMO+lGsX9G6goE=", - "dev": true - } - } - }, - "postcss-normalize-string": { - "version": "4.0.2", - "resolved": "https://registry.npm.taobao.org/postcss-normalize-string/download/postcss-normalize-string-4.0.2.tgz?cache=0&sync_timestamp=1603212744390&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-normalize-string%2Fdownload%2Fpostcss-normalize-string-4.0.2.tgz", - "integrity": "sha1-zUTECrB6DHo23F6Zqs4eyk7CaQw=", - "dev": true, - "requires": { - "has": "^1.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npm.taobao.org/postcss-value-parser/download/postcss-value-parser-3.3.1.tgz", - "integrity": "sha1-n/giVH4okyE88cMO+lGsX9G6goE=", - "dev": true - } - } - }, - "postcss-normalize-timing-functions": { - "version": "4.0.2", - "resolved": "https://registry.npm.taobao.org/postcss-normalize-timing-functions/download/postcss-normalize-timing-functions-4.0.2.tgz?cache=0&sync_timestamp=1603212744477&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-normalize-timing-functions%2Fdownload%2Fpostcss-normalize-timing-functions-4.0.2.tgz", - "integrity": "sha1-jgCcoqOUnNr4rSPmtquZy159KNk=", - "dev": true, - "requires": { - "cssnano-util-get-match": "^4.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npm.taobao.org/postcss-value-parser/download/postcss-value-parser-3.3.1.tgz", - "integrity": "sha1-n/giVH4okyE88cMO+lGsX9G6goE=", - "dev": true - } - } - }, - "postcss-normalize-unicode": { - "version": "4.0.1", - "resolved": "https://registry.npm.taobao.org/postcss-normalize-unicode/download/postcss-normalize-unicode-4.0.1.tgz?cache=0&sync_timestamp=1603212744570&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-normalize-unicode%2Fdownload%2Fpostcss-normalize-unicode-4.0.1.tgz", - "integrity": "sha1-hBvUj9zzAZrUuqdJOj02O1KuHPs=", - "dev": true, - "requires": { - "browserslist": "^4.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npm.taobao.org/postcss-value-parser/download/postcss-value-parser-3.3.1.tgz", - "integrity": "sha1-n/giVH4okyE88cMO+lGsX9G6goE=", - "dev": true - } - } - }, - "postcss-normalize-url": { - "version": "4.0.1", - "resolved": "https://registry.npm.taobao.org/postcss-normalize-url/download/postcss-normalize-url-4.0.1.tgz?cache=0&sync_timestamp=1603212726241&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-normalize-url%2Fdownload%2Fpostcss-normalize-url-4.0.1.tgz", - "integrity": "sha1-EOQ3+GvHx+WPe5ZS7YeNqqlfquE=", - "dev": true, - "requires": { - "is-absolute-url": "^2.0.0", - "normalize-url": "^3.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npm.taobao.org/postcss-value-parser/download/postcss-value-parser-3.3.1.tgz", - "integrity": "sha1-n/giVH4okyE88cMO+lGsX9G6goE=", - "dev": true - } - } - }, - "postcss-normalize-whitespace": { - "version": "4.0.2", - "resolved": "https://registry.npm.taobao.org/postcss-normalize-whitespace/download/postcss-normalize-whitespace-4.0.2.tgz?cache=0&sync_timestamp=1603212744791&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-normalize-whitespace%2Fdownload%2Fpostcss-normalize-whitespace-4.0.2.tgz", - "integrity": "sha1-vx1AcP5Pzqh9E0joJdjMDF+qfYI=", - "dev": true, - "requires": { - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npm.taobao.org/postcss-value-parser/download/postcss-value-parser-3.3.1.tgz", - "integrity": "sha1-n/giVH4okyE88cMO+lGsX9G6goE=", - "dev": true - } - } - }, - "postcss-ordered-values": { - "version": "4.1.2", - "resolved": "https://registry.npm.taobao.org/postcss-ordered-values/download/postcss-ordered-values-4.1.2.tgz?cache=0&sync_timestamp=1603212726427&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-ordered-values%2Fdownload%2Fpostcss-ordered-values-4.1.2.tgz", - "integrity": "sha1-DPdcgg7H1cTSgBiVWeC1ceusDu4=", - "dev": true, - "requires": { - "cssnano-util-get-arguments": "^4.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npm.taobao.org/postcss-value-parser/download/postcss-value-parser-3.3.1.tgz", - "integrity": "sha1-n/giVH4okyE88cMO+lGsX9G6goE=", - "dev": true - } - } - }, - "postcss-reduce-initial": { - "version": "4.0.3", - "resolved": "https://registry.npm.taobao.org/postcss-reduce-initial/download/postcss-reduce-initial-4.0.3.tgz?cache=0&sync_timestamp=1603212726527&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-reduce-initial%2Fdownload%2Fpostcss-reduce-initial-4.0.3.tgz", - "integrity": "sha1-f9QuvqXpyBRgljniwuhK4nC6SN8=", - "dev": true, - "requires": { - "browserslist": "^4.0.0", - "caniuse-api": "^3.0.0", - "has": "^1.0.0", - "postcss": "^7.0.0" - } - }, - "postcss-reduce-transforms": { - "version": "4.0.2", - "resolved": "https://registry.npm.taobao.org/postcss-reduce-transforms/download/postcss-reduce-transforms-4.0.2.tgz?cache=0&sync_timestamp=1603214556347&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-reduce-transforms%2Fdownload%2Fpostcss-reduce-transforms-4.0.2.tgz", - "integrity": "sha1-F++kBerMbge+NBSlyi0QdGgdTik=", - "dev": true, - "requires": { - "cssnano-util-get-match": "^4.0.0", - "has": "^1.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npm.taobao.org/postcss-value-parser/download/postcss-value-parser-3.3.1.tgz", - "integrity": "sha1-n/giVH4okyE88cMO+lGsX9G6goE=", - "dev": true - } - } - }, - "postcss-selector-parser": { - "version": "6.0.4", - "resolved": "https://registry.npm.taobao.org/postcss-selector-parser/download/postcss-selector-parser-6.0.4.tgz?cache=0&sync_timestamp=1601045316432&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-selector-parser%2Fdownload%2Fpostcss-selector-parser-6.0.4.tgz", - "integrity": "sha1-VgdaE4CgRgTDiwY+p3Z6Epr1wrM=", - "dev": true, - "requires": { - "cssesc": "^3.0.0", - "indexes-of": "^1.0.1", - "uniq": "^1.0.1", - "util-deprecate": "^1.0.2" - } - }, - "postcss-svgo": { - "version": "4.0.2", - "resolved": "https://registry.npm.taobao.org/postcss-svgo/download/postcss-svgo-4.0.2.tgz", - "integrity": "sha1-F7mXvHEbMzurFDqu07jT1uPTglg=", - "dev": true, - "requires": { - "is-svg": "^3.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0", - "svgo": "^1.0.0" - }, - "dependencies": { - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npm.taobao.org/postcss-value-parser/download/postcss-value-parser-3.3.1.tgz", - "integrity": "sha1-n/giVH4okyE88cMO+lGsX9G6goE=", - "dev": true - } - } - }, - "postcss-unique-selectors": { - "version": "4.0.1", - "resolved": "https://registry.npm.taobao.org/postcss-unique-selectors/download/postcss-unique-selectors-4.0.1.tgz?cache=0&sync_timestamp=1603212891912&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-unique-selectors%2Fdownload%2Fpostcss-unique-selectors-4.0.1.tgz", - "integrity": "sha1-lEaRHzKJv9ZMbWgPBzwDsfnuS6w=", - "dev": true, - "requires": { - "alphanum-sort": "^1.0.0", - "postcss": "^7.0.0", - "uniqs": "^2.0.0" - } - }, - "postcss-value-parser": { - "version": "4.1.0", - "resolved": "https://registry.npm.taobao.org/postcss-value-parser/download/postcss-value-parser-4.1.0.tgz", - "integrity": "sha1-RD9qIM7WSBor2k+oUypuVdeJoss=", - "dev": true - }, - "prepend-http": { - "version": "1.0.4", - "resolved": "https://registry.npm.taobao.org/prepend-http/download/prepend-http-1.0.4.tgz", - "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", - "dev": true - }, - "prettier": { - "version": "1.19.1", - "resolved": "https://registry.npm.taobao.org/prettier/download/prettier-1.19.1.tgz?cache=0&sync_timestamp=1600215482255&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fprettier%2Fdownload%2Fprettier-1.19.1.tgz", - "integrity": "sha1-99f1/4qc2HKnvkyhQglZVqYHl8s=", - "dev": true, - "optional": true - }, - "pretty-error": { - "version": "2.1.2", - "resolved": "https://registry.npm.taobao.org/pretty-error/download/pretty-error-2.1.2.tgz?cache=0&sync_timestamp=1603050467792&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpretty-error%2Fdownload%2Fpretty-error-2.1.2.tgz", - "integrity": "sha1-von4LYGxyG7I/fvDhQRYgnJ/k7Y=", - "dev": true, - "requires": { - "lodash": "^4.17.20", - "renderkid": "^2.0.4" - } - }, - "process": { - "version": "0.11.10", - "resolved": "https://registry.npm.taobao.org/process/download/process-0.11.10.tgz", - "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=" - }, - "process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/process-nextick-args/download/process-nextick-args-2.0.1.tgz", - "integrity": "sha1-eCDZsWEgzFXKmud5JoCufbptf+I=" - }, - "promise-inflight": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/promise-inflight/download/promise-inflight-1.0.1.tgz", - "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=" - }, - "proxy-addr": { - "version": "2.0.6", - "resolved": "https://registry.npm.taobao.org/proxy-addr/download/proxy-addr-2.0.6.tgz", - "integrity": "sha1-/cIzZQVEfT8vLGOO0nLK9hS7sr8=", - "dev": true, - "requires": { - "forwarded": "~0.1.2", - "ipaddr.js": "1.9.1" - } - }, - "prr": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/prr/download/prr-1.0.1.tgz", - "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=" - }, - "pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/pseudomap/download/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", - "dev": true - }, - "psl": { - "version": "1.8.0", - "resolved": "https://registry.npm.taobao.org/psl/download/psl-1.8.0.tgz", - "integrity": "sha1-kyb4vPsBOtzABf3/BWrM4CDlHCQ=", - "dev": true - }, - "public-encrypt": { - "version": "4.0.3", - "resolved": "https://registry.npm.taobao.org/public-encrypt/download/public-encrypt-4.0.3.tgz", - "integrity": "sha1-T8ydd6B+SLp1J+fL4N4z0HATMeA=", - "requires": { - "bn.js": "^4.1.0", - "browserify-rsa": "^4.0.0", - "create-hash": "^1.1.0", - "parse-asn1": "^5.0.0", - "randombytes": "^2.0.1", - "safe-buffer": "^5.1.2" - }, - "dependencies": { - "bn.js": { - "version": "4.11.9", - "resolved": "https://registry.npm.taobao.org/bn.js/download/bn.js-4.11.9.tgz", - "integrity": "sha1-JtVWgpRY+dHoH8SJUkk9C6NQeCg=" - } - } - }, - "pump": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/pump/download/pump-3.0.0.tgz", - "integrity": "sha1-tKIRaBW94vTh6mAjVOjHVWUQemQ=", - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "pumpify": { - "version": "1.5.1", - "resolved": "https://registry.npm.taobao.org/pumpify/download/pumpify-1.5.1.tgz", - "integrity": "sha1-NlE74karJ1cLGjdKXOJ4v9dDcM4=", - "requires": { - "duplexify": "^3.6.0", - "inherits": "^2.0.3", - "pump": "^2.0.0" - }, - "dependencies": { - "pump": { - "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/pump/download/pump-2.0.1.tgz", - "integrity": "sha1-Ejma3W5M91Jtlzy8i1zi4pCLOQk=", - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - } - } - }, - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npm.taobao.org/punycode/download/punycode-2.1.1.tgz", - "integrity": "sha1-tYsBCsQMIsVldhbI0sLALHv0eew=" - }, - "q": { - "version": "1.5.1", - "resolved": "https://registry.npm.taobao.org/q/download/q-1.5.1.tgz", - "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=", - "dev": true - }, - "qs": { - "version": "6.5.2", - "resolved": "https://registry.npm.taobao.org/qs/download/qs-6.5.2.tgz", - "integrity": "sha1-yzroBuh0BERYTvFUzo7pjUA/PjY=", - "dev": true - }, - "query-string": { - "version": "4.3.4", - "resolved": "https://registry.npm.taobao.org/query-string/download/query-string-4.3.4.tgz?cache=0&sync_timestamp=1602948828228&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fquery-string%2Fdownload%2Fquery-string-4.3.4.tgz", - "integrity": "sha1-u7aTucqRXCMlFbIosaArYJBD2+s=", - "dev": true, - "requires": { - "object-assign": "^4.1.0", - "strict-uri-encode": "^1.0.0" - } - }, - "querystring": { - "version": "0.2.0", - "resolved": "https://registry.npm.taobao.org/querystring/download/querystring-0.2.0.tgz", - "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=" - }, - "querystring-es3": { - "version": "0.2.1", - "resolved": "https://registry.npm.taobao.org/querystring-es3/download/querystring-es3-0.2.1.tgz", - "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=" - }, - "querystringify": { - "version": "2.2.0", - "resolved": "https://registry.npm.taobao.org/querystringify/download/querystringify-2.2.0.tgz?cache=0&sync_timestamp=1597686771604&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fquerystringify%2Fdownload%2Fquerystringify-2.2.0.tgz", - "integrity": "sha1-M0WUG0FTy50ILY7uTNogFqmu9/Y=", - "dev": true - }, - "randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/randombytes/download/randombytes-2.1.0.tgz", - "integrity": "sha1-32+ENy8CcNxlzfYpE0mrekc9Tyo=", - "requires": { - "safe-buffer": "^5.1.0" - } - }, - "randomfill": { - "version": "1.0.4", - "resolved": "https://registry.npm.taobao.org/randomfill/download/randomfill-1.0.4.tgz", - "integrity": "sha1-ySGW/IarQr6YPxvzF3giSTHWFFg=", - "requires": { - "randombytes": "^2.0.5", - "safe-buffer": "^5.1.0" - } - }, - "range-parser": { - "version": "1.2.1", - "resolved": "https://registry.npm.taobao.org/range-parser/download/range-parser-1.2.1.tgz", - "integrity": "sha1-PPNwI9GZ4cJNGlW4SADC8+ZGgDE=", - "dev": true - }, - "raw-body": { - "version": "2.4.0", - "resolved": "https://registry.npm.taobao.org/raw-body/download/raw-body-2.4.0.tgz", - "integrity": "sha1-oc5vucm8NWylLoklarWQWeE9AzI=", - "dev": true, - "requires": { - "bytes": "3.1.0", - "http-errors": "1.7.2", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" - } - }, - "read-pkg": { - "version": "5.2.0", - "resolved": "https://registry.npm.taobao.org/read-pkg/download/read-pkg-5.2.0.tgz", - "integrity": "sha1-e/KVQ4yloz5WzTDgU7NO5yUMk8w=", - "dev": true, - "requires": { - "@types/normalize-package-data": "^2.4.0", - "normalize-package-data": "^2.5.0", - "parse-json": "^5.0.0", - "type-fest": "^0.6.0" - } - }, - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npm.taobao.org/readable-stream/download/readable-stream-2.3.7.tgz?cache=0&sync_timestamp=1581624324274&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Freadable-stream%2Fdownload%2Freadable-stream-2.3.7.tgz", - "integrity": "sha1-Hsoc9xGu+BTAT2IlKjamL2yyO1c=", - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "readdirp": { - "version": "3.5.0", - "resolved": "https://registry.npm.taobao.org/readdirp/download/readdirp-3.5.0.tgz?cache=0&sync_timestamp=1602584331621&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Freaddirp%2Fdownload%2Freaddirp-3.5.0.tgz", - "integrity": "sha1-m6dMAZsV02UnjS6Ru4xI17TULJ4=", - "optional": true, - "requires": { - "picomatch": "^2.2.1" - } - }, - "regenerate": { - "version": "1.4.1", - "resolved": "https://registry.npm.taobao.org/regenerate/download/regenerate-1.4.1.tgz?cache=0&sync_timestamp=1591302331571&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fregenerate%2Fdownload%2Fregenerate-1.4.1.tgz", - "integrity": "sha1-ytkq2Oa1kXc0hfvgWkhcr09Ffm8=", - "dev": true - }, - "regenerate-unicode-properties": { - "version": "8.2.0", - "resolved": "https://registry.npm.taobao.org/regenerate-unicode-properties/download/regenerate-unicode-properties-8.2.0.tgz", - "integrity": "sha1-5d5xEdZV57pgwFfb6f83yH5lzew=", - "dev": true, - "requires": { - "regenerate": "^1.4.0" - } - }, - "regenerator-runtime": { - "version": "0.13.7", - "resolved": "https://registry.npm.taobao.org/regenerator-runtime/download/regenerator-runtime-0.13.7.tgz?cache=0&sync_timestamp=1595456311465&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fregenerator-runtime%2Fdownload%2Fregenerator-runtime-0.13.7.tgz", - "integrity": "sha1-ysLazIoepnX+qrrriugziYrkb1U=" - }, - "regenerator-transform": { - "version": "0.14.5", - "resolved": "https://registry.npm.taobao.org/regenerator-transform/download/regenerator-transform-0.14.5.tgz?cache=0&sync_timestamp=1593557846694&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fregenerator-transform%2Fdownload%2Fregenerator-transform-0.14.5.tgz", - "integrity": "sha1-yY2hVGg2ccnE3LFuznNlF+G3/rQ=", - "dev": true, - "requires": { - "@babel/runtime": "^7.8.4" - } - }, - "regex-not": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/regex-not/download/regex-not-1.0.2.tgz", - "integrity": "sha1-H07OJ+ALC2XgJHpoEOaoXYOldSw=", - "requires": { - "extend-shallow": "^3.0.2", - "safe-regex": "^1.1.0" - } - }, - "regexp.prototype.flags": { - "version": "1.3.0", - "resolved": "https://registry.npm.taobao.org/regexp.prototype.flags/download/regexp.prototype.flags-1.3.0.tgz?cache=0&sync_timestamp=1576388141321&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fregexp.prototype.flags%2Fdownload%2Fregexp.prototype.flags-1.3.0.tgz", - "integrity": "sha1-erqJs8E6ZFCdq888qNn7ub31y3U=", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1" - }, - "dependencies": { - "es-abstract": { - "version": "1.17.7", - "resolved": "https://registry.npm.taobao.org/es-abstract/download/es-abstract-1.17.7.tgz?cache=0&sync_timestamp=1601502719982&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fes-abstract%2Fdownload%2Fes-abstract-1.17.7.tgz", - "integrity": "sha1-pN5hsvZpifx0IWdsHLl4dXOs5Uw=", - "dev": true, - "requires": { - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.2.2", - "is-regex": "^1.1.1", - "object-inspect": "^1.8.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.1", - "string.prototype.trimend": "^1.0.1", - "string.prototype.trimstart": "^1.0.1" - } - } - } - }, - "regexpu-core": { - "version": "4.7.1", - "resolved": "https://registry.npm.taobao.org/regexpu-core/download/regexpu-core-4.7.1.tgz?cache=0&sync_timestamp=1600413461940&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fregexpu-core%2Fdownload%2Fregexpu-core-4.7.1.tgz", - "integrity": "sha1-LepamgcjMpj78NuR+pq8TG4PitY=", - "dev": true, - "requires": { - "regenerate": "^1.4.0", - "regenerate-unicode-properties": "^8.2.0", - "regjsgen": "^0.5.1", - "regjsparser": "^0.6.4", - "unicode-match-property-ecmascript": "^1.0.4", - "unicode-match-property-value-ecmascript": "^1.2.0" - } - }, - "regjsgen": { - "version": "0.5.2", - "resolved": "https://registry.npm.taobao.org/regjsgen/download/regjsgen-0.5.2.tgz", - "integrity": "sha1-kv8pX7He7L9uzaslQ9IH6RqjNzM=", - "dev": true - }, - "regjsparser": { - "version": "0.6.4", - "resolved": "https://registry.npm.taobao.org/regjsparser/download/regjsparser-0.6.4.tgz", - "integrity": "sha1-p2n4aEMIQBpm6bUp0kNv9NBmYnI=", - "dev": true, - "requires": { - "jsesc": "~0.5.0" - }, - "dependencies": { - "jsesc": { - "version": "0.5.0", - "resolved": "https://registry.npm.taobao.org/jsesc/download/jsesc-0.5.0.tgz?cache=0&sync_timestamp=1603891232110&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fjsesc%2Fdownload%2Fjsesc-0.5.0.tgz", - "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", - "dev": true - } - } - }, - "relateurl": { - "version": "0.2.7", - "resolved": "https://registry.npm.taobao.org/relateurl/download/relateurl-0.2.7.tgz", - "integrity": "sha1-VNvzd+UUQKypCkzSdGANP/LYiKk=", - "dev": true - }, - "remove-trailing-separator": { - "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/remove-trailing-separator/download/remove-trailing-separator-1.1.0.tgz", - "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", - "devOptional": true - }, - "renderkid": { - "version": "2.0.4", - "resolved": "https://registry.npm.taobao.org/renderkid/download/renderkid-2.0.4.tgz?cache=0&sync_timestamp=1603039762136&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Frenderkid%2Fdownload%2Frenderkid-2.0.4.tgz", - "integrity": "sha1-0yXlMq+yjT+Hlv/uMGvo/9b8hkw=", - "dev": true, - "requires": { - "css-select": "^1.1.0", - "dom-converter": "^0.2", - "htmlparser2": "^3.3.0", - "lodash": "^4.17.20", - "strip-ansi": "^3.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npm.taobao.org/ansi-regex/download/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - }, - "css-select": { - "version": "1.2.0", - "resolved": "https://registry.npm.taobao.org/css-select/download/css-select-1.2.0.tgz", - "integrity": "sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=", - "dev": true, - "requires": { - "boolbase": "~1.0.0", - "css-what": "2.1", - "domutils": "1.5.1", - "nth-check": "~1.0.1" - } - }, - "css-what": { - "version": "2.1.3", - "resolved": "https://registry.npm.taobao.org/css-what/download/css-what-2.1.3.tgz?cache=0&sync_timestamp=1602571001952&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcss-what%2Fdownload%2Fcss-what-2.1.3.tgz", - "integrity": "sha1-ptdgRXM2X+dGhsPzEcVlE9iChfI=", - "dev": true - }, - "domutils": { - "version": "1.5.1", - "resolved": "https://registry.npm.taobao.org/domutils/download/domutils-1.5.1.tgz", - "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", - "dev": true, - "requires": { - "dom-serializer": "0", - "domelementtype": "1" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npm.taobao.org/strip-ansi/download/strip-ansi-3.0.1.tgz?cache=0&sync_timestamp=1573280518303&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstrip-ansi%2Fdownload%2Fstrip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - } - } - }, - "repeat-element": { - "version": "1.1.3", - "resolved": "https://registry.npm.taobao.org/repeat-element/download/repeat-element-1.1.3.tgz", - "integrity": "sha1-eC4NglwMWjuzlzH4Tv7mt0Lmsc4=" - }, - "repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npm.taobao.org/repeat-string/download/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=" - }, - "request": { - "version": "2.88.2", - "resolved": "https://registry.npm.taobao.org/request/download/request-2.88.2.tgz", - "integrity": "sha1-1zyRhzHLWofaBH4gcjQUb2ZNErM=", - "dev": true, - "requires": { - "aws-sign2": "~0.7.0", - "aws4": "^1.8.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "form-data": "~2.3.2", - "har-validator": "~5.1.3", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.19", - "oauth-sign": "~0.9.0", - "performance-now": "^2.1.0", - "qs": "~6.5.2", - "safe-buffer": "^5.1.2", - "tough-cookie": "~2.5.0", - "tunnel-agent": "^0.6.0", - "uuid": "^3.3.2" - } - }, - "require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npm.taobao.org/require-directory/download/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", - "dev": true - }, - "require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/require-main-filename/download/require-main-filename-2.0.0.tgz", - "integrity": "sha1-0LMp7MfMD2Fkn2IhW+aa9UqomJs=", - "dev": true - }, - "requires-port": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/requires-port/download/requires-port-1.0.0.tgz", - "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=", - "dev": true - }, - "resize-detector": { - "version": "0.1.10", - "resolved": "https://registry.npm.taobao.org/resize-detector/download/resize-detector-0.1.10.tgz", - "integrity": "sha1-HaP5YapfkUzLz9N1LVL9Rb7raSw=" - }, - "resize-observer-polyfill": { - "version": "1.5.1", - "resolved": "https://registry.npm.taobao.org/resize-observer-polyfill/download/resize-observer-polyfill-1.5.1.tgz", - "integrity": "sha1-DpAg3T0hAkRY1OvSfiPkAmmBBGQ=" - }, - "resolve": { - "version": "1.18.1", - "resolved": "https://registry.npm.taobao.org/resolve/download/resolve-1.18.1.tgz?cache=0&sync_timestamp=1603313597183&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fresolve%2Fdownload%2Fresolve-1.18.1.tgz", - "integrity": "sha1-AY/LLFsgfSpkJK7jYcWiZtqPQTA=", - "dev": true, - "requires": { - "is-core-module": "^2.0.0", - "path-parse": "^1.0.6" - } - }, - "resolve-cwd": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/resolve-cwd/download/resolve-cwd-2.0.0.tgz", - "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=", - "dev": true, - "requires": { - "resolve-from": "^3.0.0" - } - }, - "resolve-from": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/resolve-from/download/resolve-from-3.0.0.tgz", - "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", - "dev": true - }, - "resolve-url": { - "version": "0.2.1", - "resolved": "https://registry.npm.taobao.org/resolve-url/download/resolve-url-0.2.1.tgz", - "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=" - }, - "restore-cursor": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/restore-cursor/download/restore-cursor-2.0.0.tgz", - "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", - "dev": true, - "requires": { - "onetime": "^2.0.0", - "signal-exit": "^3.0.2" - } - }, - "ret": { - "version": "0.1.15", - "resolved": "https://registry.npm.taobao.org/ret/download/ret-0.1.15.tgz", - "integrity": "sha1-uKSCXVvbH8P29Twrwz+BOIaBx7w=" - }, - "retry": { - "version": "0.12.0", - "resolved": "https://registry.npm.taobao.org/retry/download/retry-0.12.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fretry%2Fdownload%2Fretry-0.12.0.tgz", - "integrity": "sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs=", - "dev": true - }, - "rgb-regex": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/rgb-regex/download/rgb-regex-1.0.1.tgz", - "integrity": "sha1-wODWiC3w4jviVKR16O3UGRX+rrE=", - "dev": true - }, - "rgba-regex": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/rgba-regex/download/rgba-regex-1.0.0.tgz", - "integrity": "sha1-QzdOLiyglosO8VI0YLfXMP8i7rM=", - "dev": true - }, - "rimraf": { - "version": "2.7.1", - "resolved": "https://registry.npm.taobao.org/rimraf/download/rimraf-2.7.1.tgz?cache=0&sync_timestamp=1581229865753&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Frimraf%2Fdownload%2Frimraf-2.7.1.tgz", - "integrity": "sha1-NXl/E6f9rcVmFCwp1PB8ytSD4+w=", - "requires": { - "glob": "^7.1.3" - } - }, - "ripemd160": { - "version": "2.0.2", - "resolved": "https://registry.npm.taobao.org/ripemd160/download/ripemd160-2.0.2.tgz", - "integrity": "sha1-ocGm9iR1FXe6XQeRTLyShQWFiQw=", - "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1" - } - }, - "run-queue": { - "version": "1.0.3", - "resolved": "https://registry.npm.taobao.org/run-queue/download/run-queue-1.0.3.tgz", - "integrity": "sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec=", - "requires": { - "aproba": "^1.1.1" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npm.taobao.org/safe-buffer/download/safe-buffer-5.1.2.tgz", - "integrity": "sha1-mR7GnSluAxN0fVm9/St0XDX4go0=" - }, - "safe-regex": { - "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/safe-regex/download/safe-regex-1.1.0.tgz", - "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", - "requires": { - "ret": "~0.1.10" - } - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npm.taobao.org/safer-buffer/download/safer-buffer-2.1.2.tgz", - "integrity": "sha1-RPoWGwGHuVSd2Eu5GAL5vYOFzWo=" - }, - "sax": { - "version": "1.2.4", - "resolved": "https://registry.npm.taobao.org/sax/download/sax-1.2.4.tgz", - "integrity": "sha1-KBYjTiN4vdxOU1T6tcqold9xANk=", - "dev": true - }, - "schema-utils": { - "version": "2.7.1", - "resolved": "https://registry.npm.taobao.org/schema-utils/download/schema-utils-2.7.1.tgz", - "integrity": "sha1-HKTzLRskxZDCA7jnpQvw6kzTlNc=", - "requires": { - "@types/json-schema": "^7.0.5", - "ajv": "^6.12.4", - "ajv-keywords": "^3.5.2" - } - }, - "select": { - "version": "1.1.2", - "resolved": "https://registry.npm.taobao.org/select/download/select-1.1.2.tgz", - "integrity": "sha1-DnNQrN7ICxEIUoeG7B1EGNEbOW0=" - }, - "select-hose": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/select-hose/download/select-hose-2.0.0.tgz", - "integrity": "sha1-Yl2GWPhlr0Psliv8N2o3NZpJlMo=", - "dev": true - }, - "selfsigned": { - "version": "1.10.8", - "resolved": "https://registry.npm.taobao.org/selfsigned/download/selfsigned-1.10.8.tgz?cache=0&sync_timestamp=1600186189732&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fselfsigned%2Fdownload%2Fselfsigned-1.10.8.tgz", - "integrity": "sha1-DRcgi30Swz+OrIXEGDXyf8PYGjA=", - "dev": true, - "requires": { - "node-forge": "^0.10.0" - } - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npm.taobao.org/semver/download/semver-5.7.1.tgz", - "integrity": "sha1-qVT5Ma66UI0we78Gnv8MAclhFvc=" - }, - "send": { - "version": "0.17.1", - "resolved": "https://registry.npm.taobao.org/send/download/send-0.17.1.tgz", - "integrity": "sha1-wdiwWfeQD3Rm3Uk4vcROEd2zdsg=", - "dev": true, - "requires": { - "debug": "2.6.9", - "depd": "~1.1.2", - "destroy": "~1.0.4", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "~1.7.2", - "mime": "1.6.0", - "ms": "2.1.1", - "on-finished": "~2.3.0", - "range-parser": "~1.2.1", - "statuses": "~1.5.0" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npm.taobao.org/debug/download/debug-2.6.9.tgz?cache=0&sync_timestamp=1600502894812&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdebug%2Fdownload%2Fdebug-2.6.9.tgz", - "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", - "dev": true, - "requires": { - "ms": "2.0.0" - }, - "dependencies": { - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/ms/download/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } - } - }, - "mime": { - "version": "1.6.0", - "resolved": "https://registry.npm.taobao.org/mime/download/mime-1.6.0.tgz?cache=0&sync_timestamp=1590596706367&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmime%2Fdownload%2Fmime-1.6.0.tgz", - "integrity": "sha1-Ms2eXGRVO9WNGaVor0Uqz/BJgbE=", - "dev": true - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npm.taobao.org/ms/download/ms-2.1.1.tgz", - "integrity": "sha1-MKWGTrPrsKZvLr5tcnrwagnYbgo=", - "dev": true - } - } - }, - "serialize-javascript": { - "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/serialize-javascript/download/serialize-javascript-4.0.0.tgz?cache=0&sync_timestamp=1599740650381&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fserialize-javascript%2Fdownload%2Fserialize-javascript-4.0.0.tgz", - "integrity": "sha1-tSXhI4SJpez8Qq+sw/6Z5mb0sao=", - "requires": { - "randombytes": "^2.1.0" - } - }, - "serve-index": { - "version": "1.9.1", - "resolved": "https://registry.npm.taobao.org/serve-index/download/serve-index-1.9.1.tgz", - "integrity": "sha1-03aNabHn2C5c4FD/9bRTvqEqkjk=", - "dev": true, - "requires": { - "accepts": "~1.3.4", - "batch": "0.6.1", - "debug": "2.6.9", - "escape-html": "~1.0.3", - "http-errors": "~1.6.2", - "mime-types": "~2.1.17", - "parseurl": "~1.3.2" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npm.taobao.org/debug/download/debug-2.6.9.tgz?cache=0&sync_timestamp=1600502894812&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdebug%2Fdownload%2Fdebug-2.6.9.tgz", - "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "http-errors": { - "version": "1.6.3", - "resolved": "https://registry.npm.taobao.org/http-errors/download/http-errors-1.6.3.tgz", - "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", - "dev": true, - "requires": { - "depd": "~1.1.2", - "inherits": "2.0.3", - "setprototypeof": "1.1.0", - "statuses": ">= 1.4.0 < 2" - } - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npm.taobao.org/inherits/download/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/ms/download/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, - "setprototypeof": { - "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/setprototypeof/download/setprototypeof-1.1.0.tgz", - "integrity": "sha1-0L2FU2iHtv58DYGMuWLZ2RxU5lY=", - "dev": true - } - } - }, - "serve-static": { - "version": "1.14.1", - "resolved": "https://registry.npm.taobao.org/serve-static/download/serve-static-1.14.1.tgz", - "integrity": "sha1-Zm5jbcTwEPfvKZcKiKZ0MgiYsvk=", - "dev": true, - "requires": { - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "parseurl": "~1.3.3", - "send": "0.17.1" - } - }, - "set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/set-blocking/download/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", - "dev": true - }, - "set-value": { - "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/set-value/download/set-value-2.0.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fset-value%2Fdownload%2Fset-value-2.0.1.tgz", - "integrity": "sha1-oY1AUw5vB95CKMfe/kInr4ytAFs=", - "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.3", - "split-string": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/extend-shallow/download/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "setimmediate": { - "version": "1.0.5", - "resolved": "https://registry.npm.taobao.org/setimmediate/download/setimmediate-1.0.5.tgz", - "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" - }, - "setprototypeof": { - "version": "1.1.1", - "resolved": "https://registry.npm.taobao.org/setprototypeof/download/setprototypeof-1.1.1.tgz", - "integrity": "sha1-fpWsskqpL1iF4KvvW6ExMw1K5oM=", - "dev": true - }, - "sha.js": { - "version": "2.4.11", - "resolved": "https://registry.npm.taobao.org/sha.js/download/sha.js-2.4.11.tgz", - "integrity": "sha1-N6XPC4HsvGlD3hCbopYNGyZYSuc=", - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npm.taobao.org/shebang-command/download/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", - "dev": true, - "requires": { - "shebang-regex": "^1.0.0" - } - }, - "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/shebang-regex/download/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", - "dev": true - }, - "shell-quote": { - "version": "1.7.2", - "resolved": "https://registry.npm.taobao.org/shell-quote/download/shell-quote-1.7.2.tgz", - "integrity": "sha1-Z6fQLHbJ2iT5nSCAj8re0ODgS+I=", - "dev": true - }, - "signal-exit": { - "version": "3.0.3", - "resolved": "https://registry.npm.taobao.org/signal-exit/download/signal-exit-3.0.3.tgz", - "integrity": "sha1-oUEMLt2PB3sItOJTyOrPyvBXRhw=", - "dev": true - }, - "simple-swizzle": { - "version": "0.2.2", - "resolved": "https://registry.npm.taobao.org/simple-swizzle/download/simple-swizzle-0.2.2.tgz", - "integrity": "sha1-pNprY1/8zMoz9w0Xy5JZLeleVXo=", - "dev": true, - "requires": { - "is-arrayish": "^0.3.1" - }, - "dependencies": { - "is-arrayish": { - "version": "0.3.2", - "resolved": "https://registry.npm.taobao.org/is-arrayish/download/is-arrayish-0.3.2.tgz", - "integrity": "sha1-RXSirlb3qyBolvtDHq7tBm/fjwM=", - "dev": true - } - } - }, - "sirv": { - "version": "1.0.11", - "resolved": "https://registry.npm.taobao.org/sirv/download/sirv-1.0.11.tgz", - "integrity": "sha1-gcGaKSAgSFB9bsDYuokQ/aUutaQ=", - "dev": true, - "requires": { - "@polka/url": "^1.0.0-next.9", - "mime": "^2.3.1", - "totalist": "^1.0.0" - } - }, - "slash": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/slash/download/slash-1.0.0.tgz", - "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", - "dev": true - }, - "snapdragon": { - "version": "0.8.2", - "resolved": "https://registry.npm.taobao.org/snapdragon/download/snapdragon-0.8.2.tgz", - "integrity": "sha1-ZJIufFZbDhQgS6GqfWlkJ40lGC0=", - "requires": { - "base": "^0.11.1", - "debug": "^2.2.0", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "map-cache": "^0.2.2", - "source-map": "^0.5.6", - "source-map-resolve": "^0.5.0", - "use": "^3.1.0" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npm.taobao.org/debug/download/debug-2.6.9.tgz?cache=0&sync_timestamp=1600502894812&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdebug%2Fdownload%2Fdebug-2.6.9.tgz", - "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", - "requires": { - "ms": "2.0.0" - } - }, - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npm.taobao.org/define-property/download/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/extend-shallow/download/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "requires": { - "is-extendable": "^0.1.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/ms/download/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - } - } - }, - "snapdragon-node": { - "version": "2.1.1", - "resolved": "https://registry.npm.taobao.org/snapdragon-node/download/snapdragon-node-2.1.1.tgz", - "integrity": "sha1-bBdfhv8UvbByRWPo88GwIaKGhTs=", - "requires": { - "define-property": "^1.0.0", - "isobject": "^3.0.0", - "snapdragon-util": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/define-property/download/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/is-accessor-descriptor/download/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY=", - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/is-data-descriptor/download/is-data-descriptor-1.0.0.tgz", - "integrity": "sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc=", - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/is-descriptor/download/is-descriptor-1.0.2.tgz", - "integrity": "sha1-OxWXRqZmBLBPjIFSS6NlxfFNhuw=", - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "snapdragon-util": { - "version": "3.0.1", - "resolved": "https://registry.npm.taobao.org/snapdragon-util/download/snapdragon-util-3.0.1.tgz", - "integrity": "sha1-+VZHlIbyrNeXAGk/b3uAXkWrVuI=", - "requires": { - "kind-of": "^3.2.0" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npm.taobao.org/kind-of/download/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "sockjs": { - "version": "0.3.20", - "resolved": "https://registry.npm.taobao.org/sockjs/download/sockjs-0.3.20.tgz", - "integrity": "sha1-smooPsVi74smh7RAM6Tuzqx12FU=", - "dev": true, - "requires": { - "faye-websocket": "^0.10.0", - "uuid": "^3.4.0", - "websocket-driver": "0.6.5" - } - }, - "sockjs-client": { - "version": "1.4.0", - "resolved": "https://registry.npm.taobao.org/sockjs-client/download/sockjs-client-1.4.0.tgz?cache=0&sync_timestamp=1596410219305&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsockjs-client%2Fdownload%2Fsockjs-client-1.4.0.tgz", - "integrity": "sha1-yfJWjhnI/YFztJl+o0IOC7MGx9U=", - "dev": true, - "requires": { - "debug": "^3.2.5", - "eventsource": "^1.0.7", - "faye-websocket": "~0.11.1", - "inherits": "^2.0.3", - "json3": "^3.3.2", - "url-parse": "^1.4.3" - }, - "dependencies": { - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npm.taobao.org/debug/download/debug-3.2.6.tgz?cache=0&sync_timestamp=1600502894812&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdebug%2Fdownload%2Fdebug-3.2.6.tgz", - "integrity": "sha1-6D0X3hbYp++3cX7b5fsQE17uYps=", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "faye-websocket": { - "version": "0.11.3", - "resolved": "https://registry.npm.taobao.org/faye-websocket/download/faye-websocket-0.11.3.tgz", - "integrity": "sha1-XA6aiWjokSwoZjn96XeosgnyUI4=", - "dev": true, - "requires": { - "websocket-driver": ">=0.5.1" - } - } - } - }, - "sort-keys": { - "version": "1.1.2", - "resolved": "https://registry.npm.taobao.org/sort-keys/download/sort-keys-1.1.2.tgz?cache=0&sync_timestamp=1602621889278&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsort-keys%2Fdownload%2Fsort-keys-1.1.2.tgz", - "integrity": "sha1-RBttTTRnmPG05J6JIK37oOVD+a0=", - "dev": true, - "requires": { - "is-plain-obj": "^1.0.0" - } - }, - "source-list-map": { - "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/source-list-map/download/source-list-map-2.0.1.tgz", - "integrity": "sha1-OZO9hzv8SEecyp6jpUeDXHwVSzQ=" - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.5.7.tgz?cache=0&sync_timestamp=1571657176668&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsource-map%2Fdownload%2Fsource-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" - }, - "source-map-resolve": { - "version": "0.5.3", - "resolved": "https://registry.npm.taobao.org/source-map-resolve/download/source-map-resolve-0.5.3.tgz?cache=0&sync_timestamp=1584829515586&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsource-map-resolve%2Fdownload%2Fsource-map-resolve-0.5.3.tgz", - "integrity": "sha1-GQhmvs51U+H48mei7oLGBrVQmho=", - "requires": { - "atob": "^2.1.2", - "decode-uri-component": "^0.2.0", - "resolve-url": "^0.2.1", - "source-map-url": "^0.4.0", - "urix": "^0.1.0" - } - }, - "source-map-support": { - "version": "0.5.19", - "resolved": "https://registry.npm.taobao.org/source-map-support/download/source-map-support-0.5.19.tgz?cache=0&sync_timestamp=1587719289626&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsource-map-support%2Fdownload%2Fsource-map-support-0.5.19.tgz", - "integrity": "sha1-qYti+G3K9PZzmWSMCFKRq56P7WE=", - "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz?cache=0&sync_timestamp=1571657176668&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsource-map%2Fdownload%2Fsource-map-0.6.1.tgz", - "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=" - } - } - }, - "source-map-url": { - "version": "0.4.0", - "resolved": "https://registry.npm.taobao.org/source-map-url/download/source-map-url-0.4.0.tgz", - "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=" - }, - "spdx-correct": { - "version": "3.1.1", - "resolved": "https://registry.npm.taobao.org/spdx-correct/download/spdx-correct-3.1.1.tgz?cache=0&sync_timestamp=1590161967473&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fspdx-correct%2Fdownload%2Fspdx-correct-3.1.1.tgz", - "integrity": "sha1-3s6BrJweZxPl99G28X1Gj6U9iak=", - "dev": true, - "requires": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-exceptions": { - "version": "2.3.0", - "resolved": "https://registry.npm.taobao.org/spdx-exceptions/download/spdx-exceptions-2.3.0.tgz", - "integrity": "sha1-PyjOGnegA3JoPq3kpDMYNSeiFj0=", - "dev": true - }, - "spdx-expression-parse": { - "version": "3.0.1", - "resolved": "https://registry.npm.taobao.org/spdx-expression-parse/download/spdx-expression-parse-3.0.1.tgz", - "integrity": "sha1-z3D1BILu/cmOPOCmgz5KU87rpnk=", - "dev": true, - "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-license-ids": { - "version": "3.0.6", - "resolved": "https://registry.npm.taobao.org/spdx-license-ids/download/spdx-license-ids-3.0.6.tgz?cache=0&sync_timestamp=1600284873714&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fspdx-license-ids%2Fdownload%2Fspdx-license-ids-3.0.6.tgz", - "integrity": "sha1-yAdXODwoq/cpZ0SZjLwQaui4VM4=", - "dev": true - }, - "spdy": { - "version": "4.0.2", - "resolved": "https://registry.npm.taobao.org/spdy/download/spdy-4.0.2.tgz?cache=0&sync_timestamp=1585970491493&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fspdy%2Fdownload%2Fspdy-4.0.2.tgz", - "integrity": "sha1-t09GYgOj7aRSwCSSuR+56EonZ3s=", - "dev": true, - "requires": { - "debug": "^4.1.0", - "handle-thing": "^2.0.0", - "http-deceiver": "^1.2.7", - "select-hose": "^2.0.0", - "spdy-transport": "^3.0.0" - } - }, - "spdy-transport": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/spdy-transport/download/spdy-transport-3.0.0.tgz", - "integrity": "sha1-ANSGOmQArXXfkzYaFghgXl3NzzE=", - "dev": true, - "requires": { - "debug": "^4.1.0", - "detect-node": "^2.0.4", - "hpack.js": "^2.1.6", - "obuf": "^1.1.2", - "readable-stream": "^3.0.6", - "wbuf": "^1.7.3" - }, - "dependencies": { - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npm.taobao.org/readable-stream/download/readable-stream-3.6.0.tgz?cache=0&sync_timestamp=1581624324274&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Freadable-stream%2Fdownload%2Freadable-stream-3.6.0.tgz", - "integrity": "sha1-M3u9o63AcGvT4CRCaihtS0sskZg=", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - } - } - }, - "split-string": { - "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/split-string/download/split-string-3.1.0.tgz", - "integrity": "sha1-fLCd2jqGWFcFxks5pkZgOGguj+I=", - "requires": { - "extend-shallow": "^3.0.0" - } - }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npm.taobao.org/sprintf-js/download/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true - }, - "sshpk": { - "version": "1.16.1", - "resolved": "https://registry.npm.taobao.org/sshpk/download/sshpk-1.16.1.tgz", - "integrity": "sha1-+2YcC+8ps520B2nuOfpwCT1vaHc=", - "dev": true, - "requires": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" - } - }, - "ssri": { - "version": "6.0.1", - "resolved": "https://registry.npm.taobao.org/ssri/download/ssri-6.0.1.tgz", - "integrity": "sha1-KjxBso3UW2K2Nnbst0ABJlrp7dg=", - "requires": { - "figgy-pudding": "^3.5.1" - } - }, - "stable": { - "version": "0.1.8", - "resolved": "https://registry.npm.taobao.org/stable/download/stable-0.1.8.tgz", - "integrity": "sha1-g26zyDgv4pNv6vVEYxAXzn1Ho88=", - "dev": true - }, - "stackframe": { - "version": "1.2.0", - "resolved": "https://registry.npm.taobao.org/stackframe/download/stackframe-1.2.0.tgz?cache=0&sync_timestamp=1590854108362&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstackframe%2Fdownload%2Fstackframe-1.2.0.tgz", - "integrity": "sha1-UkKUktY8YuuYmATBFVLj0i53kwM=", - "dev": true - }, - "static-extend": { - "version": "0.1.2", - "resolved": "https://registry.npm.taobao.org/static-extend/download/static-extend-0.1.2.tgz", - "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", - "requires": { - "define-property": "^0.2.5", - "object-copy": "^0.1.0" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npm.taobao.org/define-property/download/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "requires": { - "is-descriptor": "^0.1.0" - } - } - } - }, - "statuses": { - "version": "1.5.0", - "resolved": "https://registry.npm.taobao.org/statuses/download/statuses-1.5.0.tgz?cache=0&sync_timestamp=1587327902535&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstatuses%2Fdownload%2Fstatuses-1.5.0.tgz", - "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=", - "dev": true - }, - "stream-browserify": { - "version": "2.0.2", - "resolved": "https://registry.npm.taobao.org/stream-browserify/download/stream-browserify-2.0.2.tgz?cache=0&sync_timestamp=1587041194718&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstream-browserify%2Fdownload%2Fstream-browserify-2.0.2.tgz", - "integrity": "sha1-h1IdOKRKp+6RzhzSpH3wy0ndZgs=", - "requires": { - "inherits": "~2.0.1", - "readable-stream": "^2.0.2" - } - }, - "stream-each": { - "version": "1.2.3", - "resolved": "https://registry.npm.taobao.org/stream-each/download/stream-each-1.2.3.tgz", - "integrity": "sha1-6+J6DDibBPvMIzZClS4Qcxr6m64=", - "requires": { - "end-of-stream": "^1.1.0", - "stream-shift": "^1.0.0" - } - }, - "stream-http": { - "version": "2.8.3", - "resolved": "https://registry.npm.taobao.org/stream-http/download/stream-http-2.8.3.tgz", - "integrity": "sha1-stJCRpKIpaJ+xP6JM6z2I95lFPw=", - "requires": { - "builtin-status-codes": "^3.0.0", - "inherits": "^2.0.1", - "readable-stream": "^2.3.6", - "to-arraybuffer": "^1.0.0", - "xtend": "^4.0.0" - } - }, - "stream-shift": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/stream-shift/download/stream-shift-1.0.1.tgz", - "integrity": "sha1-1wiCgVWasneEJCebCHfaPDktWj0=" - }, - "strict-uri-encode": { - "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/strict-uri-encode/download/strict-uri-encode-1.1.0.tgz", - "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=", - "dev": true - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npm.taobao.org/string_decoder/download/string_decoder-1.1.1.tgz", - "integrity": "sha1-nPFhG6YmhdcDCunkujQUnDrwP8g=", - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npm.taobao.org/string-width/download/string-width-2.1.1.tgz", - "integrity": "sha1-q5Pyeo3BPSjKyBXEYhQ6bZASrp4=", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/ansi-regex/download/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/strip-ansi/download/strip-ansi-4.0.0.tgz?cache=0&sync_timestamp=1573280518303&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstrip-ansi%2Fdownload%2Fstrip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, - "string.prototype.trimend": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/string.prototype.trimend/download/string.prototype.trimend-1.0.2.tgz?cache=0&sync_timestamp=1603219618123&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstring.prototype.trimend%2Fdownload%2Fstring.prototype.trimend-1.0.2.tgz", - "integrity": "sha1-bd2ah5a8cUtImjriIkaiCPN7+kY=", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.18.0-next.1" - } - }, - "string.prototype.trimstart": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/string.prototype.trimstart/download/string.prototype.trimstart-1.0.2.tgz?cache=0&sync_timestamp=1603219618047&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstring.prototype.trimstart%2Fdownload%2Fstring.prototype.trimstart-1.0.2.tgz", - "integrity": "sha1-ItRdqBAVMJzQzdeXh+iRn8XGE+c=", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.18.0-next.1" - } - }, - "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npm.taobao.org/strip-ansi/download/strip-ansi-6.0.0.tgz?cache=0&sync_timestamp=1573280518303&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstrip-ansi%2Fdownload%2Fstrip-ansi-6.0.0.tgz", - "integrity": "sha1-CxVx3XZpzNTz4G4U7x7tJiJa5TI=", - "dev": true, - "requires": { - "ansi-regex": "^5.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npm.taobao.org/ansi-regex/download/ansi-regex-5.0.0.tgz", - "integrity": "sha1-OIU59VF5vzkznIGvMKZU1p+Hy3U=", - "dev": true - } - } - }, - "strip-eof": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/strip-eof/download/strip-eof-1.0.0.tgz", - "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", - "dev": true - }, - "strip-final-newline": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/strip-final-newline/download/strip-final-newline-2.0.0.tgz", - "integrity": "sha1-ibhS+y/L6Tb29LMYevsKEsGrWK0=", - "dev": true - }, - "stylehacks": { - "version": "4.0.3", - "resolved": "https://registry.npm.taobao.org/stylehacks/download/stylehacks-4.0.3.tgz", - "integrity": "sha1-Zxj8r00eB9ihMYaQiB6NlnJqcdU=", - "dev": true, - "requires": { - "browserslist": "^4.0.0", - "postcss": "^7.0.0", - "postcss-selector-parser": "^3.0.0" - }, - "dependencies": { - "postcss-selector-parser": { - "version": "3.1.2", - "resolved": "https://registry.npm.taobao.org/postcss-selector-parser/download/postcss-selector-parser-3.1.2.tgz?cache=0&sync_timestamp=1601045316432&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-selector-parser%2Fdownload%2Fpostcss-selector-parser-3.1.2.tgz", - "integrity": "sha1-sxD1xMD9r3b5SQK7qjDbaqhPUnA=", - "dev": true, - "requires": { - "dot-prop": "^5.2.0", - "indexes-of": "^1.0.1", - "uniq": "^1.0.1" - } - } - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-5.5.0.tgz?cache=0&sync_timestamp=1598611709087&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsupports-color%2Fdownload%2Fsupports-color-5.5.0.tgz", - "integrity": "sha1-4uaaRKyHcveKHsCzW2id9lMO/I8=", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - }, - "svg-tags": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/svg-tags/download/svg-tags-1.0.0.tgz", - "integrity": "sha1-WPcc7jvVGbWdSyqEO2x95krAR2Q=", - "dev": true - }, - "svgo": { - "version": "1.3.2", - "resolved": "https://registry.npm.taobao.org/svgo/download/svgo-1.3.2.tgz?cache=0&sync_timestamp=1572433263159&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsvgo%2Fdownload%2Fsvgo-1.3.2.tgz", - "integrity": "sha1-ttxRHAYzRsnkFbgeQ0ARRbltQWc=", - "dev": true, - "requires": { - "chalk": "^2.4.1", - "coa": "^2.0.2", - "css-select": "^2.0.0", - "css-select-base-adapter": "^0.1.1", - "css-tree": "1.0.0-alpha.37", - "csso": "^4.0.2", - "js-yaml": "^3.13.1", - "mkdirp": "~0.5.1", - "object.values": "^1.1.0", - "sax": "~1.2.4", - "stable": "^0.1.8", - "unquote": "~1.1.1", - "util.promisify": "~1.0.0" - } - }, - "tapable": { - "version": "1.1.3", - "resolved": "https://registry.npm.taobao.org/tapable/download/tapable-1.1.3.tgz?cache=0&sync_timestamp=1600381197118&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ftapable%2Fdownload%2Ftapable-1.1.3.tgz", - "integrity": "sha1-ofzMBrWNth/XpF2i2kT186Pme6I=" - }, - "tar": { - "version": "6.1.0", - "resolved": "https://registry.npm.taobao.org/tar/download/tar-6.1.0.tgz", - "integrity": "sha1-0XJOm8wEuXexjVxXOzM6IgcimoM=", - "requires": { - "chownr": "^2.0.0", - "fs-minipass": "^2.0.0", - "minipass": "^3.0.0", - "minizlib": "^2.1.1", - "mkdirp": "^1.0.3", - "yallist": "^4.0.0" - }, - "dependencies": { - "chownr": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/chownr/download/chownr-2.0.0.tgz", - "integrity": "sha1-Fb++U9LqtM9w8YqM1o6+Wzyx3s4=" - }, - "mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npm.taobao.org/mkdirp/download/mkdirp-1.0.4.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmkdirp%2Fdownload%2Fmkdirp-1.0.4.tgz", - "integrity": "sha1-PrXtYmInVteaXw4qIh3+utdcL34=" - }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/yallist/download/yallist-4.0.0.tgz", - "integrity": "sha1-m7knkNnA7/7GO+c1GeEaNQGaOnI=" - } - } - }, - "terser": { - "version": "4.8.0", - "resolved": "https://registry.npm.taobao.org/terser/download/terser-4.8.0.tgz?cache=0&sync_timestamp=1603374108186&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fterser%2Fdownload%2Fterser-4.8.0.tgz", - "integrity": "sha1-YwVjQ9fHC7KfOvZlhlpG/gOg3xc=", - "requires": { - "commander": "^2.20.0", - "source-map": "~0.6.1", - "source-map-support": "~0.5.12" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz?cache=0&sync_timestamp=1571657176668&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsource-map%2Fdownload%2Fsource-map-0.6.1.tgz", - "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=" - } - } - }, - "terser-webpack-plugin": { - "version": "1.4.5", - "resolved": "https://registry.npm.taobao.org/terser-webpack-plugin/download/terser-webpack-plugin-1.4.5.tgz?cache=0&sync_timestamp=1603881713213&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fterser-webpack-plugin%2Fdownload%2Fterser-webpack-plugin-1.4.5.tgz", - "integrity": "sha1-oheu+uozDnNP+sthIOwfoxLWBAs=", - "requires": { - "cacache": "^12.0.2", - "find-cache-dir": "^2.1.0", - "is-wsl": "^1.1.0", - "schema-utils": "^1.0.0", - "serialize-javascript": "^4.0.0", - "source-map": "^0.6.1", - "terser": "^4.1.2", - "webpack-sources": "^1.4.0", - "worker-farm": "^1.7.0" - }, - "dependencies": { - "schema-utils": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/schema-utils/download/schema-utils-1.0.0.tgz", - "integrity": "sha1-C3mpMgTXtgDUsoUNH2bCo0lRx3A=", - "requires": { - "ajv": "^6.1.0", - "ajv-errors": "^1.0.0", - "ajv-keywords": "^3.1.0" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz?cache=0&sync_timestamp=1571657176668&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsource-map%2Fdownload%2Fsource-map-0.6.1.tgz", - "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=" - } - } - }, - "thenify": { - "version": "3.3.1", - "resolved": "https://registry.npm.taobao.org/thenify/download/thenify-3.3.1.tgz", - "integrity": "sha1-iTLmhqQGYDigFt2eLKRq3Zg4qV8=", - "dev": true, - "requires": { - "any-promise": "^1.0.0" - } - }, - "thenify-all": { - "version": "1.6.0", - "resolved": "https://registry.npm.taobao.org/thenify-all/download/thenify-all-1.6.0.tgz", - "integrity": "sha1-GhkY1ALY/D+Y+/I02wvMjMEOlyY=", - "dev": true, - "requires": { - "thenify": ">= 3.1.0 < 4" - } - }, - "thread-loader": { - "version": "2.1.3", - "resolved": "https://registry.npm.taobao.org/thread-loader/download/thread-loader-2.1.3.tgz?cache=0&sync_timestamp=1603809339530&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fthread-loader%2Fdownload%2Fthread-loader-2.1.3.tgz", - "integrity": "sha1-y9LBOfwrLebp0o9iKGq3cMGsvdo=", - "dev": true, - "requires": { - "loader-runner": "^2.3.1", - "loader-utils": "^1.1.0", - "neo-async": "^2.6.0" - } - }, - "throttle-debounce": { - "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/throttle-debounce/download/throttle-debounce-1.1.0.tgz?cache=0&sync_timestamp=1604313832516&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fthrottle-debounce%2Fdownload%2Fthrottle-debounce-1.1.0.tgz", - "integrity": "sha1-UYU9o3vmihVctugns1FKPEIuic0=" - }, - "through2": { - "version": "2.0.5", - "resolved": "https://registry.npm.taobao.org/through2/download/through2-2.0.5.tgz", - "integrity": "sha1-AcHjnrMdB8t9A6lqcIIyYLIxMs0=", - "requires": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - }, - "thunky": { - "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/thunky/download/thunky-1.1.0.tgz", - "integrity": "sha1-Wrr3FKlAXbBQRzK7zNLO3Z75U30=", - "dev": true - }, - "timers-browserify": { - "version": "2.0.12", - "resolved": "https://registry.npm.taobao.org/timers-browserify/download/timers-browserify-2.0.12.tgz?cache=0&sync_timestamp=1603793741116&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ftimers-browserify%2Fdownload%2Ftimers-browserify-2.0.12.tgz", - "integrity": "sha1-RKRcEfv0B/NPl7zNFXfGUjYbAO4=", - "requires": { - "setimmediate": "^1.0.4" - } - }, - "timsort": { - "version": "0.3.0", - "resolved": "https://registry.npm.taobao.org/timsort/download/timsort-0.3.0.tgz", - "integrity": "sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q=", - "dev": true - }, - "tiny-emitter": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/tiny-emitter/download/tiny-emitter-2.1.0.tgz", - "integrity": "sha1-HRpW7fxRxD6GPLtTgqcjMONVVCM=" - }, - "to-arraybuffer": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/to-arraybuffer/download/to-arraybuffer-1.0.1.tgz", - "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=" - }, - "to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/to-fast-properties/download/to-fast-properties-2.0.0.tgz?cache=0&sync_timestamp=1580550317222&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fto-fast-properties%2Fdownload%2Fto-fast-properties-2.0.0.tgz", - "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", - "dev": true - }, - "to-object-path": { - "version": "0.3.0", - "resolved": "https://registry.npm.taobao.org/to-object-path/download/to-object-path-0.3.0.tgz", - "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npm.taobao.org/kind-of/download/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "to-regex": { - "version": "3.0.2", - "resolved": "https://registry.npm.taobao.org/to-regex/download/to-regex-3.0.2.tgz", - "integrity": "sha1-E8/dmzNlUvMLUfM6iuG0Knp1mc4=", - "requires": { - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "regex-not": "^1.0.2", - "safe-regex": "^1.1.0" - } - }, - "to-regex-range": { - "version": "2.1.1", - "resolved": "https://registry.npm.taobao.org/to-regex-range/download/to-regex-range-2.1.1.tgz", - "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", - "requires": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" - } - }, - "toidentifier": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/toidentifier/download/toidentifier-1.0.0.tgz", - "integrity": "sha1-fhvjRw8ed5SLxD2Uo8j013UrpVM=", - "dev": true - }, - "toposort": { - "version": "1.0.7", - "resolved": "https://registry.npm.taobao.org/toposort/download/toposort-1.0.7.tgz?cache=0&sync_timestamp=1574984066913&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ftoposort%2Fdownload%2Ftoposort-1.0.7.tgz", - "integrity": "sha1-LmhELZ9k7HILjMieZEOsbKqVACk=", - "dev": true - }, - "totalist": { - "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/totalist/download/totalist-1.1.0.tgz", - "integrity": "sha1-pNZaPlRlF3AePlw3pHpwrJf+Vt8=", - "dev": true - }, - "tough-cookie": { - "version": "2.5.0", - "resolved": "https://registry.npm.taobao.org/tough-cookie/download/tough-cookie-2.5.0.tgz?cache=0&sync_timestamp=1584646121003&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ftough-cookie%2Fdownload%2Ftough-cookie-2.5.0.tgz", - "integrity": "sha1-zZ+yoKodWhK0c72fuW+j3P9lreI=", - "dev": true, - "requires": { - "psl": "^1.1.28", - "punycode": "^2.1.1" - } - }, - "tryer": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/tryer/download/tryer-1.0.1.tgz", - "integrity": "sha1-8shUBoALmw90yfdGW4HqrSQSUvg=", - "dev": true - }, - "ts-pnp": { - "version": "1.2.0", - "resolved": "https://registry.npm.taobao.org/ts-pnp/download/ts-pnp-1.2.0.tgz", - "integrity": "sha1-pQCtCEsHmPHDBxrzkeZZEshrypI=", - "dev": true - }, - "tslib": { - "version": "1.14.1", - "resolved": "https://registry.npm.taobao.org/tslib/download/tslib-1.14.1.tgz", - "integrity": "sha1-zy04vcNKE0vK8QkcQfZhni9nLQA=" - }, - "tty-browserify": { - "version": "0.0.0", - "resolved": "https://registry.npm.taobao.org/tty-browserify/download/tty-browserify-0.0.0.tgz", - "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=" - }, - "tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npm.taobao.org/tunnel-agent/download/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", - "dev": true, - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npm.taobao.org/tweetnacl/download/tweetnacl-0.14.5.tgz?cache=0&sync_timestamp=1581364203962&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ftweetnacl%2Fdownload%2Ftweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", - "dev": true - }, - "type-fest": { - "version": "0.6.0", - "resolved": "https://registry.npm.taobao.org/type-fest/download/type-fest-0.6.0.tgz?cache=0&sync_timestamp=1602623859603&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ftype-fest%2Fdownload%2Ftype-fest-0.6.0.tgz", - "integrity": "sha1-jSojcNPfiG61yQraHFv2GIrPg4s=", - "dev": true - }, - "type-is": { - "version": "1.6.18", - "resolved": "https://registry.npm.taobao.org/type-is/download/type-is-1.6.18.tgz", - "integrity": "sha1-TlUs0F3wlGfcvE73Od6J8s83wTE=", - "dev": true, - "requires": { - "media-typer": "0.3.0", - "mime-types": "~2.1.24" - } - }, - "typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npm.taobao.org/typedarray/download/typedarray-0.0.6.tgz", - "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" - }, - "uglify-js": { - "version": "3.4.10", - "resolved": "https://registry.npm.taobao.org/uglify-js/download/uglify-js-3.4.10.tgz?cache=0&sync_timestamp=1603670355885&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fuglify-js%2Fdownload%2Fuglify-js-3.4.10.tgz", - "integrity": "sha1-mtlWPY6zrN+404WX0q8dgV9qdV8=", - "dev": true, - "requires": { - "commander": "~2.19.0", - "source-map": "~0.6.1" - }, - "dependencies": { - "commander": { - "version": "2.19.0", - "resolved": "https://registry.npm.taobao.org/commander/download/commander-2.19.0.tgz?cache=0&sync_timestamp=1603599636161&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcommander%2Fdownload%2Fcommander-2.19.0.tgz", - "integrity": "sha1-9hmKqE5bg8RgVLlN3tv+1e6f8So=", - "dev": true - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz?cache=0&sync_timestamp=1571657176668&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsource-map%2Fdownload%2Fsource-map-0.6.1.tgz", - "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", - "dev": true - } - } - }, - "uglifyjs-webpack-plugin": { - "version": "2.2.0", - "resolved": "https://registry.npm.taobao.org/uglifyjs-webpack-plugin/download/uglifyjs-webpack-plugin-2.2.0.tgz", - "integrity": "sha1-51vIDn8ZN/cllUybTFoeln6p0Nc=", - "dev": true, - "requires": { - "cacache": "^12.0.2", - "find-cache-dir": "^2.1.0", - "is-wsl": "^1.1.0", - "schema-utils": "^1.0.0", - "serialize-javascript": "^1.7.0", - "source-map": "^0.6.1", - "uglify-js": "^3.6.0", - "webpack-sources": "^1.4.0", - "worker-farm": "^1.7.0" - }, - "dependencies": { - "schema-utils": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/schema-utils/download/schema-utils-1.0.0.tgz", - "integrity": "sha1-C3mpMgTXtgDUsoUNH2bCo0lRx3A=", - "dev": true, - "requires": { - "ajv": "^6.1.0", - "ajv-errors": "^1.0.0", - "ajv-keywords": "^3.1.0" - } - }, - "serialize-javascript": { - "version": "1.9.1", - "resolved": "https://registry.npm.taobao.org/serialize-javascript/download/serialize-javascript-1.9.1.tgz?cache=0&sync_timestamp=1599740650381&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fserialize-javascript%2Fdownload%2Fserialize-javascript-1.9.1.tgz", - "integrity": "sha1-z8IArvd7YAxH2pu4FJyUPnmML9s=", - "dev": true - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz", - "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", - "dev": true - }, - "uglify-js": { - "version": "3.13.3", - "resolved": "https://registry.npm.taobao.org/uglify-js/download/uglify-js-3.13.3.tgz?cache=0&sync_timestamp=1616975983207&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fuglify-js%2Fdownload%2Fuglify-js-3.13.3.tgz", - "integrity": "sha1-znKhrRVDSOoq9h9Qkzx2zIgCJ24=", - "dev": true - } - } - }, - "unicode-canonical-property-names-ecmascript": { - "version": "1.0.4", - "resolved": "https://registry.npm.taobao.org/unicode-canonical-property-names-ecmascript/download/unicode-canonical-property-names-ecmascript-1.0.4.tgz", - "integrity": "sha1-JhmADEyCWADv3YNDr33Zkzy+KBg=", - "dev": true - }, - "unicode-match-property-ecmascript": { - "version": "1.0.4", - "resolved": "https://registry.npm.taobao.org/unicode-match-property-ecmascript/download/unicode-match-property-ecmascript-1.0.4.tgz", - "integrity": "sha1-jtKjJWmWG86SJ9Cc0/+7j+1fAgw=", - "dev": true, - "requires": { - "unicode-canonical-property-names-ecmascript": "^1.0.4", - "unicode-property-aliases-ecmascript": "^1.0.4" - } - }, - "unicode-match-property-value-ecmascript": { - "version": "1.2.0", - "resolved": "https://registry.npm.taobao.org/unicode-match-property-value-ecmascript/download/unicode-match-property-value-ecmascript-1.2.0.tgz", - "integrity": "sha1-DZH2AO7rMJaqlisdb8iIduZOpTE=", - "dev": true - }, - "unicode-property-aliases-ecmascript": { - "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/unicode-property-aliases-ecmascript/download/unicode-property-aliases-ecmascript-1.1.0.tgz?cache=0&sync_timestamp=1583945910569&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Funicode-property-aliases-ecmascript%2Fdownload%2Funicode-property-aliases-ecmascript-1.1.0.tgz", - "integrity": "sha1-3Vepn2IHvt/0Yoq++5TFDblByPQ=", - "dev": true - }, - "union-value": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/union-value/download/union-value-1.0.1.tgz", - "integrity": "sha1-C2/nuDWuzaYcbqTU8CwUIh4QmEc=", - "requires": { - "arr-union": "^3.1.0", - "get-value": "^2.0.6", - "is-extendable": "^0.1.1", - "set-value": "^2.0.1" - } - }, - "uniq": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/uniq/download/uniq-1.0.1.tgz", - "integrity": "sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=", - "dev": true - }, - "uniqs": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/uniqs/download/uniqs-2.0.0.tgz", - "integrity": "sha1-/+3ks2slKQaW5uFl1KWe25mOawI=", - "dev": true - }, - "unique-filename": { - "version": "1.1.1", - "resolved": "https://registry.npm.taobao.org/unique-filename/download/unique-filename-1.1.1.tgz", - "integrity": "sha1-HWl2k2mtoFgxA6HmrodoG1ZXMjA=", - "requires": { - "unique-slug": "^2.0.0" - } - }, - "unique-slug": { - "version": "2.0.2", - "resolved": "https://registry.npm.taobao.org/unique-slug/download/unique-slug-2.0.2.tgz", - "integrity": "sha1-uqvOkQg/xk6UWw861hPiZPfNTmw=", - "requires": { - "imurmurhash": "^0.1.4" - } - }, - "universalify": { - "version": "0.1.2", - "resolved": "https://registry.npm.taobao.org/universalify/download/universalify-0.1.2.tgz?cache=0&sync_timestamp=1603179967633&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Funiversalify%2Fdownload%2Funiversalify-0.1.2.tgz", - "integrity": "sha1-tkb2m+OULavOzJ1mOcgNwQXvqmY=", - "dev": true - }, - "unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/unpipe/download/unpipe-1.0.0.tgz", - "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", - "dev": true - }, - "unquote": { - "version": "1.1.1", - "resolved": "https://registry.npm.taobao.org/unquote/download/unquote-1.1.1.tgz", - "integrity": "sha1-j97XMk7G6IoP+LkF58CYzcCG1UQ=", - "dev": true - }, - "unset-value": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/unset-value/download/unset-value-1.0.0.tgz", - "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", - "requires": { - "has-value": "^0.3.1", - "isobject": "^3.0.0" - }, - "dependencies": { - "has-value": { - "version": "0.3.1", - "resolved": "https://registry.npm.taobao.org/has-value/download/has-value-0.3.1.tgz", - "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", - "requires": { - "get-value": "^2.0.3", - "has-values": "^0.1.4", - "isobject": "^2.0.0" - }, - "dependencies": { - "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/isobject/download/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "requires": { - "isarray": "1.0.0" - } - } - } - }, - "has-values": { - "version": "0.1.4", - "resolved": "https://registry.npm.taobao.org/has-values/download/has-values-0.1.4.tgz", - "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=" - } - } - }, - "upath": { - "version": "1.2.0", - "resolved": "https://registry.npm.taobao.org/upath/download/upath-1.2.0.tgz?cache=0&sync_timestamp=1602008334498&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fupath%2Fdownload%2Fupath-1.2.0.tgz", - "integrity": "sha1-j2bbzVWog6za5ECK+LA1pQRMGJQ=", - "devOptional": true - }, - "upper-case": { - "version": "1.1.3", - "resolved": "https://registry.npm.taobao.org/upper-case/download/upper-case-1.1.3.tgz", - "integrity": "sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg=", - "dev": true - }, - "uri-js": { - "version": "4.4.0", - "resolved": "https://registry.npm.taobao.org/uri-js/download/uri-js-4.4.0.tgz", - "integrity": "sha1-qnFCYd55PoqCNHp7zJznTobyhgI=", - "requires": { - "punycode": "^2.1.0" - } - }, - "urix": { - "version": "0.1.0", - "resolved": "https://registry.npm.taobao.org/urix/download/urix-0.1.0.tgz", - "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=" - }, - "url": { - "version": "0.11.0", - "resolved": "https://registry.npm.taobao.org/url/download/url-0.11.0.tgz", - "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", - "requires": { - "punycode": "1.3.2", - "querystring": "0.2.0" - }, - "dependencies": { - "punycode": { - "version": "1.3.2", - "resolved": "https://registry.npm.taobao.org/punycode/download/punycode-1.3.2.tgz", - "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=" - } - } - }, - "url-loader": { - "version": "2.3.0", - "resolved": "https://registry.npm.taobao.org/url-loader/download/url-loader-2.3.0.tgz?cache=0&sync_timestamp=1602252626029&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Furl-loader%2Fdownload%2Furl-loader-2.3.0.tgz", - "integrity": "sha1-4OLvZY8APvuMpBsPP/v3a6uIZYs=", - "dev": true, - "requires": { - "loader-utils": "^1.2.3", - "mime": "^2.4.4", - "schema-utils": "^2.5.0" - } - }, - "url-parse": { - "version": "1.4.7", - "resolved": "https://registry.npm.taobao.org/url-parse/download/url-parse-1.4.7.tgz", - "integrity": "sha1-qKg1NejACjFuQDpdtKwbm4U64ng=", - "dev": true, - "requires": { - "querystringify": "^2.1.1", - "requires-port": "^1.0.0" - } - }, - "use": { - "version": "3.1.1", - "resolved": "https://registry.npm.taobao.org/use/download/use-3.1.1.tgz", - "integrity": "sha1-1QyMrHmhn7wg8pEfVuuXP04QBw8=" - }, - "util": { - "version": "0.11.1", - "resolved": "https://registry.npm.taobao.org/util/download/util-0.11.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Futil%2Fdownload%2Futil-0.11.1.tgz", - "integrity": "sha1-MjZzNyDsZLsn9uJvQhqqLhtYjWE=", - "requires": { - "inherits": "2.0.3" - }, - "dependencies": { - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npm.taobao.org/inherits/download/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" - } - } - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/util-deprecate/download/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" - }, - "util.promisify": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/util.promisify/download/util.promisify-1.0.1.tgz", - "integrity": "sha1-a693dLgO6w91INi4HQeYKlmruu4=", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.2", - "has-symbols": "^1.0.1", - "object.getownpropertydescriptors": "^2.1.0" - }, - "dependencies": { - "es-abstract": { - "version": "1.17.7", - "resolved": "https://registry.npm.taobao.org/es-abstract/download/es-abstract-1.17.7.tgz?cache=0&sync_timestamp=1601502719982&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fes-abstract%2Fdownload%2Fes-abstract-1.17.7.tgz", - "integrity": "sha1-pN5hsvZpifx0IWdsHLl4dXOs5Uw=", - "dev": true, - "requires": { - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.2.2", - "is-regex": "^1.1.1", - "object-inspect": "^1.8.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.1", - "string.prototype.trimend": "^1.0.1", - "string.prototype.trimstart": "^1.0.1" - } - } - } - }, - "utila": { - "version": "0.4.0", - "resolved": "https://registry.npm.taobao.org/utila/download/utila-0.4.0.tgz", - "integrity": "sha1-ihagXURWV6Oupe7MWxKk+lN5dyw=", - "dev": true - }, - "utils-merge": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/utils-merge/download/utils-merge-1.0.1.tgz", - "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=", - "dev": true - }, - "uuid": { - "version": "3.4.0", - "resolved": "https://registry.npm.taobao.org/uuid/download/uuid-3.4.0.tgz", - "integrity": "sha1-sj5DWK+oogL+ehAK8fX4g/AgB+4=", - "dev": true - }, - "v-tooltip": { - "version": "2.1.3", - "resolved": "https://registry.npmmirror.com/v-tooltip/-/v-tooltip-2.1.3.tgz", - "integrity": "sha512-xXngyxLQTOx/yUEy50thb8te7Qo4XU6h4LZB6cvEfVd9mnysUxLEoYwGWDdqR+l69liKsy3IPkdYff3J1gAJ5w==", - "requires": { - "@babel/runtime": "^7.13.10", - "lodash": "^4.17.21", - "popper.js": "^1.16.1", - "vue-resize": "^1.0.1" - } - }, - "validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npm.taobao.org/validate-npm-package-license/download/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha1-/JH2uce6FchX9MssXe/uw51PQQo=", - "dev": true, - "requires": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, - "vary": { - "version": "1.1.2", - "resolved": "https://registry.npm.taobao.org/vary/download/vary-1.1.2.tgz", - "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", - "dev": true - }, - "vendors": { - "version": "1.0.4", - "resolved": "https://registry.npm.taobao.org/vendors/download/vendors-1.0.4.tgz?cache=0&sync_timestamp=1579857147055&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fvendors%2Fdownload%2Fvendors-1.0.4.tgz", - "integrity": "sha1-4rgApT56Kbk1BsPPQRANFsTErY4=", - "dev": true - }, - "verror": { - "version": "1.10.0", - "resolved": "https://registry.npm.taobao.org/verror/download/verror-1.10.0.tgz", - "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - } - }, - "vm-browserify": { - "version": "1.1.2", - "resolved": "https://registry.npm.taobao.org/vm-browserify/download/vm-browserify-1.1.2.tgz?cache=0&sync_timestamp=1572870717730&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fvm-browserify%2Fdownload%2Fvm-browserify-1.1.2.tgz", - "integrity": "sha1-eGQcSIuObKkadfUR56OzKobl3aA=" - }, - "vue": { - "version": "2.6.12", - "resolved": "https://registry.npm.taobao.org/vue/download/vue-2.6.12.tgz", - "integrity": "sha1-9evU+mvShpQD4pqJau1JBEVskSM=" - }, - "vue-avatar": { - "version": "2.3.3", - "resolved": "https://registry.npm.taobao.org/vue-avatar/download/vue-avatar-2.3.3.tgz", - "integrity": "sha1-4SW/T0pvT5SA2gxSICAmaoYJ0qg=" - }, - "vue-calendar-heatmap": { - "version": "0.8.4", - "resolved": "https://registry.npmmirror.com/vue-calendar-heatmap/-/vue-calendar-heatmap-0.8.4.tgz", - "integrity": "sha512-Hx7OYBY1ghUIxKmFIIzpLT4XlcrwnI3WpadJEj/sKj5quoxwEuSDKmf94v0zWOHeQ/2CrB1G66geaKR/O56+OQ==", - "requires": { - "v-tooltip": "^2.0.0-rc.32" - } - }, - "vue-clipboard2": { - "version": "0.3.1", - "resolved": "https://registry.npm.taobao.org/vue-clipboard2/download/vue-clipboard2-0.3.1.tgz", - "integrity": "sha1-blUft704SImyiw2jsSKJ7WvKSJQ=", - "requires": { - "clipboard": "^2.0.0" - } - }, - "vue-codemirror-lite": { - "version": "1.0.4", - "resolved": "https://registry.npm.taobao.org/vue-codemirror-lite/download/vue-codemirror-lite-1.0.4.tgz", - "integrity": "sha1-SKXNfRfAkUUDyM2dm1a0OOScNBA=", - "requires": { - "codemirror": "^5.22.0" - } - }, - "vue-cropper": { - "version": "0.5.5", - "resolved": "https://registry.npm.taobao.org/vue-cropper/download/vue-cropper-0.5.5.tgz", - "integrity": "sha1-m9G6Vjx/qiaKvVL7KvTGwo0zyWI=" - }, - "vue-dompurify-html": { - "version": "2.5.0", - "resolved": "https://registry.npmmirror.com/vue-dompurify-html/-/vue-dompurify-html-2.5.0.tgz", - "integrity": "sha512-k2ejMJmsCsREGtJFDXNwqMvvek447id5ZAOU10jm2+cmsZHXgFIEdlwDam4cU4wh0iOZM+uDmkwbVJAJtmgeVQ==", - "requires": { - "dompurify": "^2.3.4" - } - }, - "vue-echarts": { - "version": "5.0.0-beta.0", - "resolved": "https://registry.npm.taobao.org/vue-echarts/download/vue-echarts-5.0.0-beta.0.tgz", - "integrity": "sha1-Q43UsPxczqKBcJwffGMhsFNSvfQ=", - "requires": { - "core-js": "^3.4.4", - "lodash": "^4.17.15", - "resize-detector": "^0.1.10" - } - }, - "vue-hot-reload-api": { - "version": "2.3.4", - "resolved": "https://registry.npm.taobao.org/vue-hot-reload-api/download/vue-hot-reload-api-2.3.4.tgz", - "integrity": "sha1-UylVzB6yCKPZkLOp+acFdGV+CPI=", - "dev": true - }, - "vue-i18n": { - "version": "8.24.4", - "resolved": "https://registry.nlark.com/vue-i18n/download/vue-i18n-8.24.4.tgz", - "integrity": "sha1-sVhhTB332xg9nK3du3Ph1UAmlJI=" - }, - "vue-katex-auto-render": { - "version": "0.1.3", - "resolved": "https://registry.npmmirror.com/vue-katex-auto-render/download/vue-katex-auto-render-0.1.3.tgz", - "integrity": "sha1-a2RYX9aiX6PDtwyxOiI6251CwZQ=", - "requires": { - "katex": "^0.11.1" - }, - "dependencies": { - "katex": { - "version": "0.11.1", - "resolved": "https://registry.npmmirror.com/katex/download/katex-0.11.1.tgz", - "integrity": "sha512-5oANDICCTX0NqYIyAiFCCwjQ7ERu3DQG2JFHLbYOf+fXaMoH8eg/zOq5WSYJsKMi/QebW+Eh3gSM+oss1H/bww==", - "requires": { - "commander": "^2.19.0" - } - } - } - }, - "vue-loader": { - "version": "15.9.4", - "resolved": "https://registry.npm.taobao.org/vue-loader/download/vue-loader-15.9.4.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fvue-loader%2Fdownload%2Fvue-loader-15.9.4.tgz", - "integrity": "sha1-wuzvihoIAqx2xtaGZBtd3lIq4mc=", - "dev": true, - "requires": { - "@vue/component-compiler-utils": "^3.1.0", - "hash-sum": "^1.0.2", - "loader-utils": "^1.1.0", - "vue-hot-reload-api": "^2.3.0", - "vue-style-loader": "^4.1.0" - }, - "dependencies": { - "hash-sum": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/hash-sum/download/hash-sum-1.0.2.tgz", - "integrity": "sha1-M7QHd3VMZDJXPBIMw4CLvRDUfwQ=", - "dev": true - } - } - }, - "vue-m-message": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/vue-m-message/download/vue-m-message-3.0.0.tgz", - "integrity": "sha1-D93EdZEovPO0iolxDl4jZoH2xpA=" - }, - "vue-monoplasty-slide-verify": { - "version": "1.1.3", - "resolved": "https://registry.npm.taobao.org/vue-monoplasty-slide-verify/download/vue-monoplasty-slide-verify-1.1.3.tgz", - "integrity": "sha1-cKOlaeMuwO2VthHWdUv1I8JJmjw=", - "requires": { - "vue": "^2.5.11" - } - }, - "vue-particles": { - "version": "1.0.9", - "resolved": "https://registry.npm.taobao.org/vue-particles/download/vue-particles-1.0.9.tgz", - "integrity": "sha1-KdnMK+AVffHAqH7DuWyW8zJ5Um4=", - "requires": { - "particles.js": "^2.0.0", - "vue": "^2.2.6" - } - }, - "vue-resize": { - "version": "1.0.1", - "resolved": "https://registry.npmmirror.com/vue-resize/-/vue-resize-1.0.1.tgz", - "integrity": "sha512-z5M7lJs0QluJnaoMFTIeGx6dIkYxOwHThlZDeQnWZBizKblb99GSejPnK37ZbNE/rVwDcYcHY+Io+AxdpY952w==", - "requires": { - "@babel/runtime": "^7.13.10" - } - }, - "vue-router": { - "version": "3.4.8", - "resolved": "https://registry.npm.taobao.org/vue-router/download/vue-router-3.4.8.tgz?cache=0&sync_timestamp=1603710629657&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fvue-router%2Fdownload%2Fvue-router-3.4.8.tgz", - "integrity": "sha1-LAYmHTXYB1iTRwNS1C1wtih7gZQ=" - }, - "vue-style-loader": { - "version": "4.1.2", - "resolved": "https://registry.npm.taobao.org/vue-style-loader/download/vue-style-loader-4.1.2.tgz", - "integrity": "sha1-3t80mAbyXOtOZPOtfApE+6c1/Pg=", - "dev": true, - "requires": { - "hash-sum": "^1.0.2", - "loader-utils": "^1.0.2" - }, - "dependencies": { - "hash-sum": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/hash-sum/download/hash-sum-1.0.2.tgz", - "integrity": "sha1-M7QHd3VMZDJXPBIMw4CLvRDUfwQ=", - "dev": true - } - } - }, - "vue-template-compiler": { - "version": "2.6.12", - "resolved": "https://registry.npm.taobao.org/vue-template-compiler/download/vue-template-compiler-2.6.12.tgz?cache=0&sync_timestamp=1597927407682&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fvue-template-compiler%2Fdownload%2Fvue-template-compiler-2.6.12.tgz", - "integrity": "sha1-lH7XGWdEyKUoXr4SM/6WBDf8xX4=", - "requires": { - "de-indent": "^1.0.2", - "he": "^1.1.0" - } - }, - "vue-template-es2015-compiler": { - "version": "1.9.1", - "resolved": "https://registry.npm.taobao.org/vue-template-es2015-compiler/download/vue-template-es2015-compiler-1.9.1.tgz", - "integrity": "sha1-HuO8mhbsv1EYvjNLsV+cRvgvWCU=", - "dev": true - }, - "vuex": { - "version": "3.5.1", - "resolved": "https://registry.npm.taobao.org/vuex/download/vuex-3.5.1.tgz", - "integrity": "sha1-8bjc6mSbwlJUz09DWAgdv12hiz0=", - "requires": {} - }, - "vuex-router-sync": { - "version": "5.0.0", - "resolved": "https://registry.npm.taobao.org/vuex-router-sync/download/vuex-router-sync-5.0.0.tgz", - "integrity": "sha1-GiJcF6Hdni90rwobLGIHLpSSswU=", - "requires": {} - }, - "vxe-table": { - "version": "2.9.26", - "resolved": "https://registry.npm.taobao.org/vxe-table/download/vxe-table-2.9.26.tgz", - "integrity": "sha1-0Ox2z/Mp1np4m6+Rl0yIprdq0Yo=", - "requires": {} - }, - "watchpack": { - "version": "1.7.4", - "resolved": "https://registry.npm.taobao.org/watchpack/download/watchpack-1.7.4.tgz?cache=0&sync_timestamp=1600385568268&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fwatchpack%2Fdownload%2Fwatchpack-1.7.4.tgz", - "integrity": "sha1-bp2lOzyAuy1lCBiPWyAEEIZs0ws=", - "requires": { - "chokidar": "^3.4.1", - "graceful-fs": "^4.1.2", - "neo-async": "^2.5.0", - "watchpack-chokidar2": "^2.0.0" - } - }, - "watchpack-chokidar2": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/watchpack-chokidar2/download/watchpack-chokidar2-2.0.0.tgz", - "integrity": "sha1-mUihhmy71suCTeoTp+1pH2yN3/A=", - "optional": true, - "requires": { - "chokidar": "^2.1.8" - }, - "dependencies": { - "anymatch": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/anymatch/download/anymatch-2.0.0.tgz", - "integrity": "sha1-vLJLTzeTTZqnrBe0ra+J58du8us=", - "optional": true, - "requires": { - "micromatch": "^3.1.4", - "normalize-path": "^2.1.1" - }, - "dependencies": { - "normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npm.taobao.org/normalize-path/download/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", - "optional": true, - "requires": { - "remove-trailing-separator": "^1.0.1" - } - } - } - }, - "binary-extensions": { - "version": "1.13.1", - "resolved": "https://registry.npm.taobao.org/binary-extensions/download/binary-extensions-1.13.1.tgz", - "integrity": "sha1-WYr+VHVbKGilMw0q/51Ou1Mgm2U=", - "optional": true - }, - "chokidar": { - "version": "2.1.8", - "resolved": "https://registry.npm.taobao.org/chokidar/download/chokidar-2.1.8.tgz?cache=0&sync_timestamp=1602585381749&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fchokidar%2Fdownload%2Fchokidar-2.1.8.tgz", - "integrity": "sha1-gEs6e2qZNYw8XGHnHYco8EHP+Rc=", - "optional": true, - "requires": { - "anymatch": "^2.0.0", - "async-each": "^1.0.1", - "braces": "^2.3.2", - "fsevents": "^1.2.7", - "glob-parent": "^3.1.0", - "inherits": "^2.0.3", - "is-binary-path": "^1.0.0", - "is-glob": "^4.0.0", - "normalize-path": "^3.0.0", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.2.1", - "upath": "^1.1.1" - } - }, - "fsevents": { - "version": "1.2.13", - "resolved": "https://registry.npm.taobao.org/fsevents/download/fsevents-1.2.13.tgz?cache=0&sync_timestamp=1588787369955&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffsevents%2Fdownload%2Ffsevents-1.2.13.tgz", - "integrity": "sha1-8yXLBFVZJCi88Rs4M3DvcOO/zDg=", - "optional": true, - "requires": { - "bindings": "^1.5.0", - "nan": "^2.12.1" - } - }, - "glob-parent": { - "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/glob-parent/download/glob-parent-3.1.0.tgz", - "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", - "optional": true, - "requires": { - "is-glob": "^3.1.0", - "path-dirname": "^1.0.0" - }, - "dependencies": { - "is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/is-glob/download/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "optional": true, - "requires": { - "is-extglob": "^2.1.0" - } - } - } - }, - "is-binary-path": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/is-binary-path/download/is-binary-path-1.0.1.tgz", - "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", - "optional": true, - "requires": { - "binary-extensions": "^1.0.0" - } - }, - "readdirp": { - "version": "2.2.1", - "resolved": "https://registry.npm.taobao.org/readdirp/download/readdirp-2.2.1.tgz?cache=0&sync_timestamp=1602584331621&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Freaddirp%2Fdownload%2Freaddirp-2.2.1.tgz", - "integrity": "sha1-DodiKjMlqjPokihcr4tOhGUppSU=", - "optional": true, - "requires": { - "graceful-fs": "^4.1.11", - "micromatch": "^3.1.10", - "readable-stream": "^2.0.2" - } - } - } - }, - "wbuf": { - "version": "1.7.3", - "resolved": "https://registry.npm.taobao.org/wbuf/download/wbuf-1.7.3.tgz", - "integrity": "sha1-wdjRSTFtPqhShIiVy2oL/oh7h98=", - "dev": true, - "requires": { - "minimalistic-assert": "^1.0.0" - } - }, - "wcwidth": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/wcwidth/download/wcwidth-1.0.1.tgz", - "integrity": "sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g=", - "dev": true, - "requires": { - "defaults": "^1.0.3" - } - }, - "webpack": { - "version": "4.44.2", - "resolved": "https://registry.npm.taobao.org/webpack/download/webpack-4.44.2.tgz?cache=0&sync_timestamp=1603999440291&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fwebpack%2Fdownload%2Fwebpack-4.44.2.tgz", - "integrity": "sha1-a/4rCvBVyLLR6Q7SzZNj+EEma3I=", - "requires": { - "@webassemblyjs/ast": "1.9.0", - "@webassemblyjs/helper-module-context": "1.9.0", - "@webassemblyjs/wasm-edit": "1.9.0", - "@webassemblyjs/wasm-parser": "1.9.0", - "acorn": "^6.4.1", - "ajv": "^6.10.2", - "ajv-keywords": "^3.4.1", - "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^4.3.0", - "eslint-scope": "^4.0.3", - "json-parse-better-errors": "^1.0.2", - "loader-runner": "^2.4.0", - "loader-utils": "^1.2.3", - "memory-fs": "^0.4.1", - "micromatch": "^3.1.10", - "mkdirp": "^0.5.3", - "neo-async": "^2.6.1", - "node-libs-browser": "^2.2.1", - "schema-utils": "^1.0.0", - "tapable": "^1.1.3", - "terser-webpack-plugin": "^1.4.3", - "watchpack": "^1.7.4", - "webpack-sources": "^1.4.1" - }, - "dependencies": { - "schema-utils": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/schema-utils/download/schema-utils-1.0.0.tgz", - "integrity": "sha1-C3mpMgTXtgDUsoUNH2bCo0lRx3A=", - "requires": { - "ajv": "^6.1.0", - "ajv-errors": "^1.0.0", - "ajv-keywords": "^3.1.0" - } - } - } - }, - "webpack-bundle-analyzer": { - "version": "4.4.0", - "resolved": "https://registry.npm.taobao.org/webpack-bundle-analyzer/download/webpack-bundle-analyzer-4.4.0.tgz?cache=0&sync_timestamp=1611221513167&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fwebpack-bundle-analyzer%2Fdownload%2Fwebpack-bundle-analyzer-4.4.0.tgz", - "integrity": "sha1-dAExBufisHy9ZPOlroR/foFIAsc=", - "dev": true, - "requires": { - "acorn": "^8.0.4", - "acorn-walk": "^8.0.0", - "chalk": "^4.1.0", - "commander": "^6.2.0", - "gzip-size": "^6.0.0", - "lodash": "^4.17.20", - "opener": "^1.5.2", - "sirv": "^1.0.7", - "ws": "^7.3.1" - }, - "dependencies": { - "acorn": { - "version": "8.1.0", - "resolved": "https://registry.npm.taobao.org/acorn/download/acorn-8.1.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Facorn%2Fdownload%2Facorn-8.1.0.tgz", - "integrity": "sha1-UjEf1wN64RnLsTQwnpAapGKVs/4=", - "dev": true - }, - "acorn-walk": { - "version": "8.0.2", - "resolved": "https://registry.npm.taobao.org/acorn-walk/download/acorn-walk-8.0.2.tgz?cache=0&sync_timestamp=1611560713023&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Facorn-walk%2Fdownload%2Facorn-walk-8.0.2.tgz", - "integrity": "sha1-1GMr/GP9k9DxX9BeoOmE/9P1qMM=", - "dev": true - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npm.taobao.org/ansi-styles/download/ansi-styles-4.3.0.tgz?cache=0&sync_timestamp=1617175602652&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fansi-styles%2Fdownload%2Fansi-styles-4.3.0.tgz", - "integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.0", - "resolved": "https://registry.npm.taobao.org/chalk/download/chalk-4.1.0.tgz", - "integrity": "sha1-ThSHCmGNni7dl92DRf2dncMVZGo=", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/color-convert/download/color-convert-2.0.1.tgz", - "integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npm.taobao.org/color-name/download/color-name-1.1.4.tgz", - "integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=", - "dev": true - }, - "commander": { - "version": "6.2.1", - "resolved": "https://registry.npm.taobao.org/commander/download/commander-6.2.1.tgz?cache=0&sync_timestamp=1616363849438&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcommander%2Fdownload%2Fcommander-6.2.1.tgz", - "integrity": "sha1-B5LraC37wyWZm7K4T93duhEKxzw=", - "dev": true - }, - "gzip-size": { - "version": "6.0.0", - "resolved": "https://registry.npm.taobao.org/gzip-size/download/gzip-size-6.0.0.tgz?cache=0&sync_timestamp=1605523244597&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fgzip-size%2Fdownload%2Fgzip-size-6.0.0.tgz", - "integrity": "sha1-BlNn/VDCOcBnHLy61b4+LusQ5GI=", - "dev": true, - "requires": { - "duplexer": "^0.1.2" - } - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/has-flag/download/has-flag-4.0.0.tgz", - "integrity": "sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=", - "dev": true - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-7.2.0.tgz?cache=0&sync_timestamp=1611393963969&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsupports-color%2Fdownload%2Fsupports-color-7.2.0.tgz", - "integrity": "sha1-G33NyzK4E4gBs+R4umpRyqiWSNo=", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - }, - "ws": { - "version": "7.4.4", - "resolved": "https://registry.npm.taobao.org/ws/download/ws-7.4.4.tgz?cache=0&sync_timestamp=1615063746103&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fws%2Fdownload%2Fws-7.4.4.tgz", - "integrity": "sha1-ODvJdCyyAikskHfOq29gR7F/LVk=", - "dev": true, - "requires": {} - } - } - }, - "webpack-chain": { - "version": "6.5.1", - "resolved": "https://registry.npm.taobao.org/webpack-chain/download/webpack-chain-6.5.1.tgz?cache=0&sync_timestamp=1595814928534&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fwebpack-chain%2Fdownload%2Fwebpack-chain-6.5.1.tgz", - "integrity": "sha1-TycoTLu2N+PI+970Pu9YjU2GEgY=", - "dev": true, - "requires": { - "deepmerge": "^1.5.2", - "javascript-stringify": "^2.0.1" - } - }, - "webpack-dev-middleware": { - "version": "3.7.2", - "resolved": "https://registry.npm.taobao.org/webpack-dev-middleware/download/webpack-dev-middleware-3.7.2.tgz?cache=0&sync_timestamp=1603894555091&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fwebpack-dev-middleware%2Fdownload%2Fwebpack-dev-middleware-3.7.2.tgz", - "integrity": "sha1-ABnD23FuP6XOy/ZPKriKdLqzMfM=", - "dev": true, - "requires": { - "memory-fs": "^0.4.1", - "mime": "^2.4.4", - "mkdirp": "^0.5.1", - "range-parser": "^1.2.1", - "webpack-log": "^2.0.0" - } - }, - "webpack-dev-server": { - "version": "3.11.0", - "resolved": "https://registry.npm.taobao.org/webpack-dev-server/download/webpack-dev-server-3.11.0.tgz", - "integrity": "sha1-jxVKO84bz9HMYY705wMniFXn/4w=", - "dev": true, - "requires": { - "ansi-html": "0.0.7", - "bonjour": "^3.5.0", - "chokidar": "^2.1.8", - "compression": "^1.7.4", - "connect-history-api-fallback": "^1.6.0", - "debug": "^4.1.1", - "del": "^4.1.1", - "express": "^4.17.1", - "html-entities": "^1.3.1", - "http-proxy-middleware": "0.19.1", - "import-local": "^2.0.0", - "internal-ip": "^4.3.0", - "ip": "^1.1.5", - "is-absolute-url": "^3.0.3", - "killable": "^1.0.1", - "loglevel": "^1.6.8", - "opn": "^5.5.0", - "p-retry": "^3.0.1", - "portfinder": "^1.0.26", - "schema-utils": "^1.0.0", - "selfsigned": "^1.10.7", - "semver": "^6.3.0", - "serve-index": "^1.9.1", - "sockjs": "0.3.20", - "sockjs-client": "1.4.0", - "spdy": "^4.0.2", - "strip-ansi": "^3.0.1", - "supports-color": "^6.1.0", - "url": "^0.11.0", - "webpack-dev-middleware": "^3.7.2", - "webpack-log": "^2.0.0", - "ws": "^6.2.1", - "yargs": "^13.3.2" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npm.taobao.org/ansi-regex/download/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - }, - "anymatch": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/anymatch/download/anymatch-2.0.0.tgz", - "integrity": "sha1-vLJLTzeTTZqnrBe0ra+J58du8us=", - "dev": true, - "requires": { - "micromatch": "^3.1.4", - "normalize-path": "^2.1.1" - }, - "dependencies": { - "normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npm.taobao.org/normalize-path/download/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", - "dev": true, - "requires": { - "remove-trailing-separator": "^1.0.1" - } - } - } - }, - "binary-extensions": { - "version": "1.13.1", - "resolved": "https://registry.npm.taobao.org/binary-extensions/download/binary-extensions-1.13.1.tgz", - "integrity": "sha1-WYr+VHVbKGilMw0q/51Ou1Mgm2U=", - "dev": true - }, - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npm.taobao.org/camelcase/download/camelcase-5.3.1.tgz?cache=0&sync_timestamp=1603923709404&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcamelcase%2Fdownload%2Fcamelcase-5.3.1.tgz", - "integrity": "sha1-48mzFWnhBoEd8kL3FXJaH0xJQyA=", - "dev": true - }, - "chokidar": { - "version": "2.1.8", - "resolved": "https://registry.npm.taobao.org/chokidar/download/chokidar-2.1.8.tgz?cache=0&sync_timestamp=1602585381749&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fchokidar%2Fdownload%2Fchokidar-2.1.8.tgz", - "integrity": "sha1-gEs6e2qZNYw8XGHnHYco8EHP+Rc=", - "dev": true, - "requires": { - "anymatch": "^2.0.0", - "async-each": "^1.0.1", - "braces": "^2.3.2", - "fsevents": "^1.2.7", - "glob-parent": "^3.1.0", - "inherits": "^2.0.3", - "is-binary-path": "^1.0.0", - "is-glob": "^4.0.0", - "normalize-path": "^3.0.0", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.2.1", - "upath": "^1.1.1" - } - }, - "cliui": { - "version": "5.0.0", - "resolved": "https://registry.npm.taobao.org/cliui/download/cliui-5.0.0.tgz?cache=0&sync_timestamp=1602861367442&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcliui%2Fdownload%2Fcliui-5.0.0.tgz", - "integrity": "sha1-3u/P2y6AB4SqNPRvoI4GhRx7u8U=", - "dev": true, - "requires": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npm.taobao.org/ansi-regex/download/ansi-regex-4.1.0.tgz", - "integrity": "sha1-i5+PCM8ay4Q3Vqg5yox+MWjFGZc=", - "dev": true - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npm.taobao.org/strip-ansi/download/strip-ansi-5.2.0.tgz?cache=0&sync_timestamp=1573280518303&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstrip-ansi%2Fdownload%2Fstrip-ansi-5.2.0.tgz", - "integrity": "sha1-jJpTb+tq/JYr36WxBKUJHBrZwK4=", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - } - } - }, - "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npm.taobao.org/emoji-regex/download/emoji-regex-7.0.3.tgz?cache=0&sync_timestamp=1603212180491&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Femoji-regex%2Fdownload%2Femoji-regex-7.0.3.tgz", - "integrity": "sha1-kzoEBShgyF6DwSJHnEdIqOTHIVY=", - "dev": true - }, - "fsevents": { - "version": "1.2.13", - "resolved": "https://registry.npm.taobao.org/fsevents/download/fsevents-1.2.13.tgz?cache=0&sync_timestamp=1588787369955&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffsevents%2Fdownload%2Ffsevents-1.2.13.tgz", - "integrity": "sha1-8yXLBFVZJCi88Rs4M3DvcOO/zDg=", - "dev": true, - "optional": true, - "requires": { - "bindings": "^1.5.0", - "nan": "^2.12.1" - } - }, - "glob-parent": { - "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/glob-parent/download/glob-parent-3.1.0.tgz", - "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", - "dev": true, - "requires": { - "is-glob": "^3.1.0", - "path-dirname": "^1.0.0" - }, - "dependencies": { - "is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/is-glob/download/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "dev": true, - "requires": { - "is-extglob": "^2.1.0" - } - } - } - }, - "is-absolute-url": { - "version": "3.0.3", - "resolved": "https://registry.npm.taobao.org/is-absolute-url/download/is-absolute-url-3.0.3.tgz", - "integrity": "sha1-lsaiK2ojkpsR6gr7GDbDatSl1pg=", - "dev": true - }, - "is-binary-path": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/is-binary-path/download/is-binary-path-1.0.1.tgz", - "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", - "dev": true, - "requires": { - "binary-extensions": "^1.0.0" - } - }, - "readdirp": { - "version": "2.2.1", - "resolved": "https://registry.npm.taobao.org/readdirp/download/readdirp-2.2.1.tgz?cache=0&sync_timestamp=1602584331621&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Freaddirp%2Fdownload%2Freaddirp-2.2.1.tgz", - "integrity": "sha1-DodiKjMlqjPokihcr4tOhGUppSU=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.11", - "micromatch": "^3.1.10", - "readable-stream": "^2.0.2" - } - }, - "schema-utils": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/schema-utils/download/schema-utils-1.0.0.tgz", - "integrity": "sha1-C3mpMgTXtgDUsoUNH2bCo0lRx3A=", - "dev": true, - "requires": { - "ajv": "^6.1.0", - "ajv-errors": "^1.0.0", - "ajv-keywords": "^3.1.0" - } - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npm.taobao.org/semver/download/semver-6.3.0.tgz", - "integrity": "sha1-7gpkyK9ejO6mdoexM3YeG+y9HT0=", - "dev": true - }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/string-width/download/string-width-3.1.0.tgz", - "integrity": "sha1-InZ74htirxCBV0MG9prFG2IgOWE=", - "dev": true, - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npm.taobao.org/ansi-regex/download/ansi-regex-4.1.0.tgz", - "integrity": "sha1-i5+PCM8ay4Q3Vqg5yox+MWjFGZc=", - "dev": true - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npm.taobao.org/strip-ansi/download/strip-ansi-5.2.0.tgz?cache=0&sync_timestamp=1573280518303&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstrip-ansi%2Fdownload%2Fstrip-ansi-5.2.0.tgz", - "integrity": "sha1-jJpTb+tq/JYr36WxBKUJHBrZwK4=", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - } - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npm.taobao.org/strip-ansi/download/strip-ansi-3.0.1.tgz?cache=0&sync_timestamp=1573280518303&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstrip-ansi%2Fdownload%2Fstrip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-6.1.0.tgz?cache=0&sync_timestamp=1598611709087&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsupports-color%2Fdownload%2Fsupports-color-6.1.0.tgz", - "integrity": "sha1-B2Srxpxj1ayELdSGfo0CXogN+PM=", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - }, - "wrap-ansi": { - "version": "5.1.0", - "resolved": "https://registry.npm.taobao.org/wrap-ansi/download/wrap-ansi-5.1.0.tgz", - "integrity": "sha1-H9H2cjXVttD+54EFYAG/tpTAOwk=", - "dev": true, - "requires": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npm.taobao.org/ansi-regex/download/ansi-regex-4.1.0.tgz", - "integrity": "sha1-i5+PCM8ay4Q3Vqg5yox+MWjFGZc=", - "dev": true - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npm.taobao.org/strip-ansi/download/strip-ansi-5.2.0.tgz?cache=0&sync_timestamp=1573280518303&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstrip-ansi%2Fdownload%2Fstrip-ansi-5.2.0.tgz", - "integrity": "sha1-jJpTb+tq/JYr36WxBKUJHBrZwK4=", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - } - } - }, - "yargs": { - "version": "13.3.2", - "resolved": "https://registry.npm.taobao.org/yargs/download/yargs-13.3.2.tgz?cache=0&sync_timestamp=1602805561021&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fyargs%2Fdownload%2Fyargs-13.3.2.tgz", - "integrity": "sha1-rX/+/sGqWVZayRX4Lcyzipwxot0=", - "dev": true, - "requires": { - "cliui": "^5.0.0", - "find-up": "^3.0.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^3.0.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^13.1.2" - } - }, - "yargs-parser": { - "version": "13.1.2", - "resolved": "https://registry.npm.taobao.org/yargs-parser/download/yargs-parser-13.1.2.tgz?cache=0&sync_timestamp=1602861397132&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fyargs-parser%2Fdownload%2Fyargs-parser-13.1.2.tgz", - "integrity": "sha1-Ew8JcC667vJlDVTObj5XBvek+zg=", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } - } - } - }, - "webpack-log": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/webpack-log/download/webpack-log-2.0.0.tgz", - "integrity": "sha1-W3ko4GN1k/EZ0y9iJ8HgrDHhtH8=", - "dev": true, - "requires": { - "ansi-colors": "^3.0.0", - "uuid": "^3.3.2" - } - }, - "webpack-merge": { - "version": "4.2.2", - "resolved": "https://registry.npm.taobao.org/webpack-merge/download/webpack-merge-4.2.2.tgz?cache=0&sync_timestamp=1602063120051&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fwebpack-merge%2Fdownload%2Fwebpack-merge-4.2.2.tgz", - "integrity": "sha1-onxS6ng9E5iv0gh/VH17nS9DY00=", - "dev": true, - "requires": { - "lodash": "^4.17.15" - } - }, - "webpack-sources": { - "version": "1.4.3", - "resolved": "https://registry.npm.taobao.org/webpack-sources/download/webpack-sources-1.4.3.tgz?cache=0&sync_timestamp=1603965311142&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fwebpack-sources%2Fdownload%2Fwebpack-sources-1.4.3.tgz", - "integrity": "sha1-7t2OwLko+/HL/plOItLYkPMwqTM=", - "requires": { - "source-list-map": "^2.0.0", - "source-map": "~0.6.1" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz?cache=0&sync_timestamp=1571657176668&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsource-map%2Fdownload%2Fsource-map-0.6.1.tgz", - "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=" - } - } - }, - "websocket-driver": { - "version": "0.6.5", - "resolved": "https://registry.npm.taobao.org/websocket-driver/download/websocket-driver-0.6.5.tgz?cache=0&sync_timestamp=1591288600527&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fwebsocket-driver%2Fdownload%2Fwebsocket-driver-0.6.5.tgz", - "integrity": "sha1-XLJVbOuF9Dc8bYI4qmkchFThOjY=", - "dev": true, - "requires": { - "websocket-extensions": ">=0.1.1" - } - }, - "websocket-extensions": { - "version": "0.1.4", - "resolved": "https://registry.npm.taobao.org/websocket-extensions/download/websocket-extensions-0.1.4.tgz?cache=0&sync_timestamp=1591103014229&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fwebsocket-extensions%2Fdownload%2Fwebsocket-extensions-0.1.4.tgz", - "integrity": "sha1-f4RzvIOd/YdgituV1+sHUhFXikI=", - "dev": true - }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npm.taobao.org/which/download/which-1.3.1.tgz?cache=0&sync_timestamp=1574116720213&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fwhich%2Fdownload%2Fwhich-1.3.1.tgz", - "integrity": "sha1-pFBD1U9YBTFtqNYvn1CRjT2nCwo=", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "which-module": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/which-module/download/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", - "dev": true - }, - "worker-farm": { - "version": "1.7.0", - "resolved": "https://registry.npm.taobao.org/worker-farm/download/worker-farm-1.7.0.tgz", - "integrity": "sha1-JqlMU5G7ypJhUgAvabhKS/dy5ag=", - "requires": { - "errno": "~0.1.7" - } - }, - "wrap-ansi": { - "version": "6.2.0", - "resolved": "https://registry.npm.taobao.org/wrap-ansi/download/wrap-ansi-6.2.0.tgz", - "integrity": "sha1-6Tk7oHEC5skaOyIUePAlfNKFblM=", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npm.taobao.org/ansi-styles/download/ansi-styles-4.3.0.tgz?cache=0&sync_timestamp=1601839122515&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fansi-styles%2Fdownload%2Fansi-styles-4.3.0.tgz", - "integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/color-convert/download/color-convert-2.0.1.tgz", - "integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npm.taobao.org/color-name/download/color-name-1.1.4.tgz", - "integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/is-fullwidth-code-point/download/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha1-8Rb4Bk/pCz94RKOJl8C3UFEmnx0=", - "dev": true - }, - "string-width": { - "version": "4.2.0", - "resolved": "https://registry.npm.taobao.org/string-width/download/string-width-4.2.0.tgz", - "integrity": "sha1-lSGCxGzHssMT0VluYjmSvRY7crU=", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" - } - } - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/wrappy/download/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" - }, - "ws": { - "version": "6.2.1", - "resolved": "https://registry.npm.taobao.org/ws/download/ws-6.2.1.tgz?cache=0&sync_timestamp=1593925439808&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fws%2Fdownload%2Fws-6.2.1.tgz", - "integrity": "sha1-RC/fCkftZPWbal2P8TD0dI7VJPs=", - "dev": true, - "requires": { - "async-limiter": "~1.0.0" - } - }, - "xe-utils": { - "version": "2.8.1", - "resolved": "https://registry.npm.taobao.org/xe-utils/download/xe-utils-2.8.1.tgz?cache=0&sync_timestamp=1604659233906&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fxe-utils%2Fdownload%2Fxe-utils-2.8.1.tgz", - "integrity": "sha1-PtUX1BdzGoKgGoyam6sk9JCb6IY=" - }, - "xss": { - "version": "1.0.10", - "resolved": "https://registry.npmmirror.com/xss/-/xss-1.0.10.tgz", - "integrity": "sha512-qmoqrRksmzqSKvgqzN0055UFWY7OKx1/9JWeRswwEVX9fCG5jcYRxa/A2DHcmZX6VJvjzHRQ2STeeVcQkrmLSw==", - "requires": { - "commander": "^2.20.3", - "cssfilter": "0.0.10" - } - }, - "xtend": { - "version": "4.0.2", - "resolved": "https://registry.npm.taobao.org/xtend/download/xtend-4.0.2.tgz", - "integrity": "sha1-u3J3n1+kZRhrH0OPZ0+jR/2121Q=" - }, - "y18n": { - "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/y18n/download/y18n-4.0.0.tgz?cache=0&sync_timestamp=1603637417853&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fy18n%2Fdownload%2Fy18n-4.0.0.tgz", - "integrity": "sha1-le+U+F7MgdAHwmThkKEg8KPIVms=" - }, - "yallist": { - "version": "3.1.1", - "resolved": "https://registry.npm.taobao.org/yallist/download/yallist-3.1.1.tgz", - "integrity": "sha1-27fa+b/YusmrRev2ArjLrQ1dCP0=" - }, - "yargs": { - "version": "15.4.1", - "resolved": "https://registry.npm.taobao.org/yargs/download/yargs-15.4.1.tgz?cache=0&sync_timestamp=1602805561021&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fyargs%2Fdownload%2Fyargs-15.4.1.tgz", - "integrity": "sha1-DYehbeAa7p2L7Cv7909nhRcw9Pg=", - "dev": true, - "requires": { - "cliui": "^6.0.0", - "decamelize": "^1.2.0", - "find-up": "^4.1.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^4.2.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^18.1.2" - }, - "dependencies": { - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npm.taobao.org/find-up/download/find-up-4.1.0.tgz?cache=0&sync_timestamp=1597169842138&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffind-up%2Fdownload%2Ffind-up-4.1.0.tgz", - "integrity": "sha1-l6/n1s3AvFkoWEt8jXsW6KmqXRk=", - "dev": true, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/is-fullwidth-code-point/download/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha1-8Rb4Bk/pCz94RKOJl8C3UFEmnx0=", - "dev": true - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npm.taobao.org/locate-path/download/locate-path-5.0.0.tgz", - "integrity": "sha1-Gvujlq/WdqbUJQTQpno6frn2KqA=", - "dev": true, - "requires": { - "p-locate": "^4.1.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npm.taobao.org/p-locate/download/p-locate-4.1.0.tgz", - "integrity": "sha1-o0KLtwiLOmApL2aRkni3wpetTwc=", - "dev": true, - "requires": { - "p-limit": "^2.2.0" - } - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/path-exists/download/path-exists-4.0.0.tgz", - "integrity": "sha1-UTvb4tO5XXdi6METfvoZXGxhtbM=", - "dev": true - }, - "string-width": { - "version": "4.2.0", - "resolved": "https://registry.npm.taobao.org/string-width/download/string-width-4.2.0.tgz", - "integrity": "sha1-lSGCxGzHssMT0VluYjmSvRY7crU=", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" - } - } - } - }, - "yargs-parser": { - "version": "18.1.3", - "resolved": "https://registry.npm.taobao.org/yargs-parser/download/yargs-parser-18.1.3.tgz?cache=0&sync_timestamp=1602861397132&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fyargs-parser%2Fdownload%2Fyargs-parser-18.1.3.tgz", - "integrity": "sha1-vmjEl1xrKr9GkjawyHA2L6sJp7A=", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - }, - "dependencies": { - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npm.taobao.org/camelcase/download/camelcase-5.3.1.tgz?cache=0&sync_timestamp=1603923709404&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcamelcase%2Fdownload%2Fcamelcase-5.3.1.tgz", - "integrity": "sha1-48mzFWnhBoEd8kL3FXJaH0xJQyA=", - "dev": true - } - } - }, - "zrender": { - "version": "4.3.2", - "resolved": "https://registry.npm.taobao.org/zrender/download/zrender-4.3.2.tgz?cache=0&sync_timestamp=1605029444182&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fzrender%2Fdownload%2Fzrender-4.3.2.tgz", - "integrity": "sha1-7HQy+UFcgsc1hLa3uMR+GwFiCcY=" - } - } -} diff --git a/src/hoj-vue/package.json b/src/hoj-vue/package.json deleted file mode 100644 index 13e2f16..0000000 --- a/src/hoj-vue/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "name": "hoj-vue", - "version": "0.1.0", - "private": true, - "scripts": { - "serve": "vue-cli-service serve", - "build": "vue-cli-service build" - }, - "dependencies": { - "@iktakahiro/markdown-it-katex": "^4.0.1", - "axios": "^0.21.0", - "browser-detect": "^0.2.28", - "compression-webpack-plugin": "^5.0.1", - "core-js": "^3.6.5", - "echarts": "^4.9.0", - "element-ui": "^2.15.3", - "font-awesome": "^4.7.0", - "highlight.js": "^10.3.2", - "jquery": "^3.5.1", - "mavon-editor": "2.9.1", - "moment": "^2.29.1", - "muse-ui": "^3.0.2", - "nprogress": "^0.2.0", - "papaparse": "^5.3.0", - "vue": "^2.6.11", - "vue-avatar": "^2.3.3", - "vue-calendar-heatmap": "^0.8.4", - "vue-clipboard2": "^0.3.1", - "vue-codemirror-lite": "^1.0.4", - "vue-cropper": "^0.5.5", - "vue-dompurify-html": "^2.5.0", - "vue-echarts": "^5.0.0-beta.0", - "vue-i18n": "^8.24.4", - "vue-katex-auto-render": "^0.1.3", - "vue-m-message": "^3.0.0", - "vue-monoplasty-slide-verify": "^1.1.3", - "vue-particles": "^1.0.9", - "vue-router": "^3.2.0", - "vue-template-compiler": "^2.6.12", - "vuex": "^3.4.0", - "vuex-router-sync": "^5.0.0", - "vxe-table": "^2.9.26", - "xe-utils": "^2.8.1" - }, - "devDependencies": { - "@types/highlight.js": "^10.1.0", - "@vue/cli-plugin-babel": "~4.5.0", - "@vue/cli-plugin-router": "~4.5.0", - "@vue/cli-plugin-vuex": "~4.5.0", - "@vue/cli-service": "~4.5.0", - "uglifyjs-webpack-plugin": "^2.2.0", - "webpack-bundle-analyzer": "^4.4.0" - }, - "browserslist": [ - "> 1%", - "last 2 versions", - "not dead" - ] -} diff --git a/src/hoj-vue/public/favicon.ico b/src/hoj-vue/public/favicon.ico deleted file mode 100644 index 35ce8fa..0000000 Binary files a/src/hoj-vue/public/favicon.ico and /dev/null differ diff --git a/src/hoj-vue/public/index.html b/src/hoj-vue/public/index.html deleted file mode 100644 index 7a20f7e..0000000 --- a/src/hoj-vue/public/index.html +++ /dev/null @@ -1,218 +0,0 @@ - - - - - - - - - - - <% for (var i in htmlWebpackPlugin.options.cdn && - htmlWebpackPlugin.options.cdn.css) { %> - - <% } %> - - Hcode OnlineJudge - - - - - - -
- -
-
-
-
-
-
-
-
-
-
-
- Loading... -
-
- - <% for (var i in htmlWebpackPlugin.options.cdn && - htmlWebpackPlugin.options.cdn.js) { %> - - <% } %> - - - \ No newline at end of file diff --git a/src/hoj-vue/src/App.vue b/src/hoj-vue/src/App.vue deleted file mode 100644 index b7a645e..0000000 --- a/src/hoj-vue/src/App.vue +++ /dev/null @@ -1,709 +0,0 @@ - - - - - - diff --git a/src/hoj-vue/src/assets/acm.jpg b/src/hoj-vue/src/assets/acm.jpg deleted file mode 100644 index 9fb6043..0000000 Binary files a/src/hoj-vue/src/assets/acm.jpg and /dev/null differ diff --git a/src/hoj-vue/src/assets/atcoder-logo.png b/src/hoj-vue/src/assets/atcoder-logo.png deleted file mode 100644 index cf5bc11..0000000 Binary files a/src/hoj-vue/src/assets/atcoder-logo.png and /dev/null differ diff --git a/src/hoj-vue/src/assets/backstage.png b/src/hoj-vue/src/assets/backstage.png deleted file mode 100644 index e0ee078..0000000 Binary files a/src/hoj-vue/src/assets/backstage.png and /dev/null differ diff --git a/src/hoj-vue/src/assets/codeforces-logo.png b/src/hoj-vue/src/assets/codeforces-logo.png deleted file mode 100644 index 5cd9966..0000000 Binary files a/src/hoj-vue/src/assets/codeforces-logo.png and /dev/null differ diff --git a/src/hoj-vue/src/assets/default.jpg b/src/hoj-vue/src/assets/default.jpg deleted file mode 100644 index 39447aa..0000000 Binary files a/src/hoj-vue/src/assets/default.jpg and /dev/null differ diff --git a/src/hoj-vue/src/assets/gym-logo.png b/src/hoj-vue/src/assets/gym-logo.png deleted file mode 100644 index 90ddbb9..0000000 Binary files a/src/hoj-vue/src/assets/gym-logo.png and /dev/null differ diff --git a/src/hoj-vue/src/assets/hdu-logo.png b/src/hoj-vue/src/assets/hdu-logo.png deleted file mode 100644 index 65a0099..0000000 Binary files a/src/hoj-vue/src/assets/hdu-logo.png and /dev/null differ diff --git a/src/hoj-vue/src/assets/home1.jfif b/src/hoj-vue/src/assets/home1.jfif deleted file mode 100644 index 919391c..0000000 Binary files a/src/hoj-vue/src/assets/home1.jfif and /dev/null differ diff --git a/src/hoj-vue/src/assets/home2.jpeg b/src/hoj-vue/src/assets/home2.jpeg deleted file mode 100644 index 149be07..0000000 Binary files a/src/hoj-vue/src/assets/home2.jpeg and /dev/null differ diff --git a/src/hoj-vue/src/assets/icon.png b/src/hoj-vue/src/assets/icon.png deleted file mode 100644 index 9b57fdc..0000000 Binary files a/src/hoj-vue/src/assets/icon.png and /dev/null differ diff --git a/src/hoj-vue/src/assets/logo.png b/src/hoj-vue/src/assets/logo.png deleted file mode 100644 index 14bc1a9..0000000 Binary files a/src/hoj-vue/src/assets/logo.png and /dev/null differ diff --git a/src/hoj-vue/src/assets/oi.jpg b/src/hoj-vue/src/assets/oi.jpg deleted file mode 100644 index 1dd5e19..0000000 Binary files a/src/hoj-vue/src/assets/oi.jpg and /dev/null differ diff --git a/src/hoj-vue/src/assets/poj-logo.png b/src/hoj-vue/src/assets/poj-logo.png deleted file mode 100644 index bf7380f..0000000 Binary files a/src/hoj-vue/src/assets/poj-logo.png and /dev/null differ diff --git a/src/hoj-vue/src/assets/spoj-logo.png b/src/hoj-vue/src/assets/spoj-logo.png deleted file mode 100644 index 607429c..0000000 Binary files a/src/hoj-vue/src/assets/spoj-logo.png and /dev/null differ diff --git a/src/hoj-vue/src/common/api.js b/src/hoj-vue/src/common/api.js deleted file mode 100644 index ab61431..0000000 --- a/src/hoj-vue/src/common/api.js +++ /dev/null @@ -1,1866 +0,0 @@ -import axios from 'axios' -import Vue from 'vue' -import mMessage from '@/common/message' -import router from '@/router' -import store from "@/store" -import utils from '@/common/utils' -import i18n from '@/i18n' -// import NProgress from 'nprogress' // nprogress插件 -// import 'nprogress/nprogress.css' // nprogress样式 - -// // 配置NProgress进度条选项 —— 动画效果 -// NProgress.configure({ ease: 'ease', speed: 1000,showSpinner: false}) -Vue.prototype.$http = axios - - -// 请求超时时间 -axios.defaults.timeout = 90000; - -axios.interceptors.request.use( - - config => { - - // NProgress.start(); - // 每次发送请求之前判断vuex中是否存在token - // 如果存在,则统一在http请求的header都加上token,这样后台根据token判断你的登录情况 - // 即使本地存在token,也有可能token是过期的,所以在响应拦截器中要对返回状态进行判断 - const token = localStorage.getItem('token') - token && (config.headers.Authorization = token); - let type = config.url.split("/")[1]; - if (type === 'admin'){ // 携带请求区别是否为admin - config.headers['Url-Type'] = type - }else{ - config.headers['Url-Type'] = 'general' - } - - return config; - }, - error => { - // NProgress.done(); - mMessage.error(error.response.data.msg); - return Promise.error(error); - }) - -// 响应拦截器 -axios.interceptors.response.use( - response => { - // NProgress.done(); - if(response.headers['refresh-token']){ // token续约! - store.commit('changeUserToken',response.headers['authorization']) - } - if (response.data.status === 200 || response.data.status==undefined) { - return Promise.resolve(response); - } else { - mMessage.error(response.data.msg); - return Promise.reject(response); - } - - }, - // 服务器状态码不是200的情况 - error => { - // NProgress.done(); - if (error.response) { - if(error.response.headers['refresh-token']){ // token续约!! - store.commit('changeUserToken',error.response.headers['authorization']) - } - if(error.response.data instanceof Blob){ // 如果是文件操作的返回,由后续进行处理 - return Promise.resolve(error.response); - } - switch (error.response.status) { - // 401: 未登录 token过期 - // 未登录则跳转登录页面,并携带当前页面的路径 - // 在登录成功后返回当前页面,这一步需要在登录页操作。 - case 401: - if(error.response.data.msg){ - mMessage.error(error.response.data.msg); - } - if(error.response.config.headers['Url-Type'] === 'admin'){ - router.push("/api/admin/login") - }else{ - store.commit('changeModalStatus', { mode: 'Login', visible: true }); - } - store.commit('clearUserInfoAndToken'); - break; - // 403 - // 无权限访问或操作的请求 - case 403: - if(error.response.data.msg){ - mMessage.error(error.response.data.msg); - } - break; - // 404请求不存在 - case 404: - mMessage.error(i18n.t('m.Query_error_unable_to_find_the_resource_to_request')); - break; - // 其他错误,直接抛出错误提示 - default: - if(error.response.data){ - if(error.response.data.msg){ - mMessage.error(error.response.data.msg); - }else{ - mMessage.error(i18n.t('m.Server_error_please_refresh_again')); - } - } - break; - } - return Promise.reject(error); - } else { //处理断网或请求超时,请求没响应 - if(error.code == 'ECONNABORTED' || error.message.includes('timeout')){ - mMessage.error(i18n.t('m.Request_timed_out_please_try_again_later')); - }else{ - mMessage.error(i18n.t('m.Network_error_abnormal_link_with_server_please_try_again_later')); - } - return Promise.reject(error); - } - } -); - - -// 处理oj前台的请求 -const ojApi = { - // Home页的请求 - getWebsiteConfig(){ - return ajax('/api/get-website-config', 'get', { - }) - }, - getHomeCarousel(){ - return ajax('/api/home-carousel', 'get', { - }) - }, - getRecentContests(){ - return ajax('/api/get-recent-contest', 'get', { - }) - }, - getRecentOtherContests(){ - return ajax('/api/get-recent-other-contest', 'get', { - }) - }, - getAnnouncementList(currentPage, limit) { - let params = { - currentPage: currentPage, - limit: limit - } - return ajax('/api/get-common-announcement', 'get', { - params - }) - }, - getRecent7ACRank(){ - return ajax('/api/get-recent-seven-ac-rank', 'get', { - }) - }, - - // 用户账户的相关请求 - getRegisterEmail(email) { - let params = { - email: email - } - return ajax('/api/get-register-code', 'get', { - params - }) - }, - - login(data) { - return ajax('/api/login', 'post', { - data - }) - }, - checkUsernameOrEmail(username, email) { - return ajax('/api/check-username-or-email', 'post', { - data: { - username, - email - } - }) - }, - // 获取验证码 - getCaptcha(){ - return ajax('/api/captcha', 'get') - }, - // 注册 - register(data) { - return ajax('/api/register', 'post', { - data - }) - }, - logout() { - return ajax('/api/logout', 'get') - }, - - // 账户的相关操作 - applyResetPassword (data) { - return ajax('/api/apply-reset-password', 'post', { - data - }) - }, - resetPassword (data) { - return ajax('/api/reset-password', 'post', { - data - }) - }, - // Problem List页的相关请求 - getProblemTagList (oj) { - return ajax('/api/get-all-problem-tags', 'get',{ - params:{ - oj - } - }) - }, - - getProblemTagsAndClassification(oj){ - return ajax('/api/get-problem-tags-and-classification', 'get',{ - params:{ - oj - } - }) - }, - - getProblemList (limit, searchParams) { - let params = { - limit - } - Object.keys(searchParams).forEach((element) => { - if (searchParams[element]!==''&&searchParams[element]!==null&&searchParams[element]!==undefined) { - params[element] = searchParams[element] - } - }) - return ajax('/api/get-problem-list', 'get', { - params: params - }) - }, - - // 查询当前登录用户对题目的提交状态 - getUserProblemStatus(pidList,isContestProblemList,cid,gid){ - return ajax("/api/get-user-problem-status",'post',{ - data:{ - pidList, - isContestProblemList, - cid, - gid - } - }) - }, - // 随机来一题 - pickone () { - return ajax('/api/get-random-problem', 'get') - }, - - // Problem详情页的相关请求 - getProblem(problemId,cid,gid){ - return ajax('/api/get-problem-detail','get',{ - params:{ - problemId, - gid - } - }) - }, - - // 获取题目代码模板 - getProblemCodeTemplate(pid){ - return ajax('/api/get-problem-code-template','get',{ - params:{ - pid - } - }) - }, - - // 提交评测模块 - submitCode (data) { - return ajax('/api/submit-problem-judge', 'post', { - data - }) - }, - // 获取单个提交的信息 - getSubmission (submitId) { - return ajax('/api/get-submission-detail', 'get', { - params: { - submitId - } - }) - }, - // 在线调试 - submitTestJudge(data){ - return ajax('/api/submit-problem-test-judge', 'post', { - data - }) - }, - // 获取调试结果 - getTestJudgeResult(testJudgeKey){ - return ajax('/api/get-test-judge-result', 'get', { - params: { - testJudgeKey - } - }) - }, - // 获取单个提交的全部测试点详情 - getAllCaseResult (submitId) { - return ajax('/api/get-all-case-result', 'get', { - params: { - submitId, - } - }) - }, - // 远程虚拟判题失败进行重新提交 - reSubmitRemoteJudge(submitId){ - return ajax("/api/resubmit",'get',{ - params:{ - submitId, - } - }) - }, - // 更新提交详情 - updateSubmission(data){ - return ajax('/api/submission', 'put', { - data - }) - }, - getSubmissionList (limit, params) { - params.limit = limit - return ajax('/api/get-submission-list', 'get', { - params - }) - }, - checkSubmissonsStatus(submitIds,cid){ - return ajax('/api/check-submissions-status', 'post', { - data:{submitIds,cid} - }) - }, - checkContestSubmissonsStatus(submitIds,cid){ - return ajax('/api/check-contest-submissions-status', 'post', { - data:{submitIds,cid} - }) - }, - - submissionRejudge (submitId) { - return ajax('/api/admin/judge/rejudge', 'get', { - params: { - submitId - } - }) - }, - - admin_manualJudge (submitId,status,score) { - return ajax('/api/admin/judge/manual-judge', 'get', { - params: { - submitId, - status, - score - } - }) - }, - - admin_cancelJudge (submitId) { - return ajax('/api/admin/judge/cancel-judge', 'get', { - params: { - submitId - } - }) - }, - - // ------------------------------------训练模块的请求--------------------------------------------- - - // 获取训练分类列表 - getTrainingCategoryList(){ - return ajax('/api/get-training-category', 'get') - }, - - - // 获取训练列表 - getTrainingList(currentPage,limit,query){ - let params = { - currentPage, - limit - } - if(query!==undefined){ - Object.keys(query).forEach((element) => { - if (query[element]) { - params[element] = query[element] - } - }) - } - return ajax('/api/get-training-list','get',{ - params: params - }) - }, - - // 获取训练详情 - getTraining(tid){ - return ajax('/api/get-training-detail','get',{ - params: {tid} - }) - }, - // 注册私有训练 - registerTraining(tid, password){ - return ajax('/api/register-training','post',{ - data:{ - tid, - password - } - }) - }, - // 获取注册训练权限 - getTrainingAccess(tid){ - return ajax('/api/get-training-access','get',{ - params: {tid} - }) - }, - // 获取训练题目列表 - getTrainingProblemList(tid){ - return ajax('/api/get-training-problem-list','get',{ - params: {tid} - }) - }, - // 获取训练题目详情 - getTrainingProblem(displayId,cid){ - return ajax('/api/get-training-problem-details','get',{ - params: {displayId,cid} - }) - }, - // 获取训练记录榜单 - getTrainingRank(params){ - return ajax('/api/get-training-rank', 'get', { - params - }) - }, - - - - // ------------------------------------------------------------------------------------------------ - - - // 比赛列表页的请求 - getContestList(currentPage,limit,query){ - let params = { - currentPage, - limit - } - if(query!==undefined){ - Object.keys(query).forEach((element) => { - if (query[element]) { - params[element] = query[element] - } - }) - } - return ajax('/api/get-contest-list','get',{ - params: params - }) - }, - - // 比赛详情的请求 - getContest(cid){ - return ajax('/api/get-contest-info','get',{ - params: {cid} - }) - }, - // 获取赛外榜单比赛的信息 - getScoreBoardContestInfo(cid){ - return ajax('/api/get-contest-outsize-info','get',{ - params: {cid} - }) - }, - // 提供比赛外榜排名数据 - getContestOutsideScoreboard(data){ - return ajax('/api/get-contest-outside-scoreboard','post',{ - data - }) - }, - // 注册私有比赛权限 - registerContest(cid,password){ - return ajax('/api/register-contest','post',{ - data:{ - cid, - password - } - }) - }, - // 获取注册比赛权限 - getContestAccess(cid){ - return ajax('/api/get-contest-access','get',{ - params: {cid} - }) - }, - // 获取比赛题目列表 - getContestProblemList(cid){ - return ajax('/api/get-contest-problem','get',{ - params: {cid} - }) - }, - // 获取比赛题目详情 - getContestProblem(displayId,cid){ - return ajax('/api/get-contest-problem-details','get',{ - params: {displayId,cid} - }) - }, - // 获取比赛提交列表 - getContestSubmissionList (limit, params) { - params.limit = limit - return ajax('/api/contest-submissions', 'get', { - params - }) - }, - - getContestRank(data){ - return ajax('/api/get-contest-rank', 'post', { - data - }) - }, - - // 获取比赛公告列表 - getContestAnnouncementList(currentPage,limit,cid){ - let params = { - currentPage, - limit, - cid - } - return ajax('/api/get-contest-announcement', 'get', { - params - }) - }, - - // 获取比赛未阅读公告列表 - getContestUserNotReadAnnouncement(data){ - return ajax('/api/get-contest-not-read-announcement', 'post', { - data - }) - }, - - // 获取acm比赛ac信息 - getACMACInfo(params){ - return ajax('/api/get-contest-ac-info', 'get', { - params - }) - }, - // 确认ac信息 - updateACInfoCheckedStatus(data){ - return ajax('/api/check-contest-ac-info', 'put', { - data - }) - }, - - // 提交打印文本 - submitPrintText(data){ - return ajax('/api/submit-print-text', 'post', { - data - }) - }, - - // 获取比赛打印文本列表 - getContestPrintList(params){ - return ajax('/api/get-contest-print', 'get', { - params - }) - }, - - // 更新比赛打印的状态 - updateContestPrintStatus(params){ - return ajax('/api/check-contest-print-status', 'put', { - params - }) - }, - - - // 比赛题目对应的提交重判 - ContestRejudgeProblem(params){ - return ajax('/api/admin/judge/rejudge-contest-problem', 'get', { - params - }) - }, - - // ACM赛制或OI赛制的排行榜 - getUserRank(currentPage,limit,type,searchUser){ - return ajax('/api/get-rank-list','get',{ - params: { - currentPage, - limit, - type, - searchUser - } - }) - }, - - // about页部分请求 - getAllLanguages(all){ - return ajax("/api/languages",'get',{ - params:{ - all - } - }) - }, - // userhome页的请求 - getUserInfo(uid,username){ - return ajax("/api/get-user-home-info",'get',{ - params:{uid,username} - }) - }, - - getUserCalendarHeatmap(uid,username){ - return ajax("/api/get-user-calendar-heatmap",'get',{ - params:{uid,username} - }) - }, - - // setting页的请求 - changePassword(data){ - return ajax("/api/change-password",'post',{ - data - }) - }, - changeEmail(data){ - return ajax("/api/change-email",'post',{ - data - }) - }, - changeUserInfo(data){ - return ajax("/api/change-userInfo",'post',{ - data - }) - }, - - // 讨论页相关请求 - getCategoryList(){ - return ajax("/api/discussion-category",'get') - }, - - getDiscussionList(limit,searchParams){ - let params = { - limit - } - Object.keys(searchParams).forEach((element) => { - if (searchParams[element]!==''&&searchParams[element]!==null&&searchParams[element]!==undefined) { - params[element] = searchParams[element] - } - }) - return ajax("/api/get-discussion-list",'get',{ - params - }) - }, - - getDiscussion(did){ - return ajax("/api/get-discussion-detail",'get',{ - params:{ - did - } - }) - }, - - addDiscussion(data){ - return ajax("/api/discussion",'post',{ - data - }) - }, - - updateDiscussion(data){ - return ajax("/api/discussion",'put',{ - data - }) - }, - - deleteDiscussion(did){ - return ajax("/api/discussion",'delete',{ - params:{ - did - } - }) - }, - - toLikeDiscussion(did,toLike){ - return ajax("/api/discussion-like",'get',{ - params:{ - did, - toLike - } - }) - }, - toReportDiscussion(data){ - return ajax("/api/discussion-report",'post',{ - data - }) - }, - - getCommentList(params){ - return ajax("/api/comments",'get',{ - params - }) - }, - - addComment(data){ - return ajax("/api/comment",'post',{ - data - }) - }, - - deleteComment(data){ - return ajax("/api/comment",'delete',{ - data - }) - }, - - toLikeComment(cid,toLike,sourceId,sourceType){ - return ajax("/api/comment-like",'get',{ - params:{ - cid, - toLike, - sourceId, - sourceType - } - }) - }, - - addReply(data){ - return ajax("/api/reply",'post',{ - data - }) - }, - - deleteReply(data){ - return ajax("/api/reply",'delete',{ - data - }) - }, - - getAllReply(commentId,cid){ - return ajax("/api/reply",'get',{ - params:{ - commentId, - cid - } - }) - }, - - // Group - getGroupList(currentPage, limit, query) { - let params = { currentPage, limit } - Object.keys(query).forEach((element) => { - if (query[element] !== '' && query[element] !== null && query[element] !== undefined) { - params[element] = query[element] - } - }) - return ajax('/api/get-group-list', 'get', { - params: params - }) - }, - - getGroup(gid) { - return ajax('/api/get-group-detail', 'get', { - params: { gid } - }) - }, - - addGroup(data) { - return ajax("/api/group", 'post', { - data - }) - }, - - updateGroup(data) { - return ajax("/api/group", 'put', { - data - }) - }, - - deleteGroup(gid) { - return ajax("/api/group", 'delete', { - params: { gid } - }) - }, - - getGroupAccess(gid) { - return ajax('/api/get-group-access', 'get', { - params: { gid } - }) - }, - - getGroupAuth(gid) { - return ajax('/api/get-group-auth', 'get', { - params: { gid } - }) - }, - - // Group Member - getGroupMemberList(currentPage, limit, gid) { - return ajax('/api/group/get-member-list', 'get', { - params: { currentPage, limit, gid } - }) - }, - - getGroupApplyList(currentPage, limit, gid) { - return ajax('/api/group/get-apply-list', 'get', { - params: { currentPage, limit, gid } - }) - }, - - addGroupMember(gid, code, reason) { - return ajax("/api/group/member", 'post', { - params: { gid, code, reason } - }) - }, - - updateGroupMember(data) { - return ajax("/api/group/member", 'put', { - data - }) - }, - - - deleteGroupMember(uid, gid) { - return ajax("/api/group/member", 'delete', { - params: { uid, gid } - }) - }, - - exitGroup(gid) { - return ajax("/api/group/member/exit", 'delete', { - params: { gid } - }) - }, - - // Group Announcement - getGroupAnnouncementList(currentPage, limit, gid) { - return ajax('/api/group/get-announcement-list', 'get', { - params: { currentPage, limit, gid } - }) - }, - - getGroupAdminAnnouncementList(currentPage, limit, gid) { - return ajax('/api/group/get-admin-announcement-list', 'get', { - params: { currentPage, limit, gid } - }) - }, - - addGroupAnnouncement(data) { - return ajax("/api/group/announcement", 'post', { - data - }) - }, - - updateGroupAnnouncement(data) { - return ajax("/api/group/announcement", 'put', { - data - }) - }, - - deleteGroupAnnouncement(aid) { - return ajax("/api/group/announcement", 'delete', { - params: { aid } - }) - }, - - // Group Problem - getGroupProblemList(currentPage, limit, gid) { - return ajax('/api/group/get-problem-list', 'get', { - params: { currentPage, limit, gid } - }) - }, - - getGroupAdminProblemList(currentPage, limit, gid){ - return ajax('/api/group/get-admin-problem-list', 'get', { - params: { currentPage, limit, gid } - }) - }, - - getGroupProblem(pid) { - return ajax("/api/group/problem", 'get', { - params: { pid } - }) - }, - - addGroupProblem(data) { - return ajax("/api/group/problem", 'post', { - data: data - }) - }, - - updateGroupProblem(data) { - return ajax("/api/group/problem", 'put', { - data - }) - }, - - deleteGroupProblem(pid) { - return ajax("/api/group/problem", 'delete', { - params: { pid } - }) - }, - - getGroupProblemCases(pid, isUpload) { - return ajax("/api/group/get-problem-cases", 'get', { - params: { pid, isUpload } - }) - }, - getGroupProblemTags(pid) { - return ajax('/api/get-problem-tags', 'get',{ - params:{ - pid - } - }) - }, - - getGroupProblemTagList (gid) { - return ajax('/api/group/get-all-problem-tags', 'get',{ - params:{ - gid - } - }) - }, - - groupCompileSpj(data, gid) { - return ajax("/api/group/compile-spj", 'post', { - data: data, - params: { gid } - }) - }, - - groupCompileInteractive(data, gid) { - return ajax("/api/group/compile-interactive", 'post', { - data: data, - params: { gid } - }) - }, - - changeGroupProblemAuth(pid, auth) { - return ajax("/api/group/change-problem-auth", 'put', { - params: { pid, auth } - }) - }, - - // Group Training - getGroupTrainingList(currentPage, limit, gid) { - return ajax('/api/group/get-training-list', 'get', { - params: { currentPage, limit, gid } - }) - }, - - getGroupAdminTrainingList(currentPage, limit, gid) { - return ajax('/api/group/get-admin-training-list','get', { - params: {currentPage, limit, gid} - }) - }, - - getGroupTraining(tid) { - return ajax("/api/group/training", 'get', { - params: { tid } - }) - }, - - addGroupTraining(data) { - return ajax("/api/group/training", 'post', { - data - }) - }, - - updateGroupTraining(data) { - return ajax("/api/group/training",'put',{ - data - }) - }, - - deleteGroupTraining(tid) { - return ajax("/api/group/training", 'delete', { - params: { tid } - }) - }, - - changeGroupTrainingStatus(tid, status) { - return ajax("/api/group/change-training-status", 'put', { - params:{ tid, status } - }) - }, - - getGroupTrainingProblemList(currentPage, limit, query) { - let params = { currentPage, limit } - Object.keys(query).forEach((element) => { - if (query[element] !== '' && query[element] !== null && query[element] !== undefined) { - params[element] = query[element] - } - }) - return ajax("/api/group/get-training-problem-list",'get',{ - params: params - }) - }, - - updateGroupTrainingProblem(data) { - return ajax("/api/group/training-problem", 'put', { - data - }) - }, - - deleteGroupTrainingProblem(pid, tid) { - return ajax("/api/group/training-problem",'delete', { - params:{ pid, tid } - }) - }, - - addGroupTrainingProblemFromPublic(data) { - return ajax("/api/group/add-training-problem-from-public", 'post', { - data - }) - }, - - addGroupTrainingProblemFromGroup(problemId, tid) { - return ajax("/api/group/add-training-problem-from-group", 'post', { - params:{ problemId, tid } - }) - }, - - //Group Contest - getGroupContestList(currentPage, limit, gid) { - return ajax('/api/group/get-contest-list', 'get', { - params: {currentPage, limit, gid} - }) - }, - - getGroupAdminContestList(currentPage, limit, gid) { - return ajax('/api/group/get-admin-contest-list','get', { - params: {currentPage, limit, gid} - }) - }, - - getGroupContest(cid) { - return ajax("/api/group/contest", 'get', { - params: { cid } - }) - }, - - addGroupContest(data) { - return ajax("/api/group/contest", 'post', { - data - }) - }, - - updateGroupContest(data) { - return ajax("/api/group/contest",'put',{ - data - }) - }, - - deleteGroupContest(cid) { - return ajax("/api/group/contest", 'delete', { - params:{ cid } - }) - }, - - changeGroupContestVisible(cid, visible) { - return ajax("/api/group/change-contest-visible", 'put', { - params:{ cid, visible } - }) - }, - - getGroupContestProblemList(currentPage, limit, query) { - let params = { currentPage, limit } - Object.keys(query).forEach((element) => { - if (query[element] !== '' && query[element] !== null && query[element] !== undefined) { - params[element] = query[element] - } - }) - return ajax("/api/group/get-contest-problem-list",'get',{ - params: params - }) - }, - - addGroupContestProblem(data) { - return ajax("/api/group/contest-problem", 'post', { - data - }) - }, - - getGroupContestProblem(pid, cid) { - return ajax("/api/group/contest-problem", 'get', { - params:{ pid, cid } - }) - }, - - updateGroupContestProblem(data) { - return ajax("/api/group/contest-problem", 'put', { - data - }) - }, - - applyGroupProblemPublic(pid,isApplied) { - return ajax("/api/group/apply-public", 'put', { - params:{ pid, isApplied } - }) - }, - - deleteGroupContestProblem(pid, cid) { - return ajax("/api/group/contest-problem",'delete', { - params:{ pid, cid } - }) - }, - - addGroupContestProblemFromPublic(data) { - return ajax("/api/group/add-contest-problem-from-public", 'post', { - data - }) - }, - - addGroupContestProblemFromGroup(problemId, cid, displayId) { - return ajax("/api/group/add-contest-problem-from-group", 'post', { - params:{ problemId, cid, displayId } - }) - }, - - getGroupContestAnnouncementList(currentPage, limit, cid) { - return ajax('/api/group/get-contest-announcement-list', 'get', { - params: { currentPage, limit, cid } - }) - }, - - addGroupContestAnnouncement(data) { - return ajax("/api/group/contest-announcement", 'post', { - data - }) - }, - - updateGroupContestAnnouncement(data) { - return ajax("/api/group/contest-announcement", 'put', { - data - }) - }, - - deleteGroupContestAnnouncement(aid, cid) { - return ajax("/api/group/contest-announcement", 'delete', { - params: { aid, cid } - }) - }, - - // Group Discussion - getGroupDiscussionList(currentPage, limit, gid, pid) { - return ajax('/api/group/get-discussion-list', 'get', { - params: { currentPage, limit, gid, pid} - }) - }, - - getGroupAdminDiscussionList(currentPage, limit, gid) { - return ajax('/api/group/get-admin-discussion-list', 'get', { - params: { currentPage, limit, gid } - }) - }, - - addGroupDiscussion(data) { - return ajax("/api/group/discussion", 'post', { - data - }) - }, - - updateGroupDiscussion(data) { - return ajax("/api/group/discussion", 'put', { - data - }) - }, - - deleteGroupDiscussion(did) { - return ajax("/api/group/discussion", 'delete', { - params: { did } - }) - }, - - getGroupRank(currentPage,limit,gid,type,searchUser){ - return ajax('/api/get-group-rank-list','get',{ - params: { - currentPage, - limit, - gid, - type, - searchUser - } - }) - }, - - // 站内消息 - - getUnreadMsgCount(){ - return ajax("/api/msg/unread",'get') - }, - - getMsgList(routerName,searchParams){ - let params ={}; - Object.keys(searchParams).forEach((element) => { - if (searchParams[element]!==''&&searchParams[element]!==null&&searchParams[element]!==undefined) { - params[element] = searchParams[element] - } - }) - switch(routerName){ - case "DiscussMsg": - return ajax("/api/msg/comment",'get',{ - params - }); - case "ReplyMsg": - return ajax("/api/msg/reply",'get',{ - params - }); - case "LikeMsg": - return ajax("/api/msg/like",'get',{ - params - }); - case "SysMsg": - return ajax("/api/msg/sys",'get',{ - params - }); - case "MineMsg": - return ajax("/api/msg/mine",'get',{ - params - }); - } - }, - - cleanMsg(routerName,id){ - let params ={}; - if(id){ - params.id=id; - } - switch(routerName){ - case "DiscussMsg": - params.type = 'Discuss'; - break; - case "ReplyMsg": - params.type = 'Reply'; - break; - case "LikeMsg": - params.type = 'Like'; - break; - case "SysMsg": - params.type = 'Sys'; - break; - case "MineMsg": - params.type = 'Mine'; - break; - } - return ajax("/api/msg/clean",'delete',{ - params - }); - } - -} - -// 处理admin后台管理的请求 -const adminApi = { - // 登录 - admin_login (username, password) { - return ajax('/api/admin/login', 'post', { - data: { - username, - password - } - }) - }, - admin_logout () { - return ajax('/api/admin/logout', 'get') - }, - admin_getDashboardInfo () { - return ajax('/api/admin/dashboard/get-dashboard-info', 'get') - }, - getSessions (data) { - return ajax('/api/admin/dashboard/get-sessions', 'post',{ - data - }) - }, - //获取数据后台服务和nacos相关详情 - admin_getGeneralSystemInfo(){ - return ajax('/api/admin/config/get-service-info','get') - }, - - getJudgeServer () { - return ajax('/api/admin/config/get-judge-service-info', 'get') - }, - - // 获取用户列表 - admin_getUserList (currentPage, limit, keyword,onlyAdmin) { - let params = {currentPage, limit} - if (keyword) { - params.keyword = keyword - } - params.onlyAdmin = onlyAdmin - return ajax('/api/admin/user/get-user-list', 'get', { - params: params - }) - }, - // 编辑用户 - admin_editUser (data) { - return ajax('/api/admin/user/edit-user', 'put', { - data - }) - }, - admin_deleteUsers (ids) { - return ajax('/api/admin/user/delete-user', 'delete', { - data:{ids} - }) - }, - admin_importUsers (users) { - return ajax('/api/admin/user/insert-batch-user', 'post', { - data: { - users - } - }) - }, - admin_generateUser (data) { - return ajax('/api/admin/user/generate-user', 'post', { - data - }) - }, - // 获取公告列表 - admin_getAnnouncementList (currentPage, limit) { - return ajax('/api/admin/announcement', 'get', { - params: { - currentPage, - limit - } - }) - }, - // 删除公告 - admin_deleteAnnouncement (aid) { - return ajax('/api/admin/announcement', 'delete', { - params: { - aid - } - }) - }, - // 修改公告 - admin_updateAnnouncement (data) { - return ajax('/api/admin/announcement', 'put', { - data - }) - }, - // 添加公告 - admin_createAnnouncement (data) { - return ajax('/api/admin/announcement', 'post', { - data - }) - }, - - - // 获取公告列表 - admin_getNoticeList (currentPage, limit,type) { - return ajax('/api/admin/msg/notice', 'get', { - params: { - currentPage, - limit, - type - } - }) - }, - // 删除公告 - admin_deleteNotice (id) { - return ajax('/api/admin/msg/notice', 'delete', { - params: { - id - } - }) - }, - // 修改公告 - admin_updateNotice (data) { - return ajax('/api/admin/msg/notice', 'put', { - data - }) - }, - // 添加公告 - admin_createNotice (data) { - return ajax('/api/admin/msg/notice', 'post', { - data - }) - }, - - // 系统配置 - admin_getSMTPConfig () { - return ajax('/api/admin/config/get-email-config', 'get') - }, - admin_editSMTPConfig (data) { - return ajax('/api/admin/config/set-email-config', 'put', { - data - }) - }, - - admin_deleteHomeCarousel(id){ - return ajax('/api/admin/config/home-carousel', 'delete', { - params:{ - id - } - }) - }, - - admin_testSMTPConfig (email) { - return ajax('/api/admin/config/test-email', 'post', { - data: { - email - } - }) - }, - admin_getWebsiteConfig () { - return ajax('/api/admin/config/get-web-config', 'get') - }, - admin_editWebsiteConfig (data) { - return ajax('/api/admin/config/set-web-config', 'put', { - data - }) - }, - admin_getDataBaseConfig(){ - return ajax('/api/admin/config/get-db-and-redis-config', 'get') - }, - admin_editDataBaseConfig(data){ - return ajax('/api/admin/config/set-db-and-redis-config', 'put', { - data - }) - }, - - // 系统开关 - admin_getSwitchConfig () { - return ajax('/api/admin/switch/info', 'get') - }, - - admin_saveSwitchConfig (data) { - return ajax('/api/admin/switch/update', 'put', { - data - }) - }, - - getLanguages (pid,all) { - return ajax('/api/languages', 'get',{ - params:{ - pid, - all - } - }) - }, - getProblemLanguages (pid) { - return ajax('/api/get-problem-languages', 'get',{ - params: { - pid: pid - } - }) - }, - - admin_getProblemList (params) { - params = utils.filterEmptyValue(params) - return ajax('/api/admin/problem/get-problem-list', 'get', { - params - }) - }, - - admin_addRemoteOJProblem(name,problemId){ - return ajax("/api/admin/problem/import-remote-oj-problem","get",{ - params: { - name, - problemId - } - }) - }, - - admin_addContestRemoteOJProblem(name,problemId,cid,displayId){ - return ajax("/api/admin/contest/import-remote-oj-problem","get",{ - params: { - name, - problemId, - cid, - displayId - } - }) - }, - - admin_createProblem (data) { - return ajax('/api/admin/problem', 'post', { - data - }) - }, - admin_editProblem (data) { - return ajax('/api/admin/problem', 'put', { - data - }) - }, - admin_deleteProblem (pid) { - return ajax('/api/admin/problem', 'delete', { - params: { - pid - } - }) - }, - admin_changeProblemAuth (data) { - return ajax('/api/admin/problem/change-problem-auth', 'put', { - data - }) - }, - admin_getProblem (pid) { - return ajax('/api/admin/problem', 'get', { - params: { - pid - } - }) - }, - admin_getAllProblemTagList (oj) { - return ajax('/api/get-all-problem-tags', 'get',{ - params: { - oj - } - }) - }, - - admin_getProblemTags(pid){ - return ajax('/api/get-problem-tags', 'get',{ - params: { - pid - } - }) - }, - admin_getProblemCases(pid,isUpload){ - return ajax('/api/admin/problem/get-problem-cases', 'get',{ - params: { - pid, - isUpload - } - }) - }, - compileSPJ (data) { - return ajax('/api/admin/problem/compile-spj', 'post', { - data - }) - }, - compileInteractive(data){ - return ajax('/api/admin/problem/compile-interactive', 'post', { - data - }) - }, - - admin_addTag (data) { - return ajax('/api/admin/tag', 'post', { - data - }) - }, - - admin_updateTag (data) { - return ajax('/api/admin/tag', 'put', { - data - }) - }, - - admin_deleteTag (tid) { - return ajax('/api/admin/tag', 'delete', { - params: { - tid - } - }) - }, - - admin_getTagClassification(oj){ - return ajax('/api/admin/tag/classification', 'get', { - params: { - oj - } - }) - }, - - admin_addTagClassification(data){ - return ajax('/api/admin/tag/classification', 'post', { - data - }) - }, - - admin_updateTagClassification (data) { - return ajax('/api/admin/tag/classification', 'put', { - data - }) - }, - - admin_deleteTagClassification (tcid) { - return ajax('/api/admin/tag/classification', 'delete', { - params: { - tcid - } - }) - }, - - admin_getGroupApplyProblemList (params) { - params = utils.filterEmptyValue(params) - return ajax('/api/admin/group-problem/list', 'get', { - params - }) - }, - - admin_changeGroupProblemApplyProgress (data) { - return ajax('/api/admin/group-problem/change-progress', 'put', { - data - }) - }, - - admin_getTrainingList (currentPage, limit, keyword) { - let params = {currentPage, limit} - if (keyword) { - params.keyword = keyword - } - return ajax('/api/admin/training/get-training-list', 'get', { - params: params - }) - }, - admin_changeTrainingStatus(tid,status,author){ - return ajax('/api/admin/training/change-training-status', 'put', { - params: { - tid, - status, - author - } - }) - }, - - admin_getTrainingProblemList(params) { - params = utils.filterEmptyValue(params) - return ajax('/api/admin/training/get-problem-list', 'get', { - params - }) - }, - - admin_deleteTrainingProblem (pid,tid) { - return ajax('/api/admin/training/problem', 'delete', { - params: { - pid, - tid - } - }) - }, - - admin_addTrainingProblemFromPublic (data) { - return ajax('/api/admin/training/add-problem-from-public', 'post', { - data - }) - }, - - admin_addTrainingRemoteOJProblem(name,problemId,tid){ - return ajax("/api/admin/training/import-remote-oj-problem","get",{ - params: { - name, - problemId, - tid, - } - }) - }, - - admin_updateTrainingProblem(data){ - return ajax('/api/admin/training/problem', 'put', { - data - }) - }, - - admin_createTraining (data) { - return ajax('/api/admin/training', 'post', { - data - }) - }, - admin_getTraining (tid) { - return ajax('/api/admin/training', 'get', { - params: { - tid - } - }) - }, - admin_editTraining (data) { - return ajax('/api/admin/training', 'put', { - data - }) - }, - admin_deleteTraining(tid){ - return ajax('/api/admin/training', 'delete', { - params: { - tid - } - }) - }, - - admin_addCategory(data) { - return ajax('/api/admin/training/category', 'post', { - data - }) - }, - - admin_updateCategory (data) { - return ajax('/api/admin/training/category', 'put', { - data - }) - }, - - admin_deleteCategory (cid) { - return ajax('/api/admin/training/category', 'delete', { - params: { - cid - } - }) - }, - - - admin_getContestProblemInfo(pid,cid) { - return ajax('/api/admin/contest/contest-problem', 'get', { - params: { - cid, - pid - } - }) - }, - admin_setContestProblemInfo(data) { - return ajax('/api/admin/contest/contest-problem', 'put', { - data - }) - }, - - admin_getContestProblemList (params) { - params = utils.filterEmptyValue(params) - return ajax('/api/admin/contest/get-problem-list', 'get', { - params - }) - }, - - admin_getContestProblem (pid) { - return ajax('/api/admin/contest/problem', 'get', { - params: { - pid, - } - }) - }, - admin_createContestProblem (data) { - return ajax('/api/admin/contest/problem', 'post', { - data - }) - }, - admin_editContestProblem (data) { - return ajax('/api/admin/contest/problem', 'put', { - data - }) - }, - admin_deleteContestProblem (pid,cid) { - return ajax('/api/admin/contest/problem', 'delete', { - params: { - pid, - cid - } - }) - }, - admin_addContestProblemFromPublic (data) { - return ajax('/api/admin/contest/add-problem-from-public', 'post', { - data - }) - }, - - exportProblems (data) { - return ajax('export_problem', 'post', { - data - }) - }, - - admin_createContest (data) { - return ajax('/api/admin/contest', 'post', { - data - }) - }, - admin_getContest (cid) { - return ajax('/api/admin/contest', 'get', { - params: { - cid - } - }) - }, - admin_editContest (data) { - return ajax('/api/admin/contest', 'put', { - data - }) - }, - admin_deleteContest(cid){ - return ajax('/api/admin/contest', 'delete', { - params: { - cid - } - }) - }, - admin_changeContestVisible(cid,visible,uid){ - return ajax('/api/admin/contest/change-contest-visible', 'put', { - params: { - cid, - visible, - uid - } - }) - }, - admin_getContestList (currentPage, limit, keyword) { - let params = {currentPage, limit} - if (keyword) { - params.keyword = keyword - } - return ajax('/api/admin/contest/get-contest-list', 'get', { - params: params - }) - }, - admin_getContestAnnouncementList (cid,currentPage,limit) { - return ajax('/api/admin/contest/announcement', 'get', { - params: { - cid, - currentPage, - limit - } - }) - }, - admin_createContestAnnouncement (data) { - return ajax('/api/admin/contest/announcement', 'post', { - data - }) - }, - admin_deleteContestAnnouncement (aid) { - return ajax('/api/admin/contest/announcement', 'delete', { - params: { - aid - } - }) - }, - admin_updateContestAnnouncement (data) { - return ajax('/api/admin/contest/announcement', 'put', { - data - }) - }, - - admin_updateDiscussion(data){ - return ajax("/api/admin/discussion",'put',{ - data - }) - }, - - admin_deleteDiscussion(data){ - return ajax("/api/admin/discussion",'delete',{ - data - }) - }, - admin_getDiscussionReport(currentPage,limit){ - return ajax("/api/admin/discussion-report",'get',{ - params:{ - currentPage, - limit - } - }) - }, - admin_updateDiscussionReport(data){ - return ajax("/api/admin/discussion-report",'put',{ - data - }) - } -} - -// 集中导出oj前台的api和admin管理端的api -let api = Object.assign(ojApi,adminApi) -export default api -/** - * @param url - * @param method get|post|put|delete... - * @param params like queryString. if a url is index?a=1&b=2, params = {a: '1', b: '2'} - * @param data post data, use for method put|post - * @returns {axios} - */ -function ajax(url, method, options) { - if (options !== undefined) { - var { params = {}, data = {} } = options - } else { - params = data = {} - } - return new Promise((resolve, reject) => { - axios({ - url, - method, - params, - data - }).then((res) => { - resolve(res) - }).catch(error => { - reject(error) - }) - }) -} - diff --git a/src/hoj-vue/src/common/codeblock.js b/src/hoj-vue/src/common/codeblock.js deleted file mode 100644 index bb9288b..0000000 --- a/src/hoj-vue/src/common/codeblock.js +++ /dev/null @@ -1,32 +0,0 @@ - -import $ from 'jquery' -import myMessage from '@/common/message'; -export const addCodeBtn = _ => { - //markdown代码存放在pre code 标签对中 - $('pre code').each(function () { - let lines = $(this).text().split('\n').length - 1 - //添加有序列表 - let $numbering = $('
    ').addClass('pre-numbering') - //添加复制按钮,此处使用的是element-ui icon 图标 - let $copy = $(' COPY').addClass('el-icon-document-copy code-copy') - $(this) - .parent() - .append($numbering) - .append($copy) - for (let i = 0; i <= lines; i++) { - $numbering.append($('
  1. ')) - } - }) - //监听复制按钮点击事件 - $('pre i.code-copy').click(e => { - let text = $(e.target).siblings('code').text() - let element = $('') - $('body').append(element) - element[0].select() - document.execCommand('Copy') - element.remove() - //这里是自定义的消息通知组件 - myMessage.success('success') - }) -} - diff --git a/src/hoj-vue/src/common/constants.js b/src/hoj-vue/src/common/constants.js deleted file mode 100644 index 85e0b92..0000000 --- a/src/hoj-vue/src/common/constants.js +++ /dev/null @@ -1,317 +0,0 @@ -export const JUDGE_STATUS = { - '-10': { - name: 'Not Submitted', - short: 'NS', - color: 'gray', - type: 'info', - rgb:'#909399' - }, - '-5': { - name: 'Submitted Unknown Result', - short: 'SNR', - color: 'gray', - type: 'info', - rgb:'#909399' - }, - '-4': { - name: 'Cancelled', - short: 'CA', - color: 'purple', - type: 'info', - rgb:'#676fc1' - }, - '-3': { - name: 'Presentation Error', - short: 'PE', - color: 'yellow', - type: 'warning', - rgb:'#f90' - }, - '-2': { - name: 'Compile Error', - short: 'CE', - color: 'yellow', - type: 'warning', - rgb:'#f90' - }, - '-1': { - name: 'Wrong Answer', - short: 'WA', - color: 'red', - type: 'error', - rgb:'#ed3f14' - }, - '0': { - name: 'Accepted', - short: 'AC', - color: 'green', - type: 'success', - rgb:'#19be6b' - }, - '1': { - name: 'Time Limit Exceeded', - short: 'TLE', - color: 'red', - type: 'error', - rgb:'#ed3f14' - }, - '2': { - name: 'Memory Limit Exceeded', - short: 'MLE', - color: 'red', - type: 'error', - rgb:'#ed3f14' - }, - '3': { - name: 'Runtime Error', - short: 'RE', - color: 'red', - type: 'error', - rgb:'#ed3f14' - }, - '4': { - name: 'System Error', - short: 'SE', - color: 'gray', - type: 'info', - rgb:'#909399' - }, - '5': { - name: 'Pending', - color: 'yellow', - type: 'warning', - rgb:'#f90' - }, - '6':{ - name: 'Compiling', - short: 'CP', - color: 'green', - type: 'info', - rgb:'#25bb9b' - }, - '7': { - name: 'Judging', - color: 'blue', - type: '', - rgb:'#2d8cf0' - }, - '8': { - name: 'Partial Accepted', - short: 'PAC', - color: 'blue', - type: '', - rgb:'#2d8cf0' - }, - '9': { - name: 'Submitting', - color: 'yellow', - type: 'warning', - rgb:'#f90' - }, - '10':{ - name:"Submitted Failed", - color:'gray', - short:'SF', - type: 'info', - rgb:'#909399', - } -} - -export const JUDGE_STATUS_RESERVE={ - 'ns':-10, - 'snr':-5, - 'ca':-4, - 'pe':-3, - 'ce':-2, - 'wa':-1, - 'ac':0, - 'tle':1, - 'mle':2, - 're':3, - 'se':4, - 'Pending':5, - 'Compiling':6, - 'Judging':7, - 'pa':8, - 'sf':10, -} - -export const PROBLEM_LEVEL={ - '0':{ - name:{ - 'zh-CN':'简单', - 'en-US':'Easy', - }, - color:'#19be6b' - }, - '1':{ - name:{ - 'zh-CN':'中等', - 'en-US':'Mid', - }, - color:'#2d8cf0' - }, - '2':{ - name:{ - 'zh-CN':'困难', - 'en-US':'Hard', - }, - color:'#ed3f14' - } -} - - -export const REMOTE_OJ = [ - { - name:'HDU', - key:"HDU" - }, - { - name:"Codeforces", - key:"CF" - }, - { - name:"POJ", - key:"POJ" - }, - { - name:"GYM", - key:"GYM" - }, - { - name:"AtCoder", - key:"AC" - }, - { - name:"SPOJ", - key:"SPOJ" - } -] - -export const CONTEST_STATUS = { - 'SCHEDULED': -1, - 'RUNNING': 0, - 'ENDED': 1 -} - -export const CONTEST_STATUS_REVERSE = { - '-1': { - name: 'Scheduled', - color: '#f90' - }, - '0': { - name: 'Running', - color: '#19be6b' - }, - '1': { - name: 'Ended', - color: '#ed3f14' - } -} - -export const TRAINING_TYPE = { - 'Public':{ - color:'success', - name:'Public' - }, - 'Private':{ - color:'danger', - name:'Private' - } -} - -export const GROUP_TYPE = { - PUBLIC: 1, - PROTECTED: 2, - PRIVATE: 3 -} - -export const GROUP_TYPE_REVERSE = { - '1':{ - name: 'Public', - color: 'success', - tips: 'Group_Public_Tips', - }, - '2':{ - name: 'Protected', - color: 'warning', - tips: 'Group_Protected_Tips', - }, - '3':{ - name: 'Private', - color: 'danger', - tips: 'Group_Private_Tips', - } -} - -export const RULE_TYPE = { - ACM: 0, - OI: 1 -} - -export const CONTEST_TYPE_REVERSE = { - '0': { - name:'Public', - color:'success', - tips:'Public_Tips', - submit:true, // 公开赛可看可提交 - look:true, - }, - '1':{ - name:'Private', - color:'danger', - tips:'Private_Tips', - submit:false, // 私有赛 必须要密码才能看和提交 - look:false, - }, - '2':{ - name:'Protected', - color:'warning', - tips:'Protected_Tips', - submit:false, //保护赛,可以看但是不能提交,提交需要附带比赛密码 - look:true, - } -} - -export const CONTEST_TYPE = { - PUBLIC: 0, - PRIVATE: 1, - PROTECTED: 2 -} - -export const USER_TYPE = { - REGULAR_USER: 'user', - ADMIN: 'admin', - PROBLEM_ADMIN:'problem_admin', - SUPER_ADMIN: 'root' -} - - -export const STORAGE_KEY = { - AUTHED: 'authed', - PROBLEM_CODE_AND_SETTING: 'hojProblemCodeAndSetting', - languages: 'languages', - CONTEST_ANNOUNCE:'hojContestAnnounce', - individualLanguageAndSetting:'hojIndividualLanguageAndSetting', - CONTEST_RANK_CONCERNED:'hojContestRankConcerned' -} - -export function buildIndividualLanguageAndSettingKey () { - return `${STORAGE_KEY.individualLanguageAndSetting}` -} - -export function buildProblemCodeAndSettingKey (problemID, contestID = null) { - if (contestID) { - return `${STORAGE_KEY.PROBLEM_CODE_AND_SETTING}_${contestID}_${problemID}` - } - return `${STORAGE_KEY.PROBLEM_CODE_AND_SETTING}_NoContest_${problemID}` -} - -export function buildContestAnnounceKey (uid, contestID) { - return `${STORAGE_KEY.CONTEST_ANNOUNCE}_${uid}_${contestID}` -} - -export function buildContestRankConcernedKey(contestID) { - return `${STORAGE_KEY.CONTEST_RANK_CONCERNED}_${contestID}` -} - diff --git a/src/hoj-vue/src/common/filters.js b/src/hoj-vue/src/common/filters.js deleted file mode 100644 index 88a483e..0000000 --- a/src/hoj-vue/src/common/filters.js +++ /dev/null @@ -1,52 +0,0 @@ -import moment from 'moment' -import utils from './utils' -import time from './time' -import {PROBLEM_LEVEL} from './constants' - -// 友好显示时间 -function fromNow (time) { - return moment(time).fromNow() -} - -function parseRole(num){ - if(num==1000){ - return '超级管理员' - }else if(num==1001){ - return '普通管理员' - }else if(num==1002){ - return '用户(默认)' - }else if(num==1003){ - return '用户(禁止提交)' - }else if(num==1004){ - return '用户(禁止发讨论)' - }else if(num==1005){ - return '用户(禁言)' - }else if(num==1006){ - return '用户(禁止提交&禁止发讨论)' - }else if(num==1007){ - return '用户(禁止提交&禁言)' - }else if(num==1008){ - return '题目管理员' - } -} -function parseContestType(num){ - if(num==0){ - return 'ACM' - }else if(num==1){ - return 'OI' - } -} - -function parseProblemLevel(num){ - return PROBLEM_LEVEL[num].name; -} - -export default { - submissionMemory: utils.submissionMemoryFormat, - submissionTime: utils.submissionTimeFormat, - localtime: time.utcToLocal, - fromNow: fromNow, - parseContestType:parseContestType, - parseRole:parseRole, - parseProblemLevel:parseProblemLevel, -} diff --git a/src/hoj-vue/src/common/highlight.js b/src/hoj-vue/src/common/highlight.js deleted file mode 100644 index d1d7604..0000000 --- a/src/hoj-vue/src/common/highlight.js +++ /dev/null @@ -1,26 +0,0 @@ -import hljs from 'highlight.js' -import 'highlight.js/styles/atom-one-light.css' - -export default { - install (Vue, options) { - Vue.directive('highlight', { - deep: true, - bind: function (el, binding) { - Array.from(el.querySelectorAll('pre code')).forEach((target) => { - if (binding.value) { - target.textContent = binding.value - } - hljs.highlightBlock(target) - }) - }, - componentUpdated: function (el, binding) { - Array.from(el.querySelectorAll('pre code')).forEach((target) => { - if (binding.value) { - target.textContent = binding.value - } - hljs.highlightBlock(target) - }) - } - }) - } -} diff --git a/src/hoj-vue/src/common/katex.js b/src/hoj-vue/src/common/katex.js deleted file mode 100644 index dc7be22..0000000 --- a/src/hoj-vue/src/common/katex.js +++ /dev/null @@ -1,36 +0,0 @@ -import 'katex' -import renderMathInElement from 'katex/contrib/auto-render/auto-render' -import 'katex/dist/katex.min.css' - -function _ () { -} - -const defaultOptions = { - errorCallback: _, - throwOnError: false, - delimiters: [ - {left: '$', right: '$', display: false}, - {left: '$$', right: '$$', display: true}, - {left: '\\[', right: '\\]', display: true}, - {left: '\\(', right: '\\)', display: false} - ], - ignoredTags:["script", "noscript", "style", "textarea", "code", "option",], -} - -function render (el, binding) { - let options = {} - if (binding.value) { - options = binding.value.options || {} - } - Object.assign(options, defaultOptions) - renderMathInElement(el, options) -} - -export default { - install: function (Vue, options) { - Vue.directive('katex', { - bind: render, - componentUpdated: render - }) - } -} diff --git a/src/hoj-vue/src/common/logo.js b/src/hoj-vue/src/common/logo.js deleted file mode 100644 index 9e7beff..0000000 --- a/src/hoj-vue/src/common/logo.js +++ /dev/null @@ -1,15 +0,0 @@ -export const LOGO = -" _ _ _____ ____ _____ ______ \n"+ -" | | | |/ ____/ __ \| __ \| ____| \n"+ -" | |__| | | | | | | | | | |__ \n"+ -" | __ | | | | | | | | | __| \n"+ -" | | | | |___| |__| | |__| | |____ \n"+ -" |_| |_|\_____\____/|_____/|______| \n"+ -" Hcode Online Judge(HOJ)"+"\n"+ -" @Author Himit_ZH"+"\n"+ -" QQ Group: 598587305"+"\n"+ -" ->Github<- https://www.github.com/HimitZH/HOJ"+"\n"+ -" ->Gitee<- https://gitee.com/himitzh0730/hoj"; - -export const MOTTO = -" Welcome to Use HOJ, Dream in Code!"; \ No newline at end of file diff --git a/src/hoj-vue/src/common/message.js b/src/hoj-vue/src/common/message.js deleted file mode 100644 index e13a3c6..0000000 --- a/src/hoj-vue/src/common/message.js +++ /dev/null @@ -1,42 +0,0 @@ -import Vue from 'vue' - -let messageInstance = null; - -const message=function(type,msg,duration=3000){ - if(messageInstance !=null){ - messageInstance.close() - } - messageInstance = Vue.prototype.$msg({ type: type, message: msg, zIndex: 3000 ,position:'top-center',duration:duration}) - return messageInstance -} - - -const error = function (msg) { - return message('error',msg) -} - -const success = function (msg) { - return message('success',msg) -} - -const info = function (msg) { - return message('info',msg) -} - -const warning = function (msg) { - return message('warning',msg) -} -const loading = function(msg){ - return message('loading',msg) -} - -const mMessage = { - error, - success, - info, - warning, - loading, - message -} - -export default mMessage; \ No newline at end of file diff --git a/src/hoj-vue/src/common/storage.js b/src/hoj-vue/src/common/storage.js deleted file mode 100644 index 77e7308..0000000 --- a/src/hoj-vue/src/common/storage.js +++ /dev/null @@ -1,37 +0,0 @@ -const localStorage = window.localStorage - -export default { - name: 'storage', - - /** - * save value(Object) to key - * @param {string} key 键 - * @param {Object} value 值 - */ - set (key, value) { - localStorage.setItem(key, JSON.stringify(value)) - }, - - /** - * get value(Object) by key - * @param {string} key 键 - * @return {Object} - */ - get (key) { - return JSON.parse(localStorage.getItem(key)) || null - }, - - /** - * remove key from localStorage - * @param {string} key 键 - */ - remove (key) { - localStorage.removeItem(key) - }, - /** - * clear all - */ - clear () { - localStorage.clear() - } -} diff --git a/src/hoj-vue/src/common/time.js b/src/hoj-vue/src/common/time.js deleted file mode 100644 index 4ea41d5..0000000 --- a/src/hoj-vue/src/common/time.js +++ /dev/null @@ -1,79 +0,0 @@ -import moment from 'moment' -import i18n from '@/i18n' -// 全局设定语言 -moment.locale(i18n.locale); - - -// convert utc time to localtime -function utcToLocal (utcDt, format = 'YYYY-MM-DD HH:mm:ss') { - return moment.utc(utcDt).local().format(format) -} - -// get duration from startTime to endTime, return like 3 days, 2 hours, one year .. -function duration (startTime, endTime) { - let start = moment(startTime) - let end = moment(endTime) - let duration = moment.duration(start.diff(end, 'seconds'), 'seconds') - return duration.humanize() -} - -function formatSpecificDuration(startTime, endTime){ - let start = moment(startTime) - let end = moment(endTime) - let ms = moment.duration(start.diff(end, 'seconds'), 'seconds') - if (ms < 0) ms = -ms; - let arr=[86400000,3600000,60000,1000]; - let en_time=['day','hour','minute','second']; - let zh_time=['天','小时','分钟','秒']; - - let res = ''; - - if(i18n.locale=='en-US'){ - for(let i=0;i=1){ - res+=tmp+' '+en_time[i]; - if(tmp!=1){ - res+='s'; - } - return res; - } - } - }else if(i18n.locale=='zh-CN'){ - - for(let i=0;i=1){ - return tmp+zh_time[i]; - } - } - } -}; - - -function formatDuration(time){ - let duration = moment.duration(time) - return duration.humanize() -} - -function secondFormat (time) { - let m = moment.duration(time, 'seconds') - let seconds = m.seconds()>=10?m.seconds():'0'+m.seconds(); - let hours = Math.floor(m.asHours())>=10?Math.floor(m.asHours()):'0'+Math.floor(m.asHours()); - let minutes = m.minutes()>=10?m.minutes():'0'+m.minutes(); - return hours + ':' + minutes + ':' + seconds; -} - -function durationMs (startTime, endTime) { // 计算时间段的时间戳 - let start = moment(startTime) - let end = moment(endTime) - return end.diff(start, 'seconds'); -} -export default { - utcToLocal: utcToLocal, - duration: duration, - formatSpecificDuration:formatSpecificDuration, - secondFormat: secondFormat, - durationMs:durationMs, - formatDuration:formatDuration -} diff --git a/src/hoj-vue/src/common/utils.js b/src/hoj-vue/src/common/utils.js deleted file mode 100644 index 2983f9a..0000000 --- a/src/hoj-vue/src/common/utils.js +++ /dev/null @@ -1,187 +0,0 @@ -import Vue from 'vue' -import storage from '@/common/storage' -import { STORAGE_KEY,PROBLEM_LEVEL } from '@/common/constants' -import myMessage from '@/common/message' -import api from "@/common/api"; -import store from '@/store' - -// function submissionMemoryFormat (memory) { -// if (memory === undefined || memory ===null || memory === '') return '--' -// // 1048576 = 1024 * 1024 -// let t = parseInt(memory) -// return String(t.toFixed(0)) + 'KB' -// } -function submissionMemoryFormat(a,b){ - if(a ===null || a === ''||a=== undefined)return"--"; - if(a===0) return"0 KB"; - var c=1024,d=b||1,e=["KB","MB","GB","TB","PB","EB","ZB","YB"], - f=Math.floor(Math.log(a)/Math.log(c)); - return parseFloat((a/Math.pow(c,f)).toFixed(d))+" "+e[f] -} - -function submissionTimeFormat (time) { - if (time === undefined || time === null || time === '') return '--' - return time + 'ms' -} - -function submissionLengthFormat(length){ - if (length === undefined || length ===null || length === '') return '--' - return length + 'B' -} - -function getACRate (acCount, totalCount) { - let rate = totalCount === 0 ? 0.00 : (acCount / totalCount * 100).toFixed(2) - return String(rate) + '%' -} - -// 去掉值为空的项,返回object -function filterEmptyValue (object) { - let query = {} - Object.keys(object).forEach(key => { - if (object[key] || object[key] === 0 || object[key] === false) { - query[key] = object[key] - } - }) - return query -} - -// 按指定字符数截断添加换行,非英文字符按指定字符的半数截断 -function breakLongWords (value, length = 16) { - let re - if (escape(value).indexOf('%u') === -1) { - // 没有中文 - re = new RegExp('(.{' + length + '})', 'g') - } else { - // 中文字符 - re = new RegExp('(.{' + (parseInt(length / 2) + 1) + '})', 'g') - } - return value.replace(re, '$1\n') -} - -function downloadFile (url) { - return new Promise((resolve, reject) => { - Vue.prototype.$axios.get(url, {responseType: 'blob',timeout: 5 * 60 * 1000}).then(resp => { - let headers = resp.headers - if (headers['content-type'].indexOf('json') !== -1) { - let fr = new window.FileReader() - if (resp.data.error) { - myMessage.error(resp.data.error) - } - fr.onload = (event) => { - let data = JSON.parse(event.target.result) - if (data.msg) { - myMessage.info(data.msg) - } else { - myMessage.error('Invalid file format') - } - } - let b = new window.Blob([resp.data], {type: 'application/json'}) - fr.readAsText(b) - return - } - let link = document.createElement('a') - link.href = window.URL.createObjectURL(new window.Blob([resp.data], {type: headers['content-type']})) - link.download = (headers['content-disposition'] || '').split('filename=')[1] - document.body.appendChild(link) - link.click() - link.remove() - myMessage.success("Downloading...") - resolve() - }).catch((error) => { - reject(error) - }) - }) -} - -function downloadFileByText (fileName,fileContent) { - return new Promise((resolve, reject) => { - let link = document.createElement('a') - link.href = window.URL.createObjectURL(new window.Blob([fileContent], {type:'text/plain;charset=utf-8'})) - link.download = fileName - document.body.appendChild(link) - link.click() - link.remove() - myMessage.success("Download Successfully!") - resolve() - }) -} - -function getLanguages (all=true) { - return new Promise((resolve, reject) => { - let languages = storage.get(STORAGE_KEY.languages) - if (languages) { - resolve(languages) - }else{ - api.getAllLanguages(all).then(res=>{ - let langs = res.data.data - storage.set(STORAGE_KEY.languages,langs); - resolve(langs); - },err=>{ - reject(err) - }) - } - }) -} - -function stringToExamples(value){ - let reg = "([\\s\\S]*?)([\\s\\S]*?)"; - let re = RegExp(reg,"g"); - let objList = [] - let tmp; - while(tmp=re.exec(value)){ - objList.push({input:tmp[1],output:tmp[2]}) - } - return objList -} - -function examplesToString(objList){ - if(objList.length == 0){ - return ""; - } - let result="" - for(let obj of objList){ - result+= ""+obj.input+""+obj.output+"" - } - return result -} - -function getLevelColor(difficulty) { - if (difficulty != undefined && difficulty != null) { - if (PROBLEM_LEVEL[difficulty]) { - return ( - 'color: #fff !important;background-color:' + - PROBLEM_LEVEL[difficulty]['color'] + - ' !important;' - ); - } else { - return 'color: #fff !important;background-color: rgb(255, 153, 0)!important;'; - } - } -} -function getLevelName(difficulty) { - if ( - difficulty != undefined && - difficulty != null && - PROBLEM_LEVEL[difficulty] - ) { - return PROBLEM_LEVEL[difficulty]['name'][store.getters.webLanguage]; - } else { - return 'unknown [' + difficulty + ']'; - } -} - -export default { - submissionMemoryFormat: submissionMemoryFormat, - submissionTimeFormat: submissionTimeFormat, - submissionLengthFormat:submissionLengthFormat, - getACRate: getACRate, - filterEmptyValue: filterEmptyValue, - breakLongWords: breakLongWords, - downloadFile: downloadFile, - downloadFileByText:downloadFileByText, - getLanguages:getLanguages, - stringToExamples:stringToExamples, - examplesToString:examplesToString, - getLevelColor:getLevelColor, - getLevelName:getLevelName -} diff --git a/src/hoj-vue/src/components/admin/Accordion.vue b/src/hoj-vue/src/components/admin/Accordion.vue deleted file mode 100644 index d478fb0..0000000 --- a/src/hoj-vue/src/components/admin/Accordion.vue +++ /dev/null @@ -1,91 +0,0 @@ - - - - - diff --git a/src/hoj-vue/src/components/admin/AddExtraFile.vue b/src/hoj-vue/src/components/admin/AddExtraFile.vue deleted file mode 100644 index 4cb4ac4..0000000 --- a/src/hoj-vue/src/components/admin/AddExtraFile.vue +++ /dev/null @@ -1,146 +0,0 @@ - - - - diff --git a/src/hoj-vue/src/components/admin/AddPublicProblem.vue b/src/hoj-vue/src/components/admin/AddPublicProblem.vue deleted file mode 100644 index 0d66790..0000000 --- a/src/hoj-vue/src/components/admin/AddPublicProblem.vue +++ /dev/null @@ -1,170 +0,0 @@ - - - diff --git a/src/hoj-vue/src/components/admin/CodeMirror.vue b/src/hoj-vue/src/components/admin/CodeMirror.vue deleted file mode 100644 index 2eb7e80..0000000 --- a/src/hoj-vue/src/components/admin/CodeMirror.vue +++ /dev/null @@ -1,107 +0,0 @@ - - - - diff --git a/src/hoj-vue/src/components/admin/Editor.vue b/src/hoj-vue/src/components/admin/Editor.vue deleted file mode 100644 index 9b2ad58..0000000 --- a/src/hoj-vue/src/components/admin/Editor.vue +++ /dev/null @@ -1,193 +0,0 @@ - - - diff --git a/src/hoj-vue/src/components/admin/KatexEditor.vue b/src/hoj-vue/src/components/admin/KatexEditor.vue deleted file mode 100644 index 355465e..0000000 --- a/src/hoj-vue/src/components/admin/KatexEditor.vue +++ /dev/null @@ -1,45 +0,0 @@ - - - - - diff --git a/src/hoj-vue/src/components/admin/RemoteJudgeAccount.vue b/src/hoj-vue/src/components/admin/RemoteJudgeAccount.vue deleted file mode 100644 index db1efa3..0000000 --- a/src/hoj-vue/src/components/admin/RemoteJudgeAccount.vue +++ /dev/null @@ -1,133 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/hoj-vue/src/components/admin/infoCard.vue b/src/hoj-vue/src/components/admin/infoCard.vue deleted file mode 100644 index 5b0ce78..0000000 --- a/src/hoj-vue/src/components/admin/infoCard.vue +++ /dev/null @@ -1,90 +0,0 @@ - - - - - diff --git a/src/hoj-vue/src/components/oj/comment/comment.vue b/src/hoj-vue/src/components/oj/comment/comment.vue deleted file mode 100644 index 205da35..0000000 --- a/src/hoj-vue/src/components/oj/comment/comment.vue +++ /dev/null @@ -1,1279 +0,0 @@ - - - - - - - diff --git a/src/hoj-vue/src/components/oj/comment/emoji.json b/src/hoj-vue/src/components/oj/comment/emoji.json deleted file mode 100644 index 91dca10..0000000 --- a/src/hoj-vue/src/components/oj/comment/emoji.json +++ /dev/null @@ -1 +0,0 @@ -["😀","😄","😁","😆","😅","🤣","😂","🙂","🙃","😉","😊","😇","🥰","😍","🤩","😘","😗","😚","😙","😋","😛","😜","🤪","😝","🤑","🤗","🤭","🤫","🤔","🤐","🤨","😐","😶","😶‍🌫️","😏","😒","🙄","😬","😮‍💨","🤥","😌","😔","😪","🤤","😴","😷","🤒","🤕","🤢","🤮","🤧","🥵","🥶","🥴","😵","😵‍💫","🤯","🤠","🥳","😎","🤓","🧐","😕","😟","🙁","☹️","😮","😯","😲","😳","🥺","😦","😧","😨","😰","😥","😢","😭","😱","😖","😣","😞","😓","😩","😫","🥱","😤","😡","😠","🤬","😈","👿","💀","☠️","💩","🤡","👹","👺","👻","👽","👾","🤖","😺","😸","😹","😻","😼","😽","🙀","😿","😾","🙈","🙉","🙊","💋","💌","💘","💝","💖","💗","💓","💞","💕","💟","❣️","❣","💔","❤️‍🔥","❤‍🩹","❤️","❤","🧡","💛","💚","💙","💜","🤎","🖤","🤍","💯","💢","💥","💫","💦","💨","🕳️","🕳","💣","💬","👁️‍🗨️","🗨️","🗨","🗯️","🗯","💭","💤","🙋","🙇","🙌","🙏","🚶","🏃","👯","💃","👫","👬","👭","💏","💑","👪","💪","👈","👉","☝","👆","👇","✌","✋","👌","👍","👎","✊","👊","👋","👏","👐","✍","🐁","🐂","🐅","🐇","🐉","🐍","🐎","🐐","🐒","🐓","🐕","🐖","💐","🌸","💮","🌹","🌺","🌻","🌼","🌷","🌱","🌿","🍀"] \ No newline at end of file diff --git a/src/hoj-vue/src/components/oj/common/Announcements.vue b/src/hoj-vue/src/components/oj/common/Announcements.vue deleted file mode 100644 index 43ad358..0000000 --- a/src/hoj-vue/src/components/oj/common/Announcements.vue +++ /dev/null @@ -1,236 +0,0 @@ - - - - - diff --git a/src/hoj-vue/src/components/oj/common/CodeMirror.vue b/src/hoj-vue/src/components/oj/common/CodeMirror.vue deleted file mode 100644 index f1d24f2..0000000 --- a/src/hoj-vue/src/components/oj/common/CodeMirror.vue +++ /dev/null @@ -1,834 +0,0 @@ - - - - - - diff --git a/src/hoj-vue/src/components/oj/common/Highlight.vue b/src/hoj-vue/src/components/oj/common/Highlight.vue deleted file mode 100644 index 2b3dea1..0000000 --- a/src/hoj-vue/src/components/oj/common/Highlight.vue +++ /dev/null @@ -1,50 +0,0 @@ - - - - - diff --git a/src/hoj-vue/src/components/oj/common/Login.vue b/src/hoj-vue/src/components/oj/common/Login.vue deleted file mode 100644 index e022e3e..0000000 --- a/src/hoj-vue/src/components/oj/common/Login.vue +++ /dev/null @@ -1,217 +0,0 @@ - - - diff --git a/src/hoj-vue/src/components/oj/common/Marquee.vue b/src/hoj-vue/src/components/oj/common/Marquee.vue deleted file mode 100644 index af392ce..0000000 --- a/src/hoj-vue/src/components/oj/common/Marquee.vue +++ /dev/null @@ -1,80 +0,0 @@ - - - - - diff --git a/src/hoj-vue/src/components/oj/common/NavBar.vue b/src/hoj-vue/src/components/oj/common/NavBar.vue deleted file mode 100644 index 8a500aa..0000000 --- a/src/hoj-vue/src/components/oj/common/NavBar.vue +++ /dev/null @@ -1,845 +0,0 @@ - - - diff --git a/src/hoj-vue/src/components/oj/common/Pagination.vue b/src/hoj-vue/src/components/oj/common/Pagination.vue deleted file mode 100644 index 418a8c3..0000000 --- a/src/hoj-vue/src/components/oj/common/Pagination.vue +++ /dev/null @@ -1,94 +0,0 @@ - - - - - diff --git a/src/hoj-vue/src/components/oj/common/Register.vue b/src/hoj-vue/src/components/oj/common/Register.vue deleted file mode 100644 index 0242c20..0000000 --- a/src/hoj-vue/src/components/oj/common/Register.vue +++ /dev/null @@ -1,315 +0,0 @@ - - - diff --git a/src/hoj-vue/src/components/oj/common/ResetPassword.vue b/src/hoj-vue/src/components/oj/common/ResetPassword.vue deleted file mode 100644 index db0cc8b..0000000 --- a/src/hoj-vue/src/components/oj/common/ResetPassword.vue +++ /dev/null @@ -1,208 +0,0 @@ - - - diff --git a/src/hoj-vue/src/components/oj/group/AddGroupProblem.vue b/src/hoj-vue/src/components/oj/group/AddGroupProblem.vue deleted file mode 100644 index 3ae1c90..0000000 --- a/src/hoj-vue/src/components/oj/group/AddGroupProblem.vue +++ /dev/null @@ -1,87 +0,0 @@ - - diff --git a/src/hoj-vue/src/components/oj/group/AddPublicProblem.vue b/src/hoj-vue/src/components/oj/group/AddPublicProblem.vue deleted file mode 100644 index b2e0cb2..0000000 --- a/src/hoj-vue/src/components/oj/group/AddPublicProblem.vue +++ /dev/null @@ -1,190 +0,0 @@ - - - diff --git a/src/hoj-vue/src/components/oj/group/Announcement.vue b/src/hoj-vue/src/components/oj/group/Announcement.vue deleted file mode 100644 index a5de964..0000000 --- a/src/hoj-vue/src/components/oj/group/Announcement.vue +++ /dev/null @@ -1,203 +0,0 @@ - - - - - diff --git a/src/hoj-vue/src/components/oj/group/AnnouncementList.vue b/src/hoj-vue/src/components/oj/group/AnnouncementList.vue deleted file mode 100644 index 677205d..0000000 --- a/src/hoj-vue/src/components/oj/group/AnnouncementList.vue +++ /dev/null @@ -1,354 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/hoj-vue/src/components/oj/group/Contest.vue b/src/hoj-vue/src/components/oj/group/Contest.vue deleted file mode 100644 index ad6f1ae..0000000 --- a/src/hoj-vue/src/components/oj/group/Contest.vue +++ /dev/null @@ -1,659 +0,0 @@ - - - - diff --git a/src/hoj-vue/src/components/oj/group/ContestList.vue b/src/hoj-vue/src/components/oj/group/ContestList.vue deleted file mode 100644 index 09b9528..0000000 --- a/src/hoj-vue/src/components/oj/group/ContestList.vue +++ /dev/null @@ -1,313 +0,0 @@ - - - diff --git a/src/hoj-vue/src/components/oj/group/DiscussionList.vue b/src/hoj-vue/src/components/oj/group/DiscussionList.vue deleted file mode 100644 index 6e94b47..0000000 --- a/src/hoj-vue/src/components/oj/group/DiscussionList.vue +++ /dev/null @@ -1,248 +0,0 @@ - - - - - diff --git a/src/hoj-vue/src/components/oj/group/MemberList.vue b/src/hoj-vue/src/components/oj/group/MemberList.vue deleted file mode 100644 index 6a0b5c7..0000000 --- a/src/hoj-vue/src/components/oj/group/MemberList.vue +++ /dev/null @@ -1,288 +0,0 @@ - - - - - diff --git a/src/hoj-vue/src/components/oj/group/Problem.vue b/src/hoj-vue/src/components/oj/group/Problem.vue deleted file mode 100644 index 0924c63..0000000 --- a/src/hoj-vue/src/components/oj/group/Problem.vue +++ /dev/null @@ -1,1499 +0,0 @@ - - - - - diff --git a/src/hoj-vue/src/components/oj/group/ProblemList.vue b/src/hoj-vue/src/components/oj/group/ProblemList.vue deleted file mode 100644 index 45c3015..0000000 --- a/src/hoj-vue/src/components/oj/group/ProblemList.vue +++ /dev/null @@ -1,459 +0,0 @@ - - - diff --git a/src/hoj-vue/src/components/oj/group/Training.vue b/src/hoj-vue/src/components/oj/group/Training.vue deleted file mode 100644 index 111e93d..0000000 --- a/src/hoj-vue/src/components/oj/group/Training.vue +++ /dev/null @@ -1,320 +0,0 @@ - - - - - diff --git a/src/hoj-vue/src/components/oj/group/TrainingList.vue b/src/hoj-vue/src/components/oj/group/TrainingList.vue deleted file mode 100644 index 830302b..0000000 --- a/src/hoj-vue/src/components/oj/group/TrainingList.vue +++ /dev/null @@ -1,208 +0,0 @@ - - - \ No newline at end of file diff --git a/src/hoj-vue/src/components/oj/group/TrainingProblemList.vue b/src/hoj-vue/src/components/oj/group/TrainingProblemList.vue deleted file mode 100644 index 3340dc1..0000000 --- a/src/hoj-vue/src/components/oj/group/TrainingProblemList.vue +++ /dev/null @@ -1,292 +0,0 @@ - - - diff --git a/src/hoj-vue/src/components/oj/msg/msgSvg.vue b/src/hoj-vue/src/components/oj/msg/msgSvg.vue deleted file mode 100644 index dc6f5e3..0000000 --- a/src/hoj-vue/src/components/oj/msg/msgSvg.vue +++ /dev/null @@ -1,23 +0,0 @@ - - - diff --git a/src/hoj-vue/src/components/oj/setting/Account.vue b/src/hoj-vue/src/components/oj/setting/Account.vue deleted file mode 100644 index c5cf442..0000000 --- a/src/hoj-vue/src/components/oj/setting/Account.vue +++ /dev/null @@ -1,428 +0,0 @@ - - - - - diff --git a/src/hoj-vue/src/components/oj/setting/UserInfo.vue b/src/hoj-vue/src/components/oj/setting/UserInfo.vue deleted file mode 100644 index c69b1e7..0000000 --- a/src/hoj-vue/src/components/oj/setting/UserInfo.vue +++ /dev/null @@ -1,454 +0,0 @@ - - - - - diff --git a/src/hoj-vue/src/i18n/admin/en-US.js b/src/hoj-vue/src/i18n/admin/en-US.js deleted file mode 100644 index 09960ea..0000000 --- a/src/hoj-vue/src/i18n/admin/en-US.js +++ /dev/null @@ -1,442 +0,0 @@ -export const m = { - Tips: 'Tips', - Warning: 'Warning', - Successfully: 'Successfully', - // /views/admin/Login.vue - Welcome_to_Login_Admin: 'Welcome to Login Background Management System', - Login: 'Login', - Please_enter_username: 'Please enter username', - Please_enter_password: 'Please enter password', - Admin_Login_Success: 'Dear administrator, welcome back~', - Please_check_your_username_or_password: 'Please check your username or password', - - // /views/admin/Home.vue - Dashboard: 'Dashboard', - General: 'General', - User_Admin: 'Admin User', - Auth_Admin: 'Auth Admin', - Announcement_Admin: 'Announcement', - System_Config: 'System Config', - System_Switch:'System Switch', - Problem_Admin: 'Problem', - Problem_List: 'Problem List', - Create_Problem: 'Create Problem', - Admin_Group_Apply_Problem:'Group Problem Examine', - Export_Import_Problem: 'Export | Import Problem', - Training_Admin: 'Training', - Training_List: 'Training List', - Create_Training: 'Create Training', - Admin_Category: 'Admin Category', - Contest_Admin: 'Contest', - Contest_List: 'Contest List', - Create_Contest: 'Create Contest', - Discussion: 'Discussion', - Discussion_Admin: 'Admin Discussion', - Home_Page: 'Home Page', - Logout: 'Logout', - Log_Out_Successfully: 'Log out successfully', - - // /views/admin/Dashboard.vue - Last_Login: 'Last Login', - Super_Admin: 'Super Admin', - Admin: 'Admin', - All_Problem_Admin: 'Problem Admin', - Total_Users: 'Total Users', - Today_Submissions: 'Today Submissions', - Recent_14_Days_Contests: 'Recent 14 Days Contests', - Backend_System: 'Backend System', - Server_Number: 'Server Number', - Nacos_Status: 'Nacos Status', - HTTPS_Status: 'HTTPS Status', - Backend_Service: 'Backend Service', - Name: 'Name', - Host: 'Host', - Port: 'Port', - CPU_Core: 'CPU Core', - CPU_Usage: 'CPU Usage', - Mem_Usage: 'Mem Usage', - Healthy: 'Healthy', - Secure: 'Secure', - Healthy_Status: 'Healthy', - Unhealthy: 'Unhealthy', - Judge_Server: 'Judge Server', - - // /views/admin/general/User.vue - General_User: 'User', - Created_Time: 'Created Time', - Delete: 'Delete', - OnlyAdmin: 'OnlyAdmin', - User_Type: 'User Type', - Normal: 'Normal', - Disable: 'Disable', - Edit_User: 'Edit User', - Delete_User: 'Delete User', - Import_User: 'Import User', - Import_User_Tips1: 'The imported user data only supports user data in CSV format.', - Import_User_Tips2: 'There are seven columns of data: username, password, email, realname and gender. The username and password cannot be empty, others can be enmpty, otherwise the data in this row may fail to be imported.', - Import_User_Tips3:'The first line does not need to write the seven column names ("username", "password", "email","realname","gender","nickname","school").', - Import_User_Tips4: 'If the gender is male, please use "male" or "0", if the gender is female, please use "female" or "1". If it is not filled in, it is assumed to be "secrecy".', - Import_User_Tips5: 'Please import the file saved as UTF-8 code, otherwise Chinese may be garbled.', - Choose_File: 'Choose File', - Password: 'Password', - Upload_All: 'Upload All', - Clear_All: 'Clear All', - Generate_User: 'Generate User', - Prefix: 'Prefix', - Suffix: 'Suffix', - Start_Number: 'Start Number', - End_Number: 'End Number', - Extra_Account: 'Extra Accounts Allowed to The Contest', - Extra_Account_Tips: 'Please enter the username of the account allowed to enter to the contest, separated by spaces.', - Password_Length: 'Password Length', - Generate_and_Export: 'Generate & Export', - The_usernames_will_be: 'The usernames will be', - Set_New_PWD: 'Set PWD', - General_New_Password: 'New PWD', - Title_Color: 'Title Color', - Title_Name: 'Title Name', - The_end_number_cannot_be_less_than_the_start_number: 'The end number cannot be less than the start number', - Please_select_6_to_25_characters_for_password_length: 'Please select 6 ~ 25 characters for password length', - Start_Number_Required: 'The Start Number is required.', - End_Number_Required: 'The End Number is required.', - Password_Length_Checked: 'Password length must be numeric', - Delete_User_Tips: 'Are you sure you want to delete this user? May be associated to delete the user created announcements, topics, competitions, etc.', - The_number_of_users_selected_cannot_be_empty: 'The number of users selected cannot be empty', - Error_Please_check_your_choice: 'Wrong, please check your choice.', - Generate_User_Success: 'All users in the specified format have been created successfully, and the user table has been downloaded to your computer successfully!', - Generate_Skipped_Reason: 'rows user data are filtered because it may be an empty row or a column(username or password) value is empty.', - Upload_Users_Successfully: 'Upload Users Successfully', - - // /views/admin/general/Auth.vue - General_Auth: 'Auth', - Auth: 'Auth', - Create_Auth: 'Create Auth', - Edit_Auth: 'Edit Auth', - Auth_Name: 'Name', - Auth_Permission: 'Permission', - Role_Auth: 'Role Auth', - Role: 'Role', - Auth_Id: 'Auth ID', - Create_Role_Auth: 'Create Role Auth', - Delete_Auth: 'Delete Auth', - Delete_Auth_Tips: 'Are you sure you want to delete this auth?', - - // /views/admin/general/Announcement.vue - General_Announcement: 'Announcement', - Create: 'Create', - Modified_Time: 'Modified Time', - Edit_Announcement: 'Edit Announcement', - Create_Announcement: 'Create Announcement', - Delete_Announcement: 'Delete Announcement', - Announcement_Title: 'Title', - Announcement_Content: 'Content', - Announcement_visible: 'Visible', - Delete_Announcement_Tips: 'Are you sure you want to delete this announcement?', - - // /views/admin/general/SysNotice.vue - SysNotice: 'Notification', - Notice_Admin: 'Notification', - Push_System_Notification_Every_Hour: 'Tips: Push System Notification Every Hour', - Edit_Notice: 'Edit Notification', - Create_Notice: 'Create Notification', - Delete_Notice: 'Delete Notification', - Notice_Title: 'Notification Title', - Notice_Content: 'Notification Content', - Notice_Push: 'Pushed', - Notice_Recipient: 'Recipient', - All_User: 'All User', - Designated_User: 'Designated User', - All_Admin: 'Admin', - Delete_Notice_Tips: 'Are you sure you want to delete this notification?', - - // /views/admin/general/SystemConfig.vue - Website_Config: 'Website Config', - Base_Url: 'Base Url', - Web_Name: 'Web Name', - Short_Name: 'Short Name', - Record_Name: 'Record Name', - Record_Url: 'Record Url', - Project_Name: 'Project Name', - Project_Url: 'Project Url', - Web_Desc: 'Web Desc', - Allow_Register: 'Allow Register', - Home_Rotation_Chart: 'Home Rotation Chart', - SMTP_Config: 'SMTP Config', - Email_BG: 'BG IMG', - Email_BG_Desc: 'SMTP Template Background IMG Address', - Send_Test_Email: 'Send Test Email', - Email: 'Email', - Mobile_Config: 'Mobile Config', - Region_Id: 'Region ID', - Domain: 'Domain', - Access_Key_Id: 'Access Key Id', - Secret: 'Secret', - Sign_Name: 'Sign Name', - Template_Code: 'Template Code', - Send_Test_Message: 'Send Test Message', - DataSource_Config: 'DataSource Config', - Please_input_your_email: 'Please input your email', - - // /views/admin/general/SysSwitch.vue - Judge_Config:'Judge Config', - Open_Public_Judge:'Open Public Judge', - Open_Group_Judge:'Open Group Judge', - Open_Contest_Judge:'Open Contest Judge', - Non_Contest_Submission_Frequency:'Non Contest Submission Frequency(s)', - Discussion_Config:'Discussion Config', - Open_Public_Discussion:'Open Public Discussion', - Open_Group_Discussion:'Open Group Discussion', - Open_Contest_Comment:'Open Contest Comment', - Hide_Non_Contest_Submission_Code:'Hide Non Master Station Contest Submission Code', - Number_of_AC_required_for_ordinary_users_to_post:'Users can create discussion (Required AC)', - Number_of_posts_that_users_can_create_per_day:'Number of Users can create discussion per day', - Number_of_AC_required_for_Comment_of_ordinary_users:'Users can comment (Required AC)', - Group_Config:'Group Config', - Number_of_Groups_that_users_can_create_per_day:'Number of Users can create group per day', - Total_number_of_groups_that_ordinary_users_can_create:'Total number of Users can create group', - Number_of_AC_required_for_ordinary_users_to_create_group:'Users can create group (Required AC)', - Account_Config:'Account Config', - Account:'Account', - Add_Account:'Add Account', - - // /views/admin/problem/ProblemList.vue - Contest_Problem_List: 'Contest Problem List', - Display_ID: 'Display ID', - Display_Title: 'Display Title', - Original_Display: 'Original Display', - Contest_Display: 'Contest Display', - Add_Rmote_OJ_Problem: 'Add Remote OJ Problem', - Add_From_Public_Problem: 'Add From Public Problem', - ACM_Contest_Add_From_Public_Problem_Tips:'ACM Contest: Only ACM type problem and Remote Judge problem can be imported', - OI_Contest_Add_From_Public_Problem_Tips:'OI Contest: Only OI type problem and Remote Judge problem can be imported', - Auth: 'Auth', - Modified_User: 'Modified User', - All_Problem: 'All Problem', - Public_Problem: 'Public Problem', - Private_Problem: 'Private Problem', - Contest_Problem: 'Contest Problem', - Download_Testcase: 'Download Testcase', - Add_Contest_Problem: 'Add Contest Problem', - Remote_OJ: 'Remote OJ', - Add: 'Add', - Remove: 'Remove', - Delete_Problem_Tips: 'Are you sure you want to delete this problem? Note: the relevant submission data for this issue will also be deleted.', - Remove_Contest_Problem_Tips: 'Are you sure you want to remove the problem from the contest?', - Add_Successfully: 'Add Successfully', - Download_Testcase_Success: 'The testcase of this problem has been downloaded successfully!', - Enter_The_Problem_Display_ID_in_the_Contest: 'Enter The Problem Display ID in the Contest', - Problem_ID_is_required: 'Problem ID is required', - The_Problem_Display_ID_in_the_Contest_is_required: 'The Problem Display ID in the Contest is required', - Balloon_Color: 'Balloon Color', - Update_Balloon_Color_Successfully: 'Update the Balloon color of the problem successfully!', - - // /views/admin/problem/Problem.vue - Problem_Display_ID: 'Problem Display ID', - Title: 'Title', - Contest_Display_Title: 'Contest Display Title', - Contest_Display_ID: 'Contest Display ID', - Description: 'Description', - Input_Description: 'Input Description', - Output_Description: 'Output Description', - Time_Limit: 'Time Limit', - Memory_Limit: 'Memory Limit', - Stack_Limit: 'Stack Limit', - Code_Shareable: 'Code Shareable', - Languages: 'Languages', - Problem_Examples: 'Problem Examples', - Problem_Examples_Desc: 'Problem Examples: please do not have more than 2 problem examples. Problem examples are not included in the testcase.', - Problem_Example: 'Example', - Example_Input: 'Example Input', - Example_Output: 'Example Output', - Add_Example: 'Add Example', - Judge_Mode: 'Judge Mode', - General_Judge: 'General Judge', - Special_Judge: 'Special Judge', - Interactive_Judge: 'Interactive Judge', - Special_Judge_Code: 'Special Judge Program Code', - Interactive_Judge_Code: 'Interactive Judge Program Code', - General_Judge_Mode_Tips: 'General Judge: the contestant program reads the problem standard input file, executes the code logic to obtain the contestant\'s output, and compares the contents of the problem standard output file to obtain the problem judgment result', - Special_Judge_Mode_Tips: 'Special Judge: the output results required by the problem may not be unique, and different results are allowed. Therefore, a special program is needed to read standard output, player output and standard input, and compare them to obtain the final judgment result', - Interactive_Judge_Mode_Tips: 'Interactive Judge: the standard output of the interactive program is written to the standard input of the player program through the interactive channel, and the standard output of the player program is written to the standard input of the interactive program through the interactive channel. Both need to flush the output buffer', - Use_Special_Judge: 'Use Special Judge', - SPJ_Language: 'SPJ Program Language', - Interactive_Language: 'Interactive Program Langugae', - Compile: 'Compile', - Compiled_Successfully: 'Compiled Successfully', - Code_Template: 'Code Template', - Type: 'Type', - Judge_Samples: 'Judge Samples', - Problem_Sample: 'Sample', - Sample_Input: 'Sample Input', - Sample_Output: 'Sample Output', - Sample_Input_File: 'Input File', - Sample_Output_File: 'Output File', - Sample_Tips: 'Sample: the data source of the judger to test the submission.', - Add_Sample: 'Add Sample', - Use_Upload_File: 'Use Upload File', - Use_Manual_Input: 'Use Manual Input', - Hint: 'Hint', - Source: 'Source', - Auto_Remove_the_Blank_at_the_End_of_Code: 'Automatically Remove Whitespace at The End of Each Line of Code', - Publish_the_Judging_Result_of_Test_Data: 'Publish the Judging Result of Test Data', - Edit_Problem: 'Edit Problem', - Create_Problem: 'Create Problem', - Change_Judge_Mode: 'Note: switching the judgment mode may change the evaluation logic!', - Add_Tag_Error: 'The tag has been added, please do not add it repeatedly!', - - Upload_Testcase_Successfully: 'Upload Testcase Successfully', - Upload_Testcase_Failed: 'Upload Testcase Failed', - is_required: 'is required!', - Score_must_be_greater_than_or_equal_to_0: 'Score must be greater than or equal to 0!', - Score_must_be_an_integer: 'Score must be an integer!', - Spj_Or_Interactive_Code: 'Spj Or Interactive Code', - Spj_Or_Interactive_Code_not_Compile_Success: 'Spj Or Interactive Code was not compiled successfully, please compile again!', - Judge_Extra_File: 'Judge Extra File', - Judge_Extra_File_Tips1: '1. User Program: Provide additional library files for user program', - Judge_Extra_File_Tips2: '2. Special Or Interactive Program: Provide additional library files for special or interactive programs', - User_Program: 'User Program', - SPJ_Or_Interactive_Program: 'Special Or Interactive Program', - - - // /views/admin/problem/Tag.vue - Admin_Tag: 'Admin Tag', - Add_Tag: 'Add Tag', - Update_Tag: 'Update Tag', - To_Add: 'Add', - To_Update: 'Update', - Create_Training: 'Create Training', - Tag_Name: 'Tag Name', - Tag_Color: 'Tag Color', - Tag_Attribution: 'Tag Attribution', - Delete_Tag_Tips: 'Are you sure you want to delete this tag?', - Tag_Tips:'Note: By default, there is no tag classification column, and all tags are [Unclassified]. Please click [Add Tag Classification] in the upper left corner to add tag classification, and then click tag modification #Tag Classification# to classify.', - Tag_Classification:'Tag Classification', - Add_Tag_Classification: 'Add Tag Classification', - Update_Tag_Classification: 'Update Tag Classification', - Tag_Classification_Name: 'Tag Classification Name', - Tag_Classification_Rank: 'Tag Classification Rank', - Tag_Classification_Attribution: 'Tag Classification Attribution', - Delete_Tag_Classification_Tips: 'Are you sure you want to delete this tag classification? Prompt: This operation will attribute the labels under this classification to unclassified!', - Unclassified:'Unclassified', - - // /views/amdin/problem/GroupProblemList.vue - Search:'Search', - Enter_Group_ID:'Enter Group ID', - Agreed:'Agreed', - Examine:'Examine', - - - // /views/admin/training/TrainingList.vue - Update_Time: 'Update Time', - Order_Number: 'Order Number', - View_Training_Problem_List: 'View Training Problem List', - Delete_Training_Tips: 'This operation will delete the training and its submission, rank record and other data. Do you want to continue?', - - // /views/admin/training/Training.vue - Training_rank: 'Training Sort Number (Ascending Sort)', - Training_Title: 'Training Title', - Training_Description: 'Training Description', - Training_Auth: 'Training Auth', - Training_Category: 'Training Category', - Public_Training: 'Public Training', - Private_Training: 'Private Training', - Training_Password: 'Training Password', - Edit_Training: 'Edit Training', - Create_Training: 'Create Training', - Redirect_To_Category: 'The category list of current training is empty. Please go to create category first!', - Redirect: 'Redirect', - - // /views/admin/training/TrainingProblemList.vue - Training_Problem_List: 'Training Problem List', - Add_Training_Problem: 'Add Training Problem', - Remove_Training_Problem_Tips: 'Are you sure you want to remove the problem from the training?', - Training_Problem_Rank: 'Title Display Order(Ascending)', - - // /views/admin/training/Category.vue - Add_Category: 'Add Category', - Update_Category: 'Update Category', - To_Add: 'Add', - To_Update: 'Update', - Category_Name: 'Category Name', - Category_Color: 'Category Color', - Delete_Category_Tips: 'Are you sure you want to delete this category?', - - // /views/admin/problem/ImportAndExport.vue - Export_Problem: 'Export Problem', - Export: 'Export', - Import_Problem: 'Import Problem', - Import_QDOJ_Problem: 'Import QDUOJ Problem', - Import_FPS_Problem: 'Import FPS Problem', - Export_Problem_NULL_Tips: 'The problem selected for export cannot be empty', - Upload_Problem_Succeeded: 'Upload Problem Succeeded', - Upload_Problem_Failed: 'Upload Problem Failed', - - // /views/admin/contest/ContestList.vue - Start_Time: 'Start Time', - End_Time: 'End Time', - Creator: 'Creator', - Visible: 'Visible', - Info: 'Info', - View_Contest_Problem_List: 'View Contest Problem List', - View_Contest_Announcement_List: 'View Contest Announcement List', - Download_Contest_AC_Submission: 'Download Contest AC Submissions', - Exclude_admin_submissions: 'Exclude admin submissions', - SplitType_User: 'Split folders by username', - SplitType_Problem: 'Split folders by problem id', - Delete_Contest_Tips: 'This operation will delete the contest and its submission, discussion, announcement, record and other data. Do you want to continue?', - - // /views/admin/contest/Contest.vue - Contest_Title: 'Contest Title', - Contest_Description: 'Contest Description', - Contest_Start_Time: 'Start Time', - Contest_End_Time: 'End Time', - Contest_Duration: 'Contest Duration', - Contest_Rule_Type: 'Contest Rule Type', - Seal_Time_Rank: 'Seal Time Rank', - Real_Time_Rank: 'Real Time Rank', - Seal_Rank_Time: 'Seal Rank Time', - Contest_Auth: 'Contest Auth', - Contest_Password: 'Contest Password', - OI_Rank_Score_Type: 'OI RANK Score Type', - OI_Rank_Score_Type_Recent: 'Use Recent Score', - OI_Rank_Score_Type_Highest: 'Use Highest Score', - Contest_Seal_Half_Hour: 'Half an hour', - Contest_Seal_An_Hour: 'An hour', - Contest_Seal_All_Hour: 'All hours', - Auto_Real_Rank: 'Auto_Real_Rank', - Real_Rank_After_Contest: 'Real Rank After Contest', - Seal_Rank_After_Contest: 'Seal Rank After Contest', - Edit_Contest: 'Edit Contest', - Create_Contest: 'Create Contest', - Contest_Duration_Check: 'The duration of the contest cannot be less than or equal to zero!', - Contets_Time_Check: 'The start time should be earlier than the end time!', - Print_Func: 'Print Function', - Open: 'Open', - Not_Support_Print: 'Not Support Print', - Support_Offline_Print: 'Support Offline Print', - Add_Star_User_Error: 'Please do not add existing star user repeatedly!', - Star_User_UserName: 'Star User (Please use login username)', - Rank_Show_Name: 'The Name Showed in The Rank', - Show_Username: 'Username', - Show_Nickname: 'Nickname', - Show_Realname: 'Real name', - Account_Limit: 'Account Limit (Login Username)', - The_allowed_account_will_be: 'The allowed username will be ', - - // /views/admin/discussion/Discussion.vue - Discussion_ID: 'Discussion ID', - Top: 'Top', - Discussion_Report: 'Discussion Report', - Reporter: 'Reporter', - Report_Time: 'Report Time', - View_Report_content: 'View Report Content', - View_Discussion: 'View Discussion Detail', - Content: 'Content', - Report_Content: 'Report Content', - The_number_of_discussions_selected_cannot_be_empty: 'The number of discussions selected cannot be empty', - - // components/admin/AddExtraFile.vue - Delete_Extra_File_Tips: 'Are you sure you want to delete this extra file?', - File_Name: 'File Name', - File_Content: 'File Content' -} diff --git a/src/hoj-vue/src/i18n/admin/zh-CN.js b/src/hoj-vue/src/i18n/admin/zh-CN.js deleted file mode 100644 index 9f9dd38..0000000 --- a/src/hoj-vue/src/i18n/admin/zh-CN.js +++ /dev/null @@ -1,438 +0,0 @@ -export const m = { - Tips: '提示', - Warning: '警告', - Successfully: '成功', - // /views/admin/Login.vue - Welcome_to_Login_Admin: '欢迎登录后台管理系统', - Login: '登录', - Please_enter_username: '用户名', - Please_enter_password: '密码', - Admin_Login_Success: '尊敬的管理员,欢迎回来~', - Please_check_your_username_or_password: '请检查你的用户名或密码', - - // /views/admin/Home.vue - Dashboard: '仪表盘', - General: '常用设置', - User_Admin: '用户管理', - Auth_Admin: '权限管理', - Announcement_Admin: '公告管理', - System_Config: '系统配置', - System_Switch: '系统开关', - Problem_Admin: '题目管理', - Problem_List: '题目列表', - Create_Problem: '增加题目', - Admin_Group_Apply_Problem:'团队题目审批', - Export_Import_Problem: '导入|导出题目', - Training_Admin: '训练管理', - Training_List: '训练列表', - Create_Training: '创建训练', - Admin_Category: '分类管理', - Contest_Admin: '比赛管理', - Contest_List: '比赛列表', - Create_Contest: '创建比赛', - Discussion: '讨论管理', - Discussion_Admin: '讨论管理', - Home_Page: '主页', - Logout: '退出登录', - Log_Out_Successfully: '退出登录成功', - - // /views/admin/Dashboard.vue - Last_Login: '最近登录', - Super_Admin: '超级管理员', - Admin: '普通管理员', - All_Problem_Admin: '题目管理员', - Total_Users: '总用户数', - Today_Submissions: '今日总交题数', - Recent_14_Days_Contests: '最近两周比赛', - Backend_System: '后端系统', - Server_Number: '服务器数量', - Nacos_Status: 'Nacos 状态', - HTTPS_Status: 'HTTPS 状态', - Backend_Service: '后端服务', - Name: '名称', - Host: '主机', - Port: '端口', - CPU_Core: 'CPU核心数', - CPU_Usage: 'CPU使用率', - Mem_Usage: '内存使用率', - Secure: '不稳定', - Healthy_Status: '状态', - Healthy: '健康', - Unhealthy: '不健康', - Judge_Server: '判题系统', - - // /views/admin/general/User.vue - General_User: '用户管理', - Created_Time: '创建时间', - Delete: '删除', - OnlyAdmin: '仅显示管理员', - User_Type: '用户角色', - Normal: '正常', - Disable: '封禁', - Edit_User: '编辑用户', - Delete_User: '删除用户', - Import_User: '导入用户', - Import_User_Tips1: '用户数据导入仅支持csv格式的用户数据。', - Import_User_Tips2: '共七列数据:用户名和密码不能为空,邮箱、真实姓名、性别、昵称和学校可选填,否则该行数据可能导入失败。', - Import_User_Tips3:'第一行不必写(“用户名”,“密码”,“邮箱”,"真实姓名",“性别”,“昵称”,“学校”)这七个列名', - Import_User_Tips4: '性别为男请使用“male”或“0”,女请使用“female”或“1”,不填默认为“secrecy”。', - Import_User_Tips5: '请导入保存为UTF-8编码的文件,否则中文可能会乱码。', - Choose_File: '选择文件', - Password: '密码', - Upload_All: '上传全部', - Clear_All: '清除全部', - Generate_User: '生成用户', - Prefix: '前缀', - Suffix: '后缀', - Start_Number: '开始数字', - End_Number: '结束数字', - Extra_Account: '额外允许参加比赛的账号列表', - Extra_Account_Tips: '请输入允许参加比赛账号的用户名,并用空格隔开。', - Password_Length: '密码长度', - Generate_and_Export: '生成 & 导出', - The_usernames_will_be: '生成的用户名将会是', - Set_New_PWD: '设置新密码', - General_New_Password: '新密码', - Title_Color: '头衔颜色', - Title_Name: '头衔名称', - The_end_number_cannot_be_less_than_the_start_number: '结束数字不能小于开始数字', - Please_select_6_to_25_characters_for_password_length: '请输入6~25作为密码的长度', - Start_Number_Required: '开始数字不能为空', - End_Number_Required: '结束数字不能为空', - Password_Length_Checked: '密码长度必须是数字', - Delete_User_Tips: '你确定要删除该用户吗?可能会关联删除该用户创建的公告,题目,比赛等。', - The_number_of_users_selected_cannot_be_empty: '选择的用户不能为空', - Error_Please_check_your_choice: '错误,请检查你的输入或选择是否准确', - Generate_User_Success: '所有用户已经被成功创建, 用户的列表数据文件将下载到你的电脑里', - Generate_Skipped_Reason: '行用户数据被过滤,原因是可能为空行或某个列值(用户名或密码)为空', - Upload_Users_Successfully: '上传用户成功', - - // /views/admin/general/User.vue - General_Auth: '权限管理', - Auth: '权限', - Create_Auth: '创建权限', - Edit_Auth: '编辑权限', - Auth_Name: '名称', - Auth_Permission: '权限', - Role_Auth: '角色权限', - Role: '角色', - Auth_Id: '权限 ID', - Create_Role_Auth: '创建角色权限', - Delete_Auth: '删除权限', - Delete_Auth_Tips: '你确定要删除该权限吗?', - - // /views/admin/general/Announcement.vue - General_Announcement: '公告管理', - Create: '创建', - Modified_Time: '修改时间', - Edit_Announcement: '编辑公告', - Create_Announcement: '创建公告', - Delete_Announcement: '删除公告', - Announcement_Title: '公告标题', - Announcement_Content: '公告内容', - Announcement_visible: '是否可见', - Delete_Announcement_Tips: '你确定要删除该公告吗?', - - // /views/admin/general/SysNotice.vue - SysNotice: '通知管理', - Notice_Admin: '通知管理', - Push_System_Notification_Every_Hour: '提示:每小时推送一次系统通知', - Edit_Notice: '编辑通知', - Create_Notice: '创建通知', - Delete_Notice: '删除通知', - Notice_Title: '通知标题', - Notice_Content: '通知内容', - Notice_Push: '已推送', - Notice_Recipient: '接收者', - All_User: '所有用户', - Designated_User: '指定用户', - All_Admin: '管理员', - Delete_Notice_Tips: '你确定要删除该通知吗?', - - // /views/admin/general/SystemConfig.vue - Website_Config: '网站设置', - Base_Url: '基础URL', - Web_Name: '网站名称', - Short_Name: '网站简称', - Record_Name: '备案名', - Record_Url: '备案地址', - Project_Name: '项目名', - Project_Url: '项目地址', - Web_Desc: '网站简介', - Allow_Register: '是否允许注册', - Home_Rotation_Chart: '首页轮播图', - SMTP_Config: 'SMTP 设置', - Email_BG: '邮件背景', - Email_BG_Desc: '请输入邮件背景图的URL链接', - Send_Test_Email: '发送测试邮件', - Email: '邮箱', - Mobile_Config: '信息设置', - Region_Id: '区域 ID', - Domain: '域名', - Access_Key_Id: '权限代码', - Secret: '密钥', - Sign_Name: '短信签名', - Template_Code: '模板代码', - Send_Test_Message: '发送测试短信', - DataSource_Config: '数据源设置', - Please_input_your_email: '请输入你的邮箱', - - // /views/admin/general/SysSwitch.vue - Judge_Config:'评测配置', - Open_Public_Judge:'是否开启公开题目评测', - Open_Group_Judge:'是否开启团队题目评测', - Open_Contest_Judge:'是否开启比赛题目评测', - Non_Contest_Submission_Frequency:'非比赛提交评测的间隔秒数', - Discussion_Config:'讨论配置', - Open_Public_Discussion:'是否开启公开评论区', - Open_Group_Discussion:'是否开启团队评论区', - Open_Contest_Comment:'是否开启比赛讨论区', - Hide_Non_Contest_Submission_Code:'隐藏非公共比赛提交详情的代码', - Number_of_AC_required_for_ordinary_users_to_post:'普通用户发布帖子需要的AC题目数', - Number_of_posts_that_users_can_create_per_day:'普通用户每天可以创建的帖子数', - Number_of_AC_required_for_Comment_of_ordinary_users:'普通用户评论和回复需要的AC题目数', - Group_Config:'团队配置', - Number_of_Groups_that_users_can_create_per_day:'普通用户每天可以创建的团队数', - Total_number_of_groups_that_ordinary_users_can_create:'普通用户总共可以创建的团队数', - Number_of_AC_required_for_ordinary_users_to_create_group:'普通用户创建团队需要的AC题目数', - Account_Config:'账号配置', - Account:'账号', - Add_Account:'增加账号', - - // /views/admin/problem/ProblemList.vue - Contest_Problem_List: '比赛题目列表', - Display_ID: '展示ID', - Display_Title: '展示标题', - Add_Rmote_OJ_Problem: '添加远程OJ题目', - Add_From_Public_Problem: '从公共题库添加题目', - ACM_Contest_Add_From_Public_Problem_Tips:'当前比赛为ACM赛制:只支持导入ACM类型的题目和远程题目', - OI_Contest_Add_From_Public_Problem_Tips:'当前比赛为OI赛制:只支持导入OI类型的题目和远程题目', - Original_Display: '原题显示', - Contest_Display: '比赛显示', - Auth: '权限', - Modified_User: '最近修改者', - All_Problem: '全部题目', - Public_Problem: '公开题目', - Private_Problem: '隐藏题目', - Contest_Problem: '比赛题目', - Download_Testcase: '下载评测数据', - Add_Contest_Problem: '添加比赛题目', - Remote_OJ: '远程OJ', - Add: '添加', - Remove: '移除', - Delete_Problem_Tips: '确定要删除此题目吗?注意:该问题的相关数据也将被彻底删除,包括题目详情、题目的提交记录等!', - Remove_Contest_Problem_Tips: '你是否确定要将该题目移出比赛?', - Add_Successfully: '添加成功', - Download_Testcase_Success: '该题目的评测数据已经被成功下载!', - Enter_The_Problem_Display_ID_in_the_Contest: '请输入该题目在比赛中展示ID', - Problem_ID_is_required: '题目ID不能为空', - The_Problem_Display_ID_in_the_Contest_is_required: '题目在比赛中的展示ID不能为空', - Balloon_Color: '气球颜色', - Update_Balloon_Color_Successfully: '更新该题气球颜色成功!', - - // /views/admin/problem/Problem.vue - Problem_Display_ID: '题目展示ID', - Contest_Display_Title: '比赛中的展示标题', - Contest_Display_ID: '比赛中的展示ID', - Description: '描述', - Input_Description: '输入描述', - Output_Description: '输出描述', - Time_Limit: '时间限制', - Memory_Limit: '内存限制', - Stack_Limit: '栈限制', - Code_Shareable: '代码是否可分享', - Languages: '语言列表', - Problem_Examples: '题面样例', - Problem_Examples_Desc: '题目样例:请最好不要超过2个题目样例,题面样例不纳入评测数据。', - Problem_Example: '样例', - Example_Input: '样例输入', - Example_Output: '样例输出', - Add_Example: '添加样例', - Judge_Mode: '判题模式', - General_Judge: '普通判题', - Special_Judge: '特殊判题', - Interactive_Judge: '交互判题', - Special_Judge_Code: '特殊判题程序代码', - Interactive_Judge_Code: '交互判题程序代码', - General_Judge_Mode_Tips: '普通判题:选手程序读取题目标准输入文件,执行代码逻辑得到选手输出,对比题目标准输出文件内容得到判题结果', - Special_Judge_Mode_Tips: '特殊判题:题目要求的输出结果可能不唯一,允许不同结果存在,所以需要一个特殊程序读取标准输出、选手输出和标准输入,进行对比得出最终判题结果', - Interactive_Judge_Mode_Tips: '交互判题:交互程序的标准输出通过交互通道写到选手程序标准输入,选手程序的标准输出通过交互通道写到交互程序的标准输入,两者需要刷新输出缓冲区', - Interactive_Language: '交互判题程序语言', - SPJ_Language: '特殊判题程序语言', - Compile: '编译', - Compiled_Successfully: '编译成功', - Code_Template: '代码模板', - Type: '类型', - Judge_Samples: '评测数据', - Problem_Sample: '测试用例', - Sample_Input: '用例输入', - Sample_Output: '用例输出', - Sample_Input_File: '输入文件名', - Sample_Output_File: '输出文件名', - Sample_Tips: '评测数据:判题机对该题目的相关提交进行评测的数据来源。', - Add_Sample: '添加用例', - Use_Upload_File: '使用上传文件', - Use_Manual_Input: '使用手动输入', - Hint: '提示', - Source: '来源', - Auto_Remove_the_Blank_at_the_End_of_Code: '自动去除代码每行末尾空白符', - Publish_the_Judging_Result_of_Test_Data: '公开评测点数据结果', - Edit_Problem: '编辑题目', - Create_Problem: '创建题目', - Change_Judge_Mode: '注意:切换判题模式后可能会改变评测的逻辑!', - Add_Tag_Error: '不要添加已有的标签!', - - Upload_Testcase_Successfully: '上传评测数据成功', - Upload_Testcase_Failed: '上传评测数据失败', - is_required: '不能为空!', - Score_must_be_greater_than_or_equal_to_0: '分数必须大于0!', - Score_must_be_an_integer: '分数必须是整数!', - Spj_Or_Interactive_Code: 'Spj或交互程序的代码', - Spj_Or_Interactive_Code_not_Compile_Success: 'Spj或交互程序的代码没有编译成功,请重新编译!', - Judge_Extra_File: '评测额外文件', - Judge_Extra_File_Tips1: '1. 选手程序:给选手程序提供额外的库文件', - Judge_Extra_File_Tips2: '2. 特殊或交互程序:给特殊或交互程序提供额外的库文件', - User_Program: '选手程序', - SPJ_Or_Interactive_Program: '特殊或交互程序', - - // /views/admin/problem/tag - Admin_Tag: '标签管理', - Add_Tag: '添加标签', - Update_Tag: '修改标签', - To_Add: '添加', - To_Update: '更新', - Tag_Name: '标签名称', - Tag_Color: '标签颜色', - Tag_Attribution: '标签归属', - Delete_Tag_Tips: '你是否确定删除该标签?', - Tag_Tips:'提示:默认无标签分类栏,所有标签都是[未分类],请自行点击左上角【添加标签分类】添加标签分类,再点击标签修改#标签分类#进行归类。', - Tag_Classification:'标签分类', - Add_Tag_Classification: '添加标签分类', - Update_Tag_Classification: '修改标签分类', - Tag_Classification_Name: '标签分类名称', - Tag_Classification_Rank: '标签分类排序', - Tag_Classification_Attribution: '标签分类归属', - Delete_Tag_Classification_Tips: '你是否确定删除该分类?提示:此操作会把该分类下的标签归属到未分类!', - Unclassified:'未分类', - - // /views/amdin/problem/GroupProblemList.vue - Search:'搜索', - Enter_Group_ID:'请输入团队ID', - Agreed:'已同意', - Examine:'审批', - - // /views/admin/problem/ImportAndExport.vue - Export_Problem: '导出题目', - Export: '导出', - Import_Problem: '导入题目', - Import_QDOJ_Problem: '导入QDUOJ的题目', - Import_FPS_Problem: '导入FPS格式的题目', - Export_Problem_NULL_Tips: '选择导出的题目不能为空', - Upload_Problem_Succeeded: '上传题目成功', - Upload_Problem_Failed: '上传题目失败', - - // /views/admin/training/TrainingList.vue - Update_Time: '更新时间', - Order_Number: '序号', - View_Training_Problem_List: '查看训练题目列表', - Delete_Training_Tips: '此操作将删除该训练提交记录、榜单等数据, 是否继续?', - - // /views/admin/training/Training.vue - Training_rank: '训练排序编号(升序)', - Training_Title: '训练标题', - Training_Description: '训练描述', - Training_Auth: '训练权限', - Training_Category: '训练分类', - Public_Training: '公开训练', - Private_Training: '私有训练', - Training_Password: '训练密码', - Edit_Training: '编辑训练', - Create_Training: '创建训练', - Redirect_To_Category: '当前训练的分类列表为空,请先前往创建分类!', - Redirect: '重定向', - - // /views/admin/training/TrainingProblemList.vue - Training_Problem_List: '训练题目列表', - Add_Training_Problem: '添加训练题目', - Remove_Training_Problem_Tips: '你是否确定要将该题目移出训练?', - Training_Problem_Rank: '题目显示顺序(升序)', - - // /views/admin/training/Category.vue - Add_Category: '添加分类', - Update_Category: '修改分类', - To_Add: '添加', - To_Update: '更新', - Create_Training: '创建训练', - Category_Name: '分类名称', - Category_Color: '分类颜色', - Delete_Category_Tips: '你是否确定删除该分类?', - - // /views/admin/contest/ContestList.vue - Start_Time: '开始时间', - End_Time: '结束时间', - Creator: '创建者', - Visible: '是否可见', - Info: '信息', - View_Contest_Problem_List: '查看比赛题目列表', - View_Contest_Announcement_List: '查看比赛公告列表', - Download_Contest_AC_Submission: '下载比赛通过的提交代码', - Exclude_admin_submissions: '排除管理员的提交', - SplitType_User: '以用户名分割文件夹', - SplitType_Problem: '以题目ID分割文件夹', - Delete_Contest_Tips: '此操作将删除该比赛以及比赛的提交、讨论、公告、记录等数据, 是否继续?', - - // /views/admin/contest/Contest.vue - Contest_Title: '比赛标题', - Contest_Description: '比赛描述', - Contest_Start_Time: '开始时间', - Contest_End_Time: '结束时间', - Contest_Duration: '比赛时长', - Contest_Rule_Type: '比赛赛制', - Seal_Time_Rank: '开启封榜', - Real_Time_Rank: '实时榜单', - Seal_Rank_Time: '封榜时间', - Contest_Auth: '比赛权限', - Contest_Password: '比赛密码', - OI_Rank_Score_Type: 'OI排行榜得分类型', - OI_Rank_Score_Type_Recent: '使用最近得分', - OI_Rank_Score_Type_Highest: '使用最高得分', - Contest_Seal_Half_Hour: '比赛结束前半小时', - Contest_Seal_An_Hour: '比赛结束前一小时', - Contest_Seal_All_Hour: '比赛全程', - Auto_Real_Rank: '自动取消封榜', - Real_Rank_After_Contest: '比赛完取消封榜', - Seal_Rank_After_Contest: '比赛完继续封榜', - Edit_Contest: '编辑比赛', - Create_Contest: '创建比赛', - Contest_Duration_Check: '比赛时长不能小于0', - Contets_Time_Check: '开始时间应该早于结束时间', - Print_Func: '打印功能', - Not_Support_Print: '不支持打印', - Support_Offline_Print: '支持线下打印', - Open: '开启', - Add_Star_User_Error: '请不要重复添加已有打星用户!', - Star_User_UserName: '打星用户(请使用登录用户名)', - Rank_Show_Name: '榜单显示用户名称', - Show_Username: '用户名', - Show_Nickname: '昵称', - Show_Realname: '真实姓名', - Account_Limit: '账号限制(登录用户名)', - The_allowed_account_will_be: '允许参加比赛的用户名是:', - - // /views/admin/discussion/Discussion.vue - Discussion_ID: '讨论ID', - Top: '置顶', - Discussion_Report: '讨论举报', - Reporter: '举报者', - Report_Time: '举报时间', - View_Report_content: '查看举报内容', - View_Discussion: '查看讨论详情', - Content: '内容', - Report_Content: '举报内容', - The_number_of_discussions_selected_cannot_be_empty: '勾选的讨论不能为空', - - // components/admin/AddExtraFile.vue - Delete_Extra_File_Tips: '你是否确定要删除该额外文件?', - File_Name: '文件名字', - File_Content: '文件内容' -} diff --git a/src/hoj-vue/src/i18n/index.js b/src/hoj-vue/src/i18n/index.js deleted file mode 100644 index 47f92cb..0000000 --- a/src/hoj-vue/src/i18n/index.js +++ /dev/null @@ -1,32 +0,0 @@ -import Vue from 'vue' -import VueI18n from 'vue-i18n' -import elenUS from 'element-ui/lib/locale/lang/en' -import elzhCN from 'element-ui/lib/locale/lang/zh-CN' -import vxeEnUS from 'vxe-table/lib/locale/lang/en-US' -import vxeZhCN from 'vxe-table/lib/locale/lang/zh-CN' -import storage from '@/common/storage' -Vue.use(VueI18n) - -const languages = [ - {value: 'en-US', label: 'English', el: elenUS, vxe: {...vxeEnUS}}, - {value: 'zh-CN', label: '简体中文', el: elzhCN, vxe: {...vxeZhCN}}, -] -const messages = {} - -// combine admin and oj -for (let lang of languages) { - let locale = lang.value - let m = require(`./oj/${locale}`).m - Object.assign(m, require(`./admin/${locale}`).m) - let ui = Object.assign(lang.vxe, lang.el) - messages[locale] = Object.assign({m: m}, ui); -} - - -// load language packages -export default new VueI18n({ - locale: storage.get('Web_Language') || 'zh-CN', - messages: messages -}) - -export {languages} diff --git a/src/hoj-vue/src/i18n/oj/en-US.js b/src/hoj-vue/src/i18n/oj/en-US.js deleted file mode 100644 index b084bef..0000000 --- a/src/hoj-vue/src/i18n/oj/en-US.js +++ /dev/null @@ -1,696 +0,0 @@ -export const m = { - - // /src/common/api.js - Query_error_unable_to_find_the_resource_to_request: 'Query error! Unable to find the resource to request!', - Server_error_please_refresh_again: 'Server error! Please refresh again!', - Request_timed_out_please_try_again_later: 'Request timed out! Please try again later!', - Network_error_abnormal_link_with_server_please_try_again_later: 'Network error! Abnormal link with server, Please try again later!', - - // /components/oj/common/NavBar.vue 导航栏 - NavBar_Home: 'Home', - NavBar_Problem: 'Problem', - NavBar_Training: 'Training', - NavBar_Contest: 'Contest', - NavBar_Status: 'Status', - NavBar_Rank: 'Rank', - NavBar_ACM_Rank: 'ACM Rank', - NavBar_OI_Rank: 'OI Rank', - NavBar_Discussion: 'Discussion', - NavBar_Group: 'Group', - NavBar_About: 'About', - NavBar_Introduction: 'Introduction', - NavBar_Developer: 'Developer', - NavBar_Login: 'Login', - NavBar_Register: 'Register', - NavBar_UserHome: 'Home', - NavBar_Submissions: 'Submissions', - NavBar_Setting: 'Setting', - NavBar_Management: 'Management', - NavBar_Logout: 'Logout', - Dialog_Login: 'Login', - Dialog_Register: 'Register', - Dialog_Reset_Password: 'Reset Password', - Click_To_Change_Web_Language: 'Click to change web language', - - // /components/oj/common/Login.vue 登录弹窗 - Login_Username: 'Username', - Login_Password: 'Password', - Login_Btn: 'Login', - Slide_Verify: 'Please slide right to verify', - Slide_Verify_Success: 'Success', - Login_No_Account: 'No account? Register now!', - Login_Forget_Password: 'Forget Password', - Username_Check_Required: 'The username is required.', - Username_Check_Max: 'The longest length of a username is 20.', - Password_Check_Required: 'The password is required.', - Password_Check_Between: 'The length of the password is between 6 and 20.', - Welcome_Back: 'Welcome back~', - - // /components/oj/common/Register.vue 注册弹窗 - Register_Username: 'Please Enter Username', - Register_Password: 'Please Enter Password', - Register_Password_Again: 'Please Enter Password Again', - Register_Email: 'Please Enter Email', - Register_Email_Captcha: 'Please enter the captcha from the email', - Register_Btn: 'Register', - Register_Already_Registed: 'Already registed? Login now!', - The_username_already_exists: 'The username already exists.', - The_email_already_exists: 'The email already exists.', - Password_does_not_match: 'Password does not match.', - Email_Check_Required: 'The email is required.', - Email_Check_Format: 'The email format is incorrect.', - Password_Again_Check_Required: 'The password again is required.', - Code_Check_Required: 'The captcha is required.', - Code_Check_Length: 'The captcha must be six digits.', - The_system_is_processing: 'Please Waiting... The system is processing...', - Register_Send_Email_Msg: 'Verification code has been sent to the designated mailbox! If you haven\'t received the email for a long time, please check whether your email is accurate!', - Thanks_for_registering: 'Thanks for your registering, you can login now.', - - // /components/oj/common/ResetPassword.vue 重置密码弹窗 - // /views/oj/user/SetNeWPassword.vue 设置新密码页 - Reset_Password_Email: 'Please Enter Your Email', - Reset_Password_Captcha: 'Please Enter the captcha', - Send_Password_Reset_Email: 'Send Password Reset Email', - Waiting_Can_Resend_Email: 'resend the Reset Email...', - ResetPwd_Send_Email_Msg: 'Reset password email has been sent to the designated mailbox! If you haven\'t received the email for a long time, please check whether your email is accurate!', - Remember_Passowrd_To_Login: 'Remember password? To login!', - Set_New_Password: 'Set New Password', - Set_New_Password_Msg: 'Please Enter New Password', - Set_New_Password_Again_Msg: 'Please Enter New Password Again', - The_username_does_not_exists: 'The username does not exist.', - The_email_does_not_exists: 'The email does not exist.', - Your_password_has_been_reset: 'Your password has been reset.', - - // /components/oj/setting/Account.vue 账号信息管理页面 - Old_Password: 'Old Password', - New_Password: 'new Password', - Confirm_New_Password: 'Confirm New Password', - Current_Password: 'Current Password', - Old_Email: 'Old Email', - New_Email: 'New Email', - Old_Mobile: 'Old Mobile', - New_Mobile: 'New Mobile', - Change_Password: 'Change Password', - Change_Email: 'Change Email', - Change_Mobile: 'Change Mobile', - Update_Password: 'Update Password', - Update_Email: 'Update Email', - Update_Mobile: 'Update Mobile', - Captcha: 'Captcha', - The_new_password_does_not_change: 'The new password doesn\'t change.', - The_new_email_does_not_change: 'The new email doesn\'t change.', - The_new_mobile_does_not_change: 'The new mobile doesn\'t change.', - Mobile_Check_Required: 'The mobile is required.', - Mobile_Check_Format: 'The mobile format is incorrect.', - Change_Email_Captcha: 'Please enter the captcha from the email', - Change_Mobile_Captcha: 'Please enter the captcha from the mobile', - Change_Send_Email_Msg: 'Verification code has been sent to the designated mailbox! If you haven\'t received the email for a long time, please check whether your email is accurate!', - Change_Send_Mobile_Msg: 'Verification code has been sent to the designated mobile! If you haven\'t received the message for a long time, please check whether your mobile is accurate!', - Update_Successfully: 'Update Successfully', - Update_Failed: 'Update Failed', - Guess_robot: 'Speed too fast, may be machine operation! Please verify again!', - - - // /components/oj/setting/UserInfo.vue - Avatar_Setting: 'Avatar Setting', - UserInfo_Setting: 'UserInfo Setting', - Upload_avatar_hint: 'Drag and drop the avatar here, or click here.', - CF_Username: 'Codeforces Username', - School: 'School', - Student_Number: 'Student Number', - Blog: 'Blog', - Github: 'Github', - Gender: 'Gender', - Male: 'Male', - Female: 'Female', - Secrecy: 'Secrecy', - Save: 'Save', - Upload: 'Upload', - Your_new_avatar: 'Your new avatar', - Upload_Avatar_Successfully: 'Upload avatar successfully', - File_type_not_support: 'File type not support', - is_incorrect_format_file: ' is an incorrect format file,please choose the file format of .GIF, .JPG, .JPEG, .PNG, .BMP, .Webp', - Exceed_max_size_limit: 'Exceed max size limit', - File_Exceed_Tips: ' file size is wrong, you can upload a image up to 2MB in size', - Cancel_Avater_Tips: 'Are you sure you want to cancel the capture of this image?', - - // /views/oj/user/UserHome.vue - Recent_login_time: 'Recently launched:', - Not_set_yet: 'This guy is lazy. He doesn\'t write anything.', - UserHome_Solved: 'Solved', - UserHome_Submissions: 'Submissions', - UserHome_Score: 'Score', - UserHome_Rating: 'Rating', - List_Solved_Problems: 'List of solved problems', - UserHome_Not_Data: 'The guy is so lazy that has not solved any problem yet.', - Personal_Profile: 'Persion Profile', - UserHome_Solved_Problems: 'Solved Problems', - Thermal_energy_table_submitted_in_the_last_year:'Thermal energy table submitted in the last year', - Calendar_Tooltip_Uint:'submissions', - Jan: 'Jan', - Feb: 'Feb', - Mar: 'Mar', - Apr: 'Apr', - May: 'May', - Jun: 'Jun', - Jul: 'Jul', - Aug: 'Aug', - Sep: 'Sep', - Oct: 'Oct', - Nov: 'Nov', - Dec: 'Dec', - Sun: 'Sun', - Mon: 'Mon', - Tue: 'Tue', - Wed: 'Wed', - Thu: 'Thu', - Fri: 'Fri', - Sat: 'Sat', - Less:'Less', - More:'More', - on:'on', - - // /views/oj/user/Setting.vue - Account_Setting: 'Account Setting', - - // App.vue 底部文案 - Service: 'Service', - Judging_Queue: 'Judging Queue', - System_Info: 'System Info', - Development: 'Development', - Open_Source: 'Open Source', - Support: 'Support', - Help: 'Help', - Group: 'Group', - - // /views/oj/Home.vue - Welcome_to: 'Welcome to ', - Recent_7_Days_AC_Rank: 'Recent 7 Days AC Top 10 Rank', - Other_OJ_Contest: 'Other Online Judge Contest', - Supported_Remote_Online_Judge: 'Supported Remote Online Judge', - - - // 表格通用列名,按钮,搜索框等 - Enter_keyword: 'Enter keyword', - Reset: 'Reset', - Username: 'Username', - Solved: 'Solved', - AC: 'AC', - OJ: 'OJ', - Title: 'Title', - Begin_Time: 'Begin Time', - End_Time: 'End Time', - Contest_Time: 'Contest Time', - Recent_Contest: 'Recent Contest', - Problem_ID: 'Problem ID', - Total: 'Total', - AC_Rate: 'AC Rate', - Score: 'Score', - - // /views/oj/problem/problemList.vue - Problem_List: 'Problem List', - Problem_Bank: 'Problem Bank', - All: 'All', - My_OJ: 'Mine', - Level: 'Level', - Tags: 'Tags', - Search_Filter_Tag: 'Enter the tag name...', - Pick_a_random_question: 'Pick a random question', - Touch_Get_Status: 'Please touch or hover the mouse to the designated problem line to view the submission status', - Good_luck_to_you: 'Good luck to you!', - - // /views/oj/problem/Problem.vue - Problem_Description: 'Problem Description', - My_Submission: 'My Submission', - Problem_Annex: 'Problem Annex', - Login_to_view_your_submission_history: 'Login to view your submission history', - Shrink_Sidebar: 'Shrink Sidebar', - View_Problem_Content: 'View Problem Content', - Only_View_Problem: 'Only View Problem', - Put_away_the_full_screen_and_write_the_code: 'Put away the full screen and write the code', - Contest_Problem: 'Contest Problem', - Show_Tags: 'Show Tags', - Hide_Tags: 'Hide Tags', - No_tag: 'No tag', - Statistic: 'Statistic', - Solutions: 'Solutions', - Problem_Discussion: 'Discussion', - Description: 'Description', - Input: 'Input', - Output: 'Output', - Sample_Input: 'Sample Input', - Sample_Output: 'Sample Output', - Hint: 'Hint', - Source: 'Source', - Status: 'Status', - Information: 'Information', - Time_Limit: 'Time Limit', - Memory_Limit: 'Memory Limit', - Other: 'Other', - Created: 'Created By', - Please_login_first: 'Please login first', - Submit: 'Submit', - Online_Test:'Online Test', - Submitting: 'Submitting', - Judging: 'Judging', - Wrong_Answer: 'Wrong Answer', - View_Contest: 'View Contest', - Are_you_sure_you_want_to_reset_your_code: 'Are you sure you want to reset your code?', - Code_can_not_be_empty: 'Code can not be empty', - Code_Length_can_not_exceed_65535: 'The code should contain no more than 65535 characters!', - Submit_code_successfully: 'Submit code successfully', - You_have_solved_the_problem: 'You have solved the problem', - Submitted_successfully: 'Submitted successfully', - Submitted_Not_Result: 'Submitted successfully, but the result is not known at present', - You_have_submitted_a_solution: 'You have submitted a solution.', - Contest_has_ended: 'Contest has ended', - You_have_submission_in_this_problem_sure_to_cover_it: 'You have submission in this problem, sure to cover it?', - Close: 'Close', - Cancel: 'Cancel', - OK: 'OK', - Copied_successfully: 'Copied successfully', - Copied_failed: 'Copied failed', - - - // /views/oj/status/SubmissionList.vue - Mine: 'Mine', - Time: 'Time', - Memory: 'Memory', - Length: 'Length', - Language: 'Language', - View_submission_details: 'View submission details', - Judger: 'Judger', - Author: 'Author', - Submit_Time: 'Submit Time', - Option: 'Option', - Rejudge: 'Rejudge', - Resubmitted_Successfully: 'Resubmitted Successfully!', - Refresh: 'Refresh', - Enter_Problem_ID: 'Enter Problem ID', - Enter_Author: 'Enter Author', - Run_ID: 'Run ID', - Problem: 'Problem', - Problem_Score: 'Problem Score', - OI_Rank_Score: 'OI Rank Score', - OI_Rank_Calculation_Rule: 'OI Rank Calculation Rule', - Cancel_Evaluation: 'Cancel', - Modify_Evaluation:'Modify', - Has_Been_Manually_Judged:'Has been manually judged', - Manually_Jugde:'Manually Judge', - Cancel_Judge_Tips:'Are you sure you want to mark this submission as Cancelled?', - Cancel_Successfully:'Cancel Successfully', - Click_to_Manually_Judge:'Click to Manually Judge', - - // /views/oj/status/SubmissionDetails.vue - Test_point_details: 'Test point details', - Copy: 'Copy', - Shared: 'Shared', - Unshared: 'Unshared', - Shared_successfully: 'Shared successfully', - Cancel_Sharing_Successfully: 'Cancel Sharing Succeessfully', - Input_File: 'Input File', - Output_File: 'Output File', - Case_tips: 'Case Tips', - Nothing: 'Nothing', - - // /views/oj/rank/ACMRank.vue - ACM_Ranklist: 'ACM Ranklist', - User: 'User', - Nickname: 'Nickname', - Signature: 'Signature', - Rating: 'Rating', - Rank_Search_Placeholder: 'Please enter username, nickname or real name.', - - // /views/oj/rank/OIRank.vue - OI_Ranklist: 'OI Ranklist', - - // /views/oj/discussion/discussionList.vue - Go_to_problem:"Go to Problem", - Release_Time: 'Release Time', - Likes: 'Likes', - Like_Successfully: 'Like Successfully', - Cancel_Like_Successfully: 'Cancel Successfully', - Views: 'Views', - Edit: 'Edit', - Delete: 'Delete', - Post_discussion: 'Post Discussion', - Post_problem_discussion: 'Post Problem Discussion', - General_discussion: 'General Discussion', - Return: 'Return', - Category: 'Category', - Discussion_title: 'Title', - Discussion_Desc: 'Description', - Discussion_Category: 'Category', - Discussion_top: 'Top', - Discussion_content: 'Content', - Create_Discussion: 'Create Discussion', - Edit_Discussion: 'Edit Discussion', - Delete_Discussion_Tips: 'This operation will delete the discussion, including the associated comments and replies. Do you want to continue?', - Delete_successfully: 'Delete Successfully', - Post_successfully: 'Post Successfully', - Send_successfully:'Send Successfully', - - // /views/oj/discussion/discussion.vue - Report: 'Report', - Like: 'Like', - Liked: 'Liked', - Report_Reason: 'Report Reason', - The_report_label_and_reason_cannot_be_empty: 'The report label and reason cannot be empty.', - - // 404.vue - Page_Not_Found:"Sorry, the page can't be found", - Go_Home: 'Go Home', - Back: 'Back', - - // /views/oj/contest/ContestList.vue - Rule: 'Rule', - Running: 'Running', - Scheduled: 'Scheduled', - Ended: 'Ended', - No_contest: 'No contest', - Contests: 'Contests', - Public: 'Public', - Private: 'Private', - Protected: 'Protected', - Public_Tips: 'Public - Any one can see and submit.', - Protected_Tips: 'Protected - Any one can see, but only users knowing contest password can submit.', - Private_Tips: 'Private - Only users knowing contest password can see and submit.', - Contest_Outside_ScoreBoard: 'OutSide Contest ScoreBoard', - - // /views/oj/contest/ContestDetail.vue - StartAt: 'StartAt', - EndAt: 'EndAt', - Password_Required: 'Password Required', - To_Enter_Need_Password: 'To enter the Private contest, please input the password!', - Enter_the_contest_password: 'Enter the contest password', - Enter: 'Enter', - Overview: 'Overview', - Announcement: 'Announcement', - Submissions: 'Submissions', - Rankings: 'Rankings', - Comment: 'Comment', - Print: 'Print', - Admin_Print: 'Admin Print', - Admin_Helper: 'AC Info', - Register_contest_successfully: 'Register contest successfully', - Please_check_the_contest_announcement_for_details: 'Please check the contest announcement for details', - Go_To_Group_Contest_List:'Go to Group Contest List', - Group_Contest_Tag:'Group Contest', - - // /views/oj/contest/children/ACMContestRank.vue - Contest_Rank: 'Contest Rank', - Menu: 'Menu', - Chart: 'Chart', - Table: 'Table', - Auto_Refresh: 'Auto Refresh', - RealName: 'RealName', - Force_Update: 'Force Update', - Download_as_CSV: 'Download as CSV', - TotalTime: 'Time', - Top_10_Teams: 'Top 10 Teams', - save_as_image: 'save as image', - Contest_Rank_Seq: 'Rank', - Star_User: 'Star User', - Unfollow: 'Unfollow', - Top_And_Follow: 'Top And Follow', - - // /views/oj/contest/children/ACMInfo.vue - AC_Time: 'AC Time', - First_Blood: 'First Blood', - Checked: 'Checked', - Not_Checked: 'Not Checked', - Check_It: 'Check It', - Accepted: 'Accepted', - - // /views/oj/contest/children/ContestPrint.vue - Print_Title: 'Contest Text Printing', - Print_tips: 'Please put the text to be printed into the content box, and then submit. Note: please do not submit maliciously!', - Content: 'Content', - Content_cannot_be_empty: 'Tne content cannot be empty!', - The_number_of_content_cannot_be_less_than_50: 'The number of words cannot be less than 50', - Success_submit_tips: 'Submitted successfully! Please wait patiently for the staff to print!', - - // /views/oj/contest/children/ContestAdminPrint.vue - Download: 'Download', - Printed: 'Printed', - Not_Printed: 'Not Printed', - - // /views/oj/contest/children/ContestRejudgeAdmin.vue - Contest_Rejudge: 'Contest Rejudge', - ID: 'ID', - Contest_Rejudge_Tips: 'Are you sure you want to rejudge all submissions of the questions?', - Rejudge_All: 'Rejudge All', - Rejudge_successfully: 'Rejudge successfully', - - // /views/oj/contest/children/OIContestRank.vue - Total_Score: 'Total Score', - Based_on_The_Highest_Score_Submitted_For_Each_Problem: 'Based on the highest score submitted for each problem', - Based_on_The_Recent_Score_Submitted_Of_Each_Problem: 'Based on the recent score submitted of each problem', - - // /views/oj/about/Introduction.vue - Compiler: 'Compiler', - Example: 'Example', - Result_Explanation: 'Result Explanation', - Pending_Description: 'Your solution is waiting be judged, please wait for the result...', - Submitted_Faild_Description: 'Your submission failed this time, please click the button to submit again.', - Compiling_Description: 'Your source code is being compiled, please wait for the result...', - Judging_Description: 'Your program is running with test data. Please wait for the result...', - Compile_Error_Description: "Failed to compile your source code. Click on the link to see compiler's output.", - Persentation_Error_Description: 'The code you submitted is very close to the correct answer. Please check whether there are extra spaces, newlines and other blanks in the code format output.', - Accepted_Description: 'Congratulations! Your solution is correct.', - Wrong_Answer_Description: "Your program's output doesn't match judger's answer.", - Runtime_Error_Description: 'Your program terminated abnormally. Possible reasons are: segment fault, divided by zero or exited with code other than 0.', - Time_Limit_Exceeded_Description: 'The time your program used has exceeded limit.', - Memory_Limit_Exceeded_Description: 'The memory your program actually used has exceeded limit.', - System_Error_Description: 'Oops, something has gone wrong with the judger. Please report this to administrator.', - Cancelled_Description:'Your submission has been cancelled!', - Compile_Explanation: 'Compile Explanation', - Compile_Tips1:"`__int64` is not defined by ANSI standard and can only be used in `VC`. It should be written as `long long` type in `GNU C++`. For `scanf` and `printf`, please use `%lld` as the format.", - Compile_Tips2:"The return value of `main()` must be defined as `int`, not `void`", - Compile_Tips3:"`i` lost definition outside the loop,\"for(int i=0...){...}\"", - Compile_Tips4:"`itoa` is not an ANSI standard function (not available in standard `C/C++`)", - - // /views/oj/about/Developer.vue - Leader_BackEnd_FrontEnd_Engineer: 'Leader & BackEnd | FrontEnd Engineer', - Group_Function_Development_Contributor: 'Group Function Development Contributor', - Distributed: 'Distributed', - Distributed_Desc: 'It is divided into frontend and backend separation, and supports the micro service cluster', - Customization: 'Customization', - Customization_Desc: 'The website configuration is highly integrated and supports customized modification', - Security: 'Security', - Security_Desc: 'The Sandbox is isolated by CGroup, and the website authority control is perfect', - Diversity: 'Diversity', - Diversity_Desc: 'Support Codefoces, HDU, POJ, GYM, AtCoder, SPOJ remote judge', - Available: 'Available', - Faulty: 'Faulty', - - // /components/oj/common/Announcements.vue - Contest_Announcement: 'Contest Announcement', - No_Announcements: 'No Announcements', - - // /components/oj/common/CodeMirror.vue - Lang: 'Lang', - Code_Editor_Setting:'Code Editor Setting', - Setting:'Setting', - Theme: 'Theme', - FontSize: 'Font Size', - TabSize:'Tab Size', - Two_Spaces:'2 spaces', - Four_Spaces:'4 spaces', - Eight_Spaces:'8 spaces', - Reset_Code: 'Reset Code', - Upload_file: 'Upload file', - monokai: 'Mnokai', - solarized: 'Molarized Light', - material: 'Material', - idea:'IDEA', - eclipse:'Eclipse', - base16_dark:'Base16-dark', - cobalt:'Cobalt', - dracula:'Dracula', - Test_Case: 'Test Case', - Test_Result: 'Test Result', - Running_Test: 'Running Test', - Non_Test_Judge_Tips:'After entering the test case, click Running test, and the running results will be displayed here.', - Problem_Uncertain_Answer: 'Note: there may be multiple outputs that meet the requirements of this problem. Please judge whether the program output passes.', - Fill_Case: 'Fill Case', - Compilation_Failed: 'Compilation Failed', - Test_Input: 'Test Input', - Expected_Output: 'Expected Output', - Real_Output: 'Real Output', - Pass_Test_Case: 'Pass Test Case', - - // /components/oj/comment/Comment.vue - Announcement_of_contest_Q_and_A_area: 'Announcement of Contest Q & A Area', - Announcement_of_contest_Q_and_A_area_tips1:"Please don't ask questions irrelevant to the contest. No irrigation!", - Announcement_of_contest_Q_and_A_area_tips2: 'During the contest, only the comments of yourself and the contest administrator can be seen!', - Announcement_of_contest_Q_and_A_area_tips3:"The contest administrator's comments cannot be replied. The comments return to normal at the end of the contest!", - Come_and_write_down_your_comments: 'Come and write down your comments', - Inline_Code: 'Inline Code', - Code_Block: 'Code Block', - Link: 'Link', - Unordered_list: 'Unordered List', - Ordered_List: 'Ordered List', - Submit_Comment: 'Submit', - All_Comment: 'All Comment', - Reply: 'Reply', - Reply_Successfully: 'Reply Successfully', - Comment_Successfully: 'Comment Successfully', - Reply_Total: 'Total', - Replies: 'replies', - Click_Show_All: 'Click to Show All', - Pick_up:"Pick up", - Load_More: 'Load More', - Delete_Comment_Tips: 'This operation will delete the comment and all its replies. Do you want to continue?', - Delete_Reply_Tips: 'This operation will delete the reply. Do you want to continue?', - - - // /views/oj/message/message.vue - Message_Center: 'Message Center', - No_Data: 'No Data', - - // /views/oj/message/UserMsg.vue - Msg_Total: 'Total', - Msg_Messages: 'messages', - DiscussMsg: 'Discuss', - ReplyMsg: 'Reply', - LikeMsg: 'Likes', - SysMsg: 'System', - MineMsg: 'Mine', - Clean_All: 'Clean All', - Action_Like_Discuss: 'Praised My Comment', - Action_Like_Post: 'Praised My Discussion Post', - Action_Discuss: 'Commented on My Discussion Post', - Action_Reply: 'Responded to My Comment', - From_Discussion_Post: 'From Discussion Post', - From_the_Contest: 'From the Contest', - Delete_Msg_Tips: 'Are you sure you want to delete the message?', - - // /views/oj/training/TrainingList.vue - Search_Training: 'Search Training', - Training_Public: 'Public', - Training_Private: 'Private', - Training_Category: 'Training Category', - Number: 'Number', - Problem_Number: 'Problem Number', - Recent_Update: 'Recent Update', - - // /views/oj/training/TrainingDetails.vue - Training_Introduction: 'Training Introduction', - Training_Number: 'Number', - Training_Auth: 'Training Auth', - Training_Total_Problems: 'Total Problems', - Record_List: 'Record List', - To_Enter_Training_Need_Password: 'To enter the Private training, please input the password!', - Enter_the_training_password: 'Enter the training password', - Register_training_successfully: 'Register training successfully', - - // /views/oj/training/TrainingRank.vue - Total_AC: 'Total AC', - - // /views/oj/group/GroupList.vue - Search_Group: 'Search Group', - Create_Group: 'Create Group', - All_Group: 'All Group', - My_Group: 'My Group', - No_Groups: 'No Groups', - Group_Name: 'Group Name', - Group_Short_Name: 'Group Short Name(display ID prefix for group problems)', - Group_Brief: 'Group Brief', - Group_Description: 'Group Description', - Group_Public: 'Public', - Group_Protected: 'Protected', - Group_Private: 'Private', - Group_Hidden: 'Hidden', - Group_Auth: 'Group Auth', - Group_Owner: 'Group Owner', - Group_Code: 'Invitation Code', - Total_Members: 'Total Members', - Group_Public_Tips: 'Public - Free to join in.', - Group_Protected_Tips: 'Protected - Apply to join in.', - Group_Private_Tips: 'Private - Require invitation code to apply.', - Group_Hidden_Tips: 'Hidden - Only group members can see.', - Create_Successfully: 'Create Successfully', - Group_Name_Check_Required: 'The group name is required.', - Group_Name_Check_Min_Max: 'The length of group name is 5 to 25', - Group_Short_Name_Check_Required: 'The group shortname is required.', - Group_Short_Name_Check_Min_Max: 'The length of group shortname is 5 to 10', - Group_Brief_Check_Required: 'The group brief is required.', - Group_Brief_Check_Min_Max: 'The length of group brief is 5 to 50', - Group_Auth_Check_Required: 'The group auth is required.', - Group_Code_Check_Required: 'The invitation code is required.', - Group_Code_Check_Min_Max: 'The length of invitation code is 6', - Group_Description_Check_Required: 'The group description is required.', - Group_Description_Check_Min_Max: 'The length of group description is 5 to 1000', - - // /views/oj/group/GroupDetails.vue - Apply_Group: 'Apply to Join', - Apply_Successfully: 'Apply Successfully', - Exit_Group: 'Exit Group', - Applying:'Applying...', - Reject_Application:'Rejected', - Exit_Group_Tips: 'Are you sure you want to exit the group? After exiting, you will no longer be able to view group resources!', - Exit_Successfully: 'Exit Successfully', - Disband_Group:'Disband Group', - Disband_Group_Tips:'Are you sure you want to disband the group?', - Disband_Successfully:'Disband Successfully', - Group_Number: 'Number', - Group_Home: 'Home', - Group_Problem: 'Problem', - Group_Training: 'Training', - Group_Contest: 'Contest', - Group_Submission: 'Submission', - Group_Discussion: 'Discussion', - Group_Setting: 'Setting', - Group_Rank:'Rank', - Group_Announcement: 'Announcement', - Group_Member: 'Member', - Apply_Reason: 'Apply Reason', - Apply_Reason_Check_Required: 'The apply reason is required.', - Apply_Reason_Check_Min_Max: 'The length of apply reason is 5 to 100', - - // /views/oj/group/GroupTrainingList.vue - Back_To_Admin_Training_List:'Back to Admin Trainingt List', - Back_To_Training_List:'Back To Training List', - Back_Admin_Training_Problem_List:'Back Admin Training Problem List', - - // /views/oj/group/GroupContestList.vue - Back_To_Admin_Contest_List:'Back to Admin Contest List', - Back_To_Contest_List:'Back to Contest List', - Back_Admin_Contest_Problem_List:'Back to Admin Contest Problem List', - - // /views/oj/group/GroupDiscussionList.vue - No_Discussion: 'No Discussion', - Problem_Discussion:'Problem Discussion', - - // /views/oj/group/GroupMemberList.vue - Applying: 'Applying', - Refused: 'Refused', - General_Member: 'General Member', - Member_Admin: 'Member Admin', - Join_Time: 'Joined Time', - Change_Time: 'Changed Time', - Member_Auth: 'Member Auth', - Group_Admin: 'Admin', - Group_Root: 'Root', - View_Reason: 'View Reason', - Delete_Member: 'Kick Member', - Delete_Member_Tips: 'Are you sure you want to kick the member out of the group? After kicking out, the member will no longer be able to view group resources! What\'s more, if the member is the owner, the group will be disbanded together!', - - // /views/oj/group/GroupSetting.vue - Add_From_Group_Problem: 'Add_From_Group_Problem', - - // /views/oj/group/GroupSetting.vue - Group_Visible: 'Show in group list', - Group_Not_Visible: 'Hide in group list', - - // /views/oj/group/GroupRank.vue - Group_ACM_Rank_Type: 'ACM Rank', - Group_OI_Rank_Type: 'OI Rank', - - // GroupAdminProblemList.vue - Group_Problem_Apply_Public:'Apply to join the public problem bank', - Already_Public_Problem:'Already in the public problem bank', - Group_Problem_Apply_Public_Tips:'Are you sure you want to apply for this problem to be added to the public bank?', - Cancel_Group_Problem_Apply_Public_Tips:'Do you want to cancel the application for this problem to be added to the public bank?' -} diff --git a/src/hoj-vue/src/i18n/oj/zh-CN.js b/src/hoj-vue/src/i18n/oj/zh-CN.js deleted file mode 100644 index e9d487b..0000000 --- a/src/hoj-vue/src/i18n/oj/zh-CN.js +++ /dev/null @@ -1,696 +0,0 @@ -export const m = { - - // /src/common/api.js - Query_error_unable_to_find_the_resource_to_request: '查询错误,找不到要请求的资源!', - Server_error_please_refresh_again: '服务器错误,请重新刷新!', - Request_timed_out_please_try_again_later: '请求超时,请稍后再尝试!', - Network_error_abnormal_link_with_server_please_try_again_later: '网络错误,与服务器链接出现异常,请稍后再尝试!', - - // /components/oj/common/NavBar.vue 导航栏 - NavBar_Home: '首页', - NavBar_Problem: '题目', - NavBar_Training: '训练', - NavBar_Contest: '比赛', - NavBar_Status: '评测', - NavBar_Rank: '排名', - NavBar_ACM_Rank: 'ACM 排名', - NavBar_OI_Rank: 'OI 排名', - NavBar_Discussion: '讨论', - NavBar_Group: '团队', - NavBar_About: '关于', - NavBar_Introduction: '简介', - NavBar_Developer: '开发者', - NavBar_Login: '登录', - NavBar_Register: '注册', - NavBar_UserHome: '我的首页', - NavBar_Submissions: '我的提交', - NavBar_Setting: '我的设置', - NavBar_Management: '后台管理', - NavBar_Logout: '退出登录', - Dialog_Login: '登录', - Dialog_Register: '注册', - Dialog_Reset_Password: '重置密码', - Click_To_Change_Web_Language: '点击切换网站语言', - - // /components/oj/common/Login.vue 登录弹窗 - Login_Username: '用户名', - Login_Password: '密码', - Login_Btn: '登录', - Slide_Verify: '请向右滑动验证', - Slide_Verify_Success: '验证成功', - Login_No_Account: '没有账号?立即注册!', - Login_Forget_Password: '忘记密码', - Username_Check_Required: '用户名不能为空', - Username_Check_Max: '用户名长度不能超过20位', - Password_Check_Required: '密码不能为空', - Password_Check_Between: '请输入长度为6~20位的密码', - Welcome_Back: '欢迎回来~', - - // /components/oj/common/Register.vue 注册弹窗 - Register_Username: '请输入用户名', - Register_Password: '请输入密码', - Register_Password_Again: '请再次输入密码', - Register_Email: '请输入邮箱,点击右侧发送验证码', - Register_Email_Captcha: '请输入邮件中的验证码', - Register_Btn: '注册', - Register_Already_Registed: '已有账号?立即登录!', - The_username_already_exists: '用户名已存在', - The_email_already_exists: '邮箱已存在', - Password_does_not_match: '两次输入密码不一致', - Email_Check_Required: '邮箱不能为空', - Email_Check_Format: '邮箱格式不正确', - Password_Again_Check_Required: '请再次输入密码', - Code_Check_Required: '验证码不能为空', - Code_Check_Length: '请输入6位数字的验证码', - The_system_is_processing: '请稍等... 系统正在处理...', - Register_Send_Email_Msg: '发送成功!如果长时间没收到邮件,请检查你的邮箱是否准确!', - Thanks_for_registering: '感谢您的注册,您现在可以登录了', - - // /components/oj/common/ResetPassword.vue 重置密码弹窗 - // /views/oj/user/SetNeWPassword.vue 设置新密码页 - Reset_Password_Email: '请输入您的邮箱', - Reset_Password_Captcha: '请输入验证码', - Send_Password_Reset_Email: '发送密码重置邮件', - Waiting_Can_Resend_Email: '请稍等片刻,重新发送重置邮件...', - ResetPwd_Send_Email_Msg: '发送成功!如果长时间没收到邮件,请检查你的邮箱是否准确!', - Remember_Passowrd_To_Login: '咦,好像记得密码? 请尝试登录!', - Set_New_Password: '设置新密码', - Set_New_Password_Msg: '请输入新密码', - Set_New_Password_Again_Msg: '请再次输入新密码', - The_username_does_not_exists: '用户名不存在', - The_email_does_not_exists: '邮箱不存在', - Your_password_has_been_reset: '您的密码已重置', - - // /components/oj/setting/Account.vue 账号信息管理页面 - Old_Password: '当前密码', - New_Password: '新密码', - Confirm_New_Password: '确认新密码', - Current_Password: '当前密码', - Old_Email: '当前邮箱', - New_Email: '新邮箱', - Old_Mobile: '当前手机号', - New_Mobile: '新手机号', - Change_Password: '更改密码', - Change_Email: '更改邮箱', - Change_Mobile: '更改手机号', - Update_Password: '更新密码', - Update_Email: '更新邮箱', - Update_Mobile: '更新手机号', - Captcha: '验证码', - The_new_password_does_not_change: '新密码未变动', - The_new_email_does_not_change: '新邮箱未变动', - The_new_mobile_does_not_change: '新手机号未变动', - Mobile_Check_Required: '手机号不能为空', - Mobile_Check_Format: '手机号格式不正确', - Change_Email_Captcha: '请输入邮件中的验证码', - Change_Mobile_Captcha: '请输入短信中的验证码', - Change_Send_Email_Msg: '发送成功!如果长时间没收到邮件,请检查你的邮箱是否准确!', - Change_Send_Mobile_Msg: '发送成功!如果长时间没收到短信,请检查你的手机号是否准确!', - Update_Successfully: '更新成功', - Update_Failed: '更新失败', - Guess_robot: '您的操作太快啦,可能是机器操作!请再次验证!', - - - // /components/oj/setting/UserInfo.vue - Avatar_Setting: '头像设置', - Upload_avatar_hint: '将头像拖放到此处,或单击此处', - CF_Username: 'Codeforces 用户名', - School: '学校', - Student_Number: '学号', - Blog: '博客', - Github: 'Github', - Gender: '性别', - Male: '男', - Female: '女', - Secrecy: '保密', - Save: '保存', - Upload: '上传', - Your_new_avatar: '您的新头像', - Upload_Avatar_Successfully: '上传头像成功', - File_type_not_support: '文件类型不支持', - is_incorrect_format_file: '的文件格式不正确,请选择.gif,.jpg,.jpeg,.png,.bmp,.webp的图片文件。', - Exceed_max_size_limit: '超过文件大小限制', - File_Exceed_Tips: '文件大小错误, 您只能上传不大于2MB的图片文件!', - Cancel_Avater_Tips: '您确定取消该图像的截取?', - - // /views/oj/user/UserHome.vue - Recent_login_time: '最近上线时间:', - Not_set_yet: '这个家伙很懒,什么也没写…', - UserHome_Solved: '已解决', - UserHome_Submissions: '总交题数', - UserHome_Score: 'OI分数', - UserHome_Rating: 'CF分数', - List_Solved_Problems: '已解决问题列表', - UserHome_Not_Data: '这家伙太懒了,还没有做过题...', - Personal_Profile: '个人简介', - UserHome_Solved_Problems: '做题情况', - Thermal_energy_table_submitted_in_the_last_year:'最近一年提交热力表', - Calendar_Tooltip_Uint:'次提交', - Jan: '一月', - Feb: '二月', - Mar: '三月', - Apr: '四月', - May: '五月', - Jun: '六月', - Jul: '七月', - Aug: '八月', - Sep: '九月', - Oct: '十月', - Nov: '十一月', - Dec: '十二月', - Sun: '周日', - Mon: '周一', - Tue: '周二', - Wed: '周三', - Thu: '周四', - Fri: '周五', - Sat: '周六', - Less:'较少', - More:'较多', - on:'在', - - // /views/oj/user/Setting.vue - Account_Setting: '账户设置', - UserInfo_Setting: '资料设置', - - // App.vue 底部文案 - Service: '服务', - Judging_Queue: '评测队列', - System_Info: '系统信息', - Development: '开发', - Open_Source: '开源', - Support: '支持', - Help: '帮助', - Group: 'Q群', - - // /views/oj/Home.vue - Welcome_to: '欢迎使用 ', - Recent_7_Days_AC_Rank: '最近7天内AC排名', - Other_OJ_Contest: '其它OJ的近期比赛', - Supported_Remote_Online_Judge: '支持的远程评测平台', - - - // 表格通用列名,按钮,搜索框等 - Enter_keyword: '输入关键词', - Reset: '重置', - Username: '用户名', - Solved: '已解决', - AC: 'AC', - OJ: 'OJ', - Title: '标题', - Begin_Time: '开始时间', - End_Time: '结束时间', - Contest_Time: '比赛时间', - Recent_Contest: '近期比赛', - Problem_ID: '题目ID', - Total: '总数', - AC_Rate: 'AC 通过率', - Score: '分数', - - // /views/oj/problem/problemList.vue - Problem_List: '题目列表', - Problem_Bank: '题库', - All: '全部', - My_OJ: '主题库', - Level: '难度', - Tags: '标签', - Search_Filter_Tag: '输入标签名称...', - Pick_a_random_question: '随机选一题', - Touch_Get_Status: '请点击或悬停鼠标至问题行查看提交状态', - Good_luck_to_you: '祝你好运!', - - // /views/oj/problem/Problem.vue - Problem_Description: '题目描述', - My_Submission: '我的提交', - Problem_Annex: '题目附件', - Login_to_view_your_submission_history: '登录以查看您的提交记录', - Shrink_Sidebar: '收缩侧边栏', - View_Problem_Content: '查看题目内容', - Only_View_Problem: '只看题目内容', - Put_away_the_full_screen_and_write_the_code: '收起全屏,编写代码', - Contest_Problem: '比赛题目', - Show_Tags: '显示标签', - Hide_Tags: '隐藏标签', - No_tag: '暂无标签', - Statistic: '题目统计', - Solutions: '全部提交', - Problem_Discussion: '题目讨论', - Description: '题目描述', - Input: '输入描述', - Output: '输出描述', - Sample_Input: '样例输入', - Sample_Output: '样例输出', - Hint: '说明', - Source: '来源', - Status: '状态', - Information: '题目信息', - Time_Limit: '时间限制', - Memory_Limit: '内存限制', - Other: '其他语言', - Created: '出题人', - Please_login_first: '请先登录', - Submit: '提交评测', - Online_Test:'在线自测', - Submitting: '提交中', - Judging: '正在评测', - Wrong_Answer: 'Wrong Answer', - View_Contest: '查看比赛', - Are_you_sure_you_want_to_reset_your_code: '您确定要重置代码吗?', - Code_can_not_be_empty: '代码不能为空', - Code_Length_can_not_exceed_65535: '代码的字符长度不能超过65535!', - Submit_code_successfully: '提交代码成功', - You_have_solved_the_problem: '你已经解决了该问题', - Submitted_successfully: '提交成功', - Submitted_Not_Result: '提交成功,判题结果暂不可知', - You_have_submitted_a_solution: '您已有提交记录', - Contest_has_ended: '比赛已结束', - You_have_submission_in_this_problem_sure_to_cover_it: '您已经提交过该问题的代码,确定重新提交?', - Close: '关闭', - Cancel: '取消', - OK: '确定', - Copied_successfully: '复制成功', - Copied_failed: '复制失败', - - - // /views/oj/status/SubmissionList.vue - Mine: '我的', - ID: 'ID', - Time: '运行时间', - Memory: '运行内存', - Length: '代码长度', - Language: '语言', - View_submission_details: '查看提交详情', - Judger: '判题源', - Author: '作者', - Submit_Time: '提交时间', - Option: '操作', - Rejudge: '重新评测', - Resubmitted_Successfully: '重新提交成功!', - Refresh: '刷新', - Enter_Problem_ID: '请输入题目ID', - Enter_Author: '请输入作者', - Run_ID: 'Run ID', - Problem: '题目', - Problem_Score: 'OI题目总分数', - OI_Rank_Score: 'OI排行榜得分', - OI_Rank_Calculation_Rule: 'OI排行得分计算公式', - Cancel_Evaluation: '取消评测', - Modify_Evaluation:'修改评测', - Has_Been_Manually_Judged:'已被人工评测', - Manually_Jugde:'人工评测', - Cancel_Judge_Tips:'你是否确定将该提交标记为已取消?', - Cancel_Successfully:'取消成功', - Click_to_Manually_Judge:'点击进行人工评测', - - - // /views/oj/status/SubmissionDetails.vue - Test_point_details: '测试点详情', - Copy: '复制', - Shared: '分享', - Unshared: '不分享', - Shared_successfully: '分享成功', - Cancel_Sharing_Successfully: '取消分享成功', - Input_File: '输入文件', - Output_File: '输出文件', - Case_tips: '信息提示', - Nothing: '无', - - // /views/oj/rank/ACMRank.vue - ACM_Ranklist: 'ACM 排行榜', - User: '用户', - Nickname: '昵称', - Signature: '个性简介', - Rating: '通过率', - Rank_Search_Placeholder: '请输入查询的用户名、昵称或真实姓名', - - // /views/oj/rank/OIRank.vue - OI_Ranklist: 'OI 排行榜', - - // /views/oj/discussion/discussion.vue - Go_to_problem: '前往原题', - Release_Time: '发布时间', - Likes: '点赞', - Like_Successfully: '点赞成功', - Cancel_Like_Successfully: '取消成功', - Views: '浏览', - Edit: '编辑', - Delete: '删除', - Post_discussion: '发布一个讨论~', - Post_problem_discussion: '发布题解', - General_discussion: '公共讨论区', - Return: '返回', - Category: '分类', - Discussion_title: '标题', - Discussion_Desc: '描述', - Discussion_Category: '分类', - Discussion_top: '是否置顶', - Discussion_content: '内容', - Create_Discussion: '创建', - Edit_Discussion: '编辑', - Delete_Discussion_Tips: '此操作将删除讨论,包括相关的评论和回复。你要继续吗?', - Delete_successfully: '删除成功', - Post_successfully: '发布成功', - Send_successfully: '发送成功', - - // /views/oj/discussion/discussionList.vue - Report: '举报', - Like: '点赞', - Liked: '已点赞', - Report_Reason: '举报原因', - The_report_label_and_reason_cannot_be_empty: '举报标签和理由不能都为空', - - // 404.vue - Page_Not_Found:"页面找不到啦", - Go_Home: '返回主页', - Back: '返回', - - // /views/oj/contest/ContestList.vue - Rule: '规则', - Running: '进行中', - Scheduled: '筹备中', - Ended: '已结束', - No_contest: '暂无比赛', - Contests: '比赛', - Public: '公开赛', - Private: '私有赛', - Protected: '保护赛', - Public_Tips: '公开赛 - 每个用户都可查看与提交', - Protected_Tips: '保护赛 - 每个用户都可查看,但是提交需要密码', - Private_Tips: '私有赛 - 用户需要密码才可查看与提交', - Contest_Outside_ScoreBoard: '赛外榜单', - - // /views/oj/contest/ContestDetail.vue - StartAt: '开始时间', - EndAt: '结束时间', - Password_Required: '需要密码', - To_Enter_Need_Password: '请输入该比赛的密码,方可进入比赛', - Enter_the_contest_password: '请输入比赛密码', - Enter: '进入', - Overview: '比赛简介', - Announcement: '公告', - Submissions: '提交记录', - Rankings: '排行榜', - Comment: '评论', - Print: '打印', - Admin_Print: '管理打印', - Admin_Helper: 'AC助手', - Register_contest_successfully: '比赛报名成功', - Please_check_the_contest_announcement_for_details: '具体内容请查看比赛公告', - Go_To_Group_Contest_List:'前往团队比赛列表', - Group_Contest_Tag:'团队比赛', - - // /views/oj/contest/children/ACMContestRank.vue - Contest_Rank: '比赛排名', - Menu: '菜单', - Chart: '图表', - Table: '表格', - Auto_Refresh: '自动刷新', - RealName: '真实姓名', - Force_Update: '强制更新', - Download_as_CSV: '以CSV格式导出排名', - TotalTime: '总时间', - Top_10_Teams: 'Top 10 Teams', - save_as_image: '保存成图片', - Contest_Rank_Seq: '排名', - Star_User: '打星用户', - Unfollow: '取消关注', - Top_And_Follow: '置顶关注', - - // /views/oj/contest/children/ACMInfo.vue - AC_Time: 'AC 时间', - First_Blood: 'First Blood', - Checked: '已检查', - Not_Checked: '未检查', - Check_It: '检查', - Accepted: 'Accepted', - - // /views/oj/contest/children/ContestPrint.vue - Print_Title: '比赛文本打印', - Print_tips: '请将需要打印的文本放入内容框内提交。注意:请不要恶意提交!', - Content: '内容', - Content_cannot_be_empty: '内容不能为空', - The_number_of_content_cannot_be_less_than_50: '内容字符数不能低于50!', - Success_submit_tips: '提交成功!请耐心等待工作人员打印!', - - // /views/oj/contest/children/ContestAdminPrint.vue - Download: '下载', - Printed: '已打印', - Not_Printed: '未打印', - - // /views/oj/contest/children/ContestRejudgeAdmin.vue - Contest_Rejudge: '比赛重新测评', - ID: 'ID', - Rejudge_All: '重测', - Contest_Rejudge_Tips: '您确定重测所有提交记录?', - Rejudge_successfully: '重测成功', - - // /views/oj/contest/children/OIContestRank.vue - Total_Score: '总分', - Based_on_The_Highest_Score_Submitted_For_Each_Problem: '以每题提交的最高得分计算', - Based_on_The_Recent_Score_Submitted_Of_Each_Problem: '以每题提交的最近得分计算', - - // /views/oj/about/Introduction.vue - Compiler: '编译器', - Example: '例题', - Result_Explanation: '结果说明', - Pending_Description: '您的解答正在排队等待评测中,请等待结果...', - Submitted_Faild_Description: '您的此次提交失败,请点击按钮重新提交...', - Compiling_Description: '正在对您的源代码进行编译中,请等待结果...', - Judging_Description: '正在使用测试数据运行您的程序中,请等待结果...', - Compile_Error_Description: "无法编译您的源代码,点击链接查看编译器的输出。", - Persentation_Error_Description: '您提交的代码已经很接近正确答案,请检查代码格式输出是否有多余空格,换行等空白符。', - Accepted_Description: '恭喜! 您的解题方法是正确的。', - Wrong_Answer_Description: "您的程序输出结果与判题程序的答案不符。", - Runtime_Error_Description: '您的程序异常终止,可能的原因是:段错误,被零除或用非0的代码退出程序。', - Time_Limit_Exceeded_Description: '您的程序运行时间已超出题目限制。', - Memory_Limit_Exceeded_Description: '您的程序实际使用的内存已超出题目限制。', - System_Error_Description: '糟糕,判题机系统出了问题。请报告给管理员。', - Cancelled_Description:'您的此次提交被取消!', - Compile_Explanation: '编译说明', - Compile_Tips1:"__int64不是ANSI标准定义,只能在VC使用,在 GNU C++ 中应写成 long long 类型, scanf和printf 请使用%lld作为格式", - Compile_Tips2:"main() 返回值必须定义为 int ,而不是 void", - Compile_Tips3:"i 在循环外失去定义 \"for(int i=0...){...}\"", - Compile_Tips4:"itoa 不是ansi标准函数(标准 C/C++ 中无此函数)", - - // /views/oj/about/Developer.vue - Leader_BackEnd_FrontEnd_Engineer: '主导 & 后端 | 前端 开发者', - Group_Function_Development_Contributor:'团队功能开发贡献者', - Distributed: '分布式', - Distributed_Desc: '前后端分离,支持判题微服务集群', - Customization: '定制化', - Customization_Desc: '网站配置高度集成,支持定制化修改', - Security: '安全性', - Security_Desc: '判题沙盒使用cgroup隔离,网站权限控制完善', - Diversity: '多样性', - Diversity_Desc: '支持Codefoces,HDU,POJ,GYM,AtCoder,SPOJ的远程判题', - Available: '有效', - Faulty: '不完善', - - // /components/oj/common/Announcements.vue - Contest_Announcement: '比赛公告', - No_Announcements: '暂无公告', - - // /components/oj/common/CodeMirror.vue - Lang: '语言', - Code_Editor_Setting:'代码编辑器设置', - Setting:'设置', - Theme: '主题', - FontSize: '字体大小', - TabSize:'Tab 长度', - Two_Spaces:'2个空格', - Four_Spaces:'4个空格', - Eight_Spaces:'8个空格', - Reset_Code: '重置代码', - Upload_file: '上传文件', - monokai: 'Monokai', - solarized: 'Molarized Light', - material: 'Material', - idea:'IDEA', - eclipse:'Eclipse', - base16_dark:'Base16-dark', - cobalt:'Cobalt', - dracula:'Dracula', - Test_Case: '测试用例', - Test_Result: '运行结果', - Running_Test: '运行自测', - Non_Test_Judge_Tips: '输入测试用例后,点击运行自测,这里将会显示运行结果', - Problem_Uncertain_Answer:'注意:本题可能存在多个符合题目要求的输出,请自行判断程序输出是否通过。', - Fill_Case: '填充用例', - Compilation_Failed: '编译失败', - Test_Input: '自测输入', - Expected_Output: '预期输出', - Real_Output: '实际输出', - Pass_Test_Case: '通过测试用例', - - // /components/oj/comment/Comment.vue - Announcement_of_contest_Q_and_A_area: '比赛评论区公告', - Announcement_of_contest_Q_and_A_area_tips1: '请不要提问与比赛无关的问题,禁止灌水!', - Announcement_of_contest_Q_and_A_area_tips2: '比赛过程中,仅自己与比赛管理员的评论可见!', - Announcement_of_contest_Q_and_A_area_tips3: '比赛管理员评论不可回复,比赛结束评论恢复正常!', - Come_and_write_down_your_comments: '快来写下你的评论吧', - Inline_Code: '行内代码', - Code_Block: '代码块', - Link: '链接', - Unordered_list: '无序列表', - Ordered_List: '有序列表', - Submit_Comment: '提交评论', - All_Comment: '全部评论', - Reply: '回复', - Reply_Successfully: '回复成功', - Comment_Successfully: '评论成功', - Reply_Total: '总共', - Replies: '条回复', - Click_Show_All: '点击查看全部', - Pick_up: '收起', - Load_More: '加载更多', - Delete_Comment_Tips: '此操作将删除该评论及其所有回复, 是否继续?', - Delete_Reply_Tips: '此操作将删除该回复, 是否继续?', - - // /views/oj/message/message.vue - Message_Center: '消息中心', - No_Data: '暂无数据', - - // /views/oj/message/UserMsg.vue - Msg_Total: '共', - Msg_Messages: '条', - DiscussMsg: '评论我的', - ReplyMsg: '回复我的', - LikeMsg: '收到的赞', - SysMsg: '系统通知', - MineMsg: '我的消息', - Clean_All: '清空全部', - Action_Like_Discuss: '赞了我的评论', - Action_Like_Post: '赞了我的讨论帖', - Action_Discuss: '评论了我的讨论帖', - Action_Reply: '回复了我的评论', - From_Discussion_Post: '来自讨论帖', - From_the_Contest: '来自比赛', - Delete_Msg_Tips: '你是否确定要删除或清空消息?', - - // /views/oj/training/TrainingList.vue - Search_Training: '搜索训练', - Training_Public: '公开训练', - Training_Private: '私有训练', - Training_Category: '训练分类', - Number: '编号', - Problem_Number: '题目数', - Recent_Update: '最近更新', - - // /views/oj/training/TrainingDetails.vue - Training_Introduction: '训练简介', - Training_Number: '训练编号', - Training_Auth: '训练权限', - Training_Total_Problems: '总题数', - Record_List: '记录榜单', - To_Enter_Training_Need_Password: '请输入该私有训练的密码,方可进入', - Enter_the_training_password: '请输入私有训练的密码', - Register_training_successfully: '验证训练密码成功!', - - // /views/oj/training/TrainingRank.vue - Total_AC: 'AC总数', - - // /views/oj/group/GroupList.vue - Search_Group: '搜索团队', - Create_Group: '创建团队', - All_Group: '所有团队', - My_Group: '我的团队', - No_Groups: '暂无团队', - Group_Name: '团队名称', - Group_Short_Name: '团队简称(团队题目展示ID前缀)', - Group_Brief: '团队简介', - Group_Description: '团队描述', - Group_Public: '公开团队', - Group_Protected: '保护团队', - Group_Private: '私有团队', - Group_Hidden: '隐藏', - Group_Auth: '团队权限', - Group_Owner: '团队负责人', - Group_Code: '团队邀请码', - Total_Members: '成员总数', - Group_Public_Tips: '公开团队 - 加入无需申请', - Group_Protected_Tips: '保护团队 - 加入需要申请', - Group_Private_Tips: '私有团队 - 需要邀请码才能申请', - Group_Hidden_Tips: '隐藏 - 只有团队成员可见', - Create_Successfully: '创建成功', - Group_Name_Check_Required: '团队名称不能为空', - Group_Name_Check_Min_Max: '团队名称的长度应为 5 到 25', - Group_Short_Name_Check_Required: '团队简称不能为空', - Group_Short_Name_Check_Min_Max: '团队简称的长度应为 5 到 10', - Group_Brief_Check_Required: '团队简介不能为空', - Group_Brief_Check_Min_Max: '团队简介的长度应为 5 到 50', - Group_Auth_Check_Required: '团队权限不能为空', - Group_Code_Check_Required: '团队邀请码不能为空', - Group_Code_Check_Min_Max: '团队邀请码的长度应为 6', - Group_Description_Check_Required: '团队描述不能为空', - Group_Description_Check_Min_Max: '团队描述的长度应为 5 到 1000', - - // /views/oj/group/GroupDetails.vue - Apply_Group: '申请加入', - Apply_Successfully: '申请成功', - Exit_Group: '退出团队', - Exit_Group_Tips: '确定要退出团队吗?退出后您将无法再查看团队资源!', - Exit_Successfully: '退出成功', - Disband_Group:'解散团队', - Disband_Group_Tips:'您是否确定要解散该团队?', - Disband_Successfully:'解散成功', - - Group_Number: '团队编号', - Group_Home: '主页 ', - Group_Problem: '题目', - Group_Training: '训练', - Group_Contest: '比赛', - Group_Submission: '评测', - Group_Discussion: '讨论', - Group_Setting: '设置', - Group_Announcement: '公告', - Group_Rank:'排名', - Group_Member: '成员', - Apply_Reason: '申请理由', - Apply_Reason_Check_Required: '申请理由不能为空', - Apply_Reason_Check_Min_Max: '申请理由的长度应为 5 到 100', - - // /views/oj/group/GroupDiscussionList.vue - No_Discussion: '暂无讨论', - Problem_Discussion:'题目讨论', - - // /views/oj/group/GroupMemberList.vue - Applying: '申请中', - Refused: '已拒绝', - General_Member: '普通成员', - Member_Admin: '成员管理', - Join_Time: '加入时间', - Change_Time: '变更时间', - Member_Auth: '成员权限', - Group_Admin: '管理员', - Group_Root: '超级管理员', - View_Reason: '查看理由', - Delete_Member: '踢出该成员', - Delete_Member_Tips: '确定要踢出该成员吗?踢出后该成员将无法再查看团队资源!另外,如果该成员是团队负责人,那么团队也将被一同解散!', - - // /views/oj/group/GroupTrainingList.vue - Back_To_Admin_Training_List:'返回训练管理列表', - Back_To_Training_List:'返回训练列表', - Back_Admin_Training_Problem_List:'返回训练题目管理列表', - - // /views/oj/group/GroupContestList.vue - Back_To_Admin_Contest_List:'返回比赛管理列表', - Back_To_Contest_List:'返回比赛列表', - Back_Admin_Contest_Problem_List:'返回比赛题目管理列表', - - // /views/oj/group/GroupSetting.vue - Add_From_Group_Problem: '从团队题库添加题目', - - // /views/oj/group/GroupSetting.vue - Group_Visible: '在团队列表显示', - Group_Not_Visible: '在团队列表隐藏', - - // /views/oj/group/GroupRank.vue - Group_ACM_Rank_Type: 'ACM排序', - Group_OI_Rank_Type: 'OI排序', - - // GroupAdminProblemList.vue - Group_Problem_Apply_Public:'申请加入公开题库', - Already_Public_Problem:'已在公开题库中', - Group_Problem_Apply_Public_Tips:'您是否确定要申请该题目加入公开题库?', - Cancel_Group_Problem_Apply_Public_Tips:'您是否要取消申请该题目加入公开题库?' -} diff --git a/src/hoj-vue/src/main.js b/src/hoj-vue/src/main.js deleted file mode 100644 index 32b36ca..0000000 --- a/src/hoj-vue/src/main.js +++ /dev/null @@ -1,101 +0,0 @@ -import Vue from 'vue' -import App from './App.vue' -import store from './store' -import Element from 'element-ui' -import i18n from '@/i18n' - -// import "element-ui/lib/theme-chalk/index.css" -import 'font-awesome/css/font-awesome.min.css' -import Message from 'vue-m-message' -import 'vue-m-message/dist/index.css' -import axios from 'axios' - -import Md_Katex from '@iktakahiro/markdown-it-katex' - -// 注释表示使用cdn引入 -// import 'xe-utils' -import VXETable from 'vxe-table' -// import 'vxe-table/lib/style.css' - -import Katex from '@/common/katex' - -import VueClipboard from 'vue-clipboard2' - -import highlight from '@/common/highlight' - -import filters from '@/common/filters.js' -import VueCropper from 'vue-cropper' - -// import ECharts from 'vue-echarts/components/ECharts.vue' -// import 'echarts/lib/chart/bar' -// import 'echarts/lib/chart/line' -// import 'echarts/lib/chart/pie' -// import 'echarts/lib/component/title' -// import 'echarts/lib/component/grid' -// import 'echarts/lib/component/dataZoom' -// import 'echarts/lib/component/legend' -// import 'echarts/lib/component/tooltip' -// import 'echarts/lib/component/toolbox' -// import 'echarts/lib/component/markPoint' -// Vue.component('ECharts', ECharts) - -// 使用CDN的方式如下引入echarts -import VueECharts from 'vue-echarts'; -Vue.component('ECharts', VueECharts) - - -import VueParticles from 'vue-particles' -import SlideVerify from 'vue-monoplasty-slide-verify' - -// markdown编辑器 -import mavonEditor from 'mavon-editor' //引入markdown编辑器 -import 'mavon-editor/dist/css/index.css'; -Vue.use(mavonEditor) - -import {Drawer,List,Menu,Icon,AppBar,Button,Divider} from 'muse-ui'; -import 'muse-ui/dist/muse-ui.css'; - -import VueDOMPurifyHTML from 'vue-dompurify-html' -Vue.use(VueDOMPurifyHTML) - -import router from './router' -Vue.use(Drawer) -Vue.use(List) -Vue.use(Menu) -Vue.use(Icon) -Vue.use(AppBar) -Vue.use(Button) -Vue.use(Divider) - -Object.keys(filters).forEach(key => { // 注册全局过滤器 - Vue.filter(key, filters[key]) -}) -Vue.use(VueParticles) // 粒子特效背景 -Vue.use(Katex) // 数学公式渲染 -VXETable.setup({ - // 对组件内置的提示语进行国际化翻译 - i18n: (key, value) => i18n.t(key, value) -}) -Vue.use(VXETable) // 表格组件 -Vue.use(VueClipboard) // 剪贴板 -Vue.use(highlight) // 代码高亮 -Vue.use(Element,{ - i18n: (key, value) => i18n.t(key, value) -}) - -Vue.use(VueCropper) // 图像剪切 -Vue.use(Message, { name: 'msg' }) // `Vue.prototype.$msg` 全局消息提示 - -Vue.use(SlideVerify) // 滑动验证码组件 - -Vue.prototype.$axios = axios - -Vue.prototype.$markDown = mavonEditor.mavonEditor.getMarkdownIt().use(Md_Katex) // 挂载到vue - -Vue.config.productionTip = false -new Vue({ - router, - store, - i18n, - render: h => h(App) -}).$mount('#app') diff --git a/src/hoj-vue/src/router/adminRoutes.js b/src/hoj-vue/src/router/adminRoutes.js deleted file mode 100644 index 0ac9319..0000000 --- a/src/hoj-vue/src/router/adminRoutes.js +++ /dev/null @@ -1,198 +0,0 @@ - -// 引入 view 组件 -const Login= ()=>import('@/views/admin/Login') -const Home= ()=>import('@/views/admin/Home') -const Dashboard= ()=>import('@/views/admin/Dashboard') -const User= ()=>import('@/views/admin/general/User') -const Announcement= ()=>import('@/views/admin/general/Announcement') -const SysNotice= ()=>import('@/views/admin/general/SysNotice') -const SystemConfig= ()=>import('@/views/admin/general/SystemConfig') -const SysSwitch= ()=>import('@/views/admin/general/SysSwitch') -const ProblemList= ()=>import('@/views/admin/problem/ProblemList') -const AdminGroupProblemList= ()=>import('@/views/admin/problem/GroupProblemList') -const Problem= ()=>import('@/views/admin/problem/Problem') -const Tag= ()=>import('@/views/admin/problem/Tag') -const ProblemImportAndExport= ()=>import('@/views/admin/problem/ImportAndExport') -const Contest= ()=>import('@/views/admin/contest/Contest') -const ContestList= ()=>import('@/views/admin/contest/ContestList') -const Training= ()=>import('@/views/admin/training/Training') -const TrainingList= ()=>import('@/views/admin/training/TrainingList') -const TrainingProblemList= ()=>import('@/views/admin/training/TrainingProblemList') -const TrainingCategory= ()=>import('@/views/admin/training/Category') -const DiscussionList= ()=>import('@/views/admin/discussion/Discussion') -const adminRoutes= [ - { - path: '/admin/login', - name: 'admin-login', - component: Login, - meta: { title: 'Login' } - }, - { - path: '/admin/', - component: Home, - meta: { requireAuth:true, requireAdmin: true }, - children: [ - { - path: '', - redirect: 'dashboard', - component: Dashboard, - meta: { title: 'Dashboard' } - }, - { - path: 'dashboard', - name: 'admin-dashboard', - component: Dashboard, - meta: { title: 'Dashboard' } - }, - { - path: 'user', - name: 'admin-user', - component: User, - meta: { requireSuperAdmin: true,title:'User Admin'}, - }, - { - path: 'announcement', - name: 'admin-announcement', - component: Announcement, - meta: { requireSuperAdmin: true,title:'Announcement Admin'}, - }, - { - path: 'notice', - name: 'admin-notice', - component: SysNotice, - meta: { requireSuperAdmin: true,title:'Notice Admin'}, - }, - { - path: 'conf', - name: 'admin-conf', - component: SystemConfig, - meta: { requireSuperAdmin: true,title:'System Config'}, - }, - { - path: 'switch', - name: 'admin-switch', - component: SysSwitch, - meta: { requireSuperAdmin: true,title:'System Switch'}, - }, - { - path: 'problems', - name: 'admin-problem-list', - component: ProblemList, - meta: { title:'Problem List'}, - }, - { - path: 'problem/create', - name: 'admin-create-problem', - component: Problem, - meta: { title:'Create Problem'}, - }, - { - path: 'problem/edit/:problemId', - name: 'admin-edit-problem', - component: Problem, - meta: { title:'Edit Problem'}, - }, - { - path: 'problem/tag', - name: 'admin-problem-tag', - component: Tag, - meta: { title:'Admin Tag'}, - }, - { - path: 'group-problem/apply', - name: 'admin-group-apply-problem', - component: AdminGroupProblemList, - meta: { title:'Admin Group Apply Problem'}, - }, - { - path: 'problem/batch-operation', - name: 'admin-problem_batch_operation', - component: ProblemImportAndExport, - meta: { title:'Export Import Problem'}, - }, - { - path: 'training/create', - name: 'admin-create-training', - component: Training, - meta: { title:'Create Training'}, - }, - { - path: 'training', - name: 'admin-training-list', - component: TrainingList, - meta: { title:'Training List'} - }, - { - path: 'training/:trainingId/edit', - name: 'admin-edit-training', - component: Training, - meta: { title:'Edit Training'} - }, - { - path: 'training/:trainingId/problems', - name: 'admin-training-problem-list', - component: TrainingProblemList, - meta: { title:'Training Problem List'} - }, - { - path: 'training/category', - name: 'admin-training-category', - component: TrainingCategory, - meta: { title:'Admin Category'} - }, - { - path: 'contest/create', - name: 'admin-create-contest', - component: Contest, - meta: { title:'Create Contest'}, - }, - { - path: 'contest', - name: 'admin-contest-list', - component: ContestList, - meta: { title:'Contest List'} - }, - { - path: 'contest/:contestId/edit', - name: 'admin-edit-contest', - component: Contest, - meta: { title:'Edit Contest'} - }, - { - path: 'contest/:contestId/announcement', - name: 'admin-contest-announcement', - component: Announcement, - meta: { title:'Contest Announcement'} - }, - { - path: 'contest/:contestId/problems', - name: 'admin-contest-problem-list', - component: ProblemList, - meta: { title:'Contest Problem List'} - }, - { - path: 'contest/:contestId/problem/create', - name: 'admin-create-contest-problem', - component: Problem, - meta: { title:'Create Problem'} - }, - { - path: 'contest/:contestId/problem/:problemId/edit', - name: 'admin-edit-contest-problem', - component: Problem, - meta: { title:'Edit Problem'} - }, - { - path: 'discussion', - name: 'admin-discussion-list', - component: DiscussionList, - meta: { title:'Discussion Admin'} - }, - ] - }, - { - path: '/admin/*', redirect: '/admin/login' - } - ] - - export default adminRoutes diff --git a/src/hoj-vue/src/router/index.js b/src/hoj-vue/src/router/index.js deleted file mode 100644 index 0c04781..0000000 --- a/src/hoj-vue/src/router/index.js +++ /dev/null @@ -1,142 +0,0 @@ -import Vue from 'vue' -import VueRouter from 'vue-router' -import { sync } from 'vuex-router-sync' -import adminRoutes from '@/router/adminRoutes' -import ojRoutes from '@/router/ojRoutes' -import mMessage from '@/common/message' -import store from '@/store' -import NProgress from 'nprogress' // nprogress插件 -import 'nprogress/nprogress.css' // nprogress样式 - -// 配置NProgress进度条选项 —— 动画效果 -NProgress.configure({ ease: 'ease', speed: 1000,showSpinner: false }) - -Vue.use(VueRouter) - -//获取原型对象上的push函数 -const originalPush = VueRouter.prototype.push -//修改原型对象中的push方法 -VueRouter.prototype.push = function push(location) { - return originalPush.call(this, location).catch(err => err) -} - -let routes = new Set([...ojRoutes, ...adminRoutes]); -const router = new VueRouter({ - mode: 'history', - base: process.env.BASE_URL, - routes, - scrollBehavior(to, from, savedPosition) { - if (savedPosition) { - return savedPosition - } else { - return { x: 0, y: 0 } - } - }, -}) - - -// 路由判断登录 根据路由配置文件的参数(全局身份验证token) -router.beforeEach((to, from, next) => { - NProgress.start() - if (to.matched.some(record => record.meta.requireAuth)) { // 判断该路由是否需要登录权限 - const token = localStorage.getItem('token') || '' - const isSuperAdmin = store.getters.isSuperAdmin - const isAmdin = store.getters.isAdminRole - if (token) { // 判断当前的token是否存在 ; 登录存入的token - - if(to.matched.some(record => record.meta.requireSuperAdmin)){ // 判断是否需要超级管理权限 - - if(isSuperAdmin){ // 拥有权限就进入 - next() - }else{ // 没有超级管理员权限 全部返回登录页,并且清除缓存 - if(to.path.split('/')[1]==='admin'){ //管理端 - next({ - path: '/admin/login' - }) - }else{ // oj端 - next({ - path: '/home' - }) - store.commit('changeModalStatus',{mode: 'Login', visible: true}) - } - mMessage.error('Error!Please Login Again!') - store.commit("clearUserInfoAndToken"); - } - }else if(to.matched.some(record => record.meta.requireAdmin)){ //判断是否需要管理员权限 - if(isAmdin){ - next() - }else{ // 没有管理员权限 全部返回登录页,并且清除缓存 - if(to.path.split('/')[1]==='admin'){ // 管理端 - next({ - path: '/admin/login' - }) - }else{ - next({ - path: '/home' - }) - store.commit('changeModalStatus',{mode: 'Login', visible: true}) - } - mMessage.error('Error!Please Login Again!') - store.commit("clearUserInfoAndToken"); - } - }else{ - next() - } - - } else { // 如果没有token - - if(to.path.split('/')[1]==='admin'){ - next({ - path: '/admin/login' // 管理端无token认证返回登录页 - }) - }else{ - next({ - path: '/home' // 无token认证的一致返回到主页 - }) - store.commit('changeModalStatus',{mode: 'Login', visible: true}) - } - store.commit("clearUserInfoAndToken"); - mMessage.error('Please Login First!') - } - } else { // 不需要登录认证的页面 - if(to.meta.access){ // 单级路由有access控制 - const webConfig = store.getters.websiteConfig; - switch(to.meta.access){ - case 'discussion': - if(!webConfig.openPublicDiscussion){ - next({ - path: '/home' - }) - mMessage.error('No Access: There is no open discussion area on the website!') - } - break; - case 'groupDiscussion': - if(!webConfig.openGroupDiscussion){ - next({ - path: '/home' - }) - mMessage.error('No Access: There is no open group discussion area on the website!') - } - break; - case 'contestComment': - if(!webConfig.openContestComment){ - next({ - path: '/home' - }) - mMessage.error('No Access: There is no open contest comment area on the website!') - } - break; - } - } - next() - } - -}) - -router.afterEach((to, from, next) => { - NProgress.done() -}) - -sync(store, router) - -export default router diff --git a/src/hoj-vue/src/router/ojRoutes.js b/src/hoj-vue/src/router/ojRoutes.js deleted file mode 100644 index be627d5..0000000 --- a/src/hoj-vue/src/router/ojRoutes.js +++ /dev/null @@ -1,435 +0,0 @@ -import Home from '@/views/oj/Home.vue' -import SetNewPassword from "@/views/oj/user/SetNewPassword.vue" -import UserHome from "@/views/oj/user/UserHome.vue" -import Setting from "@/views/oj/user/Setting.vue" -import ProblemLIst from "@/views/oj/problem/ProblemList.vue" -import Logout from "@/views/oj/user/Logout.vue" -import SubmissionList from "@/views/oj/status/SubmissionList.vue" -import SubmissionDetails from "@/views/oj/status/SubmissionDetails.vue" -import ContestList from "@/views/oj/contest/ContestList.vue" -import Problem from "@/views/oj/problem/Problem.vue" -import ACMRank from "@/views/oj/rank/ACMRank.vue" -import OIRank from "@/views/oj/rank/OIRank.vue" -import ContestDetails from "@/views/oj/contest/ContestDetails.vue" -import ACMScoreBoard from "@/views/oj/contest/outside/ACMScoreBoard.vue" -import OIScoreBoard from "@/views/oj/contest/outside/OIScoreBoard.vue" -import ContestProblemList from "@/views/oj/contest/children/ContestProblemList.vue" -import ContestRank from "@/views/oj/contest/children/ContestRank.vue" -import ACMInfoAdmin from "@/views/oj/contest/children/ACMInfoAdmin.vue" -import Announcements from "@/components/oj/common/Announcements.vue" -import ContestComment from "@/views/oj/contest/children/ContestComment.vue" -import ContestPrint from "@/views/oj/contest/children/ContestPrint.vue" -import ContestAdminPrint from "@/views/oj/contest/children/ContestAdminPrint.vue" -import ContestRejudgeAdmin from "@/views/oj/contest/children/ContestRejudgeAdmin.vue" -import DiscussionList from "@/views/oj/discussion/discussionList.vue" -import Discussion from "@/views/oj/discussion/discussion.vue" -import Introduction from "@/views/oj/about/Introduction.vue" -import Developer from "@/views/oj/about/Developer.vue" -import Message from "@/views/oj/message/message.vue" -import UserMsg from "@/views/oj/message/UserMsg.vue" -import SysMsg from "@/views/oj/message/SysMsg.vue" -import TrainingList from "@/views/oj/training/TrainingList.vue" -import TrainingDetails from "@/views/oj/training/TrainingDetails.vue" -import TrainingProblemList from "@/views/oj/training/TrainingProblemList.vue" -import TrainingRank from "@/views/oj/training/TrainingRank.vue" -import GroupList from '@/views/oj/group/GroupList.vue' -import GroupDetails from '@/views/oj/group/GroupDetails.vue' -import GroupAnnouncementList from '@/views/oj/group/children/GroupAnnouncementList.vue' -import GroupProblemList from '@/views/oj/group/children/GroupProblemList.vue' -import GroupTrainingList from '@/views/oj/group/children/GroupTrainingList.vue' -import GroupContestList from '@/views/oj/group/children/GroupContestList.vue' -import GroupDiscussionList from '@/views/oj/group/children/GroupDiscussionList.vue' -import GroupMemberList from '@/views/oj/group/children/GroupMemberList.vue' -import GroupSetting from '@/views/oj/group/children/GroupSetting.vue' -import GroupRank from '@/views/oj/group/children/GroupRank.vue' -import NotFound from "@/views/404.vue" - -const ojRoutes = [ - { - path: '/', - redirect: '/home', - component: Home, - meta: { title: 'Home' } - }, - { - path: '/home', - name: 'Home', - component: Home, - meta: { title: 'Home' } - }, - { - path: '/problem', - name: 'ProblemList', - component: ProblemLIst, - meta: { title: 'Problem' } - }, - { - path: '/problem/:problemID', - name: 'ProblemDetails', - component: Problem, - meta: { title: 'Problem Details' } - }, - { - path: '/training', - name: 'TrainingList', - component: TrainingList, - meta: { title: 'Training' } - }, - { - name: 'TrainingDetails', - path: '/training/:trainingID/', - component:TrainingDetails, - meta: {title: 'Training Details'}, - children: [ - { - name: 'TrainingProblemList', - path: 'problems', - component: TrainingProblemList, - meta: { title: 'Training Problem' } - }, - { - name: 'TrainingProblemDetails', - path: 'problem/:problemID/', - component: Problem, - meta: { title: 'Training Problem Details' } - }, - { - name: 'TrainingRank', - path: 'rank', - component: TrainingRank, - meta: { title: 'Training Rank' } - } - ] - }, - { - path: '/contest', - name: 'ContestList', - component: ContestList, - meta: { title: 'Contest' } - }, - { - path: '/contest/acm-scoreboard/:contestID', - name: 'ACMScoreBoard', - component: ACMScoreBoard, - meta: { title: 'ACM Contest ScoreBoard' } - }, - { - path: '/contest/oi-scoreboard/:contestID', - name: 'OIScoreBoard', - component: OIScoreBoard, - meta: { title: 'OI Contest ScoreBoard' } - }, - { - name: 'ContestDetails', - path: '/contest/:contestID/', - component:ContestDetails, - meta: {title: 'Contest Details',requireAuth:true}, - children: [ - { - name: 'ContestSubmissionList', - path: 'submissions', - component: SubmissionList, - meta: { title: 'Contest Submission' } - }, - { - name: 'ContestSubmissionDeatil', - path: 'problem/:problemID/submission-deatil/:submitID', - component: SubmissionDetails, - meta: { title: 'Contest Submission Deatil' } - }, - { - name: 'ContestProblemList', - path: 'problems', - component: ContestProblemList, - meta: { title: 'Contest Problem' } - }, - { - name: 'ContestProblemDetails', - path: 'problem/:problemID/', - component: Problem, - meta: { title: 'Contest Problem Details' } - }, - { - name: 'ContestAnnouncementList', - path: 'announcements', - component: Announcements, - meta: { title: 'Contest Announcement' } - }, - { - name: 'ContestRank', - path: 'rank', - component: ContestRank, - meta: { title: 'Contest Rank' } - }, - { - name: 'ContestACInfo', - path: 'ac-info', - component: ACMInfoAdmin, - meta: { title: 'Contest AC Info'} - }, - { - name:'ContestRejudgeAdmin', - path:'rejudge', - component:ContestRejudgeAdmin, - meta: { title: 'Contest Rejudge',requireSuperAdmin:true } - }, - { - name: 'ContestComment', - path:'comment', - component: ContestComment, - meta: { title: 'Contest Comment', access:'contestComment'} - }, - { - name: 'ContestPrint', - path:'print', - component: ContestPrint, - meta: { title: 'Contest Print'} - }, - { - name: 'ContestAdminPrint', - path:'admin-print', - component: ContestAdminPrint, - meta: { title: 'Contest Admin Print'} - } - ] - }, - { - path: '/status', - name: 'SubmissionList', - component: SubmissionList, - meta: { title: 'Status' } - }, - { - path: '/submission-detail/:submitID', - name: 'SubmissionDeatil', - component: SubmissionDetails, - meta: {title: 'Submission Deatil' } - }, - { - path: '/acm-rank', - name: 'ACM Rank', - component: ACMRank, - meta: { title: 'ACM Rank' } - }, - { - path: '/oi-rank', - name: 'OI Rank', - component: OIRank, - meta: { title: 'OI Rank' } - }, - { - path: '/reset-password', - name: 'SetNewPassword', - component: SetNewPassword, - meta: { title: 'Reset Password' } - }, - { - name: 'UserHome', - path: '/user-home', - component: UserHome, - meta: { title: 'User Home' } - }, - { - name: 'Setting', - path: '/setting', - component: Setting, - meta: { requireAuth: true, title: 'Setting' } - }, - { - name: 'Logout', - path: '/logout', - component: Logout, - meta: { requireAuth: true, title: 'Logout' } - }, - { - path: '/discussion', - name: 'AllDiscussion', - meta: {title: 'Discussion', access:'discussion'}, - component:DiscussionList - }, - { - path: '/discussion/:problemID', - name: 'ProblemDiscussion', - meta: {title: 'Discussion', access:'discussion'}, - component:DiscussionList - }, - { - path: '/discussion-detail/:discussionID', - name:'DiscussionDetails', - meta: {title: 'Discussion Details', access:'discussion'}, - component: Discussion - }, - { - path: '/group', - name: 'GroupList', - component: GroupList, - meta: {title: 'Group'} - }, - { - path: '/group/:groupID', - name: 'GroupDetails', - component: GroupDetails, - meta: {title: 'Group Details', requireAuth: true}, - children: [ - { - path: 'announcement', - name: 'GroupAnnouncementList', - component: GroupAnnouncementList, - meta: { title: 'Group Announcement' }, - }, - { - path: 'problem', - name: 'GroupProblemList', - component: GroupProblemList, - meta: { title: 'Group Problem' }, - }, - { - name: 'GroupProblemDetails', - path: 'problem/:problemID/', - component: Problem, - meta: { title: 'Group Problem Details' } - }, - { - path: 'training', - name: 'GroupTrainingList', - component: GroupTrainingList, - meta: { title: 'Group Training' } - }, - { - name: 'GroupTrainingDetails', - path: 'training/:trainingID/', - component:TrainingDetails, - meta: {title: 'Group Training Details'}, - children: [ - { - name: 'GroupTrainingProblemList', - path: 'problems', - component: TrainingProblemList, - meta: { title: 'Group Training Problem' } - }, - { - name: 'GroupTrainingProblemDetails', - path: 'problem/:problemID/', - component: Problem, - meta: { title: 'Group Training Problem Details' } - }, - { - name: 'GroupTrainingRank', - path: 'rank', - component: TrainingRank, - meta: { title: 'Group Training Rank' } - } - ] - }, - { - path: 'contest', - name: 'GroupContestList', - component: GroupContestList, - meta: { title: 'Group Contest' } - }, - { - path: 'status', - name: 'GroupSubmissionList', - component: SubmissionList, - meta: { title: 'Group Status' } - }, - { - path: 'submission-detail/:submitID', - name: 'GroupSubmissionDeatil', - component: SubmissionDetails, - meta: {title: 'Group Submission Deatil' } - }, - { - path: 'discussion', - name: 'GroupDiscussionList', - component: GroupDiscussionList, - meta: { title: 'Group Discussion', access:'groupDiscussion' } - }, - { - path: 'discussion/:problemID', - name: 'GroupProblemDiscussion', - meta: {title: 'Group Discussion', access:'groupDiscussion'}, - component:GroupDiscussionList - }, - { - path: 'discussion-detail/:discussionID', - name:'GroupDiscussionDetails', - meta: {title: 'Group Discussion Details', access:'groupDiscussion'}, - component: Discussion - }, - { - path: 'member', - name: 'GroupMemberList', - component: GroupMemberList, - meta: { title: 'Group Member' } - }, - { - path: 'setting', - name: 'GroupSetting', - component: GroupSetting, - meta: { title: 'Group Setting' } - }, - { - path: 'rank', - name: 'GroupRank', - component: GroupRank, - meta: { title: 'Group Rank' } - }, - ] - }, - { - path: '/introduction', - meta: {title: 'Introduction'}, - component:Introduction, - }, - { - path: '/developer', - meta: {title: 'Developer'}, - component:Developer, - }, - { - name:'Message', - path:'/message/', - component:Message, - meta: { requireAuth: true, title: 'Message' }, - children: [ - { - name: 'DiscussMsg', - path: 'discuss', - component: UserMsg, - meta: { requireAuth: true,title: 'Discuss Message' } - }, - { - name: 'ReplyMsg', - path: 'reply', - component: UserMsg, - meta: { requireAuth: true,title: 'Reply Message' } - }, - { - name: 'LikeMsg', - path: 'like', - component: UserMsg, - meta: { requireAuth: true,title: 'Like Message' } - }, - { - name: 'SysMsg', - path: 'sys', - component: SysMsg, - meta: { requireAuth: true,title: 'System Message' } - }, - { - name: 'MineMsg', - path: 'mine', - component: SysMsg, - meta: { requireAuth: true,title: 'Mine Message' } - }, - ] - }, - { - path: '*', - meta: {title: '404'}, - component:NotFound, - meta: { title: '404' } - } -] -export default ojRoutes diff --git a/src/hoj-vue/src/store/contest.js b/src/hoj-vue/src/store/contest.js deleted file mode 100644 index 6d479a9..0000000 --- a/src/hoj-vue/src/store/contest.js +++ /dev/null @@ -1,282 +0,0 @@ -import moment from 'moment' -import api from '@/common/api' -import { CONTEST_STATUS, CONTEST_TYPE } from '@/common/constants' -import time from '@/common/time' -const state = { - now: moment(), - intoAccess: false, // 比赛进入权限 - submitAccess:false, // 保护比赛的提交权限 - forceUpdate: false, // 强制实时榜单 - removeStar: false, // 榜单去除打星队伍 - concernedList:[], // 关注队伍 - contest: { - auth: CONTEST_TYPE.PUBLIC, - openPrint: false, - rankShowName:'username', - }, - contestProblems: [], - itemVisible: { - table: true, - chart: true, - }, - disPlayIdMapColor:{}, // 展示id对应的气球颜色 - groupContestAuth: 0, -} - -const getters = { - contestStatus: (state, getters) => { - return state.contest.status; - }, - contestRuleType: (state,getters) => { - return state.contest.type; - }, - isContestAdmin: (state, getters, _, rootGetters) => { - return rootGetters.isAuthenticated && - (state.contest.author === rootGetters.userInfo.username || rootGetters.isSuperAdmin || state.groupContestAuth == 5) - }, - canSubmit:(state, getters)=>{ - return state.intoAccess||state.submitAccess || state.contest.auth === CONTEST_TYPE.PUBLIC ||getters.isContestAdmin - }, - contestMenuDisabled: (state, getters) => { - // 比赛创建者或者超级管理员可以直接查看 - if (getters.isContestAdmin) return false - // 未开始不可查看 - if(getters.contestStatus === CONTEST_STATUS.SCHEDULED) return true - - if (state.contest.auth === CONTEST_TYPE.PRIVATE) { - // 私有赛需要通过验证密码方可查看比赛 - return !state.intoAccess - } - - }, - - // 榜单是否实时刷新 - ContestRealTimePermission: (state, getters, _, rootGetters) => { - // 比赛若是已结束,便是最后榜单 - if (getters.contestStatus === CONTEST_STATUS.ENDED) { - return true - } - // 比赛管理员直接可看到实时榜单 - if(getters.isContestAdmin){ - return true - } - // 比赛是否开启 - if(state.contest.sealRank === true){ - // 当前时间在封榜时间之后,即不刷新榜单 - return !state.now.isAfter(moment(state.contest.sealRankTime)) - }else{ - return true - } - }, - problemSubmitDisabled: (state, getters, _, rootGetters) => { - // 比赛结束不可交题 - if (getters.contestStatus === CONTEST_STATUS.ENDED) { - return true - - // 比赛未开始不可交题,除非是比赛管理者 - } else if (getters.contestStatus === CONTEST_STATUS.SCHEDULED) { - return !getters.isContestAdmin - } - // 未登录不可交题 - return !rootGetters.isAuthenticated - }, - // 是否需要显示密码验证框 - passwordFormVisible: (state, getters) => { - // 如果是公开赛,保护赛,或已注册过,管理员都不用再显示 - return state.contest.auth !== CONTEST_TYPE.PUBLIC &&state.contest.auth !== CONTEST_TYPE.PROTECTED &&!state.intoAccess && !getters.isContestAdmin - }, - contestStartTime: (state) => { - return moment(state.contest.startTime) - }, - contestEndTime: (state) => { - return moment(state.contest.endTime) - }, - // 比赛计时文本显示 - countdown: (state, getters) => { - // 还未开始的显示 - if (getters.contestStatus === CONTEST_STATUS.SCHEDULED) { - - let durationMs = getters.contestStartTime.diff(state.now, 'seconds') - - let duration = moment.duration(durationMs, 'seconds') - // time is too long - if (duration.weeks() > 0) { - return 'Start At ' + duration.humanize() - } - - if(duration.asSeconds()<=0){ - state.contest.status = CONTEST_STATUS.RUNNING - } - - let texts = time.secondFormat(durationMs) - return '-' + texts - // 比赛进行中的显示 - } else if (getters.contestStatus === CONTEST_STATUS.RUNNING) { - // 倒计时文本显示 - if(getters.contestEndTime.diff(state.now, 'seconds')>0){ - let texts = time.secondFormat(getters.contestEndTime.diff(state.now, 'seconds')) - return '-' + texts - }else{ - state.contest.status = CONTEST_STATUS.ENDED - return "00:00:00" - } - - } else { - return 'Ended' - } - }, - // 比赛开始到现在经过的秒数 - BeginToNowDuration:(state,getters)=>{ - return moment.duration(state.now.diff(getters.contestStartTime, 'seconds'), 'seconds').asSeconds() - }, - - // 比赛进度条显示 - progressValue:(state,getters)=>{ - // 还未开始的显示 - if (getters.contestStatus === CONTEST_STATUS.SCHEDULED) { - return 0; - // 比赛进行中的显示 - } else if (getters.contestStatus === CONTEST_STATUS.RUNNING) { - // 获取比赛开始到现在经过的秒数 - let duration = getters.BeginToNowDuration - // 消耗时间除以整体时间 - return (duration / state.contest.duration)*100 - }else{ - return 100; - } - }, -} - -const mutations = { - changeContest (state, payload) { - state.contest = payload.contest - }, - changeContestItemVisible(state, payload) { - state.itemVisible = {...state.itemVisible, ...payload} - }, - changeRankForceUpdate (state, payload) { - state.forceUpdate = payload.value - }, - changeRankRemoveStar(state, payload){ - state.removeStar = payload.value - }, - changeConcernedList(state, payload){ - state.concernedList = payload.value - }, - changeContestProblems(state, payload) { - state.contestProblems = payload.contestProblems; - let tmp={}; - for(var j = 0,len = payload.contestProblems.length; j < len; j++){ - tmp[payload.contestProblems[j].displayId] = payload.contestProblems[j].color; - } - state.disPlayIdMapColor = tmp; - }, - changeContestRankLimit(state, payload) { - state.rankLimit = payload.rankLimit - }, - contestIntoAccess(state, payload) { - state.intoAccess = payload.intoAccess - }, - changeGroupContestAuth(state, payload) { - state.groupContestAuth = payload.groupContestAuth - }, - contestSubmitAccess(state, payload) { - state.submitAccess = payload.submitAccess - }, - clearContest (state) { - state.contest = {} - state.contestProblems = [] - state.intoAccess = false - state.submitAccess = false - state.itemVisible = { - table: true, - chart: true, - realName: false - } - state.forceUpdate = false - state.removeStar = false - state.groupContestAuth = 0 - }, - now(state, payload) { - state.now = payload.now - }, - nowAdd1s (state) { - state.now = moment(state.now.add(1, 's')) - }, -} - -const actions = { - getContest ({commit, rootState, dispatch}) { - return new Promise((resolve, reject) => { - api.getContest(rootState.route.params.contestID).then((res) => { - resolve(res) - let contest = res.data.data - commit('changeContest', {contest: contest}) - if (contest.gid) { - dispatch('getGroupContestAuth', {gid: contest.gid}) - } - commit('now', {now: moment(contest.now)}) - if (contest.auth == CONTEST_TYPE.PRIVATE) { - dispatch('getContestAccess',{auth:CONTEST_TYPE.PRIVATE}) - }else if(contest.auth == CONTEST_TYPE.PROTECTED){ - dispatch('getContestAccess',{auth:CONTEST_TYPE.PROTECTED}) - } - }, err => { - reject(err) - }) - }) - }, - getScoreBoardContestInfo ({commit, rootState, dispatch}) { - return new Promise((resolve, reject) => { - api.getScoreBoardContestInfo(rootState.route.params.contestID).then((res) => { - resolve(res) - let contest = res.data.data.contest; - let problemList = res.data.data.problemList; - commit('changeContest', {contest: contest}) - commit('changeContestProblems', {contestProblems: problemList}) - commit('now', {now: moment(contest.now)}) - }, err => { - reject(err) - }) - }) - }, - - getContestProblems ({commit, rootState}) { - return new Promise((resolve, reject) => { - api.getContestProblemList(rootState.route.params.contestID).then(res => { - resolve(res) - commit('changeContestProblems', {contestProblems: res.data.data}) - }, (err) => { - commit('changeContestProblems', {contestProblems: []}) - reject(err) - }) - }) - }, - getContestAccess ({commit, rootState},contestType) { - return new Promise((resolve, reject) => { - api.getContestAccess(rootState.route.params.contestID).then(res => { - if(contestType.auth == CONTEST_TYPE.PRIVATE){ - commit('contestIntoAccess', {intoAccess: res.data.data.access}) - }else{ - commit('contestSubmitAccess', {submitAccess: res.data.data.access}) - } - resolve(res) - }).catch() - }) - }, - getGroupContestAuth ({commit, rootState}, gid) { - return new Promise((resolve, reject) => { - api.getGroupAuth(gid.gid).then(res => { - commit('changeGroupContestAuth', {groupContestAuth: res.data.data}) - resolve(res) - }).catch() - }) - } -} - -export default { - state, - mutations, - getters, - actions -} diff --git a/src/hoj-vue/src/store/group.js b/src/hoj-vue/src/store/group.js deleted file mode 100644 index 885644b..0000000 --- a/src/hoj-vue/src/store/group.js +++ /dev/null @@ -1,99 +0,0 @@ -import api from '@/common/api' -import { GROUP_TYPE } from '@/common/constants' -const state = { - intoAccess: false, - group: { - auth: GROUP_TYPE.PUBLIC, - }, - auth: 0, -} - -const getters = { - group: state=> state.group || {}, - isGroupOwner: (state, getters, _, rootGetters) => { - return rootGetters.isAuthenticated && state.group.owner == getters.userInfo.username - }, - isGroupRoot: (state, getters, _, rootGetters) => { - return rootGetters.isAuthenticated && ( - state.auth === 5 || getters.isGroupOwner || rootGetters.isSuperAdmin - ) - }, - isGroupAdmin: (state, getters, _, rootGetters) => { - return rootGetters.isAuthenticated && ( - getters.isGroupRoot || state.auth === 4 - ) - }, - isGroupMember: (state, getters, _, rootGetters) => { - return rootGetters.isAuthenticated && ( - getters.isGroupAdmin || state.auth === 3 - ) - }, - groupMenuDisabled: (state, getters) => { - if (getters.isGroupMember) return false - return !state.intoAccess - }, - userAuth: (state, getters) => { - return state.auth; - }, -} - -const mutations = { - changeGroup (state, payload) { - state.group = payload.group - }, - changeGroupAuth(state, payload) { - state.auth = payload.auth - }, - changeGroupIntoAccess(state, payload) { - state.intoAccess = payload.intoAccess - }, - clearGroup (state) { - state.group = {} - state.auth = 0 - state.intoAccess = false - } -} - -const actions = { - setGroup ({commit}, group) { - commit('changeGroup', { - group: group - }) - }, - getGroup ({commit, rootState, dispatch}) { - return new Promise((resolve, reject) => { - api.getGroup(rootState.route.params.groupID).then((res) => { - resolve(res) - let group = res.data.data - commit('changeGroup', {group: group}) - dispatch('getGroupAccess') - dispatch('getGroupAuth') - }, err => { - reject(err) - }) - }) - }, - getGroupAccess ({commit, rootState}) { - return new Promise((resolve, reject) => { - api.getGroupAccess(rootState.route.params.groupID).then(res => { - commit('changeGroupIntoAccess', {intoAccess: res.data.data.access}) - resolve(res) - }).catch() - }) - }, - getGroupAuth ({commit, rootState}) { - return new Promise((resolve, reject) => { - api.getGroupAuth(rootState.route.params.groupID).then(res => { - commit('changeGroupAuth', {auth: res.data.data}) - resolve(res) - }).catch() - }) - } -} - -export default { - state, - mutations, - getters, - actions -} diff --git a/src/hoj-vue/src/store/index.js b/src/hoj-vue/src/store/index.js deleted file mode 100644 index 7882b6a..0000000 --- a/src/hoj-vue/src/store/index.js +++ /dev/null @@ -1,139 +0,0 @@ -import Vue from 'vue' -import Vuex from 'vuex' -import user from '@/store/user' -import contest from "@/store/contest" -import training from "@/store/training" -import group from "@/store/group" -import api from '@/common/api' -import i18n from '@/i18n' -import storage from '@/common/storage' -import moment from 'moment' -Vue.use(Vuex) -const rootState = { - modalStatus: { - mode: 'Login', // or 'register', - visible: false - }, - websiteConfig:{ - recordName:'© 2020-2022', - projectName:'HOJ', - shortName:'OJ', - recordUrl:'#', - projectUrl:'#', - openPublicDiscussion: true, - openGroupDiscussion: true, - openContestComment: true - }, - registerTimeOut: 60, - resetTimeOut: 90, - language:storage.get('Web_Language') || 'zh-CN', -} - -const rootGetters = { - 'modalStatus'(state) { - return state.modalStatus - }, - 'registerTimeOut'(state) { - return state.registerTimeOut - }, - 'resetTimeOut'(state) { - return state.resetTimeOut - }, - 'websiteConfig' (state) { - return state.websiteConfig - }, - 'webLanguage'(state){ - return state.language - } -} - -const rootMutations = { - changeModalStatus(state, { mode, visible }) { - if (mode !== undefined) { - state.modalStatus.mode = mode - } - if (visible !== undefined) { - state.modalStatus.visible = visible - } - }, - changeRegisterTimeOut(state, { time }) { - if (time !== undefined) { - state.registerTimeOut = time - } - }, - changeResetTimeOut(state, { time }) { - if (time !== undefined) { - state.resetTimeOut = time - } - }, - startTimeOut(state, { name }) { // 注册邮件和重置邮件倒计时 - if (state.resetTimeOut == 0 ) { - state.resetTimeOut = 90 - return; - } - if (state.registerTimeOut == 0 ) { - state.registerTimeOut = 60 - return; - } - if (name == 'resetTimeOut') { - state.resetTimeOut--; - } - if (name == 'registerTimeOut') { - state.registerTimeOut--; - } - setTimeout(() => {this.commit('startTimeOut', { name: name }) }, 1000); - }, - changeWebsiteConfig(state, payload) { - state.websiteConfig = payload.websiteConfig - }, - changeWebLanguage (state, {language}) { - if (language) { - state.language = language - i18n.locale = language - moment.locale(language); - } - storage.set('Web_Language', language) - } -} -const rootActions = { - changeModalStatus({ commit }, payload) { - commit('changeModalStatus', payload) - }, - changeResetTimeOut({ commit }, payload) { - commit('changeResetTimeOut', payload) - }, - changeRegisterTimeOut({ commit }, payload) { - commit('changeRegisterTimeOut', payload) - }, - startTimeOut({ commit }, payload) { - commit('startTimeOut', payload) - }, - changeDomTitle ({commit, state}, payload) { - let ojName = state.websiteConfig.shortName?state.websiteConfig.shortName:'OJ' - if (payload && payload.title) { - window.document.title = payload.title + ' - ' + ojName - } else { - window.document.title = state.route.meta.title + ' - '+ ojName - } - }, - getWebsiteConfig ({commit}) { - api.getWebsiteConfig().then(res => { - commit('changeWebsiteConfig', { - websiteConfig: res.data.data - }) - }) - }, -} - -export default new Vuex.Store({ - modules: { - user, - contest, - training, - group - }, - state: rootState, - getters: rootGetters, - mutations: rootMutations, - actions: rootActions, -}) diff --git a/src/hoj-vue/src/store/training.js b/src/hoj-vue/src/store/training.js deleted file mode 100644 index 2a6b394..0000000 --- a/src/hoj-vue/src/store/training.js +++ /dev/null @@ -1,126 +0,0 @@ -import api from '@/common/api' -import { TRAINING_TYPE } from '@/common/constants' -const state = { - intoAccess: true, // 比赛进入权限 - training: { - auth: TRAINING_TYPE.Public.name, - rankShowName:'username', - gid:null - }, - trainingProblemList: [], - itemVisible: { - table: true, - chart: true, - }, - groupTrainingAuth: 0, -} - -const getters = { - isTrainingAdmin: (state, getters, _, rootGetters) => { - return rootGetters.isAuthenticated && - (state.training.author === rootGetters.userInfo.username || rootGetters.isSuperAdmin || state.groupTrainingAuth == 5) - }, - trainingMenuDisabled: (state, getters) => { - // 训练创建者和超级管理员可以直接查看 - if (getters.isTrainingAdmin) return false - - if (state.training.auth === TRAINING_TYPE.Private.name) { - // 私有训练需要通过验证密码方可查看比赛 - return !state.intoAccess - } - }, - isPrivateTraining: (state, getters) => { - return state.training.auth === TRAINING_TYPE.Private.name - }, - // 是否需要显示密码验证框 - trainingPasswordFormVisible: (state, getters) => { - // 如果是公开训练,或已注册过,管理员都不用再显示 - return !state.intoAccess && state.training.auth != TRAINING_TYPE.Public.name && !getters.isTrainingAdmin - } -} - -const mutations = { - changeTraining (state, payload) { - state.training = payload.training - }, - changeTrainingItemVisible(state, payload) { - state.itemVisible = {...state.itemVisible, ...payload} - }, - - changeTrainingProblemList(state, payload) { - state.trainingProblemList = payload.trainingProblemList; - }, - trainingIntoAccess(state, payload) { - state.intoAccess = payload.intoAccess - }, - changeGroupTrainingAuth(state, payload) { - state.groupTrainingAuth = payload.groupTrainingAuth - }, - clearTraining (state) { - state.training = {} - state.trainingProblemList = [] - state.intoAccess = false - state.itemVisible = { - table: true, - chart: true, - realName: false - } - state.groupTrainingAuth = 0 - } -} - -const actions = { - getTraining ({commit, rootState, dispatch}) { - return new Promise((resolve, reject) => { - api.getTraining(rootState.route.params.trainingID).then((res) => { - resolve(res) - let training = res.data.data - commit('changeTraining', {training: training}) - if (training.gid) { - dispatch('getGroupTrainingAuth', {gid: training.gid}) - } - if (training.auth == TRAINING_TYPE.Private.name) { - dispatch('getTrainingAccess',{auth:TRAINING_TYPE.Private.name}) - } - }, err => { - reject(err) - }) - }) - }, - getTrainingProblemList ({commit, rootState}) { - return new Promise((resolve, reject) => { - api.getTrainingProblemList(rootState.route.params.trainingID).then(res => { - resolve(res) - commit('changeTrainingProblemList', {trainingProblemList: res.data.data}) - }, (err) => { - commit('changeTrainingProblemList', {trainingProblemList: []}) - reject(err) - }) - }) - }, - getTrainingAccess ({commit, rootState},trainingType) { - return new Promise((resolve, reject) => { - api.getTrainingAccess(rootState.route.params.trainingID).then(res => { - if(trainingType.auth == TRAINING_TYPE.Private.name){ - commit('trainingIntoAccess', {intoAccess: res.data.data.access}) - } - resolve(res) - }).catch() - }) - }, - getGroupTrainingAuth ({commit, rootState}, gid) { - return new Promise((resolve, reject) => { - api.getGroupAuth(gid.gid).then(res => { - commit('changeGroupTrainingAuth', {groupTrainingAuth: res.data.data}) - resolve(res) - }).catch() - }) - } -} - -export default { - state, - mutations, - getters, - actions -} diff --git a/src/hoj-vue/src/store/user.js b/src/hoj-vue/src/store/user.js deleted file mode 100644 index e0bac87..0000000 --- a/src/hoj-vue/src/store/user.js +++ /dev/null @@ -1,110 +0,0 @@ -import { USER_TYPE } from '@/common/constants' -import storage from '@/common/storage' -const state = { - userInfo: storage.get('userInfo'), - token: localStorage.getItem('token'), - loginFailNum:0, - unreadMessage:{ - comment:0, - reply:0, - like:0, - sys:0, - mine:0 - } -} - -const getters = { - userInfo: state => state.userInfo || {}, - token: state => state.token ||'', - unreadMessage:state => state.unreadMessage || {}, - loginFailNum:state=>state.loginFailNum || 0, - isAuthenticated: (state, getters) => { - return !!getters.token - }, - isAdminRole: (state, getters) => { - if(getters.userInfo.roleList){ - return getters.userInfo.roleList.indexOf(USER_TYPE.ADMIN)!=-1 || - getters.userInfo.roleList.indexOf(USER_TYPE.PROBLEM_ADMIN)!=-1 || - getters.userInfo.roleList.indexOf(USER_TYPE.SUPER_ADMIN)!=-1 - }else{ - return false; - } - }, - isSuperAdmin: (state, getters) => { - if(getters.userInfo.roleList){ - return getters.userInfo.roleList.indexOf(USER_TYPE.SUPER_ADMIN) !=-1 - }else{ - return false; - } - }, - isProblemAdmin:(state, getters) => { - if(getters.userInfo.roleList){ - return getters.userInfo.roleList.indexOf(USER_TYPE.PROBLEM_ADMIN) !=-1 - }else{ - return false; - } - }, -} - -const mutations = { - changeUserInfo(state, {userInfo}) { - state.userInfo = userInfo - storage.set('userInfo',userInfo) - }, - changeUserToken(state,token){ - state.token = token - localStorage.setItem("token",token) - }, - incrLoginFailNum(state,{success}){ - if(!success){ - state.loginFailNum +=1 - }else{ - state.loginFailNum = 0 - } - }, - - clearUserInfoAndToken(state){ - state.token = '' - state.userInfo = {} - state.loginFailNum = 0 - storage.clear() - }, - updateUnreadMessageCount(state, {unreadMessage}){ - state.unreadMessage = unreadMessage - }, - substractUnreadMessageCount(state,{needSubstractMsg}){ - // 负数也没关系 - state.unreadMessage[needSubstractMsg.name] = state.unreadMessage[needSubstractMsg.name]-needSubstractMsg.num; - } -} - -const actions = { - setUserInfo ({commit},userInfo) { - commit('changeUserInfo', { - userInfo: userInfo - }) - }, - incrLoginFailNum({commit},success){ - commit('incrLoginFailNum',{success:success}) - }, - clearUserInfoAndToken ({commit}) { - commit('clearUserInfoAndToken') - }, - updateUnreadMessageCount({commit},unreadMessage){ - commit('updateUnreadMessageCount', { - unreadMessage: unreadMessage - }) - }, - substractUnreadMessageCount({commit},needSubstractMsg){ - commit('substractUnreadMessageCount', { - needSubstractMsg: needSubstractMsg - }) - } -} - -export default { - state, - getters, - actions, - mutations -} diff --git a/src/hoj-vue/src/views/404.vue b/src/hoj-vue/src/views/404.vue deleted file mode 100644 index 9742be7..0000000 --- a/src/hoj-vue/src/views/404.vue +++ /dev/null @@ -1,263 +0,0 @@ - - - diff --git a/src/hoj-vue/src/views/admin/Dashboard.vue b/src/hoj-vue/src/views/admin/Dashboard.vue deleted file mode 100644 index d5ab996..0000000 --- a/src/hoj-vue/src/views/admin/Dashboard.vue +++ /dev/null @@ -1,422 +0,0 @@ - - - - - diff --git a/src/hoj-vue/src/views/admin/Home.vue b/src/hoj-vue/src/views/admin/Home.vue deleted file mode 100644 index 666e44f..0000000 --- a/src/hoj-vue/src/views/admin/Home.vue +++ /dev/null @@ -1,732 +0,0 @@ - - - - - diff --git a/src/hoj-vue/src/views/admin/Login.vue b/src/hoj-vue/src/views/admin/Login.vue deleted file mode 100644 index 97bbe36..0000000 --- a/src/hoj-vue/src/views/admin/Login.vue +++ /dev/null @@ -1,151 +0,0 @@ - - - - - diff --git a/src/hoj-vue/src/views/admin/contest/Contest.vue b/src/hoj-vue/src/views/admin/contest/Contest.vue deleted file mode 100644 index 6e83de4..0000000 --- a/src/hoj-vue/src/views/admin/contest/Contest.vue +++ /dev/null @@ -1,644 +0,0 @@ - - - - diff --git a/src/hoj-vue/src/views/admin/contest/ContestList.vue b/src/hoj-vue/src/views/admin/contest/ContestList.vue deleted file mode 100644 index c9c03ba..0000000 --- a/src/hoj-vue/src/views/admin/contest/ContestList.vue +++ /dev/null @@ -1,324 +0,0 @@ - - - - diff --git a/src/hoj-vue/src/views/admin/discussion/Discussion.vue b/src/hoj-vue/src/views/admin/discussion/Discussion.vue deleted file mode 100644 index 6aac380..0000000 --- a/src/hoj-vue/src/views/admin/discussion/Discussion.vue +++ /dev/null @@ -1,451 +0,0 @@ - - - diff --git a/src/hoj-vue/src/views/admin/general/Announcement.vue b/src/hoj-vue/src/views/admin/general/Announcement.vue deleted file mode 100644 index b8d6a2d..0000000 --- a/src/hoj-vue/src/views/admin/general/Announcement.vue +++ /dev/null @@ -1,388 +0,0 @@ - - - - - diff --git a/src/hoj-vue/src/views/admin/general/SysNotice.vue b/src/hoj-vue/src/views/admin/general/SysNotice.vue deleted file mode 100644 index fc11e00..0000000 --- a/src/hoj-vue/src/views/admin/general/SysNotice.vue +++ /dev/null @@ -1,331 +0,0 @@ - - - - - diff --git a/src/hoj-vue/src/views/admin/general/SysSwitch.vue b/src/hoj-vue/src/views/admin/general/SysSwitch.vue deleted file mode 100644 index 726277b..0000000 --- a/src/hoj-vue/src/views/admin/general/SysSwitch.vue +++ /dev/null @@ -1,276 +0,0 @@ - - - diff --git a/src/hoj-vue/src/views/admin/general/SystemConfig.vue b/src/hoj-vue/src/views/admin/general/SystemConfig.vue deleted file mode 100644 index 433eba6..0000000 --- a/src/hoj-vue/src/views/admin/general/SystemConfig.vue +++ /dev/null @@ -1,474 +0,0 @@ - - - diff --git a/src/hoj-vue/src/views/admin/general/User.vue b/src/hoj-vue/src/views/admin/general/User.vue deleted file mode 100644 index 3b53124..0000000 --- a/src/hoj-vue/src/views/admin/general/User.vue +++ /dev/null @@ -1,920 +0,0 @@ - - - - - diff --git a/src/hoj-vue/src/views/admin/problem/GroupProblemList.vue b/src/hoj-vue/src/views/admin/problem/GroupProblemList.vue deleted file mode 100644 index d81571f..0000000 --- a/src/hoj-vue/src/views/admin/problem/GroupProblemList.vue +++ /dev/null @@ -1,250 +0,0 @@ - - - \ No newline at end of file diff --git a/src/hoj-vue/src/views/admin/problem/ImportAndExport.vue b/src/hoj-vue/src/views/admin/problem/ImportAndExport.vue deleted file mode 100644 index 5448524..0000000 --- a/src/hoj-vue/src/views/admin/problem/ImportAndExport.vue +++ /dev/null @@ -1,312 +0,0 @@ - - - - diff --git a/src/hoj-vue/src/views/admin/problem/Problem.vue b/src/hoj-vue/src/views/admin/problem/Problem.vue deleted file mode 100644 index a468f1a..0000000 --- a/src/hoj-vue/src/views/admin/problem/Problem.vue +++ /dev/null @@ -1,1589 +0,0 @@ - - - - - diff --git a/src/hoj-vue/src/views/admin/problem/ProblemList.vue b/src/hoj-vue/src/views/admin/problem/ProblemList.vue deleted file mode 100644 index 403bce7..0000000 --- a/src/hoj-vue/src/views/admin/problem/ProblemList.vue +++ /dev/null @@ -1,675 +0,0 @@ - - - - - diff --git a/src/hoj-vue/src/views/admin/problem/Tag.vue b/src/hoj-vue/src/views/admin/problem/Tag.vue deleted file mode 100644 index fbe238d..0000000 --- a/src/hoj-vue/src/views/admin/problem/Tag.vue +++ /dev/null @@ -1,434 +0,0 @@ - - - diff --git a/src/hoj-vue/src/views/admin/training/Category.vue b/src/hoj-vue/src/views/admin/training/Category.vue deleted file mode 100644 index 6bbb17e..0000000 --- a/src/hoj-vue/src/views/admin/training/Category.vue +++ /dev/null @@ -1,190 +0,0 @@ - - - diff --git a/src/hoj-vue/src/views/admin/training/Training.vue b/src/hoj-vue/src/views/admin/training/Training.vue deleted file mode 100644 index f39694e..0000000 --- a/src/hoj-vue/src/views/admin/training/Training.vue +++ /dev/null @@ -1,250 +0,0 @@ - - - - diff --git a/src/hoj-vue/src/views/admin/training/TrainingList.vue b/src/hoj-vue/src/views/admin/training/TrainingList.vue deleted file mode 100644 index 4d19f71..0000000 --- a/src/hoj-vue/src/views/admin/training/TrainingList.vue +++ /dev/null @@ -1,246 +0,0 @@ - - - - diff --git a/src/hoj-vue/src/views/admin/training/TrainingProblemList.vue b/src/hoj-vue/src/views/admin/training/TrainingProblemList.vue deleted file mode 100644 index 77281ee..0000000 --- a/src/hoj-vue/src/views/admin/training/TrainingProblemList.vue +++ /dev/null @@ -1,435 +0,0 @@ - - - - - diff --git a/src/hoj-vue/src/views/oj/Home.vue b/src/hoj-vue/src/views/oj/Home.vue deleted file mode 100644 index ce5ac48..0000000 --- a/src/hoj-vue/src/views/oj/Home.vue +++ /dev/null @@ -1,679 +0,0 @@ - - - - - diff --git a/src/hoj-vue/src/views/oj/about/Developer.vue b/src/hoj-vue/src/views/oj/about/Developer.vue deleted file mode 100644 index 9445b77..0000000 --- a/src/hoj-vue/src/views/oj/about/Developer.vue +++ /dev/null @@ -1,118 +0,0 @@ - - - diff --git a/src/hoj-vue/src/views/oj/about/Introduction.vue b/src/hoj-vue/src/views/oj/about/Introduction.vue deleted file mode 100644 index e1eb772..0000000 --- a/src/hoj-vue/src/views/oj/about/Introduction.vue +++ /dev/null @@ -1,196 +0,0 @@ - - - - - diff --git a/src/hoj-vue/src/views/oj/contest/ContestDetails.vue b/src/hoj-vue/src/views/oj/contest/ContestDetails.vue deleted file mode 100644 index 2926c3b..0000000 --- a/src/hoj-vue/src/views/oj/contest/ContestDetails.vue +++ /dev/null @@ -1,573 +0,0 @@ - - - diff --git a/src/hoj-vue/src/views/oj/contest/ContestList.vue b/src/hoj-vue/src/views/oj/contest/ContestList.vue deleted file mode 100644 index 21f0d3c..0000000 --- a/src/hoj-vue/src/views/oj/contest/ContestList.vue +++ /dev/null @@ -1,482 +0,0 @@ - - - - diff --git a/src/hoj-vue/src/views/oj/contest/children/ACMContestRank.vue b/src/hoj-vue/src/views/oj/contest/children/ACMContestRank.vue deleted file mode 100644 index d921d1a..0000000 --- a/src/hoj-vue/src/views/oj/contest/children/ACMContestRank.vue +++ /dev/null @@ -1,699 +0,0 @@ - - - - diff --git a/src/hoj-vue/src/views/oj/contest/children/ACMInfoAdmin.vue b/src/hoj-vue/src/views/oj/contest/children/ACMInfoAdmin.vue deleted file mode 100644 index d243cbf..0000000 --- a/src/hoj-vue/src/views/oj/contest/children/ACMInfoAdmin.vue +++ /dev/null @@ -1,241 +0,0 @@ - - - diff --git a/src/hoj-vue/src/views/oj/contest/children/ContestAdminPrint.vue b/src/hoj-vue/src/views/oj/contest/children/ContestAdminPrint.vue deleted file mode 100644 index 4fe5a2b..0000000 --- a/src/hoj-vue/src/views/oj/contest/children/ContestAdminPrint.vue +++ /dev/null @@ -1,195 +0,0 @@ - - - - - diff --git a/src/hoj-vue/src/views/oj/contest/children/ContestComment.vue b/src/hoj-vue/src/views/oj/contest/children/ContestComment.vue deleted file mode 100644 index 786c068..0000000 --- a/src/hoj-vue/src/views/oj/contest/children/ContestComment.vue +++ /dev/null @@ -1,12 +0,0 @@ - - diff --git a/src/hoj-vue/src/views/oj/contest/children/ContestPrint.vue b/src/hoj-vue/src/views/oj/contest/children/ContestPrint.vue deleted file mode 100644 index f480065..0000000 --- a/src/hoj-vue/src/views/oj/contest/children/ContestPrint.vue +++ /dev/null @@ -1,96 +0,0 @@ - - - - - diff --git a/src/hoj-vue/src/views/oj/contest/children/ContestProblemList.vue b/src/hoj-vue/src/views/oj/contest/children/ContestProblemList.vue deleted file mode 100644 index 7c56557..0000000 --- a/src/hoj-vue/src/views/oj/contest/children/ContestProblemList.vue +++ /dev/null @@ -1,249 +0,0 @@ - - - - - diff --git a/src/hoj-vue/src/views/oj/contest/children/ContestRank.vue b/src/hoj-vue/src/views/oj/contest/children/ContestRank.vue deleted file mode 100644 index 353762a..0000000 --- a/src/hoj-vue/src/views/oj/contest/children/ContestRank.vue +++ /dev/null @@ -1,46 +0,0 @@ - - - - diff --git a/src/hoj-vue/src/views/oj/contest/children/ContestRejudgeAdmin.vue b/src/hoj-vue/src/views/oj/contest/children/ContestRejudgeAdmin.vue deleted file mode 100644 index 5e31316..0000000 --- a/src/hoj-vue/src/views/oj/contest/children/ContestRejudgeAdmin.vue +++ /dev/null @@ -1,110 +0,0 @@ - - - diff --git a/src/hoj-vue/src/views/oj/contest/children/OIContestRank.vue b/src/hoj-vue/src/views/oj/contest/children/OIContestRank.vue deleted file mode 100644 index 77f9584..0000000 --- a/src/hoj-vue/src/views/oj/contest/children/OIContestRank.vue +++ /dev/null @@ -1,593 +0,0 @@ - - - diff --git a/src/hoj-vue/src/views/oj/contest/children/contestRankMixin.js b/src/hoj-vue/src/views/oj/contest/children/contestRankMixin.js deleted file mode 100644 index 78d61fe..0000000 --- a/src/hoj-vue/src/views/oj/contest/children/contestRankMixin.js +++ /dev/null @@ -1,111 +0,0 @@ -import api from '@/common/api' -import { mapGetters, mapState } from 'vuex' -import { CONTEST_STATUS, buildContestRankConcernedKey } from '@/common/constants' -import storage from '@/common/storage'; -export default { - methods: { - initConcernedList(){ - let key = buildContestRankConcernedKey(this.$route.params.contestID); - this.concernedList = storage.get(key) || []; - }, - getContestRankData (page = 1, refresh = false) { - if (this.showChart && !refresh) { - this.$refs.chart.showLoading({maskColor: 'rgba(250, 250, 250, 0.8)'}) - } - let data = { - currentPage:page, - limit: this.limit, - cid: this.$route.params.contestID, - forceRefresh: this.forceUpdate ? true: false, - removeStar: !this.showStarUser, - concernedList:this.concernedList - } - api.getContestRank(data).then(res => { - if (this.showChart && !refresh) { - this.$refs.chart.hideLoading() - } - this.total = res.data.data.total - if (page === 1) { - this.applyToChart(res.data.data.records) - } - this.applyToTable(res.data.data.records) - }) - }, - handleAutoRefresh (status) { - if (status == true) { - this.refreshFunc = setInterval(() => { - this.$store.dispatch('getContestProblems'); - this.getContestRankData(this.page, true); - }, 10000) - } else { - clearInterval(this.refreshFunc) - } - }, - updateConcernedList(uid, isConcerned){ - if(isConcerned){ - this.concernedList.push(uid); - }else{ - var index = this.concernedList.indexOf(uid); - if (index > -1) { - this.concernedList.splice(index, 1); - } - } - let key = buildContestRankConcernedKey(this.contestID); - storage.set(key, this.concernedList); - this.getContestRankData(this.page, true); - } - }, - computed: { - ...mapGetters(['isContestAdmin','userInfo']), - ...mapState({ - 'contest': state => state.contest.contest, - 'contestProblems': state => state.contest.contestProblems - }), - showChart: { - get () { - return this.$store.state.contest.itemVisible.chart - }, - set (value) { - this.$store.commit('changeContestItemVisible', {chart: value}) - } - }, - showStarUser:{ - get () { - return !this.$store.state.contest.removeStar - }, - set (value) { - this.$store.commit('changeRankRemoveStar', {value: !value}) - } - }, - showTable: { - get () { - return this.$store.state.contest.itemVisible.table - }, - set (value) { - this.$store.commit('changeContestItemVisible', {table: value}) - } - }, - forceUpdate: { - get () { - return this.$store.state.contest.forceUpdate - }, - set (value) { - this.$store.commit('changeRankForceUpdate', {value: value}) - } - }, - concernedList:{ - get () { - return this.$store.state.contest.concernedList - }, - set (value) { - this.$store.commit('changeConcernedList', {value: value}) - } - }, - refreshDisabled () { - return this.contest.status == CONTEST_STATUS.ENDED - } - }, - beforeDestroy () { - clearInterval(this.refreshFunc) - } -} diff --git a/src/hoj-vue/src/views/oj/contest/outside/ACMScoreBoard.vue b/src/hoj-vue/src/views/oj/contest/outside/ACMScoreBoard.vue deleted file mode 100644 index 40f60b0..0000000 --- a/src/hoj-vue/src/views/oj/contest/outside/ACMScoreBoard.vue +++ /dev/null @@ -1,605 +0,0 @@ - - - - - diff --git a/src/hoj-vue/src/views/oj/contest/outside/OIScoreBoard.vue b/src/hoj-vue/src/views/oj/contest/outside/OIScoreBoard.vue deleted file mode 100644 index 48d8f14..0000000 --- a/src/hoj-vue/src/views/oj/contest/outside/OIScoreBoard.vue +++ /dev/null @@ -1,552 +0,0 @@ - - - diff --git a/src/hoj-vue/src/views/oj/contest/outside/scoreBoardMixin.js b/src/hoj-vue/src/views/oj/contest/outside/scoreBoardMixin.js deleted file mode 100644 index 19173d3..0000000 --- a/src/hoj-vue/src/views/oj/contest/outside/scoreBoardMixin.js +++ /dev/null @@ -1,162 +0,0 @@ -import api from '@/common/api' -import time from '@/common/time'; -import { CONTEST_STATUS,CONTEST_STATUS_REVERSE,CONTEST_TYPE_REVERSE,RULE_TYPE, buildContestRankConcernedKey} from '@/common/constants' -import { mapState, mapGetters, mapActions } from 'vuex'; -import moment from 'moment'; -import storage from '@/common/storage'; -export default { - methods: { - init(){ - this.contestID = this.$route.params.contestID; - this.CONTEST_TYPE_REVERSE = Object.assign({}, CONTEST_TYPE_REVERSE); - this.CONTEST_STATUS = Object.assign({}, CONTEST_STATUS); - this.CONTEST_STATUS_REVERSE = Object.assign({}, CONTEST_STATUS_REVERSE); - this.RULE_TYPE = Object.assign({}, RULE_TYPE); - let key = buildContestRankConcernedKey(this.contestID); - this.concernedList = storage.get(key) || []; - this.loading.info = true; - this.$store.dispatch('getScoreBoardContestInfo').then((res) => { - if (!this.contestEnded) { - this.autoRefresh = true; - this.handleAutoRefresh(true); - } - this.changeDomTitle({ title: res.data.data.title }); - let data = res.data.data.contest; - let endTime = moment(data.endTime); - this.loading.info = false; - // 如果当前时间还是在比赛结束前的时间,需要计算倒计时,同时开启获取比赛公告的定时器 - if (endTime.isAfter(moment(data.now))) { - // 实时更新时间 - this.timer = setInterval(() => { - this.$store.commit('nowAdd1s'); - }, 1000); - } - },(err)=>{ - this.loading.info = false; - }); - }, - getContestOutsideScoreboard () { - let data = { - cid: this.$route.params.contestID, - forceRefresh: this.forceUpdate ? true: false, - removeStar: !this.showStarUser, - concernedList:this.concernedList - } - this.loading.rank = true; - api.getContestOutsideScoreboard(data).then(res => { - this.applyToTable(res.data.data); - this.loading.rank = false; - },(err)=>{ - this.loading.rank = false; - if(this.refreshFunc){ - this.autoRefresh = false; - clearInterval(this.refreshFunc) - } - }) - }, - handleAutoRefresh (status) { - if (status == true) { - this.refreshFunc = setInterval(() => { - this.getContestOutsideScoreboard() - }, 30000) - } else { - clearInterval(this.refreshFunc) - } - }, - ...mapActions(['changeDomTitle']), - formatTooltip(val) { - if (this.contest.status == -1) { - // 还未开始 - return '00:00:00'; - } else if (this.contest.status == 0) { - return time.secondFormat(this.BeginToNowDuration); // 格式化时间 - } else { - return time.secondFormat(this.contest.duration); - } - }, - getProblemCount(num){ - return num == undefined? 0 : num - }, - updateConcernedList(uid,isConcerned){ - if(isConcerned){ - this.concernedList.push(uid); - }else{ - var index = this.concernedList.indexOf(uid); - if (index > -1) { - this.concernedList.splice(index, 1); - } - } - let key = buildContestRankConcernedKey(this.contestID); - storage.set(key, this.concernedList); - this.getContestOutsideScoreboard(); - }, - toGroupContestList(gid){ - this.$router.push({ - name: 'GroupContestList', - params: { - groupID: gid, - }, - }) - }, - }, - computed: { - ...mapState({ - contest: (state) => state.contest.contest, - now: (state) => state.contest.now, - contestProblems: state => state.contest.contestProblems - }), - ...mapGetters([ - 'countdown', - 'BeginToNowDuration', - 'isContestAdmin', - 'userInfo' - ]), - forceUpdate: { - get () { - return this.$store.state.contest.forceUpdate - }, - set (value) { - this.$store.commit('changeRankForceUpdate', {value: value}) - } - }, - showStarUser:{ - get () { - return !this.$store.state.contest.removeStar - }, - set (value) { - this.$store.commit('changeRankRemoveStar', {value: !value}) - } - }, - concernedList:{ - get () { - return this.$store.state.contest.concernedList - }, - set (value) { - this.$store.commit('changeConcernedList', {value: value}) - } - }, - progressValue: { - get: function() { - return this.$store.getters.progressValue; - }, - set: function() {}, - }, - timeStep() { - // 时间段平分滑条长度 - return 100 / this.contest.duration; - }, - countdownColor() { - if (this.contest.status) { - return 'color:' + CONTEST_STATUS_REVERSE[this.contest.status].color; - } - }, - contestEnded() { - return this.contest.status == CONTEST_STATUS.ENDED; - }, - }, - beforeDestroy () { - clearInterval(this.refreshFunc) - clearInterval(this.timer); - this.$store.commit('clearContest'); - } -} diff --git a/src/hoj-vue/src/views/oj/discussion/discussion.vue b/src/hoj-vue/src/views/oj/discussion/discussion.vue deleted file mode 100644 index c6ee3c7..0000000 --- a/src/hoj-vue/src/views/oj/discussion/discussion.vue +++ /dev/null @@ -1,471 +0,0 @@ - - - - - diff --git a/src/hoj-vue/src/views/oj/discussion/discussionList.vue b/src/hoj-vue/src/views/oj/discussion/discussionList.vue deleted file mode 100644 index b65ec52..0000000 --- a/src/hoj-vue/src/views/oj/discussion/discussionList.vue +++ /dev/null @@ -1,822 +0,0 @@ - - - - diff --git a/src/hoj-vue/src/views/oj/group/GroupDetails.vue b/src/hoj-vue/src/views/oj/group/GroupDetails.vue deleted file mode 100644 index 7f12976..0000000 --- a/src/hoj-vue/src/views/oj/group/GroupDetails.vue +++ /dev/null @@ -1,628 +0,0 @@ - - - - - diff --git a/src/hoj-vue/src/views/oj/group/GroupList.vue b/src/hoj-vue/src/views/oj/group/GroupList.vue deleted file mode 100644 index 3975e6a..0000000 --- a/src/hoj-vue/src/views/oj/group/GroupList.vue +++ /dev/null @@ -1,683 +0,0 @@ - - - - - diff --git a/src/hoj-vue/src/views/oj/group/children/GroupAnnouncementList.vue b/src/hoj-vue/src/views/oj/group/children/GroupAnnouncementList.vue deleted file mode 100644 index 4542c17..0000000 --- a/src/hoj-vue/src/views/oj/group/children/GroupAnnouncementList.vue +++ /dev/null @@ -1,68 +0,0 @@ - - - - - diff --git a/src/hoj-vue/src/views/oj/group/children/GroupContestList.vue b/src/hoj-vue/src/views/oj/group/children/GroupContestList.vue deleted file mode 100644 index 6e26338..0000000 --- a/src/hoj-vue/src/views/oj/group/children/GroupContestList.vue +++ /dev/null @@ -1,580 +0,0 @@ - - - - - diff --git a/src/hoj-vue/src/views/oj/group/children/GroupDiscussionList.vue b/src/hoj-vue/src/views/oj/group/children/GroupDiscussionList.vue deleted file mode 100644 index 0bec37d..0000000 --- a/src/hoj-vue/src/views/oj/group/children/GroupDiscussionList.vue +++ /dev/null @@ -1,605 +0,0 @@ - - - - - diff --git a/src/hoj-vue/src/views/oj/group/children/GroupMemberList.vue b/src/hoj-vue/src/views/oj/group/children/GroupMemberList.vue deleted file mode 100644 index d63fbb4..0000000 --- a/src/hoj-vue/src/views/oj/group/children/GroupMemberList.vue +++ /dev/null @@ -1,200 +0,0 @@ - - - - - diff --git a/src/hoj-vue/src/views/oj/group/children/GroupProblemList.vue b/src/hoj-vue/src/views/oj/group/children/GroupProblemList.vue deleted file mode 100644 index 510f342..0000000 --- a/src/hoj-vue/src/views/oj/group/children/GroupProblemList.vue +++ /dev/null @@ -1,359 +0,0 @@ - - - - - diff --git a/src/hoj-vue/src/views/oj/group/children/GroupRank.vue b/src/hoj-vue/src/views/oj/group/children/GroupRank.vue deleted file mode 100644 index 6d2064f..0000000 --- a/src/hoj-vue/src/views/oj/group/children/GroupRank.vue +++ /dev/null @@ -1,269 +0,0 @@ - - - - - - diff --git a/src/hoj-vue/src/views/oj/group/children/GroupSetting.vue b/src/hoj-vue/src/views/oj/group/children/GroupSetting.vue deleted file mode 100644 index 387ae39..0000000 --- a/src/hoj-vue/src/views/oj/group/children/GroupSetting.vue +++ /dev/null @@ -1,551 +0,0 @@ - - - - - diff --git a/src/hoj-vue/src/views/oj/group/children/GroupTrainingList.vue b/src/hoj-vue/src/views/oj/group/children/GroupTrainingList.vue deleted file mode 100644 index 3952059..0000000 --- a/src/hoj-vue/src/views/oj/group/children/GroupTrainingList.vue +++ /dev/null @@ -1,367 +0,0 @@ - - - - - diff --git a/src/hoj-vue/src/views/oj/message/SysMsg.vue b/src/hoj-vue/src/views/oj/message/SysMsg.vue deleted file mode 100644 index 92bfca9..0000000 --- a/src/hoj-vue/src/views/oj/message/SysMsg.vue +++ /dev/null @@ -1,226 +0,0 @@ - - - diff --git a/src/hoj-vue/src/views/oj/message/UserMsg.vue b/src/hoj-vue/src/views/oj/message/UserMsg.vue deleted file mode 100644 index e667dc0..0000000 --- a/src/hoj-vue/src/views/oj/message/UserMsg.vue +++ /dev/null @@ -1,343 +0,0 @@ - - - diff --git a/src/hoj-vue/src/views/oj/message/message.vue b/src/hoj-vue/src/views/oj/message/message.vue deleted file mode 100644 index 3124081..0000000 --- a/src/hoj-vue/src/views/oj/message/message.vue +++ /dev/null @@ -1,147 +0,0 @@ - - - - - diff --git a/src/hoj-vue/src/views/oj/problem/Problem.vue b/src/hoj-vue/src/views/oj/problem/Problem.vue deleted file mode 100644 index dfa6ed3..0000000 --- a/src/hoj-vue/src/views/oj/problem/Problem.vue +++ /dev/null @@ -1,1832 +0,0 @@ - - - - - - diff --git a/src/hoj-vue/src/views/oj/problem/ProblemList.vue b/src/hoj-vue/src/views/oj/problem/ProblemList.vue deleted file mode 100644 index 1611977..0000000 --- a/src/hoj-vue/src/views/oj/problem/ProblemList.vue +++ /dev/null @@ -1,852 +0,0 @@ - - - - - diff --git a/src/hoj-vue/src/views/oj/problem/chartData.js b/src/hoj-vue/src/views/oj/problem/chartData.js deleted file mode 100644 index dfbee79..0000000 --- a/src/hoj-vue/src/views/oj/problem/chartData.js +++ /dev/null @@ -1,123 +0,0 @@ -const pieColorMap = { - 'AC': {color: '#19be6b'}, - 'WA': {color: '#ed3f14'}, - 'TLE': {color: '#ff9300'}, - 'MLE': {color: '#f7de00'}, - 'RE': {color: '#ff6104'}, - 'CE': {color: '#f90'}, - 'PA': {color: '#2d8cf0'}, - 'PE':{color:'#f90'} -} - -function getItemColor (obj) { - return pieColorMap[obj.name].color -} - -const pie = { - tooltip: { - trigger: 'item', - formatter: '{a}
    {b}: {c} ({d}%)' - }, - legend: { - left: 'center', - top: '10', - orient: 'horizontal', - data: ['AC', 'WA'] - }, - series: [ - { - name: 'Summary', - type: 'pie', - radius: '60%', - center: ['53%', '55%'], - itemStyle: { - normal: {color: getItemColor} - }, - data: [ - {value: 0, name: 'WA'}, - {value: 0, name: 'AC'} - ], - label: { - normal: { - position: 'inner', - show: true, - formatter: '{b}: {c}\n {d}%', - textStyle: { - fontWeight: 'bold' - } - } - } - } - ] -} - -const largePie = { - tooltip: { - trigger: 'item', - formatter: '{a}
    {b}: {c} ({d}%)' - }, - legend: { - left: 'center', - top:0, - orient: - 'horizontal', - itemGap: - 10, - data: - ['AC','PA','PE','CE','RE', 'WA', 'TLE', 'MLE'] - }, - series: [ - { - name: 'Detail', - type: 'pie', - radius: ['50%', '65%'], - center: ['50%', '55%'], - itemStyle: { - normal: {color: getItemColor} - }, - data: [ - {value: 0, name: 'RE'}, - {value: 0, name: 'WA'}, - {value: 0, name: 'TLE'}, - {value: 0, name: 'AC'}, - {value: 0, name: 'PA'}, - {value: 0, name: 'MLE'}, - {value: 0, name: 'PE'}, - {value: 0, name: 'CE'} - ], - label: { - normal: { - formatter: '{b}: \n{d}%\n {c}', - textStyle:{ - fontSize:10, - fontWeight: 'bold' - } - } - }, - labelLine: { - normal: {} - } - }, - { - name: 'Summary', - type: 'pie', - radius: '35%', - center: ['52%', '55%'], - itemStyle: { - normal: {color: getItemColor} - }, - data: [ - {value: 0, name: 'WA'}, - {value: 0, name: 'AC', selected: true} - ], - label: { - normal: { - position: 'inner', - formatter: '{b}: {c}\n {d}%' - } - } - } - ] -} - -export { pie, largePie } diff --git a/src/hoj-vue/src/views/oj/rank/ACMRank.vue b/src/hoj-vue/src/views/oj/rank/ACMRank.vue deleted file mode 100644 index 32436d3..0000000 --- a/src/hoj-vue/src/views/oj/rank/ACMRank.vue +++ /dev/null @@ -1,347 +0,0 @@ - - - - - - diff --git a/src/hoj-vue/src/views/oj/rank/OIRank.vue b/src/hoj-vue/src/views/oj/rank/OIRank.vue deleted file mode 100644 index d174e82..0000000 --- a/src/hoj-vue/src/views/oj/rank/OIRank.vue +++ /dev/null @@ -1,326 +0,0 @@ - - - - - diff --git a/src/hoj-vue/src/views/oj/status/SubmissionDetails.vue b/src/hoj-vue/src/views/oj/status/SubmissionDetails.vue deleted file mode 100644 index 22f8f08..0000000 --- a/src/hoj-vue/src/views/oj/status/SubmissionDetails.vue +++ /dev/null @@ -1,540 +0,0 @@ - - - - - diff --git a/src/hoj-vue/src/views/oj/status/SubmissionList.vue b/src/hoj-vue/src/views/oj/status/SubmissionList.vue deleted file mode 100644 index e89d506..0000000 --- a/src/hoj-vue/src/views/oj/status/SubmissionList.vue +++ /dev/null @@ -1,1130 +0,0 @@ - - - - - diff --git a/src/hoj-vue/src/views/oj/training/TrainingDetails.vue b/src/hoj-vue/src/views/oj/training/TrainingDetails.vue deleted file mode 100644 index b041be6..0000000 --- a/src/hoj-vue/src/views/oj/training/TrainingDetails.vue +++ /dev/null @@ -1,363 +0,0 @@ - - - - - diff --git a/src/hoj-vue/src/views/oj/training/TrainingList.vue b/src/hoj-vue/src/views/oj/training/TrainingList.vue deleted file mode 100644 index 9f59116..0000000 --- a/src/hoj-vue/src/views/oj/training/TrainingList.vue +++ /dev/null @@ -1,347 +0,0 @@ - - - - - diff --git a/src/hoj-vue/src/views/oj/training/TrainingProblemList.vue b/src/hoj-vue/src/views/oj/training/TrainingProblemList.vue deleted file mode 100644 index 6abee73..0000000 --- a/src/hoj-vue/src/views/oj/training/TrainingProblemList.vue +++ /dev/null @@ -1,228 +0,0 @@ - - - - - diff --git a/src/hoj-vue/src/views/oj/training/TrainingRank.vue b/src/hoj-vue/src/views/oj/training/TrainingRank.vue deleted file mode 100644 index 2bfec2b..0000000 --- a/src/hoj-vue/src/views/oj/training/TrainingRank.vue +++ /dev/null @@ -1,350 +0,0 @@ - - - diff --git a/src/hoj-vue/src/views/oj/user/Logout.vue b/src/hoj-vue/src/views/oj/user/Logout.vue deleted file mode 100644 index 3b20655..0000000 --- a/src/hoj-vue/src/views/oj/user/Logout.vue +++ /dev/null @@ -1,17 +0,0 @@ - - - diff --git a/src/hoj-vue/src/views/oj/user/SetNewPassword.vue b/src/hoj-vue/src/views/oj/user/SetNewPassword.vue deleted file mode 100644 index 9b54966..0000000 --- a/src/hoj-vue/src/views/oj/user/SetNewPassword.vue +++ /dev/null @@ -1,180 +0,0 @@ - - - diff --git a/src/hoj-vue/src/views/oj/user/Setting.vue b/src/hoj-vue/src/views/oj/user/Setting.vue deleted file mode 100644 index bd1fa18..0000000 --- a/src/hoj-vue/src/views/oj/user/Setting.vue +++ /dev/null @@ -1,48 +0,0 @@ - - - diff --git a/src/hoj-vue/src/views/oj/user/UserHome.vue b/src/hoj-vue/src/views/oj/user/UserHome.vue deleted file mode 100644 index 2511b29..0000000 --- a/src/hoj-vue/src/views/oj/user/UserHome.vue +++ /dev/null @@ -1,506 +0,0 @@ - - - - diff --git a/src/hoj-vue/vue.config.js b/src/hoj-vue/vue.config.js deleted file mode 100644 index cb8b19d..0000000 --- a/src/hoj-vue/vue.config.js +++ /dev/null @@ -1,119 +0,0 @@ -const UglifyJsPlugin = require('uglifyjs-webpack-plugin') // 清除注释 -const CompressionWebpackPlugin = require('compression-webpack-plugin'); // 开启压缩 - -// 是否为生产环境 -const isProduction = process.env.NODE_ENV === 'production'; - -// 本地环境是否需要使用cdn -const devNeedCdn = true; - -// cdn链接 -const cdn = { - // cdn:模块名称和模块作用域命名(对应window里面挂载的变量名称) - externals: { - vue: 'Vue', - 'vue-router':'VueRouter', - axios:'axios', - vuex:'Vuex', - 'element-ui':'ELEMENT', - 'highlight.js': 'hljs', - 'vxe-table':'VXETable', - "moment": "moment", - 'vue-echarts': 'VueECharts', - "echarts":"echarts", - // "mavon-editor": "mavonEditor", - }, - // cdn的css链接 - css: [ - "https://lf9-cdn-tos.bytecdntp.com/cdn/expire-1-M/element-ui/2.14.0/theme-chalk/index.min.css", - "https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/github-markdown-css/4.0.0/github-markdown.min.css", - "https://unpkg.com/vxe-table@2.9.26/lib/style.min.css", - ], - // cdn的js链接 - js: [ - "https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-M/vue/2.6.11/vue.min.js", - "https://lf9-cdn-tos.bytecdntp.com/cdn/expire-1-M/vue-router/3.2.0/vue-router.min.js", - "https://lf9-cdn-tos.bytecdntp.com/cdn/expire-1-M/axios/0.26.0/axios.min.js", - "https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/element-ui/2.15.3/index.min.js", - "https://lf9-cdn-tos.bytecdntp.com/cdn/expire-1-M/highlight.js/10.3.2/highlight.min.js", - "https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/moment.js/2.29.1/moment.min.js", - "https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/moment.js/2.29.1/locale/zh-cn.min.js", - "https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/moment.js/2.29.1/locale/en-gb.min.js", - "https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-M/echarts/4.9.0-rc.1/echarts.min.js", - "https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/vue-echarts/5.0.0-beta.0/vue-echarts.min.js", - "https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/vuex/3.5.1/vuex.min.js", - "https://unpkg.com/xe-utils@3.4.3/dist/xe-utils.umd.min.js", - "https://unpkg.com/vxe-table@2.9.26/lib/index.umd.min.js", - // "https://unpkg.com/mavon-editor@2.9.1/dist/mavon-editor.js" - ] -} - -module.exports={ - publicPath: '/', - assetsDir: "assets", - devServer: { - open: true, // npm run serve后自动打开页面 - host: '0.0.0.0', // 匹配本机IP地址(默认是0.0.0.0) - port: 8088, // 开发服务器运行端口号 - proxy: { - '/api': { // 以'/api'开头的请求会被代理进行转发 - target: 'http://localhost:6688', // 要发向的后台服务器地址 如果后台服务跑在后台开发人员的机器上,就写成 `http://ip:port` 如 `http:192.168.12.213:8081` ip为后台服务器的ip - changeOrigin: true - } - }, - disableHostCheck: true, - }, - //去除生产环境的productionSourceMap - productionSourceMap: false, - - chainWebpack: config => { - // ============注入cdn start============ - config.plugin('html').tap(args => { - // 生产环境或本地需要cdn时,才注入cdn - if (isProduction || devNeedCdn) args[0].cdn = cdn - return args - }) - config.plugin('webpack-bundle-analyzer') // 查看打包文件体积大小 - .use(require('webpack-bundle-analyzer').BundleAnalyzerPlugin) - // ============注入cdn end============ - }, - configureWebpack: (config) => { - // 用cdn方式引入,则构建时要忽略相关资源 - const plugins = []; - if (isProduction || devNeedCdn){ - config.externals = cdn.externals - config.mode = 'production'; - config["performance"] = {//打包文件大小配置 - "maxEntrypointSize": 10000000, - "maxAssetSize": 30000000 - } - config.plugins.push( - new UglifyJsPlugin({ - uglifyOptions: { - output: { - comments: false, // 去掉注释 - }, - warnings: false, - compress: { - drop_console: false, - drop_debugger: false, - // pure_funcs: ['console.log']//移除console - } - } - }) - ) - // 服务器也要相应开启gzip - config.plugins.push( - new CompressionWebpackPlugin({ - filename: '[path].gz[query]', - algorithm: 'gzip', - test: /\.(js|css)$/,// 匹配文件名 - threshold: 10000, // 对超过10k的数据压缩 - deleteOriginalAssets: false, // 不删除源文件 - minRatio: 0.8 // 压缩比 - }) - ) - } - } - -} \ No newline at end of file diff --git a/src/judger/README.md b/src/judger/README.md deleted file mode 100644 index 0b873aa..0000000 --- a/src/judger/README.md +++ /dev/null @@ -1 +0,0 @@ -> 这是安全沙盒可执行文件,具体使用请看[HOJ文档](https://docs.hdoi.cn/develop/sandbox.html) \ No newline at end of file diff --git a/src/judger/SandBox-v1.5.1 b/src/judger/SandBox-v1.5.1 deleted file mode 100644 index fbbcafb..0000000 Binary files a/src/judger/SandBox-v1.5.1 and /dev/null differ diff --git a/src/sqlAndsetting/README.md b/src/sqlAndsetting/README.md deleted file mode 100644 index 2997860..0000000 --- a/src/sqlAndsetting/README.md +++ /dev/null @@ -1 +0,0 @@ -> 这是HOJ数据库的创建文件、数据库数据文件、服务配置文件 \ No newline at end of file diff --git a/src/sqlAndsetting/hoj-update.sql b/src/sqlAndsetting/hoj-update.sql deleted file mode 100644 index b846015..0000000 --- a/src/sqlAndsetting/hoj-update.sql +++ /dev/null @@ -1,922 +0,0 @@ -USE `hoj`; - -/* -* 2021.08.07 修改OI题目得分在OI排行榜新计分字段 分数计算为:OI题目总得分*0.1+2*题目难度 -*/ -DROP PROCEDURE -IF EXISTS judge_Add_oi_rank_score; -DELIMITER $$ - -CREATE PROCEDURE judge_Add_oi_rank_score () -BEGIN - -IF NOT EXISTS ( - SELECT - 1 - FROM - information_schema.`COLUMNS` - WHERE - table_name = 'judge' - AND column_name = 'oi_rank' -) THEN - ALTER TABLE judge ADD COLUMN oi_rank INT(11) NULL COMMENT '该题在OI排行榜的分数'; -END -IF ; END$$ - -DELIMITER ; -CALL judge_Add_oi_rank_score ; - -DROP PROCEDURE judge_Add_oi_rank_score; - -/* -* 2021.08.08 增加vjudge_submit_id在vjudge判题获取提交id后存储,当等待结果超时,下次重判时可用该提交id直接获取结果。 - 同时vjudge_username、vjudge_password分别记录提交账号密码 -*/ -DROP PROCEDURE -IF EXISTS judge_Add_vjudge_submit_id; -DELIMITER $$ - -CREATE PROCEDURE judge_Add_vjudge_submit_id () -BEGIN - -IF NOT EXISTS ( - SELECT - 1 - FROM - information_schema.`COLUMNS` - WHERE - table_name = 'judge' - AND column_name = 'vjudge_submit_id' -) THEN - ALTER TABLE judge ADD COLUMN vjudge_submit_id BIGINT UNSIGNED NULL COMMENT 'vjudge判题在其它oj的提交id'; - ALTER TABLE judge ADD COLUMN vjudge_username VARCHAR(255) NULL COMMENT 'vjudge判题在其它oj的提交用户名'; - ALTER TABLE judge ADD COLUMN vjudge_password VARCHAR(255) NULL COMMENT 'vjudge判题在其它oj的提交账号密码'; -END -IF ; END$$ - -DELIMITER ; -CALL judge_Add_vjudge_submit_id ; - -DROP PROCEDURE judge_Add_vjudge_submit_id; - - -/* -* 2021.09.21 比赛增加打印、账号限制的功能,增大真实姓名长度 -*/ - -DROP PROCEDURE -IF EXISTS contest_Add_print_and_limit; -DELIMITER $$ - -CREATE PROCEDURE contest_Add_print_and_limit () -BEGIN - -IF NOT EXISTS ( - SELECT - 1 - FROM - information_schema.`COLUMNS` - WHERE - table_name = 'contest' - AND column_name = 'open_print' -) THEN - ALTER TABLE contest ADD COLUMN open_print tinyint(1) DEFAULT '0' COMMENT '是否打开打印功能'; - ALTER TABLE contest ADD COLUMN open_account_limit tinyint(1) DEFAULT '0' COMMENT '是否开启账号限制'; - ALTER TABLE contest ADD COLUMN account_limit_rule mediumtext COMMENT '账号限制规则'; - ALTER TABLE `hoj`.`user_info` CHANGE `realname` `realname` VARCHAR(100) CHARSET utf8 COLLATE utf8_general_ci NULL COMMENT '真实姓名'; -END -IF ; END$$ - -DELIMITER ; -CALL contest_Add_print_and_limit ; - -DROP PROCEDURE contest_Add_print_and_limit; - - - -DROP PROCEDURE -IF EXISTS Add_contest_print; -DELIMITER $$ - -CREATE PROCEDURE Add_contest_print () -BEGIN - -IF NOT EXISTS ( - SELECT - 1 - FROM - information_schema.`COLUMNS` - WHERE - table_name = 'contest_print' -) THEN - CREATE TABLE `contest_print` ( - `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, - `username` varchar(100) DEFAULT NULL, - `realname` varchar(100) DEFAULT NULL, - `cid` bigint(20) unsigned DEFAULT NULL, - `content` longtext NOT NULL, - `status` int(11) DEFAULT '0', - `gmt_create` datetime DEFAULT CURRENT_TIMESTAMP, - `gmt_modified` datetime DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (`id`), - KEY `cid` (`cid`), - KEY `username` (`username`), - CONSTRAINT `contest_print_ibfk_1` FOREIGN KEY (`cid`) REFERENCES `contest` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `contest_print_ibfk_2` FOREIGN KEY (`username`) REFERENCES `user_info` (`username`) ON DELETE CASCADE ON UPDATE CASCADE - ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -END -IF ; END$$ - -DELIMITER ; -CALL Add_contest_print ; - -DROP PROCEDURE Add_contest_print; - - -/* -* 2021.10.04 增加站内消息系统,包括评论我的、收到的赞、回复我的、系统通知、我的消息五个模块 -*/ - -DROP PROCEDURE -IF EXISTS Add_msg_table; -DELIMITER $$ - -CREATE PROCEDURE Add_msg_table () -BEGIN - -IF NOT EXISTS ( - SELECT - 1 - FROM - information_schema.`COLUMNS` - WHERE - table_name = 'msg_remind' -) THEN - CREATE TABLE `admin_sys_notice` ( - `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, - `title` varchar(255) DEFAULT NULL COMMENT '标题', - `content` longtext COMMENT '内容', - `type` varchar(255) DEFAULT NULL COMMENT '发给哪些用户类型', - `state` tinyint(1) DEFAULT '0' COMMENT '是否已拉取给用户', - `recipient_id` varchar(32) DEFAULT NULL COMMENT '接受通知的用户id', - `admin_id` varchar(32) DEFAULT NULL COMMENT '发送通知的管理员id', - `gmt_create` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `gmt_modified` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', - PRIMARY KEY (`id`), - KEY `recipient_id` (`recipient_id`), - KEY `admin_id` (`admin_id`), - CONSTRAINT `admin_sys_notice_ibfk_1` FOREIGN KEY (`recipient_id`) REFERENCES `user_info` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `admin_sys_notice_ibfk_2` FOREIGN KEY (`admin_id`) REFERENCES `user_info` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE - ) ENGINE=InnoDB DEFAULT CHARSET=utf8; - - CREATE TABLE `msg_remind` ( - `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, - `action` varchar(255) NOT NULL COMMENT '动作类型,如点赞讨论帖Like_Post、点赞评论Like_Discuss、评论Discuss、回复Reply等', - `source_id` int(10) unsigned DEFAULT NULL COMMENT '消息来源id,讨论id或比赛id', - `source_type` varchar(255) DEFAULT NULL COMMENT '事件源类型:''Discussion''、''Contest''等', - `source_content` varchar(255) DEFAULT NULL COMMENT '事件源的内容,比如回复的内容,评论的帖子标题等等', - `quote_id` int(10) unsigned DEFAULT NULL COMMENT '事件引用上一级评论或回复id', - `quote_type` varchar(255) DEFAULT NULL COMMENT '事件引用上一级的类型:Comment、Reply', - `url` varchar(255) DEFAULT NULL COMMENT '事件所发生的地点链接 url', - `state` tinyint(1) DEFAULT '0' COMMENT '是否已读', - `sender_id` varchar(32) DEFAULT NULL COMMENT '操作者的id', - `recipient_id` varchar(32) DEFAULT NULL COMMENT '接受消息的用户id', - `gmt_create` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `gmt_modified` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', - PRIMARY KEY (`id`), - KEY `sender_id` (`sender_id`), - KEY `recipient_id` (`recipient_id`), - CONSTRAINT `msg_remind_ibfk_1` FOREIGN KEY (`sender_id`) REFERENCES `user_info` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `msg_remind_ibfk_2` FOREIGN KEY (`recipient_id`) REFERENCES `user_info` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE - ) ENGINE=InnoDB DEFAULT CHARSET=utf8; - - CREATE TABLE `user_sys_notice` ( - `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, - `sys_notice_id` bigint(20) unsigned DEFAULT NULL COMMENT '系统通知的id', - `recipient_id` varchar(32) DEFAULT NULL COMMENT '接受通知的用户id', - `type` varchar(255) DEFAULT NULL COMMENT '消息类型,系统通知sys、我的信息mine', - `state` tinyint(1) DEFAULT '0' COMMENT '是否已读', - `gmt_create` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '读取时间', - `gmt_modified` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id`), - KEY `sys_notice_id` (`sys_notice_id`), - KEY `recipient_id` (`recipient_id`), - CONSTRAINT `user_sys_notice_ibfk_1` FOREIGN KEY (`sys_notice_id`) REFERENCES `admin_sys_notice` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `user_sys_notice_ibfk_2` FOREIGN KEY (`recipient_id`) REFERENCES `user_info` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE - ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -END -IF ; END$$ - -DELIMITER ; -CALL Add_msg_table; - -DROP PROCEDURE Add_msg_table; - - - - -/* -* 2021.10.06 user_info增加性别列gender 比赛榜单用户名称显示可选 - -*/ -DROP PROCEDURE -IF EXISTS user_info_Add_gender; -DELIMITER $$ - -CREATE PROCEDURE user_info_Add_gender () -BEGIN - -IF NOT EXISTS ( - SELECT - 1 - FROM - information_schema.`COLUMNS` - WHERE - table_name = 'user_info' - AND column_name = 'gender' -) THEN - ALTER TABLE user_info ADD COLUMN gender varchar(20) DEFAULT 'secrecy' NOT NULL COMMENT '性别'; -END -IF ; END$$ - -DELIMITER ; -CALL user_info_Add_gender ; - -DROP PROCEDURE user_info_Add_gender; - - -DROP PROCEDURE -IF EXISTS contest_Add_rank_show_name; -DELIMITER $$ - -CREATE PROCEDURE contest_Add_rank_show_name () -BEGIN - -IF NOT EXISTS ( - SELECT - 1 - FROM - information_schema.`COLUMNS` - WHERE - table_name = 'contest' - AND column_name = 'rank_show_name' -) THEN - ALTER TABLE contest ADD COLUMN rank_show_name varchar(20) DEFAULT 'username' COMMENT '排行榜显示(username、nickname、realname)'; -END -IF ; END$$ - -DELIMITER ; -CALL contest_Add_rank_show_name ; - -DROP PROCEDURE contest_Add_rank_show_name; - -/* -* 2021.10.08 user_info增加性别列gender 比赛榜单用户名称显示可选 - -*/ -DROP PROCEDURE -IF EXISTS contest_problem_Add_color; -DELIMITER $$ - -CREATE PROCEDURE contest_problem_Add_color () -BEGIN - -IF NOT EXISTS ( - SELECT - 1 - FROM - information_schema.`COLUMNS` - WHERE - table_name = 'contest_problem' - AND column_name = 'color' -) THEN - ALTER TABLE contest_problem ADD COLUMN `color` VARCHAR(255) NULL COMMENT '气球颜色'; - ALTER TABLE user_info ADD COLUMN `title_name` VARCHAR(255) NULL COMMENT '头衔、称号'; - ALTER TABLE user_info ADD COLUMN `title_color` VARCHAR(255) NULL COMMENT '头衔、称号的颜色'; -END -IF ; END$$ - -DELIMITER ; -CALL contest_problem_Add_color ; - -DROP PROCEDURE contest_problem_Add_color; - - -/* -* 2021.11.17 judge_server增加cf_submittable控制单台判题机只能一个账号提交CF - -*/ -DROP PROCEDURE -IF EXISTS judge_server_Add_cf_submittable; -DELIMITER $$ - -CREATE PROCEDURE judge_serverm_Add_cf_submittable () -BEGIN - -IF NOT EXISTS ( - SELECT - 1 - FROM - information_schema.`COLUMNS` - WHERE - table_name = 'judge_server' - AND column_name = 'cf_submittable' -) THEN - ALTER TABLE `hoj`.`judge_server` ADD COLUMN `cf_submittable` BOOLEAN DEFAULT 1 NULL COMMENT '是否可提交CF'; -END -IF ; END$$ - -DELIMITER ; -CALL judge_serverm_Add_cf_submittable ; - -DROP PROCEDURE judge_serverm_Add_cf_submittable; - - - -/* -* 2021.11.29 增加训练模块 -*/ - -DROP PROCEDURE -IF EXISTS Add_training_table; -DELIMITER $$ - -CREATE PROCEDURE Add_training_table () -BEGIN - -IF NOT EXISTS ( - SELECT - 1 - FROM - information_schema.`COLUMNS` - WHERE - table_name = 'training' -) THEN - - CREATE TABLE `training` ( - `id` bigint unsigned NOT NULL AUTO_INCREMENT, - `title` varchar(255) DEFAULT NULL COMMENT '训练题单名称', - `description` longtext COMMENT '训练题单简介', - `author` varchar(255) NOT NULL COMMENT '训练题单创建者用户名', - `auth` varchar(255) NOT NULL COMMENT '训练题单权限类型:Public、Private', - `private_pwd` varchar(255) DEFAULT NULL COMMENT '训练题单权限为Private时的密码', - `rank` int DEFAULT '0' COMMENT '编号,升序', - `status` tinyint(1) DEFAULT '1' COMMENT '是否可用', - `gmt_create` datetime DEFAULT CURRENT_TIMESTAMP, - `gmt_modified` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id`) - ) ENGINE=InnoDB DEFAULT CHARSET=utf8; - - - CREATE TABLE `training_category` ( - `id` bigint unsigned NOT NULL AUTO_INCREMENT, - `name` varchar(255) DEFAULT NULL, - `color` varchar(255) DEFAULT NULL, - `gmt_create` datetime DEFAULT CURRENT_TIMESTAMP, - `gmt_modified` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id`) - ) ENGINE=InnoDB DEFAULT CHARSET=utf8; - - CREATE TABLE `training_problem` ( - `id` bigint unsigned NOT NULL AUTO_INCREMENT, - `tid` bigint unsigned NOT NULL COMMENT '训练id', - `pid` bigint unsigned NOT NULL COMMENT '题目id', - `rank` int DEFAULT '0', - `display_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `gmt_create` datetime DEFAULT CURRENT_TIMESTAMP, - `gmt_modified` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id`), - KEY `tid` (`tid`), - KEY `pid` (`pid`), - KEY `display_id` (`display_id`), - CONSTRAINT `training_problem_ibfk_1` FOREIGN KEY (`tid`) REFERENCES `training` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `training_problem_ibfk_2` FOREIGN KEY (`pid`) REFERENCES `problem` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `training_problem_ibfk_3` FOREIGN KEY (`display_id`) REFERENCES `problem` (`problem_id`) ON DELETE CASCADE ON UPDATE CASCADE - ) ENGINE=InnoDB DEFAULT CHARSET=utf8; - - CREATE TABLE `training_record` ( - `id` bigint unsigned NOT NULL AUTO_INCREMENT, - `tid` bigint unsigned NOT NULL, - `tpid` bigint unsigned NOT NULL, - `pid` bigint unsigned NOT NULL, - `uid` varchar(255) NOT NULL, - `submit_id` bigint unsigned NOT NULL, - `gmt_create` datetime DEFAULT CURRENT_TIMESTAMP, - `gmt_modified` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id`), - KEY `tid` (`tid`), - KEY `tpid` (`tpid`), - KEY `pid` (`pid`), - KEY `uid` (`uid`), - KEY `submit_id` (`submit_id`), - CONSTRAINT `training_record_ibfk_1` FOREIGN KEY (`tid`) REFERENCES `training` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `training_record_ibfk_2` FOREIGN KEY (`tpid`) REFERENCES `training_problem` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `training_record_ibfk_3` FOREIGN KEY (`pid`) REFERENCES `problem` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `training_record_ibfk_4` FOREIGN KEY (`uid`) REFERENCES `user_info` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `training_record_ibfk_5` FOREIGN KEY (`submit_id`) REFERENCES `judge` (`submit_id`) ON DELETE CASCADE ON UPDATE CASCADE - ) ENGINE=InnoDB DEFAULT CHARSET=utf8; - - - CREATE TABLE `training_register` ( - `id` bigint unsigned NOT NULL AUTO_INCREMENT, - `tid` bigint unsigned NOT NULL COMMENT '训练id', - `uid` varchar(255) NOT NULL COMMENT '用户id', - `status` tinyint(1) DEFAULT '1' COMMENT '是否可用', - `gmt_create` datetime DEFAULT CURRENT_TIMESTAMP, - `gmt_modified` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id`), - KEY `tid` (`tid`), - KEY `uid` (`uid`), - CONSTRAINT `training_register_ibfk_1` FOREIGN KEY (`tid`) REFERENCES `training` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `training_register_ibfk_2` FOREIGN KEY (`uid`) REFERENCES `user_info` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE - ) ENGINE=InnoDB DEFAULT CHARSET=utf8; - - - CREATE TABLE `mapping_training_category` ( - `id` bigint unsigned NOT NULL AUTO_INCREMENT, - `tid` bigint unsigned NOT NULL, - `cid` bigint unsigned NOT NULL, - `gmt_create` datetime DEFAULT CURRENT_TIMESTAMP, - `gmt_modified` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id`), - KEY `tid` (`tid`), - KEY `cid` (`cid`), - CONSTRAINT `mapping_training_category_ibfk_1` FOREIGN KEY (`tid`) REFERENCES `training` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `mapping_training_category_ibfk_2` FOREIGN KEY (`cid`) REFERENCES `training_category` (`id`) ON DELETE CASCADE ON UPDATE CASCADE - ) ENGINE=InnoDB DEFAULT CHARSET=utf8; - - ALTER TABLE `hoj`.`judge` ADD COLUMN `tid` BIGINT UNSIGNED NULL AFTER `cpid`, - ADD FOREIGN KEY (`tid`) REFERENCES `hoj`.`training`(`id`) ON UPDATE CASCADE ON DELETE CASCADE; -END -IF ; END$$ - -DELIMITER ; -CALL Add_training_table; - -DROP PROCEDURE Add_training_table; - - -/* -* 2021.12.05 contest增加auto_real_rank比赛结束是否自动解除封榜,自动转换成真实榜单 - -*/ -DROP PROCEDURE -IF EXISTS contest_Add_auto_real_rank; -DELIMITER $$ - -CREATE PROCEDURE contest_Add_auto_real_rank() -BEGIN - -IF NOT EXISTS ( - SELECT - 1 - FROM - information_schema.`COLUMNS` - WHERE - table_name = 'contest' - AND column_name = 'auto_real_rank' -) THEN - ALTER TABLE `hoj`.`contest` ADD COLUMN `auto_real_rank` BOOLEAN DEFAULT 1 NULL COMMENT '比赛结束是否自动解除封榜,自动转换成真实榜单'; - DROP TABLE `hoj`.`training_problem`; - DROP TABLE `hoj`.`training_record`; - CREATE TABLE `training_problem` ( - `id` bigint unsigned NOT NULL AUTO_INCREMENT, - `tid` bigint unsigned NOT NULL COMMENT '训练id', - `pid` bigint unsigned NOT NULL COMMENT '题目id', - `rank` int DEFAULT '0', - `display_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `gmt_create` datetime DEFAULT CURRENT_TIMESTAMP, - `gmt_modified` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id`), - KEY `tid` (`tid`), - KEY `pid` (`pid`), - KEY `display_id` (`display_id`), - CONSTRAINT `training_problem_ibfk_1` FOREIGN KEY (`tid`) REFERENCES `training` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `training_problem_ibfk_2` FOREIGN KEY (`pid`) REFERENCES `problem` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `training_problem_ibfk_3` FOREIGN KEY (`display_id`) REFERENCES `problem` (`problem_id`) ON DELETE CASCADE ON UPDATE CASCADE - ) ENGINE=InnoDB DEFAULT CHARSET=utf8; - - CREATE TABLE `training_record` ( - `id` bigint unsigned NOT NULL AUTO_INCREMENT, - `tid` bigint unsigned NOT NULL, - `tpid` bigint unsigned NOT NULL, - `pid` bigint unsigned NOT NULL, - `uid` varchar(255) NOT NULL, - `submit_id` bigint unsigned NOT NULL, - `gmt_create` datetime DEFAULT CURRENT_TIMESTAMP, - `gmt_modified` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id`), - KEY `tid` (`tid`), - KEY `tpid` (`tpid`), - KEY `pid` (`pid`), - KEY `uid` (`uid`), - KEY `submit_id` (`submit_id`), - CONSTRAINT `training_record_ibfk_1` FOREIGN KEY (`tid`) REFERENCES `training` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `training_record_ibfk_2` FOREIGN KEY (`tpid`) REFERENCES `training_problem` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `training_record_ibfk_3` FOREIGN KEY (`pid`) REFERENCES `problem` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `training_record_ibfk_4` FOREIGN KEY (`uid`) REFERENCES `user_info` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `training_record_ibfk_5` FOREIGN KEY (`submit_id`) REFERENCES `judge` (`submit_id`) ON DELETE CASCADE ON UPDATE CASCADE - ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -END -IF ; END$$ - -DELIMITER ; -CALL contest_Add_auto_real_rank; - -DROP PROCEDURE contest_Add_auto_real_rank; - - - - -/* -* 2021.12.07 contest增加打星账号列表、是否开放榜单 - -*/ -DROP PROCEDURE -IF EXISTS contest_Add_star_account_And_open_rank; -DELIMITER $$ - -CREATE PROCEDURE contest_Add_star_account_And_open_rank () -BEGIN - -IF NOT EXISTS ( - SELECT - 1 - FROM - information_schema.`COLUMNS` - WHERE - table_name = 'contest' - AND column_name = 'star_account' -) THEN - ALTER TABLE `hoj`.`contest` ADD COLUMN `star_account` mediumtext COMMENT '打星用户列表'; - ALTER TABLE `hoj`.`contest` ADD COLUMN `open_rank` BOOLEAN DEFAULT 0 NULL COMMENT '是否开放赛外榜单'; -END -IF ; END$$ - -DELIMITER ; -CALL contest_Add_star_account_And_open_rank ; - -DROP PROCEDURE contest_Add_star_account_And_open_rank; - - - -/* -* 2021.12.19 judge表删除tid - -*/ -DROP PROCEDURE -IF EXISTS judge_Delete_tid; -DELIMITER $$ - -CREATE PROCEDURE judge_Delete_tid () -BEGIN - -IF EXISTS ( - SELECT - 1 - FROM - information_schema.`COLUMNS` - WHERE - table_name = 'judge' - AND column_name = 'tid' -) THEN - ALTER TABLE `hoj`.`judge` DROP foreign key `judge_ibfk_4`; - ALTER TABLE `hoj`.`judge` DROP COLUMN `tid`; -END -IF ; END$$ - -DELIMITER ; -CALL judge_Delete_tid ; - -DROP PROCEDURE judge_Delete_tid; - - -/* -* 2022.01.03 problem表增加mode,user_extra_file,judge_extra_file用于区别普通判题、特殊判题、交互判题 - -*/ -DROP PROCEDURE -IF EXISTS problem_Add_judge_mode; -DELIMITER $$ - -CREATE PROCEDURE problem_Add_judge_mode () -BEGIN - -IF NOT EXISTS ( - SELECT - 1 - FROM - information_schema.`COLUMNS` - WHERE - table_name = 'problem' - AND column_name = 'judge_mode' -) THEN - ALTER TABLE `hoj`.`problem` ADD COLUMN `judge_mode` varchar(255) DEFAULT 'default' COMMENT '题目评测模式,default、spj、interactive'; - ALTER TABLE `hoj`.`problem` ADD COLUMN `user_extra_file` mediumtext DEFAULT NULL COMMENT '题目评测时用户程序的额外额外文件 json key:name value:content'; - ALTER TABLE `hoj`.`problem` ADD COLUMN `judge_extra_file` mediumtext DEFAULT NULL COMMENT '题目评测时交互或特殊程序的额外额外文件 json key:name value:content'; -END -IF ; END$$ - -DELIMITER ; -CALL problem_Add_judge_mode ; - -DROP PROCEDURE problem_Add_judge_mode; - - -/* -* 2022.03.02 contest表增加oi_rank_score_type - -*/ -DROP PROCEDURE -IF EXISTS contest_Add_oi_rank_score_type; -DELIMITER $$ - -CREATE PROCEDURE contest_Add_oi_rank_score_type () -BEGIN - -IF NOT EXISTS ( - SELECT - 1 - FROM - information_schema.`COLUMNS` - WHERE - table_name = 'contest' - AND column_name = 'oi_rank_score_type' -) THEN - ALTER TABLE `hoj`.`contest` ADD COLUMN `oi_rank_score_type` varchar(255) DEFAULT 'Recent' COMMENT 'oi排行榜得分方式,Recent、Highest'; -END -IF ; END$$ - -DELIMITER ; -CALL contest_Add_oi_rank_score_type ; - -DROP PROCEDURE contest_Add_oi_rank_score_type; - - -/* -* 2022.03.28 增加团队模块 - -*/ -DROP PROCEDURE -IF EXISTS add_group; -DELIMITER $$ - -CREATE PROCEDURE add_group () -BEGIN - -IF NOT EXISTS ( - SELECT - 1 - FROM - information_schema.`COLUMNS` - WHERE - table_name = 'group' -) THEN - CREATE TABLE `group` ( - `id` bigint unsigned NOT NULL AUTO_INCREMENT, - `avatar` varchar(255) DEFAULT NULL COMMENT '头像地址', - `name` varchar(25) DEFAULT NULL COMMENT '团队名称', - `short_name` varchar(10) DEFAULT NULL COMMENT '团队简称,创建题目时题号自动添加的前缀', - `brief` varchar(50) COMMENT '团队简介', - `description` longtext COMMENT '团队介绍', - `owner` varchar(255) NOT NULL COMMENT '团队拥有者用户名', - `uid` varchar(32) NOT NULL COMMENT '团队拥有者用户id', - `auth` int(11) NOT NULL COMMENT '0为Public,1为Protected,2为Private', - `visible` tinyint(1) DEFAULT '1' COMMENT '是否可见', - `status` tinyint(1) DEFAULT '0' COMMENT '是否封禁', - `code` varchar(6) DEFAULT NULL COMMENT '邀请码', - `gmt_create` datetime DEFAULT CURRENT_TIMESTAMP, - `gmt_modified` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id`), - UNIQUE KEY `NAME_UNIQUE` (`name`), - UNIQUE KEY `short_name` (`short_name`), - CONSTRAINT `group_ibfk_1` FOREIGN KEY (`uid`) REFERENCES `user_info` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE - ) ENGINE=InnoDB AUTO_INCREMENT=1000 DEFAULT CHARSET=utf8; - - CREATE TABLE `group_member` ( - `id` bigint unsigned NOT NULL AUTO_INCREMENT, - `gid` bigint unsigned NOT NULL COMMENT '团队id', - `uid` varchar(32) NOT NULL COMMENT '用户id', - `auth` int(11) DEFAULT '1' COMMENT '1未审批,2拒绝,3普通成员,4团队管理员,5团队拥有者', - `reason` varchar(100) DEFAULT NULL COMMENT '申请理由', - `gmt_create` datetime DEFAULT CURRENT_TIMESTAMP, - `gmt_modified` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id`), - UNIQUE KEY `gid_uid_unique` (`gid`, `uid`), - KEY `gid` (`gid`), - KEY `uid` (`uid`), - CONSTRAINT `group_member_ibfk_1` FOREIGN KEY (`gid`) REFERENCES `group` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `group_member_ibfk_2` FOREIGN KEY (`uid`) REFERENCES `user_info` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE - ) ENGINE=InnoDB DEFAULT CHARSET=utf8; - - ALTER TABLE `hoj`.`announcement` ADD COLUMN `gid` bigint(20) unsigned DEFAULT NULL; - ALTER TABLE `hoj`.`announcement` ADD CONSTRAINT `announcement_ibfk_2` FOREIGN KEY (`gid`) REFERENCES `group` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; - - - ALTER TABLE `hoj`.`contest` ADD COLUMN `is_group` tinyint(1) DEFAULT '0'; - ALTER TABLE `hoj`.`contest` ADD COLUMN `gid` bigint(20) unsigned DEFAULT NULL; - ALTER TABLE `hoj`.`contest` ADD CONSTRAINT `contest_ibfk_2` FOREIGN KEY (`gid`) REFERENCES `group` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; - - ALTER TABLE `hoj`.`judge` ADD COLUMN `gid` bigint(20) unsigned DEFAULT NULL; - ALTER TABLE `hoj`.`judge` ADD CONSTRAINT `judge_ibfk_4` FOREIGN KEY (`gid`) REFERENCES `group` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; - - - ALTER TABLE `hoj`.`discussion` ADD COLUMN `gid` bigint(20) unsigned DEFAULT NULL; - ALTER TABLE `hoj`.`discussion` ADD CONSTRAINT `discussion_ibfk_3` FOREIGN KEY (`gid`) REFERENCES `group` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; - - ALTER TABLE `hoj`.`file` ADD COLUMN `gid` bigint(20) unsigned DEFAULT NULL; - ALTER TABLE `hoj`.`file` ADD CONSTRAINT `file_ibfk_2` FOREIGN KEY (`gid`) REFERENCES `group` (`id`) ON DELETE SET NULL ON UPDATE CASCADE; - - ALTER TABLE `hoj`.`problem` ADD COLUMN `is_group` tinyint(1) DEFAULT '0'; - ALTER TABLE `hoj`.`problem` ADD COLUMN `gid` bigint(20) unsigned DEFAULT NULL; - ALTER TABLE `hoj`.`problem` ADD CONSTRAINT `problem_ibfk_2` FOREIGN KEY (`gid`) REFERENCES `group` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; - - ALTER TABLE `hoj`.`tag` ADD COLUMN `gid` bigint(20) unsigned DEFAULT NULL; - ALTER TABLE `hoj`.`tag` ADD CONSTRAINT `tag_ibfk_1` FOREIGN KEY (`gid`) REFERENCES `group` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; - - - ALTER TABLE `hoj`.`training` ADD COLUMN `is_group` tinyint(1) DEFAULT '0'; - ALTER TABLE `hoj`.`training` ADD COLUMN `gid` bigint(20) unsigned DEFAULT NULL; - ALTER TABLE `hoj`.`training` ADD CONSTRAINT `training_ibfk_1` FOREIGN KEY (`gid`) REFERENCES `group` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; - - ALTER TABLE `hoj`.`training_category` ADD COLUMN `gid` bigint(20) unsigned DEFAULT NULL; - ALTER TABLE `hoj`.`training_category` ADD CONSTRAINT `training_category_ibfk_1` FOREIGN KEY (`gid`) REFERENCES `group` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; - - insert into `auth`(`id`,`name`,`permission`,`status`,`gmt_create`,`gmt_modified`) values (13,'group','group_add',0,'2022-03-11 13:36:55','2022-03-11 13:36:55'), - (14,'group','group_del',0,'2022-03-11 13:36:55','2022-03-11 13:36:55'); - - insert into `role_auth`(`auth_id`,`role_id`,`gmt_create`,`gmt_modified`) values (13,1000,'2021-06-12 23:16:58','2021-06-12 23:16:58'),(13,1001,'2021-06-12 23:16:58','2021-06-12 23:16:58'), - (13,1002,'2021-06-12 23:16:58','2021-06-12 23:16:58'),(13,1008,'2021-06-12 23:16:58','2021-06-12 23:16:58'),(14,1000,'2021-06-12 23:16:58','2021-06-12 23:16:58'), - (14,1001,'2021-06-12 23:16:58','2021-06-12 23:16:58'),(14,1002,'2021-06-12 23:16:58','2021-06-12 23:16:58'),(14,1008,'2021-06-12 23:16:58','2021-06-12 23:16:58'); - -END -IF ; END$$ - -DELIMITER ; -CALL add_group ; - -DROP PROCEDURE add_group; - - - -/* -* 2022.04.13 problem表增加apply_public_progress - -*/ -DROP PROCEDURE -IF EXISTS problem_Add_apply_public_progress; -DELIMITER $$ - -CREATE PROCEDURE problem_Add_apply_public_progress () -BEGIN - -IF NOT EXISTS ( - SELECT - 1 - FROM - information_schema.`COLUMNS` - WHERE - table_name = 'problem' - AND column_name = 'apply_public_progress' -) THEN - ALTER TABLE `hoj`.`problem` ADD COLUMN `apply_public_progress` int(11) DEFAULT NULL COMMENT '申请公开的进度:null为未申请,1为申请中,2为申请通过,3为申请拒绝'; -END -IF ; END$$ - -DELIMITER ; -CALL problem_Add_apply_public_progress ; - -DROP PROCEDURE problem_Add_apply_public_progress; - - - -/* -* 2022.06.26 给指定表的字段修改字符集为utf8mb4 - -*/ -DROP PROCEDURE -IF EXISTS table_Change_utf8mb4; -DELIMITER $$ - -CREATE PROCEDURE table_Change_utf8mb4 () -BEGIN - -IF NOT EXISTS ( - SELECT - 1 - FROM - information_schema.`COLUMNS` - WHERE - table_name = 'problem' - AND column_name = 'input' AND CHARACTER_SET_NAME = 'utf8mb4' -) THEN - ALTER TABLE hoj.admin_sys_notice MODIFY COLUMN `content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; - ALTER TABLE hoj.admin_sys_notice MODIFY COLUMN `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; - ALTER TABLE hoj.contest MODIFY COLUMN `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; - ALTER TABLE hoj.contest MODIFY COLUMN `description` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; - ALTER TABLE hoj.contest_explanation MODIFY COLUMN `content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; - ALTER TABLE hoj.contest_problem MODIFY COLUMN `display_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; - ALTER TABLE hoj.contest_print MODIFY COLUMN `content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; - ALTER TABLE hoj.discussion MODIFY COLUMN `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; - ALTER TABLE hoj.discussion MODIFY COLUMN `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; - ALTER TABLE hoj.discussion MODIFY COLUMN `content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; - ALTER TABLE hoj.discussion_report MODIFY COLUMN `content` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; - ALTER TABLE hoj.group MODIFY COLUMN `description` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; - ALTER TABLE hoj.group_member MODIFY COLUMN `reason` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; - ALTER TABLE hoj.language MODIFY COLUMN `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; - ALTER TABLE hoj.msg_remind MODIFY COLUMN `source_content` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; - ALTER TABLE hoj.problem MODIFY COLUMN `source` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; - ALTER TABLE hoj.problem MODIFY COLUMN `input` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; - ALTER TABLE hoj.problem MODIFY COLUMN `output` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; - ALTER TABLE hoj.problem MODIFY COLUMN `description` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; - ALTER TABLE hoj.problem MODIFY COLUMN `hint` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; - ALTER TABLE hoj.problem MODIFY COLUMN `spj_code` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; - ALTER TABLE hoj.problem MODIFY COLUMN `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; - ALTER TABLE hoj.reply MODIFY COLUMN `content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; - ALTER TABLE hoj.training MODIFY COLUMN `description` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; - ALTER TABLE hoj.training MODIFY COLUMN `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; - ALTER TABLE hoj.user_info MODIFY COLUMN `signature` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; - ALTER TABLE hoj.judge MODIFY COLUMN `code` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; - ALTER TABLE hoj.comment MODIFY COLUMN `content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; - -END -IF ; END$$ - -DELIMITER ; -CALL table_Change_utf8mb4 ; - -DROP PROCEDURE table_Change_utf8mb4; - - -/* -* 2022.08.05 题目标签添加分类 - -*/ -DROP PROCEDURE -IF EXISTS problem_tag_Add_classification; -DELIMITER $$ - -CREATE PROCEDURE problem_tag_Add_classification () -BEGIN - -IF NOT EXISTS ( - SELECT - 1 - FROM - information_schema.`COLUMNS` - WHERE - table_name = 'tag' - AND column_name = 'tcid' -) THEN - CREATE TABLE `tag_classification` ( - `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, - `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '标签分类名称', - `oj` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '标签分类所属oj', - `gmt_create` datetime NULL DEFAULT NULL, - `gmt_modified` datetime NULL DEFAULT NULL, - `rank` int(10) UNSIGNED ZEROFILL NULL DEFAULT NULL COMMENT '标签分类优先级 越小越高', - PRIMARY KEY (`id`) USING BTREE - ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic; - - ALTER TABLE `hoj`.`tag` ADD COLUMN `tcid` bigint(20) unsigned DEFAULT NULL; - ALTER TABLE `hoj`.`tag` ADD CONSTRAINT `tag_ibfk_2` FOREIGN KEY (`tcid`) REFERENCES `tag_classification` (`id`) ON DELETE SET NULL ON UPDATE CASCADE; - -END -IF ; END$$ - -DELIMITER ; -CALL problem_tag_Add_classification ; - -DROP PROCEDURE problem_tag_Add_classification; - - -/* -* 2022.08.21 提交评测增加人工评测标记 - -*/ -DROP PROCEDURE -IF EXISTS judge_tag_Add_is_manual; -DELIMITER $$ - -CREATE PROCEDURE judge_tag_Add_is_manual () -BEGIN - -IF NOT EXISTS ( - SELECT - 1 - FROM - information_schema.`COLUMNS` - WHERE - table_name = 'judge' - AND column_name = 'is_manual' -) THEN - - ALTER TABLE `hoj`.`judge` ADD COLUMN `is_manual` tinyint(1) DEFAULT '0' COMMENT '是否为人工评测'; - -END -IF ; END$$ - -DELIMITER ; -CALL judge_tag_Add_is_manual ; - -DROP PROCEDURE judge_tag_Add_is_manual; \ No newline at end of file diff --git a/src/sqlAndsetting/hoj.sql b/src/sqlAndsetting/hoj.sql deleted file mode 100644 index 6aa5bd0..0000000 --- a/src/sqlAndsetting/hoj.sql +++ /dev/null @@ -1,1156 +0,0 @@ -/* -SQLyog Professional v12.09 (64 bit) -MySQL - 5.7.34 : Database - hoj -********************************************************************* -*/ - - -/*!40101 SET NAMES utf8 */; - -/*!40101 SET SQL_MODE=''*/; - -/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; -/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; -/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; -/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; -CREATE DATABASE IF NOT EXISTS`hoj` DEFAULT CHARACTER SET utf8; - -USE `hoj`; - -/*Table structure for table `announcement` */ - -DROP TABLE IF EXISTS `announcement`; - -CREATE TABLE `announcement` ( - `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, - `title` varchar(255) NOT NULL, - `content` longtext, - `uid` varchar(255) DEFAULT NULL, - `status` int(11) DEFAULT '0' COMMENT '0可见,1不可见', - `gid` bigint(20) unsigned DEFAULT NULL, - `gmt_create` datetime DEFAULT CURRENT_TIMESTAMP, - `gmt_modified` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id`), - KEY `uid` (`uid`), - CONSTRAINT `announcement_ibfk_1` FOREIGN KEY (`uid`) REFERENCES `user_info` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `announcement_ibfk_2` FOREIGN KEY (`gid`) REFERENCES `group` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; - -/*Table structure for table `auth` */ - -DROP TABLE IF EXISTS `auth`; - -CREATE TABLE `auth` ( - `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, - `name` varchar(100) DEFAULT NULL COMMENT '权限名称', - `permission` varchar(100) DEFAULT NULL COMMENT '权限字符串', - `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '0可用,1不可用', - `gmt_create` datetime DEFAULT CURRENT_TIMESTAMP, - `gmt_modified` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; - -/*Table structure for table `category` */ - -DROP TABLE IF EXISTS `category`; - -CREATE TABLE `category` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `name` varchar(255) DEFAULT NULL, - `gmt_create` datetime DEFAULT CURRENT_TIMESTAMP, - `gmt_modified` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; - -/*Table structure for table `code_template` */ - -DROP TABLE IF EXISTS `code_template`; - -CREATE TABLE `code_template` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `pid` bigint(20) unsigned NOT NULL, - `lid` bigint(20) unsigned NOT NULL, - `code` longtext NOT NULL, - `status` tinyint(1) DEFAULT '0', - `gmt_create` datetime DEFAULT CURRENT_TIMESTAMP, - `gmt_modified` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id`), - KEY `pid` (`pid`), - KEY `lid` (`lid`), - CONSTRAINT `code_template_ibfk_1` FOREIGN KEY (`pid`) REFERENCES `problem` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `code_template_ibfk_2` FOREIGN KEY (`lid`) REFERENCES `language` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; - -/*Table structure for table `comment` */ - -DROP TABLE IF EXISTS `comment`; - -CREATE TABLE `comment` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `cid` bigint(20) unsigned DEFAULT NULL COMMENT 'null表示无引用比赛', - `did` int(11) DEFAULT NULL COMMENT 'null表示无引用讨论', - `content` longtext COMMENT '评论内容', - `from_uid` varchar(32) NOT NULL COMMENT '评论者id', - `from_name` varchar(255) DEFAULT NULL COMMENT '评论者用户名', - `from_avatar` varchar(255) DEFAULT NULL COMMENT '评论组头像地址', - `from_role` varchar(20) DEFAULT NULL COMMENT '评论者角色', - `like_num` int(11) DEFAULT '0' COMMENT '点赞数量', - `status` int(11) DEFAULT '0' COMMENT '是否封禁或逻辑删除该评论', - `gmt_create` datetime DEFAULT CURRENT_TIMESTAMP, - `gmt_modified` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id`), - KEY `uid` (`from_uid`), - KEY `from_avatar` (`from_avatar`), - KEY `comment_ibfk_7` (`did`), - KEY `cid` (`cid`), - CONSTRAINT `comment_ibfk_6` FOREIGN KEY (`from_avatar`) REFERENCES `user_info` (`avatar`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `comment_ibfk_7` FOREIGN KEY (`did`) REFERENCES `discussion` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `comment_ibfk_8` FOREIGN KEY (`cid`) REFERENCES `contest` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; - -/*Table structure for table `comment_like` */ - -DROP TABLE IF EXISTS `comment_like`; - -CREATE TABLE `comment_like` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `uid` varchar(255) NOT NULL, - `cid` int(11) NOT NULL, - `gmt_create` datetime DEFAULT CURRENT_TIMESTAMP, - `gmt_modified` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id`), - KEY `uid` (`uid`), - KEY `cid` (`cid`), - CONSTRAINT `comment_like_ibfk_1` FOREIGN KEY (`uid`) REFERENCES `user_info` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `comment_like_ibfk_2` FOREIGN KEY (`cid`) REFERENCES `comment` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; - -/*Table structure for table `contest` */ - -DROP TABLE IF EXISTS `contest`; - -CREATE TABLE `contest` ( - `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, - `uid` varchar(32) NOT NULL COMMENT '比赛创建者id', - `author` varchar(255) DEFAULT NULL COMMENT '比赛创建者的用户名', - `title` varchar(255) DEFAULT NULL COMMENT '比赛标题', - `type` int(11) NOT NULL DEFAULT '0' COMMENT '0为acm赛制,1为比分赛制', - `description` longtext COMMENT '比赛说明', - `source` int(11) DEFAULT '0' COMMENT '比赛来源,原创为0,克隆赛为比赛id', - `auth` int(11) NOT NULL COMMENT '0为公开赛,1为私有赛(访问有密码),2为保护赛(提交有密码)', - `pwd` varchar(255) DEFAULT NULL COMMENT '比赛密码', - `start_time` datetime DEFAULT NULL COMMENT '开始时间', - `end_time` datetime DEFAULT NULL COMMENT '结束时间', - `duration` bigint(20) DEFAULT NULL COMMENT '比赛时长(s)', - `seal_rank` tinyint(1) DEFAULT '0' COMMENT '是否开启封榜', - `seal_rank_time` datetime DEFAULT NULL COMMENT '封榜起始时间,一直到比赛结束,不刷新榜单', - `auto_real_rank` tinyint(1) DEFAULT '1' COMMENT '比赛结束是否自动解除封榜,自动转换成真实榜单', - `status` int(11) DEFAULT NULL COMMENT '-1为未开始,0为进行中,1为已结束', - `visible` tinyint(1) DEFAULT '1' COMMENT '是否可见', - `open_print` tinyint(1) DEFAULT '0' COMMENT '是否打开打印功能', - `open_account_limit` tinyint(1) DEFAULT '0' COMMENT '是否开启账号限制', - `account_limit_rule` mediumtext COMMENT '账号限制规则', - `rank_show_name` varchar(20) DEFAULT 'username' COMMENT '排行榜显示(username、nickname、realname)', - `open_rank` tinyint(1) DEFAULT '0' COMMENT '是否开放比赛榜单', - `star_account` mediumtext COMMENT '打星用户列表', - `oi_rank_score_type` varchar(255) DEFAULT 'Recent' COMMENT 'oi排行榜得分方式,Recent、Highest', - `is_group` tinyint(1) DEFAULT '0', - `gid` bigint(20) unsigned DEFAULT NULL, - `gmt_create` datetime DEFAULT CURRENT_TIMESTAMP, - `gmt_modified` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id`,`uid`), - KEY `uid` (`uid`), - CONSTRAINT `contest_ibfk_1` FOREIGN KEY (`uid`) REFERENCES `user_info` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `contest_ibfk_2` FOREIGN KEY (`gid`) REFERENCES `group` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=1000 DEFAULT CHARSET=utf8; - -/*Table structure for table `contest_announcement` */ - -DROP TABLE IF EXISTS `contest_announcement`; - -CREATE TABLE `contest_announcement` ( - `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, - `aid` bigint(20) unsigned NOT NULL COMMENT '公告id', - `cid` bigint(20) unsigned NOT NULL COMMENT '比赛id', - `gmt_create` datetime DEFAULT CURRENT_TIMESTAMP, - `gmt_modified` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id`), - KEY `contest_announcement_ibfk_1` (`cid`), - KEY `contest_announcement_ibfk_2` (`aid`), - CONSTRAINT `contest_announcement_ibfk_1` FOREIGN KEY (`cid`) REFERENCES `contest` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `contest_announcement_ibfk_2` FOREIGN KEY (`aid`) REFERENCES `announcement` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -/*Table structure for table `contest_explanation` */ - -DROP TABLE IF EXISTS `contest_explanation`; - -CREATE TABLE `contest_explanation` ( - `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, - `cid` bigint(20) unsigned NOT NULL, - `uid` varchar(32) NOT NULL COMMENT '发布者(必须为比赛创建者或者超级管理员才能)', - `content` longtext COMMENT '内容(支持markdown)', - `gmt_create` datetime DEFAULT CURRENT_TIMESTAMP, - `gmt_modified` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id`), - KEY `uid` (`uid`), - KEY `contest_explanation_ibfk_1` (`cid`), - CONSTRAINT `contest_explanation_ibfk_1` FOREIGN KEY (`cid`) REFERENCES `contest` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `contest_explanation_ibfk_2` FOREIGN KEY (`uid`) REFERENCES `user_info` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -/*Table structure for table `contest_problem` */ - -DROP TABLE IF EXISTS `contest_print`; - -CREATE TABLE `contest_print` ( - `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, - `username` varchar(100) DEFAULT NULL, - `realname` varchar(100) DEFAULT NULL, - `cid` bigint(20) unsigned DEFAULT NULL, - `content` longtext NOT NULL, - `status` int(11) DEFAULT '0', - `gmt_create` datetime DEFAULT CURRENT_TIMESTAMP, - `gmt_modified` datetime DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (`id`), - KEY `cid` (`cid`), - KEY `username` (`username`), - CONSTRAINT `contest_print_ibfk_1` FOREIGN KEY (`cid`) REFERENCES `contest` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `contest_print_ibfk_2` FOREIGN KEY (`username`) REFERENCES `user_info` (`username`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - - -DROP TABLE IF EXISTS `contest_problem`; - -CREATE TABLE `contest_problem` ( - `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键', - `display_id` varchar(255) NOT NULL COMMENT '该题目在比赛中的顺序id', - `cid` bigint(20) unsigned NOT NULL COMMENT '比赛id', - `pid` bigint(20) unsigned NOT NULL COMMENT '题目id', - `display_title` varchar(255) NOT NULL COMMENT '该题目在比赛中的标题,默认为原名字', - `color` varchar(255) DEFAULT NULL COMMENT '气球颜色', - `gmt_create` datetime DEFAULT CURRENT_TIMESTAMP, - `gmt_modified` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id`,`cid`,`pid`), - UNIQUE KEY `display_id` (`display_id`,`cid`,`pid`), - KEY `contest_problem_ibfk_1` (`cid`), - KEY `contest_problem_ibfk_2` (`pid`), - CONSTRAINT `contest_problem_ibfk_1` FOREIGN KEY (`cid`) REFERENCES `contest` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `contest_problem_ibfk_2` FOREIGN KEY (`pid`) REFERENCES `problem` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; - -/*Table structure for table `contest_record` */ - -DROP TABLE IF EXISTS `contest_record`; - -CREATE TABLE `contest_record` ( - `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键', - `cid` bigint(20) unsigned DEFAULT NULL COMMENT '比赛id', - `uid` varchar(255) NOT NULL COMMENT '用户id', - `pid` bigint(20) unsigned DEFAULT NULL COMMENT '题目id', - `cpid` bigint(20) unsigned DEFAULT NULL COMMENT '比赛中的题目的id', - `username` varchar(255) DEFAULT NULL COMMENT '用户名', - `realname` varchar(255) DEFAULT NULL COMMENT '真实姓名', - `display_id` varchar(255) DEFAULT NULL COMMENT '比赛中展示的id', - `submit_id` bigint(20) unsigned NOT NULL COMMENT '提交id,用于可重判', - `status` int(11) DEFAULT NULL COMMENT '提交结果,0表示未AC通过不罚时,1表示AC通过,-1为未AC通过算罚时', - `submit_time` datetime NOT NULL COMMENT '具体提交时间', - `time` bigint(20) unsigned DEFAULT NULL COMMENT '提交时间,为提交时间减去比赛时间', - `score` int(11) DEFAULT NULL COMMENT 'OI比赛的得分', - `use_time` int(11) DEFAULT NULL COMMENT '运行耗时', - `first_blood` tinyint(1) DEFAULT '0' COMMENT '是否为一血AC(废弃)', - `checked` tinyint(1) DEFAULT '0' COMMENT 'AC是否已校验', - `gmt_create` datetime DEFAULT CURRENT_TIMESTAMP, - `gmt_modified` datetime DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (`id`,`submit_id`), - KEY `uid` (`uid`), - KEY `pid` (`pid`), - KEY `cpid` (`cpid`), - KEY `submit_id` (`submit_id`), - KEY `index_cid` (`cid`), - KEY `index_time` (`time`), - CONSTRAINT `contest_record_ibfk_1` FOREIGN KEY (`cid`) REFERENCES `contest` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `contest_record_ibfk_2` FOREIGN KEY (`uid`) REFERENCES `user_info` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `contest_record_ibfk_3` FOREIGN KEY (`pid`) REFERENCES `problem` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `contest_record_ibfk_4` FOREIGN KEY (`cpid`) REFERENCES `contest_problem` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `contest_record_ibfk_5` FOREIGN KEY (`submit_id`) REFERENCES `judge` (`submit_id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; - -/*Table structure for table `contest_register` */ - -DROP TABLE IF EXISTS `contest_register`; - -CREATE TABLE `contest_register` ( - `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, - `cid` bigint(20) unsigned NOT NULL COMMENT '比赛id', - `uid` varchar(32) NOT NULL COMMENT '用户id', - `status` int(11) DEFAULT '0' COMMENT '默认为0表示正常,1为失效。', - `gmt_create` datetime DEFAULT CURRENT_TIMESTAMP, - `gmt_modified` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id`,`cid`,`uid`), - UNIQUE KEY `cid_uid_unique` (`cid`,`uid`), - KEY `contest_register_ibfk_2` (`uid`), - CONSTRAINT `contest_register_ibfk_1` FOREIGN KEY (`cid`) REFERENCES `contest` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `contest_register_ibfk_2` FOREIGN KEY (`uid`) REFERENCES `user_info` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -/*Table structure for table `contest_score` */ - -DROP TABLE IF EXISTS `contest_score`; - -CREATE TABLE `contest_score` ( - `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, - `cid` bigint(20) unsigned NOT NULL, - `last` int(11) DEFAULT NULL COMMENT '比赛前的score得分', - `change` int(11) DEFAULT NULL COMMENT 'Score比分变化', - `now` int(11) DEFAULT NULL COMMENT '现在的score', - `gmt_create` datetime DEFAULT CURRENT_TIMESTAMP, - `gmt_modified` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id`,`cid`), - KEY `contest_score_ibfk_1` (`cid`), - CONSTRAINT `contest_score_ibfk_1` FOREIGN KEY (`cid`) REFERENCES `contest` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -/*Table structure for table `discussion` */ - -DROP TABLE IF EXISTS `discussion`; - -CREATE TABLE `discussion` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `category_id` int(11) NOT NULL COMMENT '分类id', - `title` varchar(255) DEFAULT NULL COMMENT '讨论标题', - `description` varchar(255) DEFAULT NULL COMMENT '讨论简介', - `content` longtext COMMENT '讨论内容', - `pid` varchar(255) DEFAULT NULL COMMENT '关联题目id', - `uid` varchar(32) NOT NULL COMMENT '发表者id', - `author` varchar(255) NOT NULL COMMENT '发表者用户名', - `avatar` varchar(255) DEFAULT NULL COMMENT '发表讨论者头像', - `role` varchar(25) DEFAULT 'user' COMMENT '发表者角色', - `view_num` int(11) DEFAULT '0' COMMENT '浏览数量', - `like_num` int(11) DEFAULT '0' COMMENT '点赞数量', - `top_priority` tinyint(1) DEFAULT '0' COMMENT '优先级,是否置顶', - `comment_num` int(11) DEFAULT '0' COMMENT '评论数量', - `status` int(1) DEFAULT '0' COMMENT '是否封禁该讨论', - `gid` bigint(20) unsigned DEFAULT NULL, - `gmt_create` datetime DEFAULT CURRENT_TIMESTAMP, - `gmt_modified` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id`), - KEY `category_id` (`category_id`), - KEY `discussion_ibfk_4` (`avatar`), - KEY `discussion_ibfk_1` (`uid`), - KEY `pid` (`pid`), - CONSTRAINT `discussion_ibfk_1` FOREIGN KEY (`uid`) REFERENCES `user_info` (`uuid`) ON DELETE NO ACTION ON UPDATE CASCADE, - CONSTRAINT `discussion_ibfk_2` FOREIGN KEY (`category_id`) REFERENCES `category` (`id`) ON DELETE NO ACTION ON UPDATE CASCADE, - CONSTRAINT `discussion_ibfk_4` FOREIGN KEY (`avatar`) REFERENCES `user_info` (`avatar`) ON DELETE NO ACTION ON UPDATE CASCADE, - CONSTRAINT `discussion_ibfk_6` FOREIGN KEY (`pid`) REFERENCES `problem` (`problem_id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `discussion_ibfk_3` FOREIGN KEY (`gid`) REFERENCES `group` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; - -/*Table structure for table `discussion_like` */ - -DROP TABLE IF EXISTS `discussion_like`; - -CREATE TABLE `discussion_like` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `uid` varchar(255) NOT NULL, - `did` int(11) NOT NULL, - `gmt_create` datetime DEFAULT CURRENT_TIMESTAMP, - `gmt_modified` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id`), - KEY `did` (`did`), - KEY `uid` (`uid`), - CONSTRAINT `discussion_like_ibfk_1` FOREIGN KEY (`did`) REFERENCES `discussion` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `discussion_like_ibfk_2` FOREIGN KEY (`uid`) REFERENCES `user_info` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; - -/*Table structure for table `discussion_report` */ - -DROP TABLE IF EXISTS `discussion_report`; - -CREATE TABLE `discussion_report` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `did` int(11) DEFAULT NULL COMMENT '讨论id', - `reporter` varchar(255) DEFAULT NULL COMMENT '举报者的用户名', - `content` varchar(255) NOT NULL COMMENT '举报内容', - `status` tinyint(1) DEFAULT '0' COMMENT '是否已读', - `gmt_create` datetime DEFAULT CURRENT_TIMESTAMP, - `gmt_modified` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id`), - KEY `did` (`did`), - KEY `reporter` (`reporter`), - CONSTRAINT `discussion_report_ibfk_1` FOREIGN KEY (`did`) REFERENCES `discussion` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `discussion_report_ibfk_2` FOREIGN KEY (`reporter`) REFERENCES `user_info` (`username`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; - -/*Table structure for table `file` */ - -DROP TABLE IF EXISTS `file`; - -CREATE TABLE `file` ( - `id` bigint(32) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键', - `uid` varchar(32) DEFAULT NULL COMMENT '用户id', - `name` varchar(255) NOT NULL COMMENT '文件名', - `suffix` varchar(255) NOT NULL COMMENT '文件后缀格式', - `folder_path` varchar(255) NOT NULL COMMENT '文件所在文件夹的路径', - `file_path` varchar(255) DEFAULT NULL COMMENT '文件绝对路径', - `type` varchar(255) DEFAULT NULL COMMENT '文件所属类型,例如avatar', - `delete` tinyint(1) DEFAULT '0' COMMENT '是否删除', - `gid` bigint(20) unsigned DEFAULT NULL, - `gmt_create` datetime DEFAULT CURRENT_TIMESTAMP, - `gmt_modified` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id`), - KEY `uid` (`uid`), - CONSTRAINT `file_ibfk_1` FOREIGN KEY (`uid`) REFERENCES `user_info` (`uuid`) ON DELETE SET NULL ON UPDATE CASCADE, - CONSTRAINT `file_ibfk_2` FOREIGN KEY (`gid`) REFERENCES `group` (`id`) ON DELETE SET NULL ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; - -/*Table structure for table `judge` */ - -DROP TABLE IF EXISTS `judge`; - -CREATE TABLE `judge` ( - `submit_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, - `pid` bigint(20) unsigned NOT NULL COMMENT '题目id', - `display_pid` varchar(255) NOT NULL COMMENT '题目展示id', - `uid` varchar(32) NOT NULL COMMENT '用户id', - `username` varchar(255) DEFAULT NULL COMMENT '用户名', - `submit_time` datetime NOT NULL COMMENT '提交的时间', - `status` int(11) DEFAULT NULL COMMENT '结果码具体参考文档', - `share` tinyint(1) DEFAULT '0' COMMENT '0为仅自己可见,1为全部人可见。', - `error_message` mediumtext COMMENT '错误提醒(编译错误,或者vj提醒)', - `time` int(11) DEFAULT NULL COMMENT '运行时间(ms)', - `memory` int(11) DEFAULT NULL COMMENT '运行内存(kb)', - `score` int(11) DEFAULT NULL COMMENT 'IO判题则不为空', - `length` int(11) DEFAULT NULL COMMENT '代码长度', - `code` longtext NOT NULL COMMENT '代码', - `language` varchar(255) DEFAULT NULL COMMENT '代码语言', - `gid` bigint(20) unsigned DEFAULT NULL COMMENT '团队id,不为团队内提交则为null', - `cid` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '比赛id,非比赛题目默认为0', - `cpid` bigint(20) unsigned DEFAULT '0' COMMENT '比赛中题目排序id,非比赛题目默认为0', - `judger` varchar(20) DEFAULT NULL COMMENT '判题机ip', - `ip` varchar(20) DEFAULT NULL COMMENT '提交者所在ip', - `version` int(11) NOT NULL DEFAULT '0' COMMENT '乐观锁', - `oi_rank_score` int(11) NULL DEFAULT '0' COMMENT 'oi排行榜得分', - `vjudge_submit_id` bigint(20) unsigned NULL COMMENT 'vjudge判题在其它oj的提交id', - `vjudge_username` varchar(255) NULL COMMENT 'vjudge判题在其它oj的提交用户名', - `vjudge_password` varchar(255) NULL COMMENT 'vjudge判题在其它oj的提交账号密码', - `is_manual` tinyint(1) DEFAULT '0' COMMENT '是否为人工评测', - `gmt_create` datetime DEFAULT CURRENT_TIMESTAMP, - `gmt_modified` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`submit_id`,`pid`,`display_pid`,`uid`,`cid`), - KEY `pid` (`pid`), - KEY `uid` (`uid`), - KEY `username` (`username`), - CONSTRAINT `judge_ibfk_1` FOREIGN KEY (`pid`) REFERENCES `problem` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `judge_ibfk_2` FOREIGN KEY (`uid`) REFERENCES `user_info` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `judge_ibfk_3` FOREIGN KEY (`username`) REFERENCES `user_info` (`username`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `judge_ibfk_4` FOREIGN KEY (`gid`) REFERENCES `group` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; - -/*Table structure for table `judge_case` */ - -DROP TABLE IF EXISTS `judge_case`; - -CREATE TABLE `judge_case` ( - `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, - `submit_id` bigint(20) unsigned NOT NULL COMMENT '提交判题id', - `uid` varchar(32) NOT NULL COMMENT '用户id', - `pid` bigint(20) unsigned NOT NULL COMMENT '题目id', - `case_id` bigint(20) DEFAULT NULL COMMENT '测试样例id', - `status` int(11) DEFAULT NULL COMMENT '具体看结果码', - `time` int(11) DEFAULT NULL COMMENT '测试该样例所用时间ms', - `memory` int(11) DEFAULT NULL COMMENT '测试该样例所用空间KB', - `score` int(11) DEFAULT NULL COMMENT 'IO得分', - `input_data` longtext COMMENT '样例输入,比赛不可看', - `output_data` longtext COMMENT '样例输出,比赛不可看', - `user_output` longtext COMMENT '用户样例输出,比赛不可看', - `gmt_create` datetime DEFAULT CURRENT_TIMESTAMP, - `gmt_modified` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id`,`submit_id`,`uid`,`pid`), - KEY `case_id` (`case_id`), - KEY `judge_case_ibfk_1` (`uid`), - KEY `judge_case_ibfk_2` (`pid`), - KEY `judge_case_ibfk_3` (`submit_id`), - CONSTRAINT `judge_case_ibfk_1` FOREIGN KEY (`uid`) REFERENCES `user_info` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `judge_case_ibfk_2` FOREIGN KEY (`pid`) REFERENCES `problem` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `judge_case_ibfk_3` FOREIGN KEY (`submit_id`) REFERENCES `judge` (`submit_id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; - -/*Table structure for table `judge_server` */ - -DROP TABLE IF EXISTS `judge_server`; - -CREATE TABLE `judge_server` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `name` varchar(255) DEFAULT NULL COMMENT '判题服务名字', - `ip` varchar(255) NOT NULL COMMENT '判题机ip', - `port` int(11) NOT NULL COMMENT '判题机端口号', - `url` varchar(255) DEFAULT NULL COMMENT 'ip:port', - `cpu_core` int(11) DEFAULT '0' COMMENT '判题机所在服务器cpu核心数', - `task_number` int(11) NOT NULL DEFAULT '0' COMMENT '当前判题数', - `max_task_number` int(11) NOT NULL COMMENT '判题并发最大数', - `status` int(11) DEFAULT '0' COMMENT '0可用,1不可用', - `is_remote` tinyint(1) DEFAULT NULL COMMENT '是否开启远程判题vj', - `cf_submittable` tinyint(1) DEFAULT 1 NULL COMMENT '是否可提交CF', - `gmt_create` datetime DEFAULT CURRENT_TIMESTAMP, - `gmt_modified` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id`), - KEY `index_judge_remote` (`is_remote`), - KEY `index_judge_url` (`url`) -) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; - -/*Table structure for table `language` */ - -DROP TABLE IF EXISTS `language`; - -CREATE TABLE `language` ( - `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键', - `content_type` varchar(255) DEFAULT NULL COMMENT '语言类型', - `description` varchar(255) DEFAULT NULL COMMENT '语言描述', - `name` varchar(255) DEFAULT NULL COMMENT '语言名字', - `compile_command` mediumtext COMMENT '编译指令', - `template` longtext COMMENT '模板', - `code_template` longtext COMMENT '语言默认代码模板', - `is_spj` tinyint(1) DEFAULT '0' COMMENT '是否可作为特殊判题的一种语言', - `oj` varchar(255) DEFAULT NULL COMMENT '该语言属于哪个oj,自身oj用ME', - `gmt_create` datetime DEFAULT CURRENT_TIMESTAMP, - `gmt_modified` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; - -/*Table structure for table `problem` */ - -DROP TABLE IF EXISTS `problem`; - -CREATE TABLE `problem` ( - `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, - `problem_id` varchar(255) NOT NULL COMMENT '问题的自定义ID 例如(HOJ-1000)', - `title` varchar(255) NOT NULL COMMENT '题目', - `author` varchar(255) DEFAULT '未知' COMMENT '作者', - `type` int(11) NOT NULL DEFAULT '0' COMMENT '0为ACM,1为OI', - `time_limit` int(11) DEFAULT '1000' COMMENT '单位ms', - `memory_limit` int(11) DEFAULT '65535' COMMENT '单位kb', - `stack_limit` int(11) DEFAULT '128' COMMENT '单位mb', - `description` longtext COMMENT '描述', - `input` longtext COMMENT '输入描述', - `output` longtext COMMENT '输出描述', - `examples` longtext COMMENT '题面样例', - `is_remote` tinyint(1) DEFAULT '0' COMMENT '是否为vj判题', - `source` text COMMENT '题目来源', - `difficulty` int(11) DEFAULT '0' COMMENT '题目难度,0简单,1中等,2困难', - `hint` longtext COMMENT '备注,提醒', - `auth` int(11) DEFAULT '1' COMMENT '默认为1公开,2为私有,3为比赛题目', - `io_score` int(11) DEFAULT '100' COMMENT '当该题目为io题目时的分数', - `code_share` tinyint(1) DEFAULT '1' COMMENT '该题目对应的相关提交代码,用户是否可用分享', - `judge_mode` varchar(255) DEFAULT 'default' COMMENT '题目评测模式,default、spj、interactive', - `user_extra_file` mediumtext DEFAULT NULL COMMENT '题目评测时用户程序的额外文件 json key:name value:content', - `judge_extra_file` mediumtext DEFAULT NULL COMMENT '题目评测时交互或特殊程序的额外文件 json key:name value:content', - `spj_code` longtext COMMENT '特判程序或交互程序代码', - `spj_language` varchar(255) DEFAULT NULL COMMENT '特判程序或交互程序代码的语言', - `is_remove_end_blank` tinyint(1) DEFAULT '1' COMMENT '是否默认去除用户代码的文末空格', - `open_case_result` tinyint(1) DEFAULT '1' COMMENT '是否默认开启该题目的测试样例结果查看', - `is_upload_case` tinyint(1) DEFAULT '1' COMMENT '题目测试数据是否是上传文件的', - `case_version` varchar(40) DEFAULT '0' COMMENT '题目测试数据的版本号', - `modified_user` varchar(255) DEFAULT NULL COMMENT '修改题目的管理员用户名', - `is_group` tinyint(1) DEFAULT '0', - `gid` bigint(20) unsigned DEFAULT NULL, - `apply_public_progress` int(11) DEFAULT NULL COMMENT '申请公开的进度:null为未申请,1为申请中,2为申请通过,3为申请拒绝', - `gmt_create` datetime DEFAULT CURRENT_TIMESTAMP, - `gmt_modified` datetime DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (`id`), - KEY `author` (`author`), - KEY `problem_id` (`problem_id`), - CONSTRAINT `problem_ibfk_1` FOREIGN KEY (`author`) REFERENCES `user_info` (`username`) ON DELETE NO ACTION ON UPDATE CASCADE, - CONSTRAINT `problem_ibfk_2` FOREIGN KEY (`gid`) REFERENCES `group` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=1000 DEFAULT CHARSET=utf8; - -/*Table structure for table `problem_case` */ - -DROP TABLE IF EXISTS `problem_case`; - -CREATE TABLE `problem_case` ( - `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键id', - `pid` bigint(20) unsigned NOT NULL COMMENT '题目id', - `input` longtext COMMENT '测试样例的输入', - `output` longtext COMMENT '测试样例的输出', - `score` int(11) DEFAULT NULL COMMENT '该测试样例的IO得分', - `status` int(11) DEFAULT '0' COMMENT '0可用,1不可用', - `gmt_create` datetime DEFAULT CURRENT_TIMESTAMP, - `gmt_modified` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id`), - KEY `pid` (`pid`), - CONSTRAINT `problem_case_ibfk_1` FOREIGN KEY (`pid`) REFERENCES `problem` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; - - -/*Table structure for table `problem_language` */ - -DROP TABLE IF EXISTS `problem_language`; - -CREATE TABLE `problem_language` ( - `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, - `pid` bigint(20) unsigned NOT NULL, - `lid` bigint(20) unsigned NOT NULL, - `gmt_create` datetime DEFAULT CURRENT_TIMESTAMP, - `gmt_modified` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id`), - KEY `pid` (`pid`), - KEY `lid` (`lid`), - CONSTRAINT `problem_language_ibfk_1` FOREIGN KEY (`pid`) REFERENCES `problem` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `problem_language_ibfk_2` FOREIGN KEY (`lid`) REFERENCES `language` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; - -/*Table structure for table `problem_tag` */ - -DROP TABLE IF EXISTS `problem_tag`; - -CREATE TABLE `problem_tag` ( - `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, - `pid` bigint(20) unsigned NOT NULL, - `tid` bigint(20) unsigned NOT NULL, - `gmt_create` datetime DEFAULT CURRENT_TIMESTAMP, - `gmt_modified` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id`), - KEY `pid` (`pid`), - KEY `tid` (`tid`), - CONSTRAINT `problem_tag_ibfk_1` FOREIGN KEY (`pid`) REFERENCES `problem` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `problem_tag_ibfk_2` FOREIGN KEY (`tid`) REFERENCES `tag` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; - -/*Table structure for table `reply` */ - -DROP TABLE IF EXISTS `reply`; - -CREATE TABLE `reply` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `comment_id` int(11) NOT NULL COMMENT '被回复的评论id', - `from_uid` varchar(255) NOT NULL COMMENT '发起回复的用户id', - `from_name` varchar(255) NOT NULL COMMENT '发起回复的用户名', - `from_avatar` varchar(255) DEFAULT NULL COMMENT '发起回复的用户头像地址', - `from_role` varchar(255) DEFAULT NULL COMMENT '发起回复的用户角色', - `to_uid` varchar(255) NOT NULL COMMENT '被回复的用户id', - `to_name` varchar(255) NOT NULL COMMENT '被回复的用户名', - `to_avatar` varchar(255) DEFAULT NULL COMMENT '被回复的用户头像地址', - `content` longtext COMMENT '回复的内容', - `status` int(11) DEFAULT '0' COMMENT '是否封禁或逻辑删除该回复', - `gmt_create` datetime DEFAULT CURRENT_TIMESTAMP, - `gmt_modified` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id`), - KEY `comment_id` (`comment_id`), - KEY `from_avatar` (`from_avatar`), - KEY `to_avatar` (`to_avatar`), - CONSTRAINT `reply_ibfk_1` FOREIGN KEY (`comment_id`) REFERENCES `comment` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `reply_ibfk_2` FOREIGN KEY (`from_avatar`) REFERENCES `user_info` (`avatar`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `reply_ibfk_3` FOREIGN KEY (`to_avatar`) REFERENCES `user_info` (`avatar`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; - -/*Table structure for table `role` */ - -DROP TABLE IF EXISTS `role`; - -CREATE TABLE `role` ( - `id` bigint(20) unsigned zerofill NOT NULL, - `role` varchar(50) NOT NULL COMMENT '角色', - `description` varchar(100) DEFAULT NULL COMMENT '描述', - `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '默认0可用,1不可用', - `gmt_create` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `gmt_modified` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -/*Table structure for table `role_auth` */ - -DROP TABLE IF EXISTS `role_auth`; - -CREATE TABLE `role_auth` ( - `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, - `auth_id` bigint(20) unsigned NOT NULL, - `role_id` bigint(20) unsigned NOT NULL, - `gmt_create` datetime DEFAULT CURRENT_TIMESTAMP, - `gmt_modified` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id`), - KEY `auth_id` (`auth_id`) USING BTREE, - KEY `role_id` (`role_id`) USING BTREE, - CONSTRAINT `role_auth_ibfk_1` FOREIGN KEY (`auth_id`) REFERENCES `auth` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `role_auth_ibfk_2` FOREIGN KEY (`role_id`) REFERENCES `role` (`id`) ON DELETE NO ACTION ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; - -/*Table structure for table `session` */ - -DROP TABLE IF EXISTS `session`; - -CREATE TABLE `session` ( - `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, - `uid` varchar(255) NOT NULL, - `user_agent` varchar(512) DEFAULT NULL, - `ip` varchar(255) DEFAULT NULL, - `gmt_create` datetime DEFAULT CURRENT_TIMESTAMP, - `gmt_modified` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id`), - KEY `uid` (`uid`), - CONSTRAINT `session_ibfk_1` FOREIGN KEY (`uid`) REFERENCES `user_info` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; - -DROP TABLE IF EXISTS `tag_classification`; -CREATE TABLE `tag_classification` ( - `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, - `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '标签分类名称', - `oj` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '标签分类所属oj', - `gmt_create` datetime NULL DEFAULT NULL, - `gmt_modified` datetime NULL DEFAULT NULL, - `rank` int(10) UNSIGNED ZEROFILL NULL DEFAULT NULL COMMENT '标签分类优先级 越小越高', - PRIMARY KEY (`id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; - -/*Table structure for table `tag` */ - -DROP TABLE IF EXISTS `tag`; - -CREATE TABLE `tag` ( - `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, - `name` varchar(255) NOT NULL COMMENT '标签名字', - `color` varchar(10) DEFAULT NULL COMMENT '标签颜色', - `oj` varchar(255) DEFAULT 'ME' COMMENT '标签所属oj', - `gid` bigint(20) unsigned DEFAULT NULL, - `tcid` bigint(20) unsigned DEFAULT NULL, - `gmt_create` datetime DEFAULT CURRENT_TIMESTAMP, - `gmt_modified` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id`), - UNIQUE KEY `name` (`name`,`oj`, `gid`), - CONSTRAINT `tag_ibfk_1` FOREIGN KEY (`gid`) REFERENCES `group` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `tag_ibfk_2` FOREIGN KEY (`tcid`) REFERENCES `tag_classification` (`id`) ON DELETE SET NULL ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; - - -/*Table structure for table `user_acproblem` */ - -DROP TABLE IF EXISTS `user_acproblem`; - -CREATE TABLE `user_acproblem` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `uid` varchar(32) NOT NULL COMMENT '用户id', - `pid` bigint(20) unsigned NOT NULL COMMENT 'ac的题目id', - `submit_id` bigint(20) unsigned NOT NULL COMMENT '提交id', - `gmt_create` datetime DEFAULT CURRENT_TIMESTAMP, - `gmt_modified` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id`), - KEY `submit_id` (`submit_id`), - KEY `uid` (`uid`), - KEY `pid` (`pid`), - CONSTRAINT `user_acproblem_ibfk_2` FOREIGN KEY (`pid`) REFERENCES `problem` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `user_acproblem_ibfk_3` FOREIGN KEY (`submit_id`) REFERENCES `judge` (`submit_id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; - -/*Table structure for table `user_info` */ - -DROP TABLE IF EXISTS `user_info`; - -CREATE TABLE `user_info` ( - `uuid` varchar(32) NOT NULL, - `username` varchar(100) NOT NULL COMMENT '用户名', - `password` varchar(100) NOT NULL COMMENT '密码', - `nickname` varchar(100) DEFAULT NULL COMMENT '昵称', - `school` varchar(100) DEFAULT NULL COMMENT '学校', - `course` varchar(100) DEFAULT NULL COMMENT '专业', - `number` varchar(20) DEFAULT NULL COMMENT '学号', - `realname` varchar(100) DEFAULT NULL COMMENT '真实姓名', - `gender` varchar(20) DEFAULT 'secrecy' NOT NULL COMMENT '性别', - `github` varchar(255) DEFAULT NULL COMMENT 'github地址', - `blog` varchar(255) DEFAULT NULL COMMENT '博客地址', - `cf_username` varchar(255) DEFAULT NULL COMMENT 'cf的username', - `email` varchar(320) DEFAULT NULL COMMENT '邮箱', - `avatar` varchar(255) DEFAULT NULL COMMENT '头像地址', - `signature` mediumtext COMMENT '个性签名', - `title_name` varchar(255) DEFAULT NULL COMMENT '头衔、称号', - `title_color` varchar(255) DEFAULT NULL COMMENT '头衔、称号的颜色', - `status` int(11) NOT NULL DEFAULT '0' COMMENT '0可用,1不可用', - `gmt_create` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `gmt_modified` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', - PRIMARY KEY (`uuid`), - UNIQUE KEY `USERNAME_UNIQUE` (`username`), - UNIQUE KEY `EMAIL_UNIQUE` (`email`), - UNIQUE KEY `avatar` (`avatar`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -/*Table structure for table `user_record` */ - -DROP TABLE IF EXISTS `user_record`; - -CREATE TABLE `user_record` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `uid` varchar(32) NOT NULL COMMENT '用户id', - `rating` int(11) DEFAULT NULL COMMENT 'cf得分', - `gmt_create` datetime DEFAULT CURRENT_TIMESTAMP, - `gmt_modified` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id`,`uid`), - KEY `uid` (`uid`), - CONSTRAINT `user_record_ibfk_1` FOREIGN KEY (`uid`) REFERENCES `user_info` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; - -/*Table structure for table `user_role` */ - -DROP TABLE IF EXISTS `user_role`; - -CREATE TABLE `user_role` ( - `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, - `uid` varchar(32) NOT NULL, - `role_id` bigint(20) unsigned NOT NULL, - `gmt_create` datetime DEFAULT CURRENT_TIMESTAMP, - `gmt_modified` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id`), - KEY `uid` (`uid`) USING BTREE, - KEY `role_id` (`role_id`) USING BTREE, - CONSTRAINT `user_role_ibfk_1` FOREIGN KEY (`uid`) REFERENCES `user_info` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `user_role_ibfk_2` FOREIGN KEY (`role_id`) REFERENCES `role` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; - -/*Table structure for table `remote_judge_account` */ - -DROP TABLE IF EXISTS `remote_judge_account`; - -CREATE TABLE `remote_judge_account` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `oj` varchar(50) NOT NULL COMMENT '远程oj名字', - `username` varchar(255) NOT NULL COMMENT '账号', - `password` varchar(255) NOT NULL COMMENT '密码', - `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否可用', - `version` bigint(20) DEFAULT '0' COMMENT '版本控制', - `gmt_create` datetime DEFAULT CURRENT_TIMESTAMP, - `gmt_modified` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - - -DROP TABLE IF EXISTS `admin_sys_notice`; - -CREATE TABLE `admin_sys_notice` ( - `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, - `title` varchar(255) DEFAULT NULL COMMENT '标题', - `content` longtext COMMENT '内容', - `type` varchar(255) DEFAULT NULL COMMENT '发给哪些用户类型', - `state` tinyint(1) DEFAULT '0' COMMENT '是否已拉取给用户', - `recipient_id` varchar(32) DEFAULT NULL COMMENT '接受通知的用户id', - `admin_id` varchar(32) DEFAULT NULL COMMENT '发送通知的管理员id', - `gmt_create` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `gmt_modified` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', - PRIMARY KEY (`id`), - KEY `recipient_id` (`recipient_id`), - KEY `admin_id` (`admin_id`), - CONSTRAINT `admin_sys_notice_ibfk_1` FOREIGN KEY (`recipient_id`) REFERENCES `user_info` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `admin_sys_notice_ibfk_2` FOREIGN KEY (`admin_id`) REFERENCES `user_info` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -/*Table structure for table `msg_remind` */ - -DROP TABLE IF EXISTS `msg_remind`; - -CREATE TABLE `msg_remind` ( - `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, - `action` varchar(255) NOT NULL COMMENT '动作类型,如点赞讨论帖Like_Post、点赞评论Like_Discuss、评论Discuss、回复Reply等', - `source_id` int(10) unsigned DEFAULT NULL COMMENT '消息来源id,讨论id或比赛id', - `source_type` varchar(255) DEFAULT NULL COMMENT '事件源类型:''Discussion''、''Contest''等', - `source_content` varchar(255) DEFAULT NULL COMMENT '事件源的内容,比如回复的内容,评论的帖子标题等等', - `quote_id` int(10) unsigned DEFAULT NULL COMMENT '事件引用上一级评论或回复id', - `quote_type` varchar(255) DEFAULT NULL COMMENT '事件引用上一级的类型:Comment、Reply', - `url` varchar(255) DEFAULT NULL COMMENT '事件所发生的地点链接 url', - `state` tinyint(1) DEFAULT '0' COMMENT '是否已读', - `sender_id` varchar(32) DEFAULT NULL COMMENT '操作者的id', - `recipient_id` varchar(32) DEFAULT NULL COMMENT '接受消息的用户id', - `gmt_create` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `gmt_modified` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', - PRIMARY KEY (`id`), - KEY `sender_id` (`sender_id`), - KEY `recipient_id` (`recipient_id`), - CONSTRAINT `msg_remind_ibfk_1` FOREIGN KEY (`sender_id`) REFERENCES `user_info` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `msg_remind_ibfk_2` FOREIGN KEY (`recipient_id`) REFERENCES `user_info` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -/*Table structure for table `user_sys_notice` */ - -DROP TABLE IF EXISTS `user_sys_notice`; - -CREATE TABLE `user_sys_notice` ( - `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, - `sys_notice_id` bigint(20) unsigned DEFAULT NULL COMMENT '系统通知的id', - `recipient_id` varchar(32) DEFAULT NULL COMMENT '接受通知的用户id', - `type` varchar(255) DEFAULT NULL COMMENT '消息类型,系统通知sys、我的信息mine', - `state` tinyint(1) DEFAULT '0' COMMENT '是否已读', - `gmt_create` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '读取时间', - `gmt_modified` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id`), - KEY `sys_notice_id` (`sys_notice_id`), - KEY `recipient_id` (`recipient_id`), - CONSTRAINT `user_sys_notice_ibfk_1` FOREIGN KEY (`sys_notice_id`) REFERENCES `admin_sys_notice` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `user_sys_notice_ibfk_2` FOREIGN KEY (`recipient_id`) REFERENCES `user_info` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - - -/*Table structure for table `training` */ - -DROP TABLE IF EXISTS `training`; - -CREATE TABLE `training` ( - `id` bigint unsigned NOT NULL AUTO_INCREMENT, - `title` varchar(255) DEFAULT NULL COMMENT '训练题单名称', - `description` longtext COMMENT '训练题单简介', - `author` varchar(255) NOT NULL COMMENT '训练题单创建者用户名', - `auth` varchar(255) NOT NULL COMMENT '训练题单权限类型:Public、Private', - `private_pwd` varchar(255) DEFAULT NULL COMMENT '训练题单权限为Private时的密码', - `rank` int DEFAULT '0' COMMENT '编号,升序', - `status` tinyint(1) DEFAULT '1' COMMENT '是否可用', - `is_group` tinyint(1) DEFAULT '0', - `gid` bigint(20) unsigned DEFAULT NULL, - `gmt_create` datetime DEFAULT CURRENT_TIMESTAMP, - `gmt_modified` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id`), - CONSTRAINT `training_ibfk_1` FOREIGN KEY (`gid`) REFERENCES `group` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -/*Table structure for table `training_category` */ - -DROP TABLE IF EXISTS `training_category`; - -CREATE TABLE `training_category` ( - `id` bigint unsigned NOT NULL AUTO_INCREMENT, - `name` varchar(255) DEFAULT NULL, - `color` varchar(255) DEFAULT NULL, - `gid` bigint(20) unsigned DEFAULT NULL, - `gmt_create` datetime DEFAULT CURRENT_TIMESTAMP, - `gmt_modified` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id`), - CONSTRAINT `training_category_ibfk_1` FOREIGN KEY (`gid`) REFERENCES `group` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -/*Table structure for table `training_problem` */ - -DROP TABLE IF EXISTS `training_problem`; - -CREATE TABLE `training_problem` ( - `id` bigint unsigned NOT NULL AUTO_INCREMENT, - `tid` bigint unsigned NOT NULL COMMENT '训练id', - `pid` bigint unsigned NOT NULL COMMENT '题目id', - `rank` int DEFAULT '0', - `display_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `gmt_create` datetime DEFAULT CURRENT_TIMESTAMP, - `gmt_modified` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id`), - KEY `tid` (`tid`), - KEY `pid` (`pid`), - KEY `display_id` (`display_id`), - CONSTRAINT `training_problem_ibfk_1` FOREIGN KEY (`tid`) REFERENCES `training` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `training_problem_ibfk_2` FOREIGN KEY (`pid`) REFERENCES `problem` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `training_problem_ibfk_3` FOREIGN KEY (`display_id`) REFERENCES `problem` (`problem_id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -/*Table structure for table `training_record` */ - -DROP TABLE IF EXISTS `training_record`; - -CREATE TABLE `training_record` ( - `id` bigint unsigned NOT NULL AUTO_INCREMENT, - `tid` bigint unsigned NOT NULL, - `tpid` bigint unsigned NOT NULL, - `pid` bigint unsigned NOT NULL, - `uid` varchar(255) NOT NULL, - `submit_id` bigint unsigned NOT NULL, - `gmt_create` datetime DEFAULT CURRENT_TIMESTAMP, - `gmt_modified` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id`), - KEY `tid` (`tid`), - KEY `tpid` (`tpid`), - KEY `pid` (`pid`), - KEY `uid` (`uid`), - KEY `submit_id` (`submit_id`), - CONSTRAINT `training_record_ibfk_1` FOREIGN KEY (`tid`) REFERENCES `training` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `training_record_ibfk_2` FOREIGN KEY (`tpid`) REFERENCES `training_problem` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `training_record_ibfk_3` FOREIGN KEY (`pid`) REFERENCES `problem` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `training_record_ibfk_4` FOREIGN KEY (`uid`) REFERENCES `user_info` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `training_record_ibfk_5` FOREIGN KEY (`submit_id`) REFERENCES `judge` (`submit_id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -/*Table structure for table `training_register` */ - -DROP TABLE IF EXISTS `training_register`; - -CREATE TABLE `training_register` ( - `id` bigint unsigned NOT NULL AUTO_INCREMENT, - `tid` bigint unsigned NOT NULL COMMENT '训练id', - `uid` varchar(255) NOT NULL COMMENT '用户id', - `status` tinyint(1) DEFAULT '1' COMMENT '是否可用', - `gmt_create` datetime DEFAULT CURRENT_TIMESTAMP, - `gmt_modified` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id`), - KEY `tid` (`tid`), - KEY `uid` (`uid`), - CONSTRAINT `training_register_ibfk_1` FOREIGN KEY (`tid`) REFERENCES `training` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `training_register_ibfk_2` FOREIGN KEY (`uid`) REFERENCES `user_info` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - - -DROP TABLE IF EXISTS `mapping_training_category`; - -CREATE TABLE `mapping_training_category` ( - `id` bigint unsigned NOT NULL AUTO_INCREMENT, - `tid` bigint unsigned NOT NULL, - `cid` bigint unsigned NOT NULL, - `gmt_create` datetime DEFAULT CURRENT_TIMESTAMP, - `gmt_modified` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id`), - KEY `tid` (`tid`), - KEY `cid` (`cid`), - CONSTRAINT `mapping_training_category_ibfk_1` FOREIGN KEY (`tid`) REFERENCES `training` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `mapping_training_category_ibfk_2` FOREIGN KEY (`cid`) REFERENCES `training_category` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -/*Table structure for table `group` */ - -DROP TABLE IF EXISTS `group`; - -CREATE TABLE `group` ( - `id` bigint unsigned NOT NULL AUTO_INCREMENT, - `avatar` varchar(255) DEFAULT NULL COMMENT '头像地址', - `name` varchar(25) DEFAULT NULL COMMENT '团队名称', - `short_name` varchar(10) DEFAULT NULL COMMENT '团队简称,创建题目时题号自动添加的前缀', - `brief` varchar(50) COMMENT '团队简介', - `description` longtext COMMENT '团队介绍', - `owner` varchar(255) NOT NULL COMMENT '团队拥有者用户名', - `uid` varchar(32) NOT NULL COMMENT '团队拥有者用户id', - `auth` int(11) NOT NULL COMMENT '0为Public,1为Protected,2为Private', - `visible` tinyint(1) DEFAULT '1' COMMENT '是否可见', - `status` tinyint(1) DEFAULT '0' COMMENT '是否封禁', - `code` varchar(6) DEFAULT NULL COMMENT '邀请码', - `gmt_create` datetime DEFAULT CURRENT_TIMESTAMP, - `gmt_modified` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id`), - UNIQUE KEY `NAME_UNIQUE` (`name`), - UNIQUE KEY `short_name` (`short_name`), - CONSTRAINT `group_ibfk_1` FOREIGN KEY (`uid`) REFERENCES `user_info` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=1000 DEFAULT CHARSET=utf8; - -/*Table structure for table `group_member` */ - -DROP TABLE IF EXISTS `group_member`; - -CREATE TABLE `group_member` ( - `id` bigint unsigned NOT NULL AUTO_INCREMENT, - `gid` bigint unsigned NOT NULL COMMENT '团队id', - `uid` varchar(32) NOT NULL COMMENT '用户id', - `auth` int(11) DEFAULT '1' COMMENT '1未审批,2拒绝,3普通成员,4团队管理员,5团队拥有者', - `reason` varchar(100) DEFAULT NULL COMMENT '申请理由', - `gmt_create` datetime DEFAULT CURRENT_TIMESTAMP, - `gmt_modified` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id`), - UNIQUE KEY `gid_uid_unique` (`gid`, `uid`), - KEY `gid` (`gid`), - KEY `uid` (`uid`), - CONSTRAINT `group_member_ibfk_1` FOREIGN KEY (`gid`) REFERENCES `group` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `group_member_ibfk_2` FOREIGN KEY (`uid`) REFERENCES `user_info` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - - -/* Trigger structure for table `contest` */ - -DELIMITER $$ - -/*!50003 DROP TRIGGER*//*!50032 IF EXISTS */ /*!50003 `contest_trigger` */$$ - -/*!50003 CREATE */ /*!50017 DEFINER = 'root'@'localhost' */ /*!50003 TRIGGER `contest_trigger` BEFORE INSERT ON `contest` FOR EACH ROW BEGIN -set new.status=( - CASE - WHEN NOW() < new.start_time THEN -1 - WHEN NOW() >= new.start_time AND NOW()= new.end_time THEN 1 - END); -END */$$ - - -DELIMITER ; - -/*!50106 set global event_scheduler = 1*/; - -/* Event structure for event `contest_event` */ - -/*!50106 DROP EVENT IF EXISTS `contest_event`*/; - -DELIMITER $$ - -/*!50106 CREATE DEFINER=`root`@`localhost` EVENT `contest_event` ON SCHEDULE EVERY 1 SECOND STARTS '2021-04-18 19:04:49' ON COMPLETION PRESERVE ENABLE DO CALL contest_status() */$$ -DELIMITER ; - -/* Procedure structure for procedure `contest_status` */ - -/*!50003 DROP PROCEDURE IF EXISTS `contest_status` */; - -DELIMITER $$ - -/*!50003 CREATE DEFINER=`root`@`localhost` PROCEDURE `contest_status`() -BEGIN - UPDATE contest - SET STATUS = ( - CASE - WHEN NOW() < start_time THEN -1 - WHEN NOW() >= start_time AND NOW()= end_time THEN 1 - END); - END */$$ -DELIMITER ; - -/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; -/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; -/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; -/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; - - - -/*!40101 SET NAMES utf8 */; - -/*!40101 SET SQL_MODE=''*/; - -/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; -/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; -/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; -/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; - -USE `hoj`; - -delete from `auth`; - -delete from `category`; - -delete from `language`; - -delete from `role`; - -delete from `role_auth`; - -delete from `user_record`; - -delete from `user_role`; - -delete from `user_info`; - -/*Data for the table `auth` */ - -insert into `auth`(`id`,`name`,`permission`,`status`,`gmt_create`,`gmt_modified`) values (1,'problem','problem_admin',0,'2020-10-25 00:17:17','2021-05-15 06:51:23'),(2,'submit','submit',0,'2020-10-25 00:17:22','2021-05-15 06:41:59'),(3,'contest','contest_admin',0,'2020-10-25 00:17:33','2021-05-15 06:51:28'),(4,'rejudge','rejudge',0,'2020-10-25 00:17:49','2021-05-15 06:50:55'),(5,'announcement','announcement_admin',0,'2021-05-15 06:54:28','2021-05-15 06:54:31'),(6,'user','user_admin',0,'2021-05-15 06:54:30','2021-05-15 06:55:04'),(7,'system_info','system_info_admin',0,'2021-05-15 06:57:34','2021-05-15 06:57:41'),(8,'dicussion','discussion_add',0,'2021-05-15 06:57:36','2021-05-15 07:50:45'),(9,'dicussion','discussion_del',0,'2021-05-15 07:01:02','2021-05-15 07:51:31'),(10,'dicussion','discussion_edit',0,'2021-05-15 07:02:15','2021-05-15 07:51:34'),(11,'comment','comment_add',0,'2021-05-15 07:03:48','2021-05-15 07:03:48'),(12,'reply','reply_add',0,'2021-05-15 07:04:55','2021-05-15 07:04:55'),(13,'group','group_add',0,'2022-03-11 13:36:55','2022-03-11 13:36:55'),(14,'group','group_del',0,'2022-03-11 13:36:55','2022-03-11 13:36:55'); - -/*Data for the table `category` */ - -insert into `category`(`id`,`name`,`gmt_create`,`gmt_modified`) values (1,'闲聊','2021-05-06 11:25:24','2021-05-06 16:43:42'),(2,'题解','2021-05-06 11:25:36','2021-05-06 16:43:47'),(3,'求助','2021-05-06 11:25:40','2021-05-06 11:25:40'),(4,'建议','2021-05-06 11:25:56','2021-05-06 11:25:56'),(5,'记录','2021-05-06 11:26:02','2021-05-06 16:43:51'); - -/*Data for the table `language` */ - -insert into `language`(`id`,`content_type`,`description`,`name`,`compile_command`,`template`,`code_template`,`is_spj`,`oj`,`gmt_create`,`gmt_modified`) values (1,'text/x-csrc','GCC 7.5.0','C','/usr/bin/gcc -DONLINE_JUDGE -w -fmax-errors=3 -std=c11 {src_path} -lm -o {exe_path}','#include \r\nint main() {\r\n int a,b;\r\n scanf(\"%d %d\",&a,&b);\r\n printf(\"%d\",a+b);\r\n return 0;\r\n}','//PREPEND BEGIN\r\n#include \r\n//PREPEND END\r\n\r\n//TEMPLATE BEGIN\r\nint add(int a, int b) {\r\n // Please fill this blank\r\n return ___________;\r\n}\r\n//TEMPLATE END\r\n\r\n//APPEND BEGIN\r\nint main() {\r\n printf(\"%d\", add(1, 2));\r\n return 0;\r\n}\r\n//APPEND END',1,'ME','2020-12-12 23:11:44','2021-06-14 21:40:28'),(2,'text/x-csrc','GCC 7.5.0','C With O2','/usr/bin/gcc -DONLINE_JUDGE -O2 -w -fmax-errors=3 -std=c11 {src_path} -lm -o {exe_path}','#include \r\nint main() {\r\n int a,b;\r\n scanf(\"%d %d\",&a,&b);\r\n printf(\"%d\",a+b);\r\n return 0;\r\n}','//PREPEND BEGIN\r\n#include \r\n//PREPEND END\r\n\r\n//TEMPLATE BEGIN\r\nint add(int a, int b) {\r\n // Please fill this blank\r\n return ___________;\r\n}\r\n//TEMPLATE END\r\n\r\n//APPEND BEGIN\r\nint main() {\r\n printf(\"%d\", add(1, 2));\r\n return 0;\r\n}\r\n//APPEND END',0,'ME','2021-06-14 21:05:57','2021-06-14 21:20:08'),(3,'text/x-c++src','G++ 7.5.0','C++','/usr/bin/g++ -DONLINE_JUDGE -w -fmax-errors=3 -std=c++14 {src_path} -lm -o {exe_path}','#include\r\nusing namespace std;\r\nint main()\r\n{\r\n int a,b;\r\n cin >> a >> b;\r\n cout << a + b;\r\n return 0;\r\n}','//PREPEND BEGIN\r\n#include \r\nusing namespace std;\r\n//PREPEND END\r\n\r\n//TEMPLATE BEGIN\r\nint add(int a, int b) {\r\n // Please fill this blank\r\n return ___________;\r\n}\r\n//TEMPLATE END\r\n\r\n//APPEND BEGIN\r\nint main() {\r\n cout << add(1, 2);\r\n return 0;\r\n}\r\n//APPEND END',1,'ME','2020-12-12 23:12:44','2021-06-14 21:40:36'),(4,'text/x-c++src','G++ 7.5.0','C++ With O2','/usr/bin/g++ -DONLINE_JUDGE -O2 -w -fmax-errors=3 -std=c++14 {src_path} -lm -o {exe_path}','#include\r\nusing namespace std;\r\nint main()\r\n{\r\n int a,b;\r\n cin >> a >> b;\r\n cout << a + b;\r\n return 0;\r\n}','//PREPEND BEGIN\r\n#include \r\nusing namespace std;\r\n//PREPEND END\r\n\r\n//TEMPLATE BEGIN\r\nint add(int a, int b) {\r\n // Please fill this blank\r\n return ___________;\r\n}\r\n//TEMPLATE END\r\n\r\n//APPEND BEGIN\r\nint main() {\r\n cout << add(1, 2);\r\n return 0;\r\n}\r\n//APPEND END',0,'ME','2021-06-14 21:09:35','2021-06-14 21:20:19'),(5,'text/x-java','OpenJDK 1.8','Java','/usr/bin/javac {src_path} -d {exe_dir} -encoding UTF8','import java.util.Scanner;\r\npublic class Main{\r\n public static void main(String[] args){\r\n Scanner in=new Scanner(System.in);\r\n int a=in.nextInt();\r\n int b=in.nextInt();\r\n System.out.println((a+b));\r\n }\r\n}','//PREPEND BEGIN\r\nimport java.util.Scanner;\r\n//PREPEND END\r\n\r\npublic class Main{\r\n //TEMPLATE BEGIN\r\n public static Integer add(int a,int b){\r\n return _______;\r\n }\r\n //TEMPLATE END\r\n\r\n //APPEND BEGIN\r\n public static void main(String[] args){\r\n System.out.println(add(a,b));\r\n }\r\n //APPEND END\r\n}\r\n',0,'ME','2020-12-12 23:12:51','2021-06-14 21:19:52'),(6,'text/x-python','Python 3.7.5','Python3','/usr/bin/python3 -m py_compile {src_path}','a, b = map(int, input().split())\r\nprint(a + b)','//PREPEND BEGIN\r\n//PREPEND END\r\n\r\n//TEMPLATE BEGIN\r\ndef add(a, b):\r\n return a + b\r\n//TEMPLATE END\r\n\r\n\r\nif __name__ == \'__main__\': \r\n //APPEND BEGIN\r\n a, b = 1, 1\r\n print(add(a, b))\r\n //APPEND END',0,'ME','2020-12-12 23:14:23','2021-06-14 21:19:50'),(7,'text/x-python','Python 2.7.17','Python2','/usr/bin/python -m py_compile {src_path}','a, b = map(int, raw_input().split())\r\nprint a+b','//PREPEND BEGIN\r\n//PREPEND END\r\n\r\n//TEMPLATE BEGIN\r\ndef add(a, b):\r\n return a + b\r\n//TEMPLATE END\r\n\r\n\r\nif __name__ == \'__main__\': \r\n //APPEND BEGIN\r\n a, b = 1, 1\r\n print add(a, b)\r\n //APPEND END',0,'ME','2021-01-26 11:11:44','2021-06-14 21:19:45'),(8,'text/x-go','Golang 1.16','Golang','/usr/bin/go build -o {exe_path} {src_path}','package main\r\nimport \"fmt\"\r\n\r\nfunc main(){\r\n var x int\r\n var y int\r\n fmt.Scanln(&x,&y)\r\n fmt.Printf(\"%d\",x+y) \r\n}\r\n','\r\npackage main\r\n\r\n//PREPEND BEGIN\r\nimport \"fmt\"\r\n//PREPEND END\r\n\r\n\r\n//TEMPLATE BEGIN\r\nfunc add(a,b int)int{\r\n return ______\r\n}\r\n//TEMPLATE END\r\n\r\n//APPEND BEGIN\r\nfunc main(){\r\n var x int\r\n var y int\r\n fmt.Printf(\"%d\",add(x,y)) \r\n}\r\n//APPEND END\r\n',0,'ME','2021-03-28 23:15:54','2021-06-14 21:20:26'),(9,'text/x-csharp','C# Mono 4.6.2','C#','/usr/bin/mcs -optimize+ -out:{exe_path} {src_path}','using System;\r\nusing System.Linq;\r\n\r\nclass Program {\r\n public static void Main(string[] args) {\r\n Console.WriteLine(Console.ReadLine().Split().Select(int.Parse).Sum());\r\n }\r\n}','//PREPEND BEGIN\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Text;\r\n//PREPEND END\r\n\r\nclass Solution\r\n{\r\n //TEMPLATE BEGIN\r\n static int add(int a,int b){\r\n return _______;\r\n }\r\n //TEMPLATE END\r\n\r\n //APPEND BEGIN\r\n static void Main(string[] args)\r\n {\r\n int a ;\r\n int b ;\r\n Console.WriteLine(add(a,b));\r\n }\r\n //APPEND END\r\n}',0,'ME','2021-04-13 16:10:03','2021-06-14 21:20:36'),(11,'text/x-csrc','GCC','GCC',NULL,NULL,NULL,0,'HDU','2021-02-18 21:32:34','2021-06-14 21:19:08'),(12,'text/x-c++src','G++','G++',NULL,NULL,NULL,0,'HDU','2021-02-18 21:32:58','2021-06-14 21:19:05'),(13,'text/x-c++src','C++','C++',NULL,NULL,NULL,0,'HDU','2021-02-18 21:33:11','2021-06-14 21:19:03'),(14,'text/x-csrc','C','C',NULL,NULL,NULL,0,'HDU','2021-02-18 21:33:41','2021-06-14 21:18:58'),(15,'text/x-pascal','Pascal','Pascal',NULL,NULL,NULL,0,'HDU','2021-02-18 21:34:33','2021-06-14 21:18:56'),(16,'text/x-csrc','GNU GCC C11 5.1.0','GNU GCC C11 5.1.0',NULL,NULL,NULL,0,'CF','2021-03-03 19:46:24','2021-06-14 21:18:55'),(17,'text/x-c++src','Clang++17 Diagnostics','Clang++17 Diagnostics',NULL,NULL,NULL,0,'CF','2021-03-03 19:46:24','2021-06-14 21:18:54'),(19,'text/x-c++src','GNU G++14 6.4.0','GNU G++14 6.4.0',NULL,NULL,NULL,0,'CF','2021-03-03 19:46:24','2021-06-14 21:18:46'),(20,'text/x-c++src','GNU G++17 7.3.0','GNU G++17 7.3.0',NULL,NULL,NULL,0,'CF','2021-03-03 19:46:24','2021-06-14 21:18:45'),(21,'text/x-c++src','GNU G++20 11.2.0 (64 bit, winlibs)','GNU G++20 11.2.0 (64 bit, winlibs)',NULL,NULL,NULL,0,'CF','2021-03-03 19:46:24','2021-06-14 21:18:43'),(22,'text/x-c++src','Microsoft Visual C++ 2017','Microsoft Visual C++ 2017',NULL,NULL,NULL,0,'CF','2021-03-03 19:46:24','2021-06-14 21:18:40'),(23,'text/x-csharp','C# Mono 6.8','C# Mono 6.8',NULL,NULL,NULL,0,'CF','2021-03-03 19:46:24','2021-06-14 21:18:36'),(24,'text/x-d','D DMD32 v2.091.0','D DMD32 v2.091.0',NULL,NULL,NULL,0,'CF','2021-03-03 19:46:24','2021-06-14 21:18:34'),(25,'text/x-go','Go 1.15.6','Go 1.15.6',NULL,NULL,NULL,0,'CF','2021-03-03 19:46:24','2021-06-14 21:18:32'),(26,'text/x-haskell','Haskell GHC 8.10.1','Haskell GHC 8.10.1',NULL,NULL,NULL,0,'CF','2021-03-03 19:46:24','2021-06-14 21:18:31'),(27,'text/x-java','Java 1.8.0_241','Java 1.8.0_241',NULL,NULL,NULL,0,'CF','2021-03-03 19:46:24','2021-06-14 21:18:26'),(28,'text/x-java','Kotlin 1.4.0','Kotlin 1.4.0',NULL,NULL,NULL,0,'CF','2021-03-03 19:46:24','2021-06-14 21:18:24'),(29,'text/x-ocaml','OCaml 4.02.1','OCaml 4.02.1',NULL,NULL,NULL,0,'CF','2021-03-03 19:46:24','2021-06-14 21:18:23'),(30,'text/x-pascal','Delphi 7','Delphi 7',NULL,NULL,NULL,0,'CF','2021-03-03 19:46:24','2021-06-14 21:18:20'),(31,'text/x-pascal','Free Pascal 3.0.2','Free Pascal 3.0.2',NULL,NULL,NULL,0,'CF','2021-03-03 19:46:24','2021-06-14 21:18:18'),(32,'text/x-pascal','PascalABC.NET 3.4.2','PascalABC.NET 3.4.2',NULL,NULL,NULL,0,'CF','2021-03-03 19:46:24','2021-06-14 21:18:16'),(33,'text/x-perl','Perl 5.20.1','Perl 5.20.1',NULL,NULL,NULL,0,'CF','2021-03-03 19:46:24','2021-06-14 21:18:15'),(34,'text/x-php','PHP 7.2.13','PHP 7.2.13',NULL,NULL,NULL,0,'CF','2021-03-03 19:46:24','2021-06-14 21:18:12'),(35,'text/x-python','Python 2.7.18','Python 2.7.18',NULL,NULL,NULL,0,'CF','2021-03-03 19:46:24','2021-06-14 21:18:06'),(36,'text/x-python','Python 3.9.1','Python 3.9.1',NULL,NULL,NULL,0,'CF','2021-03-03 19:46:24','2021-06-14 21:18:04'),(37,'text/x-python','PyPy 2.7 (7.3.0)','PyPy 2.7 (7.3.0)',NULL,NULL,NULL,0,'CF','2021-03-03 19:46:24','2021-06-14 21:18:02'),(38,'text/x-python','PyPy 3.7 (7.3.0)','PyPy 3.7 (7.3.0)',NULL,NULL,NULL,0,'CF','2021-03-03 19:46:24','2021-06-14 21:18:00'),(39,'text/x-ruby','Ruby 3.0.0','Ruby 3.0.0',NULL,NULL,NULL,0,'CF','2021-03-03 19:46:24','2021-06-14 21:17:58'),(40,'text/x-rustsrc','Rust 1.49.0','Rust 1.49.0',NULL,NULL,NULL,0,'CF','2021-03-03 19:46:24','2021-06-14 21:17:56'),(41,'text/x-scala','Scala 2.12.8','Scala 2.12.8',NULL,NULL,NULL,0,'CF','2021-03-03 19:46:24','2021-06-14 21:17:54'),(42,'text/javascript','JavaScript V8 4.8.0','JavaScript V8 4.8.0',NULL,NULL,NULL,0,'CF','2021-03-03 19:46:24','2021-06-14 21:17:52'),(43,'text/javascript','Node.js 12.6.3','Node.js 12.6.3',NULL,NULL,NULL,0,'CF','2021-03-03 19:46:24','2021-06-14 21:17:50'),(44,'text/x-csharp','C# 8, .NET Core 3.1','C# 8, .NET Core 3.1',NULL,NULL,NULL,0,'CF','2021-03-25 21:17:39','2021-06-14 21:17:47'),(45,'text/x-java','Java 11.0.6','Java 11.0.6',NULL,NULL,NULL,0,'CF','2021-03-25 21:20:03','2021-06-14 21:17:46'),(46,'text/x-c++src','G++','G++',NULL,NULL,NULL,0,'POJ','2021-06-24 22:50:50','2021-06-24 22:50:50'),(47,'text/x-csrc','GCC','GCC',NULL,NULL,NULL,0,'POJ','2021-06-24 22:51:04','2021-06-24 22:51:12'),(48,'text/x-java','Java','Java',NULL,NULL,NULL,0,'POJ','2021-06-24 22:51:29','2021-06-24 22:51:44'),(49,'text/x-pascal','Pascal','Pascal',NULL,NULL,NULL,0,'POJ','2021-06-24 22:51:50','2021-06-24 22:52:02'),(50,'text/x-c++src','C++','C++',NULL,NULL,NULL,0,'POJ','2021-06-24 22:52:15','2021-06-24 22:52:27'),(51,'text/x-csrc','C','C',NULL,NULL,NULL,0,'POJ','2021-06-24 22:52:38','2021-06-24 22:52:38'),(52,'text/x-fortran','Fortran','Fortran',NULL,NULL,NULL,0,'POJ','2021-06-24 22:55:15','2021-06-24 22:55:15'); - -/*Data for the table `role` */ - -insert into `role`(`id`,`role`,`description`,`status`,`gmt_create`,`gmt_modified`) values (00000000000000001000,'root','超级管理员',0,'2020-10-25 00:16:30','2020-10-25 00:16:30'),(00000000000000001001,'admin','管理员',0,'2020-10-25 00:16:41','2020-10-25 00:16:41'),(00000000000000001002,'default_user','默认用户',0,'2020-10-25 00:16:52','2021-05-15 07:39:05'),(00000000000000001003,'no_subimit_user','禁止提交用户',0,'2021-05-15 07:10:14','2021-05-15 07:39:14'),(00000000000000001004,'no_discuss_user','禁止发贴讨论用户',0,'2021-05-15 07:11:28','2021-05-15 07:39:16'),(00000000000000001005,'mute_user','禁言包括回复讨论发帖用户',0,'2021-05-15 07:12:51','2021-05-15 07:39:19'),(00000000000000001006,'no_submit_no_discuss_user','禁止提交同时禁止发帖用户',0,'2021-05-15 07:38:08','2021-05-15 07:39:34'),(00000000000000001007,'no_submit_mute_user','禁言禁提交用户',0,'2021-05-15 07:39:00','2021-05-15 07:39:26'),(00000000000000001008,'problem_admin','题目管理员',0,'2021-06-12 23:15:06','2021-06-12 23:15:06'); - -/*Data for the table `role_auth` */ - -insert into `role_auth`(`id`,`auth_id`,`role_id`,`gmt_create`,`gmt_modified`) values (1,1,1000,'2020-10-25 00:18:17','2020-10-25 00:18:17'),(2,2,1000,'2020-10-25 00:18:38','2021-05-15 07:17:35'),(3,3,1000,'2020-10-25 00:18:48','2021-05-15 07:17:44'),(4,4,1000,'2021-05-15 07:17:56','2021-05-15 07:17:56'),(5,5,1000,'2021-05-15 07:18:20','2021-05-15 07:18:20'),(6,6,1000,'2021-05-15 07:18:29','2021-05-15 07:18:29'),(7,7,1000,'2021-05-15 07:18:42','2021-05-15 07:18:42'),(8,8,1000,'2021-05-15 07:18:59','2021-05-15 07:18:59'),(9,9,1000,'2021-05-15 07:19:07','2021-05-15 07:19:07'),(10,10,1000,'2021-05-15 07:19:10','2021-05-15 07:19:10'),(11,11,1000,'2021-05-15 07:19:13','2021-05-15 07:19:13'),(12,12,1000,'2021-05-15 07:19:18','2021-05-15 07:19:30'),(13,1,1001,'2021-05-15 07:19:29','2021-05-15 07:20:02'),(14,2,1001,'2021-05-15 07:20:25','2021-05-15 07:20:25'),(15,3,1001,'2021-05-15 07:20:33','2021-05-15 07:20:33'),(16,8,1001,'2021-05-15 07:21:56','2021-05-15 07:21:56'),(17,9,1001,'2021-05-15 07:22:03','2021-05-15 07:22:03'),(18,10,1001,'2021-05-15 07:22:10','2021-05-15 07:22:10'),(19,11,1001,'2021-05-15 07:22:17','2021-05-15 07:22:17'),(20,12,1001,'2021-05-15 07:22:21','2021-05-15 07:22:21'),(21,2,1002,'2021-05-15 07:22:40','2021-05-15 07:22:40'),(22,8,1002,'2021-05-15 07:23:49','2021-05-15 07:23:49'),(23,9,1002,'2021-05-15 07:24:10','2021-05-15 07:24:10'),(24,10,1002,'2021-05-15 07:24:14','2021-05-15 07:24:14'),(25,11,1002,'2021-05-15 07:24:19','2021-05-15 07:24:19'),(26,12,1002,'2021-05-15 07:24:23','2021-05-15 07:24:23'),(27,8,1003,'2021-05-15 07:32:56','2021-05-15 07:32:56'),(28,9,1003,'2021-05-15 07:33:01','2021-05-15 07:33:01'),(29,10,1003,'2021-05-15 07:33:05','2021-05-15 07:33:05'),(30,11,1003,'2021-05-15 07:33:09','2021-05-15 07:33:09'),(31,12,1003,'2021-05-15 07:33:22','2021-05-15 07:33:22'),(32,2,1004,'2021-05-15 07:33:38','2021-05-15 07:33:38'),(33,9,1004,'2021-05-15 07:34:27','2021-05-15 07:34:27'),(34,10,1004,'2021-05-15 07:34:31','2021-05-15 07:34:31'),(35,11,1004,'2021-05-15 07:34:42','2021-05-15 07:34:42'),(36,12,1004,'2021-05-15 07:34:47','2021-05-15 07:34:47'),(37,2,1005,'2021-05-15 07:35:11','2021-05-15 07:35:11'),(38,9,1005,'2021-05-15 07:35:46','2021-05-15 07:35:46'),(39,10,1005,'2021-05-15 07:36:01','2021-05-15 07:36:01'),(40,9,1006,'2021-05-15 07:40:09','2021-05-15 07:40:09'),(41,10,1006,'2021-05-15 07:40:16','2021-05-15 07:40:16'),(42,11,1006,'2021-05-15 07:40:30','2021-05-15 07:40:30'),(43,12,1006,'2021-05-15 07:40:37','2021-05-15 07:40:37'),(44,9,1007,'2021-05-15 07:40:54','2021-05-15 07:40:54'),(45,10,1007,'2021-05-15 07:41:04','2021-05-15 07:41:04'),(46,1,1008,'2021-06-12 23:16:10','2021-06-12 23:16:10'),(47,2,1008,'2021-06-12 23:16:15','2021-06-12 23:16:15'),(48,3,1008,'2021-06-12 23:16:19','2021-06-12 23:16:19'),(49,8,1008,'2021-06-12 23:16:24','2021-06-12 23:16:24'),(50,9,1008,'2021-06-12 23:16:45','2021-06-12 23:16:45'),(51,10,1008,'2021-06-12 23:16:48','2021-06-12 23:16:48'),(52,11,1008,'2021-06-12 23:16:52','2021-06-12 23:16:52'),(53,12,1008,'2021-06-12 23:16:58','2021-06-12 23:16:58'),(54,13,1000,'2021-06-12 23:16:58','2021-06-12 23:16:58'),(55,13,1001,'2021-06-12 23:16:58','2021-06-12 23:16:58'),(56,13,1002,'2021-06-12 23:16:58','2021-06-12 23:16:58'),(57,13,1008,'2021-06-12 23:16:58','2021-06-12 23:16:58'),(58,14,1000,'2021-06-12 23:16:58','2021-06-12 23:16:58'),(59,14,1001,'2021-06-12 23:16:58','2021-06-12 23:16:58'),(60,14,1002,'2021-06-12 23:16:58','2021-06-12 23:16:58'),(61,14,1008,'2021-06-12 23:16:58','2021-06-12 23:16:58'); - -insert into `user_info`(`uuid`,`username`,`password`,`gmt_create`,`gmt_modified`) values('1','root','9f09812f6e5165b85e258c48901d4d74',NOW(),NOW()); - -insert into `user_record`(`uid`,`gmt_create`,`gmt_modified`) values('1',NOW(),NOW()); - -insert into `user_role`(`uid`,`role_id`,`gmt_create`,`gmt_modified`) values('1',00000000000000001000,NOW(),NOW()); \ No newline at end of file diff --git a/src/sqlAndsetting/nacos.sql b/src/sqlAndsetting/nacos.sql deleted file mode 100644 index d026702..0000000 --- a/src/sqlAndsetting/nacos.sql +++ /dev/null @@ -1,222 +0,0 @@ -/* - * Copyright 1999-2018 Alibaba Group Holding Ltd. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/******************************************/ -/* 数据库全名 = nacos_config */ -/* 表名称 = config_info */ -/******************************************/ -CREATE DATABASE `nacos` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; - -use `nacos`; - -CREATE TABLE `config_info` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id', - `data_id` varchar(255) NOT NULL COMMENT 'data_id', - `group_id` varchar(255) DEFAULT NULL, - `content` longtext NOT NULL COMMENT 'content', - `md5` varchar(32) DEFAULT NULL COMMENT 'md5', - `gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间', - `src_user` text COMMENT 'source user', - `src_ip` varchar(50) DEFAULT NULL COMMENT 'source ip', - `app_name` varchar(128) DEFAULT NULL, - `tenant_id` varchar(128) DEFAULT '' COMMENT '租户字段', - `c_desc` varchar(256) DEFAULT NULL, - `c_use` varchar(64) DEFAULT NULL, - `effect` varchar(64) DEFAULT NULL, - `type` varchar(64) DEFAULT NULL, - `c_schema` text, - PRIMARY KEY (`id`), - UNIQUE KEY `uk_configinfo_datagrouptenant` (`data_id`,`group_id`,`tenant_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='config_info'; - -/******************************************/ -/* 数据库全名 = nacos_config */ -/* 表名称 = config_info_aggr */ -/******************************************/ -CREATE TABLE `config_info_aggr` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id', - `data_id` varchar(255) NOT NULL COMMENT 'data_id', - `group_id` varchar(255) NOT NULL COMMENT 'group_id', - `datum_id` varchar(255) NOT NULL COMMENT 'datum_id', - `content` longtext NOT NULL COMMENT '内容', - `gmt_modified` datetime NOT NULL COMMENT '修改时间', - `app_name` varchar(128) DEFAULT NULL, - `tenant_id` varchar(128) DEFAULT '' COMMENT '租户字段', - PRIMARY KEY (`id`), - UNIQUE KEY `uk_configinfoaggr_datagrouptenantdatum` (`data_id`,`group_id`,`tenant_id`,`datum_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='增加租户字段'; - - -/******************************************/ -/* 数据库全名 = nacos_config */ -/* 表名称 = config_info_beta */ -/******************************************/ -CREATE TABLE `config_info_beta` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id', - `data_id` varchar(255) NOT NULL COMMENT 'data_id', - `group_id` varchar(128) NOT NULL COMMENT 'group_id', - `app_name` varchar(128) DEFAULT NULL COMMENT 'app_name', - `content` longtext NOT NULL COMMENT 'content', - `beta_ips` varchar(1024) DEFAULT NULL COMMENT 'betaIps', - `md5` varchar(32) DEFAULT NULL COMMENT 'md5', - `gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间', - `src_user` text COMMENT 'source user', - `src_ip` varchar(50) DEFAULT NULL COMMENT 'source ip', - `tenant_id` varchar(128) DEFAULT '' COMMENT '租户字段', - PRIMARY KEY (`id`), - UNIQUE KEY `uk_configinfobeta_datagrouptenant` (`data_id`,`group_id`,`tenant_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='config_info_beta'; - -/******************************************/ -/* 数据库全名 = nacos_config */ -/* 表名称 = config_info_tag */ -/******************************************/ -CREATE TABLE `config_info_tag` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id', - `data_id` varchar(255) NOT NULL COMMENT 'data_id', - `group_id` varchar(128) NOT NULL COMMENT 'group_id', - `tenant_id` varchar(128) DEFAULT '' COMMENT 'tenant_id', - `tag_id` varchar(128) NOT NULL COMMENT 'tag_id', - `app_name` varchar(128) DEFAULT NULL COMMENT 'app_name', - `content` longtext NOT NULL COMMENT 'content', - `md5` varchar(32) DEFAULT NULL COMMENT 'md5', - `gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间', - `src_user` text COMMENT 'source user', - `src_ip` varchar(50) DEFAULT NULL COMMENT 'source ip', - PRIMARY KEY (`id`), - UNIQUE KEY `uk_configinfotag_datagrouptenanttag` (`data_id`,`group_id`,`tenant_id`,`tag_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='config_info_tag'; - -/******************************************/ -/* 数据库全名 = nacos_config */ -/* 表名称 = config_tags_relation */ -/******************************************/ -CREATE TABLE `config_tags_relation` ( - `id` bigint(20) NOT NULL COMMENT 'id', - `tag_name` varchar(128) NOT NULL COMMENT 'tag_name', - `tag_type` varchar(64) DEFAULT NULL COMMENT 'tag_type', - `data_id` varchar(255) NOT NULL COMMENT 'data_id', - `group_id` varchar(128) NOT NULL COMMENT 'group_id', - `tenant_id` varchar(128) DEFAULT '' COMMENT 'tenant_id', - `nid` bigint(20) NOT NULL AUTO_INCREMENT, - PRIMARY KEY (`nid`), - UNIQUE KEY `uk_configtagrelation_configidtag` (`id`,`tag_name`,`tag_type`), - KEY `idx_tenant_id` (`tenant_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='config_tag_relation'; - -/******************************************/ -/* 数据库全名 = nacos_config */ -/* 表名称 = group_capacity */ -/******************************************/ -CREATE TABLE `group_capacity` ( - `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID', - `group_id` varchar(128) NOT NULL DEFAULT '' COMMENT 'Group ID,空字符表示整个集群', - `quota` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '配额,0表示使用默认值', - `usage` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '使用量', - `max_size` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '单个配置大小上限,单位为字节,0表示使用默认值', - `max_aggr_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '聚合子配置最大个数,,0表示使用默认值', - `max_aggr_size` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '单个聚合数据的子配置大小上限,单位为字节,0表示使用默认值', - `max_history_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '最大变更历史数量', - `gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间', - PRIMARY KEY (`id`), - UNIQUE KEY `uk_group_id` (`group_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='集群、各Group容量信息表'; - -/******************************************/ -/* 数据库全名 = nacos_config */ -/* 表名称 = his_config_info */ -/******************************************/ -CREATE TABLE `his_config_info` ( - `id` bigint(64) unsigned NOT NULL, - `nid` bigint(20) unsigned NOT NULL AUTO_INCREMENT, - `data_id` varchar(255) NOT NULL, - `group_id` varchar(128) NOT NULL, - `app_name` varchar(128) DEFAULT NULL COMMENT 'app_name', - `content` longtext NOT NULL, - `md5` varchar(32) DEFAULT NULL, - `gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, - `gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, - `src_user` text, - `src_ip` varchar(50) DEFAULT NULL, - `op_type` char(10) DEFAULT NULL, - `tenant_id` varchar(128) DEFAULT '' COMMENT '租户字段', - PRIMARY KEY (`nid`), - KEY `idx_gmt_create` (`gmt_create`), - KEY `idx_gmt_modified` (`gmt_modified`), - KEY `idx_did` (`data_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='多租户改造'; - - -/******************************************/ -/* 数据库全名 = nacos_config */ -/* 表名称 = tenant_capacity */ -/******************************************/ -CREATE TABLE `tenant_capacity` ( - `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID', - `tenant_id` varchar(128) NOT NULL DEFAULT '' COMMENT 'Tenant ID', - `quota` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '配额,0表示使用默认值', - `usage` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '使用量', - `max_size` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '单个配置大小上限,单位为字节,0表示使用默认值', - `max_aggr_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '聚合子配置最大个数', - `max_aggr_size` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '单个聚合数据的子配置大小上限,单位为字节,0表示使用默认值', - `max_history_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '最大变更历史数量', - `gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间', - PRIMARY KEY (`id`), - UNIQUE KEY `uk_tenant_id` (`tenant_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='租户容量信息表'; - - -CREATE TABLE `tenant_info` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id', - `kp` varchar(128) NOT NULL COMMENT 'kp', - `tenant_id` varchar(128) default '' COMMENT 'tenant_id', - `tenant_name` varchar(128) default '' COMMENT 'tenant_name', - `tenant_desc` varchar(256) DEFAULT NULL COMMENT 'tenant_desc', - `create_source` varchar(32) DEFAULT NULL COMMENT 'create_source', - `gmt_create` bigint(20) NOT NULL COMMENT '创建时间', - `gmt_modified` bigint(20) NOT NULL COMMENT '修改时间', - PRIMARY KEY (`id`), - UNIQUE KEY `uk_tenant_info_kptenantid` (`kp`,`tenant_id`), - KEY `idx_tenant_id` (`tenant_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='tenant_info'; - -CREATE TABLE `users` ( - `username` varchar(50) NOT NULL PRIMARY KEY, - `password` varchar(500) NOT NULL, - `enabled` boolean NOT NULL -); - -CREATE TABLE `roles` ( - `username` varchar(50) NOT NULL, - `role` varchar(50) NOT NULL, - UNIQUE INDEX `idx_user_role` (`username` ASC, `role` ASC) USING BTREE -); - -CREATE TABLE `permissions` ( - `role` varchar(50) NOT NULL, - `resource` varchar(255) NOT NULL, - `action` varchar(8) NOT NULL, - UNIQUE INDEX `uk_role_permission` (`role`,`resource`,`action`) USING BTREE -); - -insert into `config_info`(`id`,`data_id`,`group_id`,`content`,`md5`,`gmt_create`,`gmt_modified`,`src_user`,`src_ip`,`app_name`,`tenant_id`,`c_desc`,`c_use`,`effect`,`type`,`c_schema`) values (1,'hoj-prod.yml','DEFAULT_GROUP','hoj:\n jwt:\n # 加密秘钥\n secret: hoj-secret-init\n # token默认为24小时 86400s\n expire: 86400\n checkRefreshExpire: 43200\n header: token\n judge:\n # 调用判题服务器的token\n token: hoj-judge-token-init\n db:\n host: 172.20.0.3\n public-host: 172.20.0.3\n port: 3306\n name: hoj\n username: root\n password: hoj123456\n mail:\n ssl: true\n username: your_email_username\n password: your_email_password\n host: smtp.qq.com\n port: 465\n background-img: https://cdn.jsdelivr.net/gh/HimitZH/CDN/images/HCODE.png\n redis:\n host: 172.20.0.2\n port: 6379\n password: hoj123456\n web-config:\n base-url: your_web_url\n name: Hcode Online Judge\n short-name: HOJ\n description: Hcode Online Judge\n register: true\n footer:\n record:\n name: 2020-2021\n url: your_record_url\n project:\n name: HOJ\n url: https://gitee.com/himitzh0730/hoj\n hdu:\n account:\n username: \n password: \n cf:\n account:\n username: \n password: \n poj:\n account:\n username: \n password: \n atcoder:\n account:\n username: \n password: \n spoj:\n account:\n username: \n password: \n switch:\n judge:\n public: true\n group: true\n contest: true\n hide-non-contest-code: false\n submit-interval: 8\n discussion:\n public: true\n group: true\n ac-initial-value: 10\n create-daily: 5\n comment:\n contest: true\n ac-initial-value: 10\n group:\n ac-initial-value: 20\n create-daily: 2\n create-total: 5','11e994dc89522e140d7e3a6c0d08262a','2021-05-18 11:29:38','2021-05-18 11:40:41',NULL,'14.211.16.41','','','hoj生产配置','','','yaml',''); - -insert into `config_info`(`id`,`data_id`,`group_id`,`content`,`md5`,`gmt_create`,`gmt_modified`,`src_user`,`src_ip`,`app_name`,`tenant_id`,`c_desc`,`c_use`,`effect`,`type`,`c_schema`) values (2, 'hoj-dev.yml', 'DEFAULT_GROUP', 'hoj:\r\n jwt:\r\n # 加密秘钥\r\n secret: hoj-secret-init\r\n # token默认为24小时 86400s\r\n expire: 86400\r\n checkRefreshExpire: 43200\r\n header: token\r\n judge:\r\n # 调用判题服务器的token\r\n token: hoj-judge-token-init\r\n db:\r\n host: 172.20.0.3\r\n public-host: 172.20.0.3\r\n port: 3306\r\n name: hoj\r\n username: root\r\n password: hoj123456\r\n mail:\r\n ssl: true\r\n username: your_email_username\r\n password: your_email_password\r\n host: smtp.qq.com\r\n port: 465\r\n background-img: https://cdn.jsdelivr.net/gh/HimitZH/CDN/images/HCODE.png\r\n redis:\r\n host: 172.20.0.2\r\n port: 6379\r\n password: hoj123456\r\n web-config:\r\n base-url: your_web_url\r\n name: Hcode Online Judge\r\n short-name: HOJ\r\n description: Hcode Online Judge\r\n register: true\r\n footer:\r\n record:\r\n name: 2020-2021\r\n url: your_record_url\r\n project:\r\n name: HOJ\r\n url: https://gitee.com/himitzh0730/hoj\r\n hdu:\r\n account:\r\n username: \r\n password: \r\n cf:\r\n account:\r\n username: \r\n password: \r\n poj:\r\n account:\r\n username: \r\n password: \r\n atcoder:\r\n account:\r\n username: \r\n password: \r\n spoj:\r\n account:\r\n username: \r\n password: \r\n switch:\r\n judge:\r\n public: true\r\n group: true\r\n contest: true\r\n hide-non-contest-code: false\r\n submit-interval: 8\r\n discussion:\r\n public: true\r\n group: true\r\n ac-initial-value: 10\r\n create-daily: 5\r\n comment:\r\n contest: true\r\n ac-initial-value: 10\r\n group:\r\n ac-initial-value: 20\r\n create-daily: 2\r\n create-total: 5', 'efe68f135e2908a791259b91c88a17c9', '2022-06-06 03:35:55', '2022-06-06 03:35:55',NULL,'14.211.16.41','','','hoj开发配置','','','yaml','');