'pageadd'

This commit is contained in:
joshen@zcwytd.com
2023-06-07 23:10:14 +08:00
parent f6176078ae
commit f9685a9094
1186 changed files with 129272 additions and 0 deletions

View File

@@ -0,0 +1,103 @@
<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.xboe</groupId>
<artifactId>module</artifactId>
<version>1.0.0</version>
<!--<relativePath>../..</relativePath> -->
</parent>
<artifactId>xboe-module-savelog</artifactId>
<name>xboe-module-savelog</name>
<packaging>jar</packaging>
<description>操作日志的保存处理</description>
<properties>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>com.xboe</groupId>
<artifactId>xboe-core</artifactId>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-text</artifactId>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aspects</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
<!-- 以下几项和jdk有关 -->
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jdk8</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.module</groupId>
<artifactId>jackson-module-parameter-names</artifactId>
</dependency>
<!-- log -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-to-slf4j</artifactId>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</dependency>
</dependencies>
</project>

View File

@@ -0,0 +1,45 @@
package com.xboe.module.autolog.dao;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Repository;
import com.xboe.common.OrderCondition;
import com.xboe.common.PageList;
import com.xboe.core.orm.BaseDao;
import com.xboe.core.orm.FieldFilters;
import com.xboe.core.orm.IFieldFilter;
import com.xboe.core.orm.LikeMatchMode;
import com.xboe.module.autolog.entity.SysLogAction;
@Repository
public class SysLogActionDao extends BaseDao<SysLogAction> {
/**
* 分页查询
*
* @param pageIndex
* @param pageSize
* @param entity
* @param order
* @return
*/
// public PageList<SysLogAction> query(int pageIndex, int pageSize, SysLogActionVo entity, OrderCondition order) {
// List<IFieldFilter> filters = new ArrayList<>();
// if (entity != null) {
// if (StringUtils.isNotBlank(entity.getName())) {
// filters.add(FieldFilters.like("name", LikeMatchMode.ANYWHERE, entity.getName()));
// }
//
// if (entity.getActTimeStart() != null && entity.getActTimeEnd() != null) {
// LocalDateTime start = entity.getActTimeStart().atTime(0, 0, 0);
// LocalDateTime end = entity.getActTimeEnd().atTime(23, 59, 59);
// filters.add(FieldFilters.between("actTime", start, end));
// }
// }
// return this.getGenericDao().findPage(pageIndex, pageSize, getEntityClass(), filters, order);
// }
}

View File

@@ -0,0 +1,59 @@
package com.xboe.module.autolog.entity;
import java.time.LocalDateTime;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.xboe.core.SysConstant;
import com.xboe.core.orm.IdEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 系统操作日志表
*/
@Data
@EqualsAndHashCode(callSuper=true)
@Entity
@Table(name = SysConstant.TABLE_PRE+"log_action")
public class SysLogAction extends IdEntity{
private static final long serialVersionUID = 1L;
/**账号id*/
@Column(name = "aid", nullable = false,length=20)
private String aid;
/**姓名*/
@Column(name = "name", nullable = true,length=30)
private String name;
/**模块*/
@Column(name = "module", nullable = true,length=50)
private String module;
/**操作的功能模块*/
@Column(name = "act_name", nullable = true,length=100)
private String actName;
/**操作类型*/
@Column(name = "act_type", nullable = true,length=50)
private String actType;
/**操作内容*/
@Column(name = "act_content", nullable = true,length=200)
private String actContent;
/**
* 操作时间
*/
@Column(name = "act_time", nullable = true)
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime actTime;
}

View File

@@ -0,0 +1,22 @@
package com.xboe.module.autolog.service.impl;
import javax.transaction.Transactional;
import org.springframework.stereotype.Service;
import com.xboe.core.log.IAutoLogSave;
import lombok.extern.slf4j.Slf4j;
@Slf4j
@Service
public class ActionAutoLogSaveImpl implements IAutoLogSave{
@Override
@Transactional
public void save(String module, String actName, String actContent, String aid, String name) {
log.error("未实现操作日志保存接口");
}
}