commit
9a6d2d089e
@ -1,12 +0,0 @@
|
||||
@echo off
|
||||
echo.
|
||||
echo [信息] 清理工程target生成路径。
|
||||
echo.
|
||||
|
||||
%~d0
|
||||
cd %~dp0
|
||||
|
||||
cd ..
|
||||
call mvn clean
|
||||
|
||||
pause
|
@ -1,14 +0,0 @@
|
||||
@echo off
|
||||
echo.
|
||||
echo [信息] 使用Jar命令运行Auth工程。
|
||||
echo.
|
||||
|
||||
cd %~dp0
|
||||
cd ../ruoyi-auth/target
|
||||
|
||||
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
|
||||
|
||||
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar ruoyi-auth.jar
|
||||
|
||||
cd bin
|
||||
pause
|
@ -1,14 +0,0 @@
|
||||
@echo off
|
||||
echo.
|
||||
echo [信息] 使用Jar命令运行Gateway工程。
|
||||
echo.
|
||||
|
||||
cd %~dp0
|
||||
cd ../ruoyi-gateway/target
|
||||
|
||||
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
|
||||
|
||||
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar ruoyi-gateway.jar
|
||||
|
||||
cd bin
|
||||
pause
|
@ -1,14 +0,0 @@
|
||||
@echo off
|
||||
echo.
|
||||
echo [信息] 使用Jar命令运行Modules-File工程。
|
||||
echo.
|
||||
|
||||
cd %~dp0
|
||||
cd ../ruoyi-modules/ruoyi-file/target
|
||||
|
||||
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
|
||||
|
||||
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar ruoyi-modules-file.jar
|
||||
|
||||
cd bin
|
||||
pause
|
@ -1,14 +0,0 @@
|
||||
@echo off
|
||||
echo.
|
||||
echo [信息] 使用Jar命令运行Modules-Gen工程。
|
||||
echo.
|
||||
|
||||
cd %~dp0
|
||||
cd ../ruoyi-modules/ruoyi-gen/target
|
||||
|
||||
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
|
||||
|
||||
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar ruoyi-modules-gen.jar
|
||||
|
||||
cd bin
|
||||
pause
|
@ -1,14 +0,0 @@
|
||||
@echo off
|
||||
echo.
|
||||
echo [信息] 使用Jar命令运行Modules-Job工程。
|
||||
echo.
|
||||
|
||||
cd %~dp0
|
||||
cd ../ruoyi-modules/ruoyi-job/target
|
||||
|
||||
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
|
||||
|
||||
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar ruoyi-modules-job.jar
|
||||
|
||||
cd bin
|
||||
pause
|
@ -1,14 +0,0 @@
|
||||
@echo off
|
||||
echo.
|
||||
echo [信息] 使用Jar命令运行Modules-System工程。
|
||||
echo.
|
||||
|
||||
cd %~dp0
|
||||
cd ../ruoyi-modules/ruoyi-system/target
|
||||
|
||||
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
|
||||
|
||||
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar ruoyi-modules-system.jar
|
||||
|
||||
cd bin
|
||||
pause
|
@ -1,14 +0,0 @@
|
||||
@echo off
|
||||
echo.
|
||||
echo [信息] 使用Jar命令运行Monitor工程。
|
||||
echo.
|
||||
|
||||
cd %~dp0
|
||||
cd ../ruoyi-visual/ruoyi-monitor/target
|
||||
|
||||
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
|
||||
|
||||
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar ruoyi-visual-monitor.jar
|
||||
|
||||
cd bin
|
||||
pause
|
@ -0,0 +1,28 @@
|
||||
package com.xjs.business.api;
|
||||
|
||||
import com.ruoyi.common.core.constant.ServiceNameConstants;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.xjs.business.api.domain.CopyWriting;
|
||||
import com.xjs.business.api.factory.RemoteCopyWritingFactory;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
|
||||
/**
|
||||
* @author xiejs
|
||||
* @desc RPC远程调用文案接口服务
|
||||
* @create 2021-12-27
|
||||
*/
|
||||
@FeignClient(contextId = "remoteCopyWritingFeign",
|
||||
value = ServiceNameConstants.BUSINESS_OPENAPI_SERVICE,
|
||||
fallbackFactory = RemoteCopyWritingFactory.class)
|
||||
@FunctionalInterface
|
||||
public interface RemoteCopyWritingFeign {
|
||||
/**
|
||||
* 获取文案
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
@GetMapping(value = "/copyWriting/forPRC")
|
||||
R<CopyWriting> copyWriting();
|
||||
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
package com.xjs.business.api;
|
||||
|
||||
import com.ruoyi.common.core.constant.ServiceNameConstants;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.xjs.business.api.domain.TranslationVo;
|
||||
import com.xjs.business.api.factory.RemoteTranDictFactory;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
/**
|
||||
* @author xiejs
|
||||
* @desc rpc调用翻译字典接口
|
||||
* @create 2021-12-30
|
||||
*/
|
||||
@FeignClient(contextId = "remoteTranDictFeign",
|
||||
value = ServiceNameConstants.BUSINESS_OPENAPI_SERVICE,
|
||||
fallbackFactory = RemoteTranDictFactory.class)
|
||||
public interface RemoteTranDIctFeign {
|
||||
|
||||
@GetMapping(value = "/tranDict/tranDictForRPC")
|
||||
R<TranslationVo> tranDict(@RequestParam("content") String content);
|
||||
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
package com.xjs.business.api;
|
||||
|
||||
import com.ruoyi.common.core.constant.ServiceNameConstants;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.xjs.business.api.domain.TranslationVo;
|
||||
import com.xjs.business.api.factory.RemoteTranslationFactory;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
/**
|
||||
* @author xiejs
|
||||
* @desc rpc远程调用其他服务翻译接口
|
||||
* @create 2021-12-29
|
||||
*/
|
||||
@FeignClient(contextId = "remoteTranslationFeign",
|
||||
value = ServiceNameConstants.BUSINESS_OPENAPI_SERVICE,
|
||||
fallbackFactory = RemoteTranslationFactory.class)
|
||||
public interface RemoteTranslationFeign {
|
||||
|
||||
@GetMapping(value = "/translation/forRPC")
|
||||
//get请求传递单个参数需要此注解
|
||||
R<TranslationVo> translation(@RequestParam("content") String content);
|
||||
|
||||
}
|
@ -0,0 +1,65 @@
|
||||
package com.xjs.business.api.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author xiejs
|
||||
* @desc 文案实体类
|
||||
* @create 2021-12-27
|
||||
*/
|
||||
public class CopyWriting implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Long id;
|
||||
|
||||
/** 文案内容 */
|
||||
private String content;
|
||||
|
||||
/** 文案来源 */
|
||||
private String source;
|
||||
|
||||
private String createTime;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
public void setContent(String content) {
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
public String getSource() {
|
||||
return source;
|
||||
}
|
||||
|
||||
public void setSource(String source) {
|
||||
this.source = source;
|
||||
}
|
||||
|
||||
public String getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(String createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "CopyWriting{" +
|
||||
"id=" + id +
|
||||
", content='" + content + '\'' +
|
||||
", source='" + source + '\'' +
|
||||
", createTime='" + createTime + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
package com.xjs.business.api.factory;
|
||||
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.xjs.business.api.RemoteCopyWritingFeign;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.cloud.openfeign.FallbackFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* @author xiejs
|
||||
* @desc 文案rpc降级服务处理
|
||||
* @create 2021-12-27
|
||||
*/
|
||||
@Component
|
||||
public class RemoteCopyWritingFactory implements FallbackFactory<RemoteCopyWritingFeign> {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(RemoteCopyWritingFactory.class);
|
||||
|
||||
@Override
|
||||
public RemoteCopyWritingFeign create(Throwable cause) {
|
||||
log.error("api模块文案服务调用失败:{}", cause.getMessage());
|
||||
return () -> R.fail("文案服务调用失败" + cause.getMessage());
|
||||
}
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
package com.xjs.business.api.factory;
|
||||
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.xjs.business.api.RemoteTranDIctFeign;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.cloud.openfeign.FallbackFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* @author xiejs
|
||||
* @desc 翻译字段服务降级处理
|
||||
* @create 2021-12-30
|
||||
*/
|
||||
@Component
|
||||
public class RemoteTranDictFactory implements FallbackFactory<RemoteTranDIctFeign> {
|
||||
private static final Logger log = LoggerFactory.getLogger(RemoteTranDictFactory.class);
|
||||
|
||||
@Override
|
||||
public RemoteTranDIctFeign create(Throwable cause) {
|
||||
log.error("api模块文案服务调用失败:{}", cause.getMessage());
|
||||
return content -> R.fail("文案服务调用失败" + cause.getMessage());
|
||||
}
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
package com.xjs.business.api.factory;
|
||||
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.xjs.business.api.RemoteTranslationFeign;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.cloud.openfeign.FallbackFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* @author xiejs
|
||||
* @desc 调用翻译接口降级处理
|
||||
* @create 2021-12-29
|
||||
*/
|
||||
@Component
|
||||
public class RemoteTranslationFactory implements FallbackFactory<RemoteTranslationFeign> {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(RemoteTranslationFactory.class);
|
||||
|
||||
@Override
|
||||
public RemoteTranslationFeign create(Throwable cause) {
|
||||
log.error("api模块翻译服务调用失败:{}", cause.getMessage());
|
||||
return content -> R.fail("翻译服务调用失败" + cause.getMessage());
|
||||
}
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
package com.xjs.business.warning;
|
||||
|
||||
import com.ruoyi.common.core.constant.ServiceNameConstants;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.xjs.business.warning.domain.ApiRecord;
|
||||
import com.xjs.business.warning.factory.RemoteWarningCRUDFactory;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.cloud.openfeign.SpringQueryMap;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author xiejs
|
||||
* @desc 远程rpc调用预警服务crud接口
|
||||
* @create 2021-12-31
|
||||
*/
|
||||
@FeignClient(contextId = "remoteWarningCRUDFeign",
|
||||
value = ServiceNameConstants.BUSINESS_WARNING_SERVICE,
|
||||
fallbackFactory = RemoteWarningCRUDFactory.class)
|
||||
public interface RemoteWarningCRUDFeign {
|
||||
|
||||
@PostMapping("apiwarning")
|
||||
public R<ApiRecord> saveApiRecordForRPC(@RequestBody ApiRecord apiRecord);
|
||||
|
||||
|
||||
@PutMapping("apiwarning")
|
||||
public R<ApiRecord> updateApiRecordForRPC(@RequestBody ApiRecord apiRecord);
|
||||
|
||||
@GetMapping("apiwarning")
|
||||
R<List<ApiRecord>> selectApiRecordListForRPC(@SpringQueryMap ApiRecord apiRecord) ;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,113 @@
|
||||
package com.xjs.business.warning.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author xiejs
|
||||
* @desc api记录实体类
|
||||
* @create 2021-12-31
|
||||
*/
|
||||
public class ApiRecord implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键id */
|
||||
private Long id;
|
||||
|
||||
/** api名称 */
|
||||
private String apiName;
|
||||
|
||||
/** api地址 */
|
||||
private String apiUrl;
|
||||
|
||||
/** api每天请求次数 */
|
||||
private Long dayCount;
|
||||
|
||||
/**
|
||||
* 请求耗费时间
|
||||
*/
|
||||
private Integer requestTime;
|
||||
|
||||
/** api总请求次数 */
|
||||
private Long totalCount;
|
||||
|
||||
/** api限制请求次数每天 */
|
||||
private Long limitCount;
|
||||
|
||||
private Date createTime;
|
||||
|
||||
private Date updateTime;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getApiName() {
|
||||
return apiName;
|
||||
}
|
||||
|
||||
public void setApiName(String apiName) {
|
||||
this.apiName = apiName;
|
||||
}
|
||||
|
||||
public String getApiUrl() {
|
||||
return apiUrl;
|
||||
}
|
||||
|
||||
public void setApiUrl(String apiUrl) {
|
||||
this.apiUrl = apiUrl;
|
||||
}
|
||||
|
||||
public Long getTotalCount() {
|
||||
return totalCount;
|
||||
}
|
||||
|
||||
public void setTotalCount(Long totalCount) {
|
||||
this.totalCount = totalCount;
|
||||
}
|
||||
|
||||
public Long getLimitCount() {
|
||||
return limitCount;
|
||||
}
|
||||
|
||||
public void setLimitCount(Long limitCount) {
|
||||
this.limitCount = limitCount;
|
||||
}
|
||||
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public Date getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
|
||||
public void setUpdateTime(Date updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
|
||||
public Integer getRequestTime() {
|
||||
return requestTime;
|
||||
}
|
||||
|
||||
public void setRequestTime(Integer requestTime) {
|
||||
this.requestTime = requestTime;
|
||||
}
|
||||
|
||||
public Long getDayCount() {
|
||||
return dayCount;
|
||||
}
|
||||
|
||||
public void setDayCount(Long dayCount) {
|
||||
this.dayCount = dayCount;
|
||||
}
|
||||
}
|
@ -0,0 +1,45 @@
|
||||
package com.xjs.business.warning.factory;
|
||||
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.xjs.business.warning.RemoteWarningCRUDFeign;
|
||||
import com.xjs.business.warning.domain.ApiRecord;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.cloud.openfeign.FallbackFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author xiejs
|
||||
* @desc 调用预警服务降级处理
|
||||
* @create 2021-12-31
|
||||
*/
|
||||
@Component
|
||||
public class RemoteWarningCRUDFactory implements FallbackFactory<RemoteWarningCRUDFeign> {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(RemoteWarningCRUDFactory.class);
|
||||
|
||||
@Override
|
||||
public RemoteWarningCRUDFeign create(Throwable cause) {
|
||||
return new RemoteWarningCRUDFeign() {
|
||||
@Override
|
||||
public R<ApiRecord> saveApiRecordForRPC(ApiRecord apiRecord) {
|
||||
log.error("调用预警服务添加接口失败,执行降级处理----"+apiRecord.getApiName());
|
||||
return R.fail();
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<ApiRecord> updateApiRecordForRPC(ApiRecord apiRecord) {
|
||||
log.error("调用预警服务修改接口失败,执行降级处理----"+apiRecord.getApiName());
|
||||
return R.fail();
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<List<ApiRecord>> selectApiRecordListForRPC(ApiRecord apiRecord) {
|
||||
log.error("调用预警服务查询接口失败,执行降级处理----"+apiRecord.getApiName());
|
||||
return R.fail();
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
This is the JRebel configuration file. It maps the running application to your IDE workspace, enabling JRebel reloading for this project.
|
||||
Refer to https://manuals.jrebel.com/jrebel/standalone/config.html for more information.
|
||||
-->
|
||||
<application generated-by="intellij" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.zeroturnaround.com" xsi:schemaLocation="http://www.zeroturnaround.com http://update.zeroturnaround.com/jrebel/rebel-2_3.xsd">
|
||||
|
||||
<id>ruoyi-api-system</id>
|
||||
|
||||
<classpath>
|
||||
<dir name="D:/Dev/IdeaPerject/GitHub/RuoYi-Cloud/ruoyi-api/ruoyi-api-system/target/classes">
|
||||
</dir>
|
||||
</classpath>
|
||||
|
||||
</application>
|
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
This is the JRebel configuration file. It maps the running application to your IDE workspace, enabling JRebel reloading for this project.
|
||||
Refer to https://manuals.jrebel.com/jrebel/standalone/config.html for more information.
|
||||
-->
|
||||
<application generated-by="intellij" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.zeroturnaround.com" xsi:schemaLocation="http://www.zeroturnaround.com http://update.zeroturnaround.com/jrebel/rebel-2_3.xsd">
|
||||
|
||||
<id>ruoyi-auth</id>
|
||||
|
||||
<classpath>
|
||||
<dir name="D:/Dev/IdeaPerject/GitHub/RuoYi-Cloud/ruoyi-auth/target/classes">
|
||||
</dir>
|
||||
</classpath>
|
||||
|
||||
</application>
|
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
This is the JRebel configuration file. It maps the running application to your IDE workspace, enabling JRebel reloading for this project.
|
||||
Refer to https://manuals.jrebel.com/jrebel/standalone/config.html for more information.
|
||||
-->
|
||||
<application generated-by="intellij" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.zeroturnaround.com" xsi:schemaLocation="http://www.zeroturnaround.com http://update.zeroturnaround.com/jrebel/rebel-2_3.xsd">
|
||||
|
||||
<id>ruoyi-common-core</id>
|
||||
|
||||
<classpath>
|
||||
<dir name="D:/Dev/IdeaPerject/GitHub/RuoYi-Cloud/ruoyi-common/ruoyi-common-core/target/classes">
|
||||
</dir>
|
||||
</classpath>
|
||||
|
||||
</application>
|
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
This is the JRebel configuration file. It maps the running application to your IDE workspace, enabling JRebel reloading for this project.
|
||||
Refer to https://manuals.jrebel.com/jrebel/standalone/config.html for more information.
|
||||
-->
|
||||
<application generated-by="intellij" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.zeroturnaround.com" xsi:schemaLocation="http://www.zeroturnaround.com http://update.zeroturnaround.com/jrebel/rebel-2_3.xsd">
|
||||
|
||||
<id>ruoyi-common-datascope</id>
|
||||
|
||||
<classpath>
|
||||
<dir name="D:/Dev/IdeaPerject/GitHub/RuoYi-Cloud/ruoyi-common/ruoyi-common-datascope/target/classes">
|
||||
</dir>
|
||||
</classpath>
|
||||
|
||||
</application>
|
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
This is the JRebel configuration file. It maps the running application to your IDE workspace, enabling JRebel reloading for this project.
|
||||
Refer to https://manuals.jrebel.com/jrebel/standalone/config.html for more information.
|
||||
-->
|
||||
<application generated-by="intellij" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.zeroturnaround.com" xsi:schemaLocation="http://www.zeroturnaround.com http://update.zeroturnaround.com/jrebel/rebel-2_3.xsd">
|
||||
|
||||
<id>ruoyi-common-datasource</id>
|
||||
|
||||
<classpath>
|
||||
<dir name="D:/Dev/IdeaPerject/GitHub/RuoYi-Cloud/ruoyi-common/ruoyi-common-datasource/target/classes">
|
||||
</dir>
|
||||
</classpath>
|
||||
|
||||
</application>
|
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
This is the JRebel configuration file. It maps the running application to your IDE workspace, enabling JRebel reloading for this project.
|
||||
Refer to https://manuals.jrebel.com/jrebel/standalone/config.html for more information.
|
||||
-->
|
||||
<application generated-by="intellij" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.zeroturnaround.com" xsi:schemaLocation="http://www.zeroturnaround.com http://update.zeroturnaround.com/jrebel/rebel-2_3.xsd">
|
||||
|
||||
<id>ruoyi-common-log</id>
|
||||
|
||||
<classpath>
|
||||
<dir name="D:/Dev/IdeaPerject/GitHub/RuoYi-Cloud/ruoyi-common/ruoyi-common-log/target/classes">
|
||||
</dir>
|
||||
</classpath>
|
||||
|
||||
</application>
|
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
This is the JRebel configuration file. It maps the running application to your IDE workspace, enabling JRebel reloading for this project.
|
||||
Refer to https://manuals.jrebel.com/jrebel/standalone/config.html for more information.
|
||||
-->
|
||||
<application generated-by="intellij" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.zeroturnaround.com" xsi:schemaLocation="http://www.zeroturnaround.com http://update.zeroturnaround.com/jrebel/rebel-2_3.xsd">
|
||||
|
||||
<id>ruoyi-common-redis</id>
|
||||
|
||||
<classpath>
|
||||
<dir name="D:/Dev/IdeaPerject/GitHub/RuoYi-Cloud/ruoyi-common/ruoyi-common-redis/target/classes">
|
||||
</dir>
|
||||
</classpath>
|
||||
|
||||
</application>
|
@ -0,0 +1,45 @@
|
||||
package com.ruoyi.common.security.service;
|
||||
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @author xiejs
|
||||
* @desc token相关配置
|
||||
* @create 2021-12-30
|
||||
*/
|
||||
@Service
|
||||
@ConfigurationProperties(prefix = "jwt")
|
||||
public class TokenProperties {
|
||||
|
||||
|
||||
private Long expireTime;
|
||||
|
||||
private String loginTokenKey;
|
||||
|
||||
private Long refreshTime;
|
||||
|
||||
public Long getExpireTime() {
|
||||
return expireTime;
|
||||
}
|
||||
|
||||
public void setExpireTime(Long expireTime) {
|
||||
this.expireTime = expireTime;
|
||||
}
|
||||
|
||||
public String getLoginTokenKey() {
|
||||
return loginTokenKey;
|
||||
}
|
||||
|
||||
public void setLoginTokenKey(String loginTokenKey) {
|
||||
this.loginTokenKey = loginTokenKey;
|
||||
}
|
||||
|
||||
public Long getRefreshTime() {
|
||||
return refreshTime;
|
||||
}
|
||||
|
||||
public void setRefreshTime(Long refreshTime) {
|
||||
this.refreshTime = refreshTime;
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
This is the JRebel configuration file. It maps the running application to your IDE workspace, enabling JRebel reloading for this project.
|
||||
Refer to https://manuals.jrebel.com/jrebel/standalone/config.html for more information.
|
||||
-->
|
||||
<application generated-by="intellij" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.zeroturnaround.com" xsi:schemaLocation="http://www.zeroturnaround.com http://update.zeroturnaround.com/jrebel/rebel-2_3.xsd">
|
||||
|
||||
<id>ruoyi-common-security</id>
|
||||
|
||||
<classpath>
|
||||
<dir name="D:/Dev/IdeaPerject/GitHub/RuoYi-Cloud/ruoyi-common/ruoyi-common-security/target/classes">
|
||||
</dir>
|
||||
</classpath>
|
||||
|
||||
</application>
|
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
This is the JRebel configuration file. It maps the running application to your IDE workspace, enabling JRebel reloading for this project.
|
||||
Refer to https://manuals.jrebel.com/jrebel/standalone/config.html for more information.
|
||||
-->
|
||||
<application generated-by="intellij" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.zeroturnaround.com" xsi:schemaLocation="http://www.zeroturnaround.com http://update.zeroturnaround.com/jrebel/rebel-2_3.xsd">
|
||||
|
||||
<id>ruoyi-common-swagger</id>
|
||||
|
||||
<classpath>
|
||||
<dir name="D:/Dev/IdeaPerject/GitHub/RuoYi-Cloud/ruoyi-common/ruoyi-common-swagger/target/classes">
|
||||
</dir>
|
||||
</classpath>
|
||||
|
||||
</application>
|
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
This is the JRebel configuration file. It maps the running application to your IDE workspace, enabling JRebel reloading for this project.
|
||||
Refer to https://manuals.jrebel.com/jrebel/standalone/config.html for more information.
|
||||
-->
|
||||
<application generated-by="intellij" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.zeroturnaround.com" xsi:schemaLocation="http://www.zeroturnaround.com http://update.zeroturnaround.com/jrebel/rebel-2_3.xsd">
|
||||
|
||||
<id>ruoyi-gateway</id>
|
||||
|
||||
<classpath>
|
||||
<dir name="D:/Dev/IdeaPerject/GitHub/RuoYi-Cloud/ruoyi-gateway/target/classes">
|
||||
</dir>
|
||||
</classpath>
|
||||
|
||||
</application>
|
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
This is the JRebel configuration file. It maps the running application to your IDE workspace, enabling JRebel reloading for this project.
|
||||
Refer to https://manuals.jrebel.com/jrebel/standalone/config.html for more information.
|
||||
-->
|
||||
<application generated-by="intellij" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.zeroturnaround.com" xsi:schemaLocation="http://www.zeroturnaround.com http://update.zeroturnaround.com/jrebel/rebel-2_3.xsd">
|
||||
|
||||
<id>ruoyi-modules-file</id>
|
||||
|
||||
<classpath>
|
||||
<dir name="D:/Dev/IdeaPerject/GitHub/RuoYi-Cloud/ruoyi-modules/ruoyi-file/target/classes">
|
||||
</dir>
|
||||
</classpath>
|
||||
|
||||
</application>
|
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
This is the JRebel configuration file. It maps the running application to your IDE workspace, enabling JRebel reloading for this project.
|
||||
Refer to https://manuals.jrebel.com/jrebel/standalone/config.html for more information.
|
||||
-->
|
||||
<application generated-by="intellij" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.zeroturnaround.com" xsi:schemaLocation="http://www.zeroturnaround.com http://update.zeroturnaround.com/jrebel/rebel-2_3.xsd">
|
||||
|
||||
<id>ruoyi-modules-gen</id>
|
||||
|
||||
<classpath>
|
||||
<dir name="D:/Dev/IdeaPerject/GitHub/RuoYi-Cloud/ruoyi-modules/ruoyi-gen/target/classes">
|
||||
</dir>
|
||||
</classpath>
|
||||
|
||||
</application>
|
@ -1,28 +0,0 @@
|
||||
package com.ruoyi.job.task;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
import com.ruoyi.common.core.utils.StringUtils;
|
||||
|
||||
/**
|
||||
* 定时任务调度测试
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@Component("ryTask")
|
||||
public class RyTask
|
||||
{
|
||||
public void ryMultipleParams(String s, Boolean b, Long l, Double d, Integer i)
|
||||
{
|
||||
System.out.println(StringUtils.format("执行多参方法: 字符串类型{},布尔类型{},长整型{},浮点型{},整形{}", s, b, l, d, i));
|
||||
}
|
||||
|
||||
public void ryParams(String params)
|
||||
{
|
||||
System.out.println("执行有参方法:" + params);
|
||||
}
|
||||
|
||||
public void ryNoParams()
|
||||
{
|
||||
System.out.println("执行无参方法");
|
||||
}
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
package com.xjs.job.task;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.xjs.business.api.RemoteCopyWritingFeign;
|
||||
import com.xjs.business.api.domain.CopyWriting;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
|
||||
/**
|
||||
* @author xiejs
|
||||
* @desc 调用文案定时任务
|
||||
* @create 2021-12-27
|
||||
*/
|
||||
@Component("CopyWritingTask")
|
||||
public class CopyWritingTask {
|
||||
|
||||
@Resource
|
||||
private RemoteCopyWritingFeign remoteCopyWritingFeign;
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(CopyWritingTask.class);
|
||||
|
||||
/**
|
||||
* 任务执行
|
||||
*/
|
||||
public void execute() {
|
||||
LocalDateTime localDateTime1 = DateUtil.date().toLocalDateTime();
|
||||
log.info("---------------文案定时任务Start-------------------");
|
||||
R<CopyWriting> r = remoteCopyWritingFeign.copyWriting();
|
||||
log.info("文案定时任务结果:code={},msg={},data={}",r.getCode(),r.getMsg(),r.getData());
|
||||
LocalDateTime localDateTime2 = DateUtil.date().toLocalDateTime();
|
||||
long between = ChronoUnit.MILLIS.between(localDateTime1, localDateTime2);
|
||||
log.info("Job耗费时间:{}ms", between);
|
||||
log.info("---------------文案定时任务end---------------------");
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
This is the JRebel configuration file. It maps the running application to your IDE workspace, enabling JRebel reloading for this project.
|
||||
Refer to https://manuals.jrebel.com/jrebel/standalone/config.html for more information.
|
||||
-->
|
||||
<application generated-by="intellij" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.zeroturnaround.com" xsi:schemaLocation="http://www.zeroturnaround.com http://update.zeroturnaround.com/jrebel/rebel-2_3.xsd">
|
||||
|
||||
<id>ruoyi-modules-job</id>
|
||||
|
||||
<classpath>
|
||||
<dir name="D:/Dev/IdeaPerject/GitHub/RuoYi-Cloud/ruoyi-modules/ruoyi-job/target/classes">
|
||||
</dir>
|
||||
</classpath>
|
||||
|
||||
</application>
|
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
This is the JRebel configuration file. It maps the running application to your IDE workspace, enabling JRebel reloading for this project.
|
||||
Refer to https://manuals.jrebel.com/jrebel/standalone/config.html for more information.
|
||||
-->
|
||||
<application generated-by="intellij" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.zeroturnaround.com" xsi:schemaLocation="http://www.zeroturnaround.com http://update.zeroturnaround.com/jrebel/rebel-2_3.xsd">
|
||||
|
||||
<id>ruoyi-modules-system</id>
|
||||
|
||||
<classpath>
|
||||
<dir name="D:/Dev/IdeaPerject/GitHub/RuoYi-Cloud/ruoyi-modules/ruoyi-system/target/classes">
|
||||
</dir>
|
||||
</classpath>
|
||||
|
||||
</application>
|
@ -1,11 +1,11 @@
|
||||
# 页面标题
|
||||
VUE_APP_TITLE = 若依管理系统
|
||||
|
||||
# 开发环境配置
|
||||
ENV = 'development'
|
||||
|
||||
# 若依管理系统/开发环境
|
||||
VUE_APP_BASE_API = '/dev-api'
|
||||
|
||||
# 路由懒加载
|
||||
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
||||
# 页面标题
|
||||
VUE_APP_TITLE = 管理平台
|
||||
|
||||
# 开发环境配置
|
||||
ENV = 'development'
|
||||
|
||||
# 若依管理系统/开发环境
|
||||
VUE_APP_BASE_API = '/dev-api'
|
||||
|
||||
# 路由懒加载
|
||||
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
||||
|
@ -1,8 +1,8 @@
|
||||
# 页面标题
|
||||
VUE_APP_TITLE = 若依管理系统
|
||||
|
||||
# 生产环境配置
|
||||
ENV = 'production'
|
||||
|
||||
# 若依管理系统/生产环境
|
||||
VUE_APP_BASE_API = '/prod-api'
|
||||
# 页面标题
|
||||
VUE_APP_TITLE = 管理平台
|
||||
|
||||
# 生产环境配置
|
||||
ENV = 'production'
|
||||
|
||||
# 若依管理系统/生产环境
|
||||
VUE_APP_BASE_API = '/prod-api'
|
||||
|
@ -1,10 +1,10 @@
|
||||
# 页面标题
|
||||
VUE_APP_TITLE = 若依管理系统
|
||||
|
||||
NODE_ENV = production
|
||||
|
||||
# 测试环境配置
|
||||
ENV = 'staging'
|
||||
|
||||
# 若依管理系统/测试环境
|
||||
VUE_APP_BASE_API = '/stage-api'
|
||||
# 页面标题
|
||||
VUE_APP_TITLE = 管理平台
|
||||
|
||||
NODE_ENV = production
|
||||
|
||||
# 测试环境配置
|
||||
ENV = 'staging'
|
||||
|
||||
# 若依管理系统/测试环境
|
||||
VUE_APP_BASE_API = '/stage-api'
|
||||
|
@ -1,90 +1,90 @@
|
||||
{
|
||||
"name": "ruoyi",
|
||||
"version": "3.3.0",
|
||||
"description": "若依管理系统",
|
||||
"author": "若依",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"dev": "vue-cli-service serve",
|
||||
"build:prod": "vue-cli-service build",
|
||||
"build:stage": "vue-cli-service build --mode staging",
|
||||
"preview": "node build/index.js --preview",
|
||||
"lint": "eslint --ext .js,.vue src"
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
"pre-commit": "lint-staged"
|
||||
}
|
||||
},
|
||||
"lint-staged": {
|
||||
"src/**/*.{js,vue}": [
|
||||
"eslint --fix",
|
||||
"git add"
|
||||
]
|
||||
},
|
||||
"keywords": [
|
||||
"vue",
|
||||
"admin",
|
||||
"dashboard",
|
||||
"element-ui",
|
||||
"boilerplate",
|
||||
"admin-template",
|
||||
"management-system"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://gitee.com/y_project/RuoYi-Cloud.git"
|
||||
},
|
||||
"dependencies": {
|
||||
"@riophae/vue-treeselect": "0.4.0",
|
||||
"axios": "0.24.0",
|
||||
"clipboard": "2.0.8",
|
||||
"core-js": "3.19.1",
|
||||
"echarts": "4.9.0",
|
||||
"element-ui": "2.15.6",
|
||||
"file-saver": "2.0.5",
|
||||
"fuse.js": "6.4.3",
|
||||
"highlight.js": "9.18.5",
|
||||
"js-beautify": "1.13.0",
|
||||
"js-cookie": "3.0.1",
|
||||
"jsencrypt": "3.2.1",
|
||||
"nprogress": "0.2.0",
|
||||
"quill": "1.3.7",
|
||||
"screenfull": "5.0.2",
|
||||
"sortablejs": "1.10.2",
|
||||
"vue": "2.6.12",
|
||||
"vue-count-to": "1.0.13",
|
||||
"vue-cropper": "0.5.5",
|
||||
"vue-meta": "2.4.0",
|
||||
"vue-router": "3.4.9",
|
||||
"vuedraggable": "2.24.3",
|
||||
"vuex": "3.6.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vue/cli-plugin-babel": "4.4.6",
|
||||
"@vue/cli-plugin-eslint": "4.4.6",
|
||||
"@vue/cli-service": "4.4.6",
|
||||
"babel-eslint": "10.1.0",
|
||||
"babel-plugin-dynamic-import-node": "2.3.3",
|
||||
"chalk": "4.1.0",
|
||||
"compression-webpack-plugin": "5.0.2",
|
||||
"connect": "3.6.6",
|
||||
"eslint": "7.15.0",
|
||||
"eslint-plugin-vue": "7.2.0",
|
||||
"lint-staged": "10.5.3",
|
||||
"runjs": "4.4.2",
|
||||
"sass": "1.32.13",
|
||||
"sass-loader": "10.1.1",
|
||||
"script-ext-html-webpack-plugin": "2.1.5",
|
||||
"svg-sprite-loader": "5.1.1",
|
||||
"vue-template-compiler": "2.6.12"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8.9",
|
||||
"npm": ">= 3.0.0"
|
||||
},
|
||||
"browserslist": [
|
||||
"> 1%",
|
||||
"last 2 versions"
|
||||
]
|
||||
}
|
||||
{
|
||||
"name": "ruoyi",
|
||||
"version": "3.3.0",
|
||||
"description": "管理平台",
|
||||
"author": "若依",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"dev": "vue-cli-service serve",
|
||||
"build:prod": "vue-cli-service build",
|
||||
"build:stage": "vue-cli-service build --mode staging",
|
||||
"preview": "node build/index.js --preview",
|
||||
"lint": "eslint --ext .js,.vue src"
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
"pre-commit": "lint-staged"
|
||||
}
|
||||
},
|
||||
"lint-staged": {
|
||||
"src/**/*.{js,vue}": [
|
||||
"eslint --fix",
|
||||
"git add"
|
||||
]
|
||||
},
|
||||
"keywords": [
|
||||
"vue",
|
||||
"admin",
|
||||
"dashboard",
|
||||
"element-ui",
|
||||
"boilerplate",
|
||||
"admin-template",
|
||||
"management-system"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://gitee.com/y_project/RuoYi-Cloud.git"
|
||||
},
|
||||
"dependencies": {
|
||||
"@riophae/vue-treeselect": "0.4.0",
|
||||
"axios": "0.24.0",
|
||||
"clipboard": "2.0.8",
|
||||
"core-js": "3.19.1",
|
||||
"echarts": "4.9.0",
|
||||
"element-ui": "2.15.6",
|
||||
"file-saver": "2.0.5",
|
||||
"fuse.js": "6.4.3",
|
||||
"highlight.js": "9.18.5",
|
||||
"js-beautify": "1.13.0",
|
||||
"js-cookie": "3.0.1",
|
||||
"jsencrypt": "3.2.1",
|
||||
"nprogress": "0.2.0",
|
||||
"quill": "1.3.7",
|
||||
"screenfull": "5.0.2",
|
||||
"sortablejs": "1.10.2",
|
||||
"vue": "2.6.12",
|
||||
"vue-count-to": "1.0.13",
|
||||
"vue-cropper": "0.5.5",
|
||||
"vue-meta": "2.4.0",
|
||||
"vue-router": "3.4.9",
|
||||
"vuedraggable": "2.24.3",
|
||||
"vuex": "3.6.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vue/cli-plugin-babel": "4.4.6",
|
||||
"@vue/cli-plugin-eslint": "4.4.6",
|
||||
"@vue/cli-service": "4.4.6",
|
||||
"babel-eslint": "10.1.0",
|
||||
"babel-plugin-dynamic-import-node": "2.3.3",
|
||||
"chalk": "4.1.0",
|
||||
"compression-webpack-plugin": "5.0.2",
|
||||
"connect": "3.6.6",
|
||||
"eslint": "7.15.0",
|
||||
"eslint-plugin-vue": "7.2.0",
|
||||
"lint-staged": "10.5.3",
|
||||
"runjs": "4.4.2",
|
||||
"sass": "1.32.13",
|
||||
"sass-loader": "10.1.1",
|
||||
"script-ext-html-webpack-plugin": "2.1.5",
|
||||
"svg-sprite-loader": "5.1.1",
|
||||
"vue-template-compiler": "2.6.12"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8.9",
|
||||
"npm": ">= 3.0.0"
|
||||
},
|
||||
"browserslist": [
|
||||
"> 1%",
|
||||
"last 2 versions"
|
||||
]
|
||||
}
|
||||
|
@ -0,0 +1,61 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询英语单词列表
|
||||
export function listWord(query) {
|
||||
return request({
|
||||
url: '/english/word/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询英语单词详细
|
||||
export function getWord(id) {
|
||||
return request({
|
||||
url: '/english/word/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function getWordRPC(id) {
|
||||
return request({
|
||||
url: '/english/word/rpc/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 新增英语单词
|
||||
export function addWord(data) {
|
||||
return request({
|
||||
url: '/english/word',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改英语单词
|
||||
export function updateWord(data) {
|
||||
return request({
|
||||
url: '/english/word',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除英语单词
|
||||
export function delWord(id) {
|
||||
return request({
|
||||
url: '/english/word/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
//查询收藏夹英语单词
|
||||
export function collectWord(query){
|
||||
return request({
|
||||
url: '/english/word/collect',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 登录方法
|
||||
export function getServiceMonitor() {
|
||||
return request({
|
||||
url: '/monitor/servicemonitor'
|
||||
})
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询日志列表
|
||||
export function listLog(query) {
|
||||
return request({
|
||||
url: '/openapi/log/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询日志详细
|
||||
export function getLog(id) {
|
||||
return request({
|
||||
url: '/openapi/log/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 删除日志
|
||||
export function delLog(id) {
|
||||
return request({
|
||||
url: '/openapi/log/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询英语一言列表
|
||||
export function listOneenglish(query) {
|
||||
return request({
|
||||
url: '/openapi/oneenglish/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询英语一言详细
|
||||
export function getOneenglish(id) {
|
||||
return request({
|
||||
url: '/openapi/oneenglish/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 删除英语一言
|
||||
export function delOneenglish(id) {
|
||||
return request({
|
||||
url: '/openapi/oneenglish/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
//获取英语一言api接口
|
||||
export function getOneEnglishApi() {
|
||||
return request({
|
||||
url: '/openapi/oneenglish/getOneEnglish'
|
||||
})
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 翻译
|
||||
export function translation(query) {
|
||||
return request({
|
||||
url: '/openapi/translation',
|
||||
method: 'post',
|
||||
data: query
|
||||
})
|
||||
}
|
||||
|
||||
//获取文案
|
||||
export function getCopyWriting(query) {
|
||||
return request({
|
||||
url: '/openapi/copyWriting',
|
||||
method: 'get',
|
||||
data: query
|
||||
})
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询API预警列表
|
||||
export function listApiwarning(query) {
|
||||
return request({
|
||||
url: '/warning/apiwarning/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询API预警详细
|
||||
export function getApiwarning(id) {
|
||||
return request({
|
||||
url: '/warning/apiwarning/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 修改API预警
|
||||
export function updateApiwarning(data) {
|
||||
return request({
|
||||
url: '/warning/apiwarning/edit',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
@ -1,93 +1,93 @@
|
||||
<template>
|
||||
<div class="sidebar-logo-container" :class="{'collapse':collapse}" :style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground }">
|
||||
<transition name="sidebarLogoFade">
|
||||
<router-link v-if="collapse" key="collapse" class="sidebar-logo-link" to="/">
|
||||
<img v-if="logo" :src="logo" class="sidebar-logo" />
|
||||
<h1 v-else class="sidebar-title" :style="{ color: sideTheme === 'theme-dark' ? variables.logoTitleColor : variables.logoLightTitleColor }">{{ title }} </h1>
|
||||
</router-link>
|
||||
<router-link v-else key="expand" class="sidebar-logo-link" to="/">
|
||||
<img v-if="logo" :src="logo" class="sidebar-logo" />
|
||||
<h1 class="sidebar-title" :style="{ color: sideTheme === 'theme-dark' ? variables.logoTitleColor : variables.logoLightTitleColor }">{{ title }} </h1>
|
||||
</router-link>
|
||||
</transition>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import logoImg from '@/assets/logo/logo.png'
|
||||
import variables from '@/assets/styles/variables.scss'
|
||||
|
||||
export default {
|
||||
name: 'SidebarLogo',
|
||||
props: {
|
||||
collapse: {
|
||||
type: Boolean,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
variables() {
|
||||
return variables;
|
||||
},
|
||||
sideTheme() {
|
||||
return this.$store.state.settings.sideTheme
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '若依管理系统',
|
||||
logo: logoImg
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.sidebarLogoFade-enter-active {
|
||||
transition: opacity 1.5s;
|
||||
}
|
||||
|
||||
.sidebarLogoFade-enter,
|
||||
.sidebarLogoFade-leave-to {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.sidebar-logo-container {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 50px;
|
||||
line-height: 50px;
|
||||
background: #2b2f3a;
|
||||
text-align: center;
|
||||
overflow: hidden;
|
||||
|
||||
& .sidebar-logo-link {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
|
||||
& .sidebar-logo {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
vertical-align: middle;
|
||||
margin-right: 12px;
|
||||
}
|
||||
|
||||
& .sidebar-title {
|
||||
display: inline-block;
|
||||
margin: 0;
|
||||
color: #fff;
|
||||
font-weight: 600;
|
||||
line-height: 50px;
|
||||
font-size: 14px;
|
||||
font-family: Avenir, Helvetica Neue, Arial, Helvetica, sans-serif;
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
|
||||
&.collapse {
|
||||
.sidebar-logo {
|
||||
margin-right: 0px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<div class="sidebar-logo-container" :class="{'collapse':collapse}" :style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground }">
|
||||
<transition name="sidebarLogoFade">
|
||||
<router-link v-if="collapse" key="collapse" class="sidebar-logo-link" to="/">
|
||||
<img v-if="logo" :src="logo" class="sidebar-logo" />
|
||||
<h1 v-else class="sidebar-title" :style="{ color: sideTheme === 'theme-dark' ? variables.logoTitleColor : variables.logoLightTitleColor }">{{ title }} </h1>
|
||||
</router-link>
|
||||
<router-link v-else key="expand" class="sidebar-logo-link" to="/">
|
||||
<img v-if="logo" :src="logo" class="sidebar-logo" />
|
||||
<h1 class="sidebar-title" :style="{ color: sideTheme === 'theme-dark' ? variables.logoTitleColor : variables.logoLightTitleColor }">{{ title }} </h1>
|
||||
</router-link>
|
||||
</transition>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import logoImg from '@/assets/logo/logo.png'
|
||||
import variables from '@/assets/styles/variables.scss'
|
||||
|
||||
export default {
|
||||
name: 'SidebarLogo',
|
||||
props: {
|
||||
collapse: {
|
||||
type: Boolean,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
variables() {
|
||||
return variables;
|
||||
},
|
||||
sideTheme() {
|
||||
return this.$store.state.settings.sideTheme
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '管理平台',
|
||||
logo: logoImg
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.sidebarLogoFade-enter-active {
|
||||
transition: opacity 1.5s;
|
||||
}
|
||||
|
||||
.sidebarLogoFade-enter,
|
||||
.sidebarLogoFade-leave-to {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.sidebar-logo-container {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 50px;
|
||||
line-height: 50px;
|
||||
background: #2b2f3a;
|
||||
text-align: center;
|
||||
overflow: hidden;
|
||||
|
||||
& .sidebar-logo-link {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
|
||||
& .sidebar-logo {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
vertical-align: middle;
|
||||
margin-right: 12px;
|
||||
}
|
||||
|
||||
& .sidebar-title {
|
||||
display: inline-block;
|
||||
margin: 0;
|
||||
color: #fff;
|
||||
font-weight: 600;
|
||||
line-height: 50px;
|
||||
font-size: 14px;
|
||||
font-family: Avenir, Helvetica Neue, Arial, Helvetica, sans-serif;
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
|
||||
&.collapse {
|
||||
.sidebar-logo {
|
||||
margin-right: 0px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -0,0 +1,541 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="英语单词" prop="englishWord">
|
||||
<el-input
|
||||
v-model="queryParams.englishWord"
|
||||
placeholder="英语单词"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="中文" prop="chineseWord">
|
||||
<el-input
|
||||
v-model="queryParams.chineseWord"
|
||||
placeholder="请输入中文"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间">
|
||||
<el-date-picker
|
||||
v-model="daterangeCreateTime"
|
||||
size="small"
|
||||
style="width: 240px"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['english:word:add']"
|
||||
>新增
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['english:word:edit']"
|
||||
>修改
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['english:word:remove']"
|
||||
>删除
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['english:word:export']"
|
||||
>导出
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<router-link :to="'/openapi/english/collect/'" class="link-type">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-star-off"
|
||||
size="mini"
|
||||
@click="handleCollect"
|
||||
v-hasPermi="['english:word:collect']"
|
||||
>
|
||||
收藏夹
|
||||
</el-button>
|
||||
</router-link>
|
||||
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="wordList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center"/>
|
||||
<el-table-column label="英语单词" align="center" prop="englishWord" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="中文" align="center" prop="chineseWord" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="排序" align="center" prop="sort" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="收藏" align="center" prop="isCollect">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.english_collect" :value="scope.row.isCollect"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="置顶" align="center" prop="top">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.english_top" :value="scope.row.top"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="查看次数" align="center" prop="lookCount" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-tooltip class="item" effect="dark" content="点击查看详情" placement="top-start">
|
||||
<el-button circle
|
||||
type=""
|
||||
icon="el-icon-view"
|
||||
@click="handleView(scope.row,scope.index)"
|
||||
v-hasPermi="['openapi:word:query']"
|
||||
></el-button>
|
||||
</el-tooltip>
|
||||
<el-button circle
|
||||
type="primary"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['english:word:edit']"
|
||||
></el-button>
|
||||
<el-button circle
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['english:word:remove']"
|
||||
></el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 修改英语单词对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="formEdit" :model="form" :rules="rulesEdit" label-width="80px" v-loading="loadingEdit">
|
||||
<el-form-item label="英语单词" prop="englishWord">
|
||||
<el-input v-model="form.englishWord" placeholder="请输入英语单词"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="中文" prop="chineseWord">
|
||||
<el-input v-model="form.chineseWord" placeholder="请输入对应的中文"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="排序" prop="sort">
|
||||
<el-slider
|
||||
v-model="form.sort"
|
||||
show-input>
|
||||
</el-slider>
|
||||
</el-form-item>
|
||||
<el-form-item label="收藏" prop="isCollect">
|
||||
<el-select v-model="form.isCollect" placeholder="请选择是否收藏">
|
||||
<el-option
|
||||
v-for="dict in dict.type.english_collect"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="parseInt(dict.value)"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="置顶" prop="top">
|
||||
<el-select v-model="form.top" placeholder="请选择置顶">
|
||||
<el-option
|
||||
v-for="dict in dict.type.english_top"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="parseInt(dict.value)"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitFormEdit">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!--添加英语对话框-->
|
||||
<el-dialog :title="title" :visible.sync="openAdd" width="500px" append-to-body>
|
||||
<el-form ref="formAdd" :model="form" :rules="rulesAdd" label-width="80px" v-loading="loadingEdit">
|
||||
<el-form-item label="中英文" prop="content">
|
||||
<el-input v-model="form.content" placeholder="请输入中文或英文"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="排序" prop="sort">
|
||||
<el-slider
|
||||
v-model="form.sort"
|
||||
show-input>
|
||||
</el-slider>
|
||||
</el-form-item>
|
||||
<el-form-item label="收藏" prop="isCollect">
|
||||
<el-select v-model="form.isCollect" placeholder="请选择是否收藏">
|
||||
<el-option
|
||||
v-for="dict in dict.type.english_collect"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="parseInt(dict.value)"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="置顶" prop="top">
|
||||
<el-select v-model="form.top" placeholder="请选择置顶">
|
||||
<el-option
|
||||
v-for="dict in dict.type.english_top"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="parseInt(dict.value)"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitFormAdd">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
<!-- 抽屉 查看详情-->
|
||||
<el-drawer
|
||||
title="单词内容"
|
||||
:visible.sync="drawer"
|
||||
direction="rtl"
|
||||
:before-close="handleClose">
|
||||
|
||||
|
||||
<div v-loading="loadingC">
|
||||
<div class="div1">
|
||||
{{ form.englishWord }}
|
||||
</div>
|
||||
<div class="div2">
|
||||
{{ form.content }}
|
||||
</div>
|
||||
<div class="div2" style="height:320px ">
|
||||
{{ oneEnglishData.en }}
|
||||
<el-divider><i class="el-icon-mobile-phone"></i></el-divider>
|
||||
{{ oneEnglishData.zh }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</el-drawer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {listWord, getWord, delWord, addWord, updateWord, getWordRPC} from "@/api/business/english/word";
|
||||
import {getOneEnglishApi} from "@/api/business/openapi/oneenglish";
|
||||
|
||||
export default {
|
||||
name: "Word",
|
||||
dicts: ['english_collect', 'english_top'],
|
||||
data() {
|
||||
return {
|
||||
// 抽屉遮罩层
|
||||
loadingC: true,
|
||||
//抽屉开关
|
||||
drawer: false,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
loadingEdit: false,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 英语单词表格数据
|
||||
wordList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
openAdd: false,
|
||||
// 查看次数时间范围
|
||||
daterangeCreateTime: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
englishWord: null,
|
||||
chineseWord: null,
|
||||
createTime: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {
|
||||
sort: 0
|
||||
},
|
||||
//英语一言数据
|
||||
oneEnglishData: {},
|
||||
// 表单校验
|
||||
rulesEdit: {
|
||||
englishWord: [
|
||||
{required: true, message: "英语单词不能为空", trigger: "blur"}
|
||||
],
|
||||
chineseWord: [
|
||||
{required: true, message: "中文不能为空", trigger: "blur"}
|
||||
],
|
||||
isCollect: [
|
||||
{required: true, message: "是否收藏 1收藏 2不收藏不能为空", trigger: "blur"}
|
||||
],
|
||||
top: [
|
||||
{required: true, message: "置顶 1置顶 2不置顶不能为空", trigger: "blur"}
|
||||
],
|
||||
createTime: [
|
||||
{required: true, message: "创建时间不能为空", trigger: "blur"}
|
||||
]
|
||||
},
|
||||
rulesAdd: {
|
||||
content: [
|
||||
{required: true, message: "中英文不能为空", trigger: "blur"}
|
||||
],
|
||||
isCollect: [
|
||||
{required: true, message: "是否收藏 1收藏 2不收藏不能为空", trigger: "blur"}
|
||||
],
|
||||
top: [
|
||||
{required: true, message: "置顶 1置顶 2不置顶不能为空", trigger: "blur"}
|
||||
],
|
||||
createTime: [
|
||||
{required: true, message: "创建时间不能为空", trigger: "blur"}
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
//获取英语一言api数据
|
||||
getOneEnglishApi() {
|
||||
getOneEnglishApi().then(res => {
|
||||
this.oneEnglishData = res.data
|
||||
})
|
||||
},
|
||||
|
||||
//根据id查询放入抽屉
|
||||
findById(id) {
|
||||
this.loadingC = true;
|
||||
getWordRPC(id).then(res => {
|
||||
this.form = res.data
|
||||
this.loadingC = false
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
//关闭抽屉
|
||||
handleClose(done) {
|
||||
done();
|
||||
this.getList();
|
||||
},
|
||||
|
||||
/** 详细按钮操作 */
|
||||
handleView(row) {
|
||||
this.drawer = true
|
||||
this.form = row;
|
||||
this.findById(row.id)
|
||||
this.getOneEnglishApi()
|
||||
},
|
||||
|
||||
/** 查询英语单词列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
this.queryParams.params = {};
|
||||
if (null != this.daterangeCreateTime && '' != this.daterangeCreateTime) {
|
||||
this.queryParams.createTime = this.daterangeCreateTime[0];
|
||||
this.queryParams.endCreateTime = this.daterangeCreateTime[1];
|
||||
}
|
||||
listWord(this.queryParams).then(response => {
|
||||
this.wordList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.openAdd = false
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
englishWord: null,
|
||||
chineseWord: null,
|
||||
sort: null,
|
||||
isCollect: null,
|
||||
top: null,
|
||||
lookCount: null,
|
||||
createTime: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.daterangeCreateTime = [];
|
||||
this.queryParams.createTime=null
|
||||
this.queryParams.endCreateTime=null
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length !== 1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.openAdd = true;
|
||||
this.title = "添加英语单词";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getWord(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改英语单词";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitFormEdit() {
|
||||
this.$refs["formEdit"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
this.loadingEdit = true
|
||||
updateWord(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.loadingEdit = false
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}).catch(err => {
|
||||
this.loadingEdit = false
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
},
|
||||
|
||||
submitFormAdd() {
|
||||
this.$refs["formAdd"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id == null) {
|
||||
this.loadingEdit = true
|
||||
addWord(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.openAdd = false;
|
||||
this.loadingEdit = false
|
||||
this.getList();
|
||||
}).catch(err => {
|
||||
this.loadingEdit = false
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
},
|
||||
|
||||
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除英语单词编号为"' + ids + '"的数据项?').then(function () {
|
||||
return delWord(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('english/word/export', {
|
||||
...this.queryParams
|
||||
}, `word_${new Date().getTime()}.xlsx`)
|
||||
},
|
||||
|
||||
//收藏夹操作
|
||||
handleCollect() {
|
||||
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.div1 {
|
||||
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
||||
height: 180px;
|
||||
margin: 10px;
|
||||
padding: 30px;
|
||||
padding-top: 60px;
|
||||
text-align: center;
|
||||
text-shadow: 2px 2px 2px grey;
|
||||
font-size: 30px;
|
||||
}
|
||||
|
||||
.div2 {
|
||||
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
||||
margin: 10px;
|
||||
padding: 30px;
|
||||
height: 280px;
|
||||
padding-top: 100px;
|
||||
text-align: center;
|
||||
text-shadow: 2px 2px 2px grey;
|
||||
font-size: 20px;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,126 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<div class="grid-content bg-purple">
|
||||
<el-tag type="info">jvm版本</el-tag>
|
||||
{{serviceMonitorInfo.jvmVersion}}
|
||||
<br>
|
||||
<el-tag type="info">jre安装路径</el-tag>
|
||||
{{serviceMonitorInfo.jreHoneDir}}
|
||||
<br>
|
||||
<el-tag type="info">jre版本</el-tag>
|
||||
{{serviceMonitorInfo.jreVersion}}
|
||||
<br>
|
||||
<el-tag type="info">jre名称</el-tag>
|
||||
{{serviceMonitorInfo.jreName}}
|
||||
<br>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<div class="grid-content bg-purple">
|
||||
<el-tag type="info">系统名称</el-tag>
|
||||
{{serviceMonitorInfo.osName}}
|
||||
<br>
|
||||
<el-tag type="info">系统版本</el-tag>
|
||||
{{serviceMonitorInfo.osVersion}}
|
||||
<br>
|
||||
<el-tag type="info">系统架构</el-tag>
|
||||
{{serviceMonitorInfo.osArch}}
|
||||
<br>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<div class="grid-content bg-purple">
|
||||
<el-tag type="info">主机名</el-tag>
|
||||
{{serviceMonitorInfo.hostName}}
|
||||
<br>
|
||||
<el-tag type="info">主机地址</el-tag>
|
||||
{{serviceMonitorInfo.hostAddress}}
|
||||
<br>
|
||||
<el-tag type="info">登录名</el-tag>
|
||||
{{serviceMonitorInfo.userName}}
|
||||
<br>
|
||||
<el-tag type="info">用户路径</el-tag>
|
||||
{{serviceMonitorInfo.homeDir}}
|
||||
<br>
|
||||
<el-tag type="info">当前目录</el-tag>
|
||||
{{serviceMonitorInfo.currentDir}}
|
||||
<br>
|
||||
<el-tag type="info">登录语言</el-tag>
|
||||
{{serviceMonitorInfo.userLanguage}}
|
||||
<br>
|
||||
<el-tag type="info">登录区域</el-tag>
|
||||
{{serviceMonitorInfo.userCountry}}
|
||||
<br>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<div class="grid-content bg-purple">
|
||||
<el-tag type="info">最大jvm内存</el-tag>
|
||||
{{serviceMonitorInfo.maxMemory/1024/1024+"M"}}
|
||||
<br>
|
||||
<el-tag type="info">已分配内存</el-tag>
|
||||
{{serviceMonitorInfo.totalMemory/1024/1024+"M"}}
|
||||
<br>
|
||||
<el-tag type="info">剩余内存</el-tag>
|
||||
{{parseFloat(Number(serviceMonitorInfo.freeMemory/1024/1024).toFixed(0))+"M"}}
|
||||
<br>
|
||||
<el-tag type="info">最大可用内存</el-tag>
|
||||
{{parseFloat(Number(serviceMonitorInfo.usableMemory/1024/1024).toFixed(0))+"M"}}
|
||||
<br>
|
||||
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getServiceMonitor} from "@/api/business/monitor/service/monitorservice";
|
||||
|
||||
export default {
|
||||
name: "Online",
|
||||
data() {
|
||||
return {
|
||||
serviceMonitorInfo:{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
created() {
|
||||
this.getServiceMonitor()
|
||||
},
|
||||
methods: {
|
||||
getServiceMonitor() {
|
||||
getServiceMonitor().then(res =>{
|
||||
this.serviceMonitorInfo=res.data
|
||||
})
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-row {
|
||||
margin: 100px;
|
||||
padding: 0 20px;
|
||||
}
|
||||
.el-col {
|
||||
border-radius: 4px;
|
||||
}
|
||||
.grid-content {
|
||||
border-radius: 4px;
|
||||
min-height: 36px;
|
||||
padding: 0 180px;
|
||||
}
|
||||
.row-bg {
|
||||
padding: 10px 0;
|
||||
background-color: #f9fafc;
|
||||
}
|
||||
</style>
|
||||
|
@ -0,0 +1,204 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="接口名称" prop="apiName">
|
||||
<el-input
|
||||
v-model="queryParams.apiName"
|
||||
placeholder="请输入接口名称"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['openapi:log:remove']"
|
||||
>删除
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['openapi:log:export']"
|
||||
>导出
|
||||
</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="logList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center"/>
|
||||
<el-table-column label="接口名称" align="center" prop="apiName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="请求URL" align="center" prop="url" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="请求方法" align="center" prop="method" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="请求参数" align="center" prop="request" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="响应参数" align="center" prop="response" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="是否请求成功" align="center" prop="isSuccess" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<el-tag :type="scope.row.isSuccess==='成功'?'success':'danger'" size="small">{{ scope.row.isSuccess }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
circle
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['openapi:log:remove']"
|
||||
>
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {listLog, getLog, delLog} from "@/api/business/openapi/log";
|
||||
|
||||
export default {
|
||||
name: "Log",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 日志表格数据
|
||||
logList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
apiName: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询日志列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listLog(this.queryParams).then(response => {
|
||||
this.logList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
apiName: null,
|
||||
url: null,
|
||||
method: null,
|
||||
request: null,
|
||||
response: null,
|
||||
isSuccess: null,
|
||||
createTime:null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length !== 1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加日志";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getLog(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改日志";
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除日志编号为"' + ids + '"的数据项?').then(function () {
|
||||
return delLog(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('openapi/log/export', {
|
||||
...this.queryParams
|
||||
}, `log_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -0,0 +1,186 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="英文" prop="en">
|
||||
<el-input
|
||||
v-model="queryParams.en"
|
||||
placeholder="请输入英文"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="中文" prop="zh">
|
||||
<el-input
|
||||
v-model="queryParams.zh"
|
||||
placeholder="请输入中文"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['openapi:oneenglish:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['openapi:oneenglish:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="oneenglishList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="英文" align="center" prop="en" />
|
||||
<el-table-column label="中文" align="center" prop="zh" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
circle
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['openapi:oneenglish:remove']"
|
||||
></el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listOneenglish, getOneenglish, delOneenglish } from "@/api/business/openapi/oneenglish";
|
||||
|
||||
export default {
|
||||
name: "Oneenglish",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 英语一言表格数据
|
||||
oneenglishList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
en: null,
|
||||
zh: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询英语一言列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listOneenglish(this.queryParams).then(response => {
|
||||
this.oneenglishList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
en: null,
|
||||
zh: null,
|
||||
createTime: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length !== 1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
|
||||
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除英语一言编号为"' + ids + '"的数据项?').then(function () {
|
||||
return delOneenglish(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('openapi/oneenglish/export', {
|
||||
...this.queryParams
|
||||
}, `oneenglish_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
@ -0,0 +1,194 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-row>
|
||||
<el-col :span="24" v-loading="loading1">
|
||||
<div class="grid-content bg-purple" style="height: 180px">
|
||||
<!-- 文案内容区域-->
|
||||
<!-- 内容-->
|
||||
<div class="content_div">
|
||||
{{responseCopyWriting.content}}
|
||||
</div>
|
||||
<!-- 来源-->
|
||||
<div class="source_div">
|
||||
{{responseCopyWriting.source}}
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<!-- 翻译区域-->
|
||||
<div class="grid-content bg-purple">
|
||||
<el-row :gutter="15">
|
||||
<el-form ref="translation" :model="translationData" :rules="translationRules" size="medium"
|
||||
label-width="100px" label-position="top">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="翻译平台" prop="translationType">
|
||||
<el-select
|
||||
v-model="translationData.translationType"
|
||||
placeholder="翻译平台"
|
||||
clearable
|
||||
size="small"
|
||||
style="width: 150px">
|
||||
<el-option
|
||||
v-for="dict in dict.type.translation_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="20" >
|
||||
<el-form-item label="翻译区域" prop="q">
|
||||
<el-input v-model="translationData.q" type="textarea" placeholder="请输入翻译内容" show-word-limit
|
||||
:autosize="{minRows: 4, maxRows: 4}" :style="{width: '100%'}"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item size="large">
|
||||
<el-button type="primary" @click="submitForm">提交</el-button>
|
||||
<el-button @click="resetForm">重置</el-button>
|
||||
<el-button type="info" icon="el-icon-check" @click="getCopyWriting" circle></el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-form>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<!-- 翻译结果显示区域-->
|
||||
<div class="grid-content bg-purple ">
|
||||
<div class="spans" v-loading="loading2">
|
||||
{{ responseTranslation }}
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {translation,getCopyWriting} from "@/api/business/openapi/translation";
|
||||
|
||||
export default {
|
||||
dicts: ['translation_type'],
|
||||
name: "Log",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading1: true,
|
||||
loading2: false,
|
||||
|
||||
//翻译响应数据
|
||||
responseTranslation: '',
|
||||
|
||||
translationData: {
|
||||
translationType: '',
|
||||
q: '',
|
||||
},
|
||||
|
||||
//文案参数
|
||||
copyWriting:[],
|
||||
|
||||
//文案响应数据
|
||||
responseCopyWriting:{},
|
||||
|
||||
translationRules: {
|
||||
translationType: [{
|
||||
required: true,
|
||||
message: '翻译平台不能为空',
|
||||
trigger: 'change'
|
||||
}],
|
||||
q: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入翻译内容',
|
||||
trigger: 'blur'
|
||||
},
|
||||
{
|
||||
min: 1,
|
||||
max: 120,
|
||||
message: '长度在 1 到 120 个字符',
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
},
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getCopyWriting()
|
||||
},
|
||||
methods: {
|
||||
//获取文案
|
||||
getCopyWriting() {
|
||||
this.loading1 = true;
|
||||
getCopyWriting(this.copyWriting).then(res =>{
|
||||
this.responseCopyWriting=res.data
|
||||
this.loading1 = false;
|
||||
})
|
||||
},
|
||||
|
||||
submitForm() {
|
||||
this.$refs['translation'].validate(valid => {
|
||||
if (valid) {
|
||||
this.loading2 = true;
|
||||
translation(this.translationData).then(res => {
|
||||
let result = res.data.transResult
|
||||
let results = ''
|
||||
result.forEach(r => {
|
||||
results = results + ' ' + r.dst;
|
||||
})
|
||||
this.responseTranslation = results
|
||||
this.loading2 = false;
|
||||
})
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
resetForm() {
|
||||
this.$refs['translation'].resetFields()
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.bg-purple {
|
||||
box-shadow: 0 0 9px 3px #999;
|
||||
}
|
||||
|
||||
.grid-content {
|
||||
border-radius: 4px;
|
||||
min-height: 36px;
|
||||
height: 500px;
|
||||
margin-top: 20px;
|
||||
padding: 50px;
|
||||
}
|
||||
|
||||
.spans {
|
||||
margin: 50px;
|
||||
margin-top: 40px;
|
||||
padding: 50px;
|
||||
font-family: Georgia;
|
||||
font-size: 20px;
|
||||
height: 300px;
|
||||
box-shadow: 0 0 9px 3px #999;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.content_div{
|
||||
float: left;
|
||||
width: 75%;
|
||||
text-shadow: 2px 2px 2px grey;
|
||||
}
|
||||
.source_div{
|
||||
float: left;
|
||||
padding-top: 70px;
|
||||
width: 25%;
|
||||
text-shadow: 2px 2px 2px grey;
|
||||
text-align :right
|
||||
}
|
||||
|
||||
</style>
|
@ -0,0 +1,219 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="api名称" prop="apiName">
|
||||
<el-input
|
||||
v-model="queryParams.apiName"
|
||||
placeholder="请输入api名称"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['warning:apiwarning:edit']"
|
||||
>修改
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['warning:apiwarning:export']"
|
||||
>导出
|
||||
</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="apiwarningList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center"/>
|
||||
<el-table-column label="API名称" align="center" prop="apiName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="API地址" align="center" prop="apiUrl" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="API总请求次数" align="center" prop="totalCount" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="请求耗费时间" align="center" prop="requestTime" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<span>{{scope.row.requestTime+"ms"}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="API每天限制请求次数" align="center" prop="limitCount" :show-overflow-tooltip="true"/>
|
||||
|
||||
<el-table-column label="API每天请求次数" align="center" prop="dayCount"/>
|
||||
<el-table-column label="调用时间" align="center" prop="updateTime" width="180"/>
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button circle
|
||||
type="primary"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['warning:apiwarning:edit']"
|
||||
></el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改API预警对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="请求次数" prop="limitCount">
|
||||
<el-input v-model="form.limitCount" placeholder="请输入api限制请求次数每天"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {listApiwarning, getApiwarning, updateApiwarning} from "@/api/business/warning/apiwarning";
|
||||
|
||||
export default {
|
||||
name: "Apiwarning",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// API预警表格数据
|
||||
apiwarningList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
apiName: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询API预警列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listApiwarning(this.queryParams).then(response => {
|
||||
this.apiwarningList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
apiName: null,
|
||||
apiUrl: null,
|
||||
totalCount: null,
|
||||
requestTime: null,
|
||||
limitCount: null,
|
||||
createTime: null,
|
||||
dayCount: null,
|
||||
updateTime: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length !== 1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getApiwarning(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改API预警";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateApiwarning(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('warning/apiwarning/export', {
|
||||
...this.queryParams
|
||||
}, `apiwarning_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -1,30 +1,30 @@
|
||||
package com.ruoyi.modules.monitor;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import de.codecentric.boot.admin.server.config.EnableAdminServer;
|
||||
|
||||
/**
|
||||
* 监控中心
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@EnableAdminServer
|
||||
@SpringBootApplication
|
||||
public class RuoYiMonitorApplication
|
||||
{
|
||||
public static void main(String[] args)
|
||||
{
|
||||
SpringApplication.run(RuoYiMonitorApplication.class, args);
|
||||
System.out.println("(♥◠‿◠)ノ゙ 监控中心启动成功 ლ(´ڡ`ლ)゙ \n" +
|
||||
" .-------. ____ __ \n" +
|
||||
" | _ _ \\ \\ \\ / / \n" +
|
||||
" | ( ' ) | \\ _. / ' \n" +
|
||||
" |(_ o _) / _( )_ .' \n" +
|
||||
" | (_,_).' __ ___(_ o _)' \n" +
|
||||
" | |\\ \\ | || |(_,_)' \n" +
|
||||
" | | \\ `' /| `-' / \n" +
|
||||
" | | \\ / \\ / \n" +
|
||||
" ''-' `'-' `-..-' ");
|
||||
}
|
||||
}
|
||||
package com.ruoyi.modules.monitor;
|
||||
|
||||
import de.codecentric.boot.admin.server.config.EnableAdminServer;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
/**
|
||||
* 监控中心
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@EnableAdminServer
|
||||
@SpringBootApplication
|
||||
public class RuoYiMonitorApplication
|
||||
{
|
||||
public static void main(String[] args)
|
||||
{
|
||||
SpringApplication.run(RuoYiMonitorApplication.class, args);
|
||||
System.out.println("(♥◠‿◠)ノ゙ 监控中心启动成功 ლ(´ڡ`ლ)゙ \n" +
|
||||
" .-------. ____ __ \n" +
|
||||
" | _ _ \\ \\ \\ / / \n" +
|
||||
" | ( ' ) | \\ _. / ' \n" +
|
||||
" |(_ o _) / _( )_ .' \n" +
|
||||
" | (_,_).' __ ___(_ o _)' \n" +
|
||||
" | |\\ \\ | || |(_,_)' \n" +
|
||||
" | | \\ `' /| `-' / \n" +
|
||||
" | | \\ / \\ / \n" +
|
||||
" ''-' `'-' `-..-' ");
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
This is the JRebel configuration file. It maps the running application to your IDE workspace, enabling JRebel reloading for this project.
|
||||
Refer to https://manuals.jrebel.com/jrebel/standalone/config.html for more information.
|
||||
-->
|
||||
<application generated-by="intellij" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.zeroturnaround.com" xsi:schemaLocation="http://www.zeroturnaround.com http://update.zeroturnaround.com/jrebel/rebel-2_3.xsd">
|
||||
|
||||
<id>ruoyi-visual-monitor</id>
|
||||
|
||||
<classpath>
|
||||
<dir name="D:/Dev/IdeaPerject/GitHub/RuoYi-Cloud/ruoyi-visual/ruoyi-monitor/target/classes">
|
||||
</dir>
|
||||
</classpath>
|
||||
|
||||
</application>
|
@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>xjs-business</artifactId>
|
||||
<groupId>com.xjs</groupId>
|
||||
<version>3.3.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<name>业务模块-通用工具</name>
|
||||
|
||||
<artifactId>xjs-business-common</artifactId>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>8</maven.compiler.source>
|
||||
<maven.compiler.target>8</maven.compiler.target>
|
||||
</properties>
|
||||
|
||||
</project>
|
@ -0,0 +1,28 @@
|
||||
package com.xjs.config;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* @author xiejs
|
||||
* @desc
|
||||
* @create 2021-12-25
|
||||
*/
|
||||
@Data
|
||||
@ConfigurationProperties(prefix = "baidu.open")
|
||||
@Component
|
||||
public class BaiduProperties {
|
||||
|
||||
/**
|
||||
* APP ID
|
||||
*/
|
||||
private String appId;
|
||||
|
||||
/**
|
||||
* 密钥
|
||||
*/
|
||||
private String key;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package com.xjs.config;
|
||||
|
||||
import feign.Logger;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
/**
|
||||
* @author xiejs
|
||||
* @desc
|
||||
* @create 2021-12-25
|
||||
*/
|
||||
@Configuration
|
||||
public class FeignConfig{
|
||||
/**
|
||||
* 配置日志输出
|
||||
* @return
|
||||
*/
|
||||
@Bean
|
||||
Logger.Level feignLoggerLevel() {
|
||||
return Logger.Level.FULL;
|
||||
}
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
package com.xjs.config;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.DbType;
|
||||
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
|
||||
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
/**
|
||||
* @author xiejs
|
||||
* @desc
|
||||
* @create 2021-12-31
|
||||
*/
|
||||
@Configuration
|
||||
public class MybatisPlusConfig {
|
||||
|
||||
/**
|
||||
* mysql分页插件
|
||||
* @return MybatisPlusInterceptor
|
||||
*/
|
||||
@Bean
|
||||
public MybatisPlusInterceptor mybatisPlusInterceptor() {
|
||||
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
|
||||
interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
|
||||
return interceptor;
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package com.xjs.config;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* @author xiejs
|
||||
* @desc 天行数据配置
|
||||
* @create 2021-12-27
|
||||
*/
|
||||
@Component
|
||||
@ConfigurationProperties(prefix = "tianxing.open")
|
||||
@Data
|
||||
public class TianXingProperties {
|
||||
|
||||
/**
|
||||
* key密钥
|
||||
*/
|
||||
private String key;
|
||||
}
|
@ -0,0 +1,55 @@
|
||||
package com.xjs.consts;
|
||||
|
||||
/**
|
||||
* @author xiejs
|
||||
* @desc api名称常量类
|
||||
* @create 2021-12-28
|
||||
*/
|
||||
public class ApiConst {
|
||||
|
||||
//--------------------name------------------------------
|
||||
|
||||
public static final String YOUDAO_FY= "有道翻译";
|
||||
|
||||
public static final String BAIDU_FY= "百度翻译";
|
||||
|
||||
public static final String TIANXING_PYQ= "天行-朋友圈";
|
||||
|
||||
public static final String TIANXING_WYY= "天行-网易云";
|
||||
|
||||
public static final String TIANXING_JDTC= "天行-经典台词";
|
||||
|
||||
public static final String TIANXING_MMMY= "天行-名人名言";
|
||||
|
||||
public static final String TIANXING_TRAN_DICT= "天行-翻译字典";
|
||||
|
||||
public static final String TIANXING_ONE_ENGLISH= "天行-英语一言";
|
||||
|
||||
|
||||
|
||||
public static final String TEN_YY= "Ten-一言";
|
||||
|
||||
|
||||
//-------------------url------------------------------
|
||||
|
||||
public static final String BAIDU_FY_URL= "http://api.fanyi.baidu.com/api/trans/vip/translate";
|
||||
|
||||
public static final String YOUDAO_FY_URL= "http://fanyi.youdao.com/translate";
|
||||
|
||||
public static final String TIANXING_PYQ_URL= "http://api.tianapi.com/pyqwenan/index";
|
||||
|
||||
public static final String TIANXING_WYY_URL= "http://api.tianapi.com/hotreview/index";
|
||||
|
||||
public static final String TIANXING_JDTC_URL= "http://api.tianapi.com/dialogue/index";
|
||||
|
||||
public static final String TIANXING_MMMY_URL= "http://api.tianapi.com/mingyan/index";
|
||||
|
||||
public static final String TIANXING_TRAN_DICT_URL= "http://api.tianapi.com/enwords/index";
|
||||
|
||||
public static final String TIANXING_ONE_ENGLISH_URL= "http://api.tianapi.com/ensentence/index";
|
||||
|
||||
|
||||
|
||||
public static final String TEN_YY_URL= "https://tenapi.cn/yiyan/";
|
||||
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package com.xjs.consts;
|
||||
|
||||
/**
|
||||
* @author xiejs
|
||||
* @desc 英语单词常量类
|
||||
* @create 2021-12-31
|
||||
*/
|
||||
public class EnglishWordConst {
|
||||
|
||||
//置顶
|
||||
public static final Integer TOP = 1;
|
||||
|
||||
//不置顶
|
||||
public static final Integer NO_TOP = 2;
|
||||
|
||||
//收藏
|
||||
public static final Integer COLLECT = 1;
|
||||
|
||||
//不收藏
|
||||
public static final Integer NO_COLLECT = 2;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
package com.xjs.consts;
|
||||
|
||||
/**
|
||||
* @author xiejs
|
||||
* @desc redis key常量
|
||||
* @create 2021-12-30
|
||||
*/
|
||||
public class RedisConst {
|
||||
|
||||
//----------------------key------------------------
|
||||
|
||||
/**
|
||||
* 翻译字典常量key
|
||||
*/
|
||||
public static final String TRAN_DICT= "tranDict";
|
||||
|
||||
/**
|
||||
* 英语一言常量key
|
||||
*/
|
||||
public static final String ONE_ENGLISH= "oneEnglish";
|
||||
|
||||
|
||||
//-------------------有效时间-----------------------
|
||||
public static final Integer TRAN_DICT_EXPIRE = 7; //天
|
||||
|
||||
public static final Integer ONE_ENGLISH_EXPIRE = 3; //分钟
|
||||
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
package com.xjs.consts;
|
||||
|
||||
/**
|
||||
* @author xiejs
|
||||
* @desc 请求是否成功常量
|
||||
* @create 2021-12-26
|
||||
*/
|
||||
public class ReqConst {
|
||||
public static final Integer SUCCESS = 1;
|
||||
public static final Integer ERROR = 2;
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
package com.xjs.consts;
|
||||
|
||||
/**
|
||||
* @author xiejs
|
||||
* @desc 各个数据平台常量类
|
||||
* @create 2021-12-28
|
||||
*/
|
||||
public class TianXingConst {
|
||||
|
||||
//朋友圈
|
||||
public static final Integer PYQ= 1;
|
||||
//网易云
|
||||
public static final Integer WYY= 2;
|
||||
//经典台词
|
||||
public static final Integer JDTC= 3;
|
||||
//名人名言
|
||||
public static final Integer MMMY= 4;
|
||||
//Ten-API 一言
|
||||
public static final Integer YY= 5;
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
package com.xjs.consts;
|
||||
|
||||
/**
|
||||
* @author xiejs
|
||||
* @desc 翻译类型常量
|
||||
* @create 2021-12-25
|
||||
*/
|
||||
public interface TranslationTypeConst {
|
||||
Integer BAIDU = 1;
|
||||
Integer YOUDAO = 2;
|
||||
Integer GOOGLE = 3;
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package com.xjs.enums;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.EnumValue;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
|
||||
/**
|
||||
* @author xiejs
|
||||
* @desc 状态类型枚举 需要返回什么参数就在toString实现 这个枚举需要mp在配置文件中配置扫描路径
|
||||
* @create 2021-12-27
|
||||
*/
|
||||
public enum StatusEnum {
|
||||
|
||||
SUCCESS(1,"成功"),
|
||||
ERROR(2,"失败");
|
||||
|
||||
|
||||
private String desc;
|
||||
|
||||
@EnumValue//标记数据库存的值是value
|
||||
@JsonValue
|
||||
private final int value;
|
||||
|
||||
StatusEnum(int value, String desc) {
|
||||
this.value = value;
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return desc;
|
||||
}
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
package com.xjs.exception;
|
||||
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
|
||||
/**
|
||||
* @author xiejs
|
||||
* @desc
|
||||
* @create 2021-12-27
|
||||
*/
|
||||
@Log4j2
|
||||
public class ApiException extends RuntimeException{
|
||||
public ApiException() {
|
||||
super();
|
||||
}
|
||||
|
||||
public ApiException(String message) {
|
||||
super(message);
|
||||
log.error("调用第三方API异常----{}",message);
|
||||
}
|
||||
|
||||
public ApiException(String message, Throwable cause) {
|
||||
super(message, cause);
|
||||
}
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
package com.xjs.exception;
|
||||
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
|
||||
/**
|
||||
* @author xiejs
|
||||
* @desc
|
||||
* @create 2021-12-25
|
||||
*/
|
||||
@Log4j2
|
||||
public class BusinessException extends RuntimeException{
|
||||
public BusinessException() {
|
||||
super();
|
||||
}
|
||||
|
||||
public BusinessException(String message) {
|
||||
super(message);
|
||||
log.error("业务异常----{}",message);
|
||||
}
|
||||
|
||||
public BusinessException(String message, Throwable cause) {
|
||||
super(message, cause);
|
||||
}
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package com.xjs.handler;
|
||||
|
||||
import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.ibatis.reflection.MetaObject;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author xiejs
|
||||
* @desc mp字段自动填充处理器
|
||||
* @create 2021-12-27
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class MyMetaObjectHandler implements MetaObjectHandler {
|
||||
|
||||
@Override
|
||||
public void insertFill(MetaObject metaObject) {
|
||||
log.info("start insert fill ....");
|
||||
//this.setFieldValByName("createTime", new Date(), metaObject);
|
||||
this.strictInsertFill(metaObject, "createTime", Date.class,new Date()); // 起始版本 3.3.3(推荐)
|
||||
this.strictInsertFill(metaObject, "updateTime", Date.class,new Date());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateFill(MetaObject metaObject) {
|
||||
log.info("start update fill ....");
|
||||
//this.strictInsertFill(metaObject, "updateTime", LocalDateTime::now, LocalDateTime.class); // 起始版本 3.3.3(推荐)
|
||||
this.strictInsertFill(metaObject, "updateTime", Date.class,new Date()); // 起始版本 3.3.3(推荐)
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
package com.xjs.validation;
|
||||
|
||||
/**
|
||||
* @author xiejs
|
||||
* @desc 添加校验分组
|
||||
* @create 2021-12-30
|
||||
*/
|
||||
public interface AddGroup {
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue