2022-03-31初始化
This commit is contained in:
46
yyd-log/yyd-log-api/pom.xml
Normal file
46
yyd-log/yyd-log-api/pom.xml
Normal file
@@ -0,0 +1,46 @@
|
||||
<?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>yyd-log</artifactId>
|
||||
<groupId>com.yyd</groupId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>yyd-log-api</artifactId>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-models</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-openfeign</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-boot-starter</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-annotation</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jakarta.validation</groupId>
|
||||
<artifactId>jakarta.validation-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.yyd</groupId>
|
||||
<artifactId>yyd-base-common</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.yyd.log.api;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.yyd.base.common.domain.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* Project: anrui_portal(门户建设) <br/>
|
||||
* File: SystemLog.java <br/>
|
||||
* Class: com.yxt.anrui.portal.api.systemlog.SystemLog <br/>
|
||||
* Description: 系统日志表. <br/>
|
||||
* Copyright: Copyright (c) 2011 <br/>
|
||||
* Company: https://gitee.com/liuzp315 <br/>
|
||||
* Makedate: 2021-08-03 00:24:30 <br/>
|
||||
*
|
||||
* @author liupopo
|
||||
* @version 1.0
|
||||
* @since 1.0
|
||||
*/
|
||||
@ApiModel(value = "系统日志表", description = "系统日志表")
|
||||
@TableName("system_log")
|
||||
@Data
|
||||
public class SystemLog extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
@ApiModelProperty("事件名称或类别")
|
||||
private String eventName;
|
||||
|
||||
@ApiModelProperty("事件内容")
|
||||
private String eventContent;
|
||||
|
||||
@ApiModelProperty("事件url")
|
||||
private String eventUrl;
|
||||
|
||||
@ApiModelProperty("用户sid")
|
||||
private String userSid;
|
||||
|
||||
@ApiModelProperty("用户名")
|
||||
private String userName;
|
||||
|
||||
@ApiModelProperty("用户iP")
|
||||
private String userIp;
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package com.yyd.log.api;
|
||||
|
||||
|
||||
import com.yyd.base.common.dto.Dto;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* Project: anrui_portal(门户建设) <br/>
|
||||
* File: SystemLogDto.java <br/>
|
||||
* Class: com.yxt.anrui.portal.api.systemlog.SystemLogDto <br/>
|
||||
* Description: 系统日志表 数据传输对象. <br/>
|
||||
* Copyright: Copyright (c) 2011 <br/>
|
||||
* Company: https://gitee.com/liuzp315 <br/>
|
||||
* Makedate: 2021-08-03 00:24:30 <br/>
|
||||
*
|
||||
* @author liupopo
|
||||
* @version 1.0
|
||||
* @since 1.0
|
||||
*/
|
||||
@Builder
|
||||
@ApiModel(value = "系统日志表 数据传输对象", description = "系统日志表 数据传输对象")
|
||||
@Data
|
||||
public class SystemLogDto implements Dto {
|
||||
|
||||
|
||||
@ApiModelProperty("事件名称或类别")
|
||||
private String eventName;
|
||||
|
||||
@ApiModelProperty("事件内容")
|
||||
private String eventContent;
|
||||
|
||||
@ApiModelProperty("事件url")
|
||||
private String eventUrl;
|
||||
|
||||
@ApiModelProperty("用户sid")
|
||||
private String userSid;
|
||||
|
||||
@ApiModelProperty("用户名")
|
||||
private String userName;
|
||||
|
||||
@ApiModelProperty("用户iP")
|
||||
private String userIp;
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.yyd.log.api;
|
||||
|
||||
import com.yyd.base.common.query.PagerQuery;
|
||||
import com.yyd.base.common.result.ResultBean;
|
||||
import com.yyd.base.common.vo.PagerVo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* Project: anrui_portal(门户建设) <br/>
|
||||
* File: SystemLogFeign.java <br/>
|
||||
* Class: com.yxt.anrui.portal.api.systemlog.SystemLogFeign <br/>
|
||||
* Description: 系统日志表. <br/>
|
||||
* Copyright: Copyright (c) 2011 <br/>
|
||||
* Company: https://gitee.com/liuzp315 <br/>
|
||||
* Makedate: 2021-08-03 00:24:30 <br/>
|
||||
*
|
||||
* @author liupopo
|
||||
* @version 1.0
|
||||
* @since 1.0
|
||||
*/
|
||||
@Api(tags = "系统日志表")
|
||||
@FeignClient(
|
||||
contextId = "yyd-log",
|
||||
name = "yyd-log",
|
||||
path = "v1/systemlog",
|
||||
fallback = SystemLogFeignFallback.class)
|
||||
public interface SystemLogFeign {
|
||||
|
||||
@ApiOperation("根据条件分页查询数据的列表")
|
||||
@PostMapping("/listPage")
|
||||
public ResultBean<PagerVo<SystemLogVo>> listPage(@RequestBody PagerQuery<SystemLogQuery> pq);
|
||||
|
||||
@ApiOperation("根据条件查询所有数据列表")
|
||||
@PostMapping("/listAll")
|
||||
public ResultBean<List<SystemLogVo>> listAll(@RequestBody SystemLogQuery query);
|
||||
|
||||
@ApiOperation("所有数据列表")
|
||||
@GetMapping("/list")
|
||||
public ResultBean<List<SystemLogVo>> list();
|
||||
|
||||
@ApiOperation("新增保存")
|
||||
@PostMapping("/save")
|
||||
public ResultBean save(@RequestBody SystemLogDto dto);
|
||||
|
||||
@ApiOperation("修改保存")
|
||||
@PostMapping("/update/{sid}")
|
||||
public ResultBean update(@RequestBody SystemLogDto dto,@PathVariable("sid") String sid);
|
||||
|
||||
@ApiOperation("删除记录")
|
||||
@GetMapping("/del/{ids}")
|
||||
public ResultBean del(@PathVariable("ids") String ids);
|
||||
|
||||
@ApiOperation("获取一条记录")
|
||||
@GetMapping("/fetch/{id}")
|
||||
public ResultBean<SystemLogVo> fetch(@PathVariable("id") String id);
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.yyd.log.api;
|
||||
|
||||
import com.yyd.base.common.query.PagerQuery;
|
||||
import com.yyd.base.common.result.ResultBean;
|
||||
import com.yyd.base.common.vo.PagerVo;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Project: anrui_portal(门户建设) <br/>
|
||||
* File: SystemLogFeignFallback.java <br/>
|
||||
* Class: com.yxt.anrui.portal.api.systemlog.SystemLogFeignFallback <br/>
|
||||
* Description: 系统日志表. <br/>
|
||||
* Copyright: Copyright (c) 2011 <br/>
|
||||
* Company: https://gitee.com/liuzp315 <br/>
|
||||
* Makedate: 2021-08-03 00:24:30 <br/>
|
||||
*
|
||||
* @author liupopo
|
||||
* @version 1.0
|
||||
* @since 1.0
|
||||
*/
|
||||
@Component
|
||||
public class SystemLogFeignFallback implements SystemLogFeign {
|
||||
|
||||
@Override
|
||||
public ResultBean<PagerVo<SystemLogVo>> listPage(PagerQuery<SystemLogQuery> pq){
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
return rb.setMsg("接口anrui_portal/systemlog/listPage无法访问");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean<List<SystemLogVo>> listAll(SystemLogQuery query){
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
return rb.setMsg("接口anrui_portal/systemlog/listAll无法访问");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean<List<SystemLogVo>> list(){
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
return rb.setMsg("接口anrui_portal/systemlog/list无法访问");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean save(SystemLogDto dto){
|
||||
return ResultBean.fireFail().setMsg("接口anrui_portal/systemlog/save无法访问");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean update(SystemLogDto dto, String sid){
|
||||
return ResultBean.fireFail().setMsg("接口anrui_portal/systemlog/update无法访问");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean del(String ids){
|
||||
return ResultBean.fireFail().setMsg("接口anrui_portal/systemlog/del无法访问");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean<SystemLogVo> fetch(String id){
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
return rb.setMsg("接口anrui_portal/systemlog/fetch无法访问");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.yyd.log.api;
|
||||
|
||||
|
||||
import com.yyd.base.common.query.Query;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* Project: anrui_portal(门户建设) <br/>
|
||||
* File: SystemLogQuery.java <br/>
|
||||
* Class: com.yxt.anrui.portal.api.systemlog.SystemLogQuery <br/>
|
||||
* Description: 系统日志表 查询条件. <br/>
|
||||
* Copyright: Copyright (c) 2011 <br/>
|
||||
* Company: https://gitee.com/liuzp315 <br/>
|
||||
* Makedate: 2021-08-03 00:24:30 <br/>
|
||||
*
|
||||
* @author liupopo
|
||||
* @version 1.0
|
||||
* @since 1.0
|
||||
*/
|
||||
@ApiModel(value = "系统日志表 查询条件", description = "系统日志表 查询条件")
|
||||
@Data
|
||||
public class SystemLogQuery implements Query {
|
||||
|
||||
|
||||
@ApiModelProperty("事件名称或类别")
|
||||
private String eventName;
|
||||
|
||||
@ApiModelProperty("事件内容")
|
||||
private String eventContent;
|
||||
|
||||
@ApiModelProperty("事件url")
|
||||
private String eventUrl;
|
||||
|
||||
@ApiModelProperty("用户sid")
|
||||
private String userSid;
|
||||
|
||||
@ApiModelProperty("用户名")
|
||||
private String userName;
|
||||
|
||||
@ApiModelProperty("用户iP")
|
||||
private String userIp;
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.yyd.log.api;
|
||||
|
||||
|
||||
import com.yyd.base.common.vo.Vo;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* Project: anrui_portal(门户建设) <br/>
|
||||
* File: SystemLogVo.java <br/>
|
||||
* Class: com.yxt.anrui.portal.api.systemlog.SystemLogVo <br/>
|
||||
* Description: 系统日志表 视图数据对象. <br/>
|
||||
* Copyright: Copyright (c) 2011 <br/>
|
||||
* Company: https://gitee.com/liuzp315 <br/>
|
||||
* Makedate: 2021-08-03 00:24:30 <br/>
|
||||
*
|
||||
* @author liupopo
|
||||
* @version 1.0
|
||||
* @since 1.0
|
||||
*/
|
||||
@ApiModel(value = "系统日志表 视图数据对象", description = "系统日志表 视图数据对象")
|
||||
@Data
|
||||
public class SystemLogVo implements Vo {
|
||||
|
||||
|
||||
@ApiModelProperty("事件名称或类别")
|
||||
private String eventName;
|
||||
|
||||
@ApiModelProperty("事件内容")
|
||||
private String eventContent;
|
||||
|
||||
@ApiModelProperty("事件url")
|
||||
private String eventUrl;
|
||||
|
||||
@ApiModelProperty("用户sid")
|
||||
private String userSid;
|
||||
|
||||
@ApiModelProperty("用户名")
|
||||
private String userName;
|
||||
|
||||
@ApiModelProperty("用户iP")
|
||||
private String userIp;
|
||||
}
|
||||
Reference in New Issue
Block a user