publish 0.8.6
This commit is contained in:
20
pom.xml
20
pom.xml
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||||
<artifactId>springboot-parent</artifactId>
|
<artifactId>springboot-parent</artifactId>
|
||||||
<version>0.8.5</version>
|
<version>0.8.6</version>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>springboot-parent</name>
|
<name>springboot-parent</name>
|
||||||
<description>杭州铁晟科技有限公司基础依赖</description>
|
<description>杭州铁晟科技有限公司基础依赖</description>
|
||||||
@@ -57,55 +57,55 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||||
<artifactId>springboot-database</artifactId>
|
<artifactId>springboot-database</artifactId>
|
||||||
<version>0.8.5</version>
|
<version>0.8.6</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||||
<artifactId>springboot-login</artifactId>
|
<artifactId>springboot-login</artifactId>
|
||||||
<version>0.8.5</version>
|
<version>0.8.6</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||||
<artifactId>springboot-web</artifactId>
|
<artifactId>springboot-web</artifactId>
|
||||||
<version>0.8.5</version>
|
<version>0.8.6</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||||
<artifactId>springboot-util</artifactId>
|
<artifactId>springboot-util</artifactId>
|
||||||
<version>0.8.5</version>
|
<version>0.8.6</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||||
<artifactId>springboot-platform</artifactId>
|
<artifactId>springboot-platform</artifactId>
|
||||||
<version>0.8.5</version>
|
<version>0.8.6</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||||
<artifactId>springboot-message</artifactId>
|
<artifactId>springboot-message</artifactId>
|
||||||
<version>0.8.5</version>
|
<version>0.8.6</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||||
<artifactId>springboot-encrypt</artifactId>
|
<artifactId>springboot-encrypt</artifactId>
|
||||||
<version>0.8.5</version>
|
<version>0.8.6</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||||
<artifactId>springboot-annotation</artifactId>
|
<artifactId>springboot-annotation</artifactId>
|
||||||
<version>0.8.5</version>
|
<version>0.8.6</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||||
<artifactId>springboot-poi</artifactId>
|
<artifactId>springboot-poi</artifactId>
|
||||||
<version>0.8.5</version>
|
<version>0.8.6</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||||
<artifactId>springboot-parent</artifactId>
|
<artifactId>springboot-parent</artifactId>
|
||||||
<version>0.8.5</version>
|
<version>0.8.6</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>springboot-ademo</artifactId>
|
<artifactId>springboot-ademo</artifactId>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||||
<artifactId>springboot-parent</artifactId>
|
<artifactId>springboot-parent</artifactId>
|
||||||
<version>0.8.5</version>
|
<version>0.8.6</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>springboot-annotation</artifactId>
|
<artifactId>springboot-annotation</artifactId>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||||
<artifactId>springboot-parent</artifactId>
|
<artifactId>springboot-parent</artifactId>
|
||||||
<version>0.8.5</version>
|
<version>0.8.6</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>springboot-database</artifactId>
|
<artifactId>springboot-database</artifactId>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||||
<artifactId>springboot-parent</artifactId>
|
<artifactId>springboot-parent</artifactId>
|
||||||
<version>0.8.5</version>
|
<version>0.8.6</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>springboot-encrypt</artifactId>
|
<artifactId>springboot-encrypt</artifactId>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||||
<artifactId>springboot-parent</artifactId>
|
<artifactId>springboot-parent</artifactId>
|
||||||
<version>0.8.5</version>
|
<version>0.8.6</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>springboot-login</artifactId>
|
<artifactId>springboot-login</artifactId>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||||
<artifactId>springboot-parent</artifactId>
|
<artifactId>springboot-parent</artifactId>
|
||||||
<version>0.8.5</version>
|
<version>0.8.6</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>springboot-message</artifactId>
|
<artifactId>springboot-message</artifactId>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||||
<artifactId>springboot-parent</artifactId>
|
<artifactId>springboot-parent</artifactId>
|
||||||
<version>0.8.5</version>
|
<version>0.8.6</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>springboot-platform</artifactId>
|
<artifactId>springboot-platform</artifactId>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||||
<artifactId>springboot-parent</artifactId>
|
<artifactId>springboot-parent</artifactId>
|
||||||
<version>0.8.5</version>
|
<version>0.8.6</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>springboot-poi</artifactId>
|
<artifactId>springboot-poi</artifactId>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||||
<artifactId>springboot-parent</artifactId>
|
<artifactId>springboot-parent</artifactId>
|
||||||
<version>0.8.5</version>
|
<version>0.8.6</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>springboot-util</artifactId>
|
<artifactId>springboot-util</artifactId>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||||
<artifactId>springboot-parent</artifactId>
|
<artifactId>springboot-parent</artifactId>
|
||||||
<version>0.8.5</version>
|
<version>0.8.6</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>springboot-web</artifactId>
|
<artifactId>springboot-web</artifactId>
|
||||||
|
|||||||
@@ -6,7 +6,9 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|||||||
import com.tiesheng.core.pojos.dao.CoreLogLogin;
|
import com.tiesheng.core.pojos.dao.CoreLogLogin;
|
||||||
import com.tiesheng.core.pojos.dao.CoreLogMessage;
|
import com.tiesheng.core.pojos.dao.CoreLogMessage;
|
||||||
import com.tiesheng.core.pojos.dao.CoreLogOperation;
|
import com.tiesheng.core.pojos.dao.CoreLogOperation;
|
||||||
|
import com.tiesheng.core.pojos.dao.CoreLogProcess;
|
||||||
import com.tiesheng.core.pojos.dto.PageDTO;
|
import com.tiesheng.core.pojos.dto.PageDTO;
|
||||||
|
import com.tiesheng.core.pojos.vo.ProcessDetailVo;
|
||||||
import com.tiesheng.core.service.CoreLogService;
|
import com.tiesheng.core.service.CoreLogService;
|
||||||
import com.tiesheng.util.pojos.ApiResp;
|
import com.tiesheng.util.pojos.ApiResp;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@@ -88,4 +90,36 @@ public class LogController {
|
|||||||
return ApiResp.respOK(page.getRecords(), page.getTotal());
|
return ApiResp.respOK(page.getRecords(), page.getTotal());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 过程日志列表
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/process/page")
|
||||||
|
public ApiResp<List<CoreLogProcess>> processPage(String type, @Valid PageDTO dto) {
|
||||||
|
|
||||||
|
QueryWrapper<CoreLogProcess> queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper.eq("is_deleted", 0);
|
||||||
|
if (!StrUtil.isEmpty(type)) {
|
||||||
|
queryWrapper.eq("type", type);
|
||||||
|
}
|
||||||
|
dto.likeColumns(queryWrapper, "title");
|
||||||
|
queryWrapper.orderByDesc("create_time");
|
||||||
|
|
||||||
|
Page<CoreLogProcess> page = dto.pageObj();
|
||||||
|
coreLogService.getCoreLogProcessMapper().selectPage(page, queryWrapper);
|
||||||
|
return ApiResp.respOK(page.getRecords(), page.getTotal());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 过程日志详情
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/process/detail")
|
||||||
|
public ApiResp<ProcessDetailVo> processPage(String id) {
|
||||||
|
ProcessDetailVo processDetail = coreLogService.getProcessDetail(id);
|
||||||
|
return ApiResp.respOK(processDetail);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package com.tiesheng.core.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.tiesheng.core.pojos.dao.CoreLogProcess;
|
||||||
|
|
||||||
|
public interface CoreLogProcessMapper extends BaseMapper<CoreLogProcess> {
|
||||||
|
}
|
||||||
@@ -0,0 +1,134 @@
|
|||||||
|
package com.tiesheng.core.pojos.dao;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.tiesheng.core.pojos.DaoBase;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 日志-过程
|
||||||
|
*/
|
||||||
|
@TableName(value = "core_log_process")
|
||||||
|
public class CoreLogProcess extends DaoBase {
|
||||||
|
/**
|
||||||
|
* 标题
|
||||||
|
*/
|
||||||
|
@TableField(value = "title")
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 总数
|
||||||
|
*/
|
||||||
|
@TableField(value = "total")
|
||||||
|
private Integer total;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 成功数
|
||||||
|
*/
|
||||||
|
@TableField(value = "success_num")
|
||||||
|
private Integer successNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 失败数
|
||||||
|
*/
|
||||||
|
@TableField(value = "fail_num")
|
||||||
|
private Integer failNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类型(import-导入,sync-同步)
|
||||||
|
*/
|
||||||
|
@TableField(value = "`type`")
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取标题
|
||||||
|
*
|
||||||
|
* @return title - 标题
|
||||||
|
*/
|
||||||
|
public String getTitle() {
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置标题
|
||||||
|
*
|
||||||
|
* @param title 标题
|
||||||
|
*/
|
||||||
|
public void setTitle(String title) {
|
||||||
|
this.title = title;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取总数
|
||||||
|
*
|
||||||
|
* @return total - 总数
|
||||||
|
*/
|
||||||
|
public Integer getTotal() {
|
||||||
|
return total;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置总数
|
||||||
|
*
|
||||||
|
* @param total 总数
|
||||||
|
*/
|
||||||
|
public void setTotal(Integer total) {
|
||||||
|
this.total = total;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取成功数
|
||||||
|
*
|
||||||
|
* @return success_num - 成功数
|
||||||
|
*/
|
||||||
|
public Integer getSuccessNum() {
|
||||||
|
return successNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置成功数
|
||||||
|
*
|
||||||
|
* @param successNum 成功数
|
||||||
|
*/
|
||||||
|
public void setSuccessNum(Integer successNum) {
|
||||||
|
this.successNum = successNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取失败数
|
||||||
|
*
|
||||||
|
* @return fail_num - 失败数
|
||||||
|
*/
|
||||||
|
public Integer getFailNum() {
|
||||||
|
return failNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置失败数
|
||||||
|
*
|
||||||
|
* @param failNum 失败数
|
||||||
|
*/
|
||||||
|
public void setFailNum(Integer failNum) {
|
||||||
|
this.failNum = failNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取类型(import-导入,sync-同步)
|
||||||
|
*
|
||||||
|
* @return type - 类型(import-导入,sync-同步)
|
||||||
|
*/
|
||||||
|
public String getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置类型(import-导入,sync-同步)
|
||||||
|
*
|
||||||
|
* @param type 类型(import-导入,sync-同步)
|
||||||
|
*/
|
||||||
|
public void setType(String type) {
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,57 @@
|
|||||||
|
package com.tiesheng.core.pojos.vo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lgc
|
||||||
|
*/
|
||||||
|
public class ProcessDetailVo {
|
||||||
|
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
private Integer total;
|
||||||
|
|
||||||
|
private Integer successNum;
|
||||||
|
|
||||||
|
private Integer failNum;
|
||||||
|
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
public String getTitle() {
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTitle(String title) {
|
||||||
|
this.title = title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getTotal() {
|
||||||
|
return total;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTotal(Integer total) {
|
||||||
|
this.total = total;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getSuccessNum() {
|
||||||
|
return successNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSuccessNum(Integer successNum) {
|
||||||
|
this.successNum = successNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getFailNum() {
|
||||||
|
return failNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFailNum(Integer failNum) {
|
||||||
|
this.failNum = failNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setType(String type) {
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -4,14 +4,14 @@ import cn.hutool.core.bean.BeanUtil;
|
|||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import cn.hutool.extra.servlet.ServletUtil;
|
import cn.hutool.extra.servlet.ServletUtil;
|
||||||
import cn.hutool.json.JSONUtil;
|
import cn.hutool.json.JSONUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.tiesheng.core.mapper.CoreLogLoginMapper;
|
import com.tiesheng.core.mapper.CoreLogLoginMapper;
|
||||||
import com.tiesheng.core.mapper.CoreLogMessageMapper;
|
import com.tiesheng.core.mapper.CoreLogMessageMapper;
|
||||||
import com.tiesheng.core.mapper.CoreLogOperationMapper;
|
import com.tiesheng.core.mapper.CoreLogOperationMapper;
|
||||||
|
import com.tiesheng.core.mapper.CoreLogProcessMapper;
|
||||||
import com.tiesheng.core.pojos.RequestUserInfo;
|
import com.tiesheng.core.pojos.RequestUserInfo;
|
||||||
import com.tiesheng.core.pojos.dao.CoreLogLogin;
|
import com.tiesheng.core.pojos.dao.*;
|
||||||
import com.tiesheng.core.pojos.dao.CoreLogMessage;
|
import com.tiesheng.core.pojos.vo.ProcessDetailVo;
|
||||||
import com.tiesheng.core.pojos.dao.CoreLogOperation;
|
|
||||||
import com.tiesheng.core.pojos.dao.CorePlatformUnique;
|
|
||||||
import com.tiesheng.login.config.token.TsTokenConfig;
|
import com.tiesheng.login.config.token.TsTokenConfig;
|
||||||
import com.tiesheng.login.config.token.bean.TokenBean;
|
import com.tiesheng.login.config.token.bean.TokenBean;
|
||||||
import com.tiesheng.message.pojos.MessageReqResp;
|
import com.tiesheng.message.pojos.MessageReqResp;
|
||||||
@@ -37,6 +37,8 @@ public class CoreLogService extends TsServiceBase<CoreLogOperationMapper, CoreLo
|
|||||||
CoreLogMessageMapper coreLogMessageMapper;
|
CoreLogMessageMapper coreLogMessageMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
Ip2regionConfig ip2regionConfig;
|
Ip2regionConfig ip2regionConfig;
|
||||||
|
@Autowired
|
||||||
|
CoreLogProcessMapper coreLogProcessMapper;
|
||||||
|
|
||||||
public CoreLogLoginMapper getLogLoginMapper() {
|
public CoreLogLoginMapper getLogLoginMapper() {
|
||||||
return coreLogLoginMapper;
|
return coreLogLoginMapper;
|
||||||
@@ -46,11 +48,56 @@ public class CoreLogService extends TsServiceBase<CoreLogOperationMapper, CoreLo
|
|||||||
return coreLogMessageMapper;
|
return coreLogMessageMapper;
|
||||||
}
|
}
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////
|
public CoreLogProcessMapper getCoreLogProcessMapper() {
|
||||||
|
return coreLogProcessMapper;
|
||||||
|
}
|
||||||
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// 操作日志
|
// 操作日志
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加空的过程 返回id 用于更新
|
||||||
|
*/
|
||||||
|
public String addProcess() {
|
||||||
|
CoreLogProcess coreLogProcess = new CoreLogProcess();
|
||||||
|
coreLogProcessMapper.insert(coreLogProcess);
|
||||||
|
return coreLogProcess.getId();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新过程
|
||||||
|
*
|
||||||
|
* @param id 过程id
|
||||||
|
* @param title 过程标题/说明
|
||||||
|
* @param total 总数
|
||||||
|
* @param successNum 成功数
|
||||||
|
* @param failNum 失败数
|
||||||
|
* @param type 类型(import-导出,sync-同步)
|
||||||
|
*/
|
||||||
|
public void upProcess(String id, String title, Integer total, Integer successNum, Integer failNum, String type) {
|
||||||
|
CoreLogProcess coreLogProcess = new CoreLogProcess();
|
||||||
|
coreLogProcess.setId(id);
|
||||||
|
coreLogProcess.setTitle(title);
|
||||||
|
coreLogProcess.setTotal(total);
|
||||||
|
coreLogProcess.setSuccessNum(successNum);
|
||||||
|
coreLogProcess.setFailNum(failNum);
|
||||||
|
coreLogProcess.setType(type);
|
||||||
|
coreLogProcessMapper.updateById(coreLogProcess);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id 获取过程详情
|
||||||
|
*/
|
||||||
|
public ProcessDetailVo getProcessDetail(String id) {
|
||||||
|
QueryWrapper<CoreLogProcess> wrapper = new QueryWrapper<>();
|
||||||
|
wrapper.eq("id", id);
|
||||||
|
CoreLogProcess coreLogProcess = coreLogProcessMapper.selectOne(wrapper);
|
||||||
|
return BeanUtil.copyProperties(coreLogProcess, ProcessDetailVo.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加操作日志
|
* 添加操作日志
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -0,0 +1,40 @@
|
|||||||
|
/*
|
||||||
|
Navicat Premium Data Transfer
|
||||||
|
|
||||||
|
Source Server : 47.96.30.85
|
||||||
|
Source Server Type : MySQL
|
||||||
|
Source Server Version : 50730
|
||||||
|
Source Host : localhost:3306
|
||||||
|
Source Schema : com_tiesheng_web
|
||||||
|
|
||||||
|
Target Server Type : MySQL
|
||||||
|
Target Server Version : 50730
|
||||||
|
File Encoding : 65001
|
||||||
|
|
||||||
|
Date: 22/03/2023 10:39:06
|
||||||
|
*/
|
||||||
|
|
||||||
|
SET NAMES utf8mb4;
|
||||||
|
SET FOREIGN_KEY_CHECKS = 0;
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Table structure for core_log_process
|
||||||
|
-- ----------------------------
|
||||||
|
CREATE TABLE `core_log_process` (
|
||||||
|
`id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
||||||
|
`create_time` datetime NOT NULL,
|
||||||
|
`update_time` datetime NOT NULL,
|
||||||
|
`is_deleted` int(6) NOT NULL DEFAULT 0,
|
||||||
|
`title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标题',
|
||||||
|
`total` int(11) NOT NULL DEFAULT 0 COMMENT '总数',
|
||||||
|
`success_num` int(11) NOT NULL DEFAULT 0 COMMENT '成功数',
|
||||||
|
`fail_num` int(11) NOT NULL DEFAULT 0 COMMENT '失败数',
|
||||||
|
`type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'import' COMMENT '类型(import-导入,sync-同步)',
|
||||||
|
PRIMARY KEY (`id`) USING BTREE
|
||||||
|
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '日志-过程' ROW_FORMAT = Dynamic;
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Records of core_log_process
|
||||||
|
-- ----------------------------
|
||||||
|
|
||||||
|
SET FOREIGN_KEY_CHECKS = 1;
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.tiesheng.core.mapper.CoreLogProcessMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.tiesheng.core.pojos.dao.CoreLogProcess">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
<!--@Table core_log_process-->
|
||||||
|
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||||
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||||
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||||
|
<result column="is_deleted" jdbcType="INTEGER" property="isDeleted" />
|
||||||
|
<result column="title" jdbcType="VARCHAR" property="title" />
|
||||||
|
<result column="total" jdbcType="INTEGER" property="total" />
|
||||||
|
<result column="success_num" jdbcType="INTEGER" property="successNum" />
|
||||||
|
<result column="fail_num" jdbcType="INTEGER" property="failNum" />
|
||||||
|
<result column="type" jdbcType="VARCHAR" property="type" />
|
||||||
|
</resultMap>
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
id, create_time, update_time, is_deleted, title, total, success_num, fail_num, `type`
|
||||||
|
</sql>
|
||||||
|
</mapper>
|
||||||
Reference in New Issue
Block a user