feat(可回溯): 重构

重构为mysql
This commit is contained in:
BrandWang
2023-05-06 18:29:18 +08:00
parent ba094c7008
commit 7412cafda0
45 changed files with 1699 additions and 253 deletions
+38
View File
@@ -0,0 +1,38 @@
target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/
### IntelliJ IDEA ###
.idea/modules.xml
.idea/jarRepositories.xml
.idea/compiler.xml
.idea/libraries/
*.iws
*.iml
*.ipr
### Eclipse ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
!**/src/main/**/build/
!**/src/test/**/build/
### VS Code ###
.vscode/
### Mac OS ###
.DS_Store
+65
View File
@@ -0,0 +1,65 @@
<?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">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.wabestway.recall</groupId>
<artifactId>afis-recall</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<packaging>jar</packaging>
<artifactId>afis-recall-service</artifactId>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<mybatisplus.version>3.3.2</mybatisplus.version>
</properties>
<dependencies>
<dependency>
<groupId>com.wabestway.common</groupId>
<artifactId>afis-web-common</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>2.0.1.Final</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>5.2.10.RELEASE</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>5.2.10.RELEASE</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.10.5</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus</artifactId>
<version>${mybatisplus.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>dynamic-datasource-spring-boot-starter</artifactId>
<version>3.5.1</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>
@@ -0,0 +1,51 @@
package com.wabestway.recall.trace.dao;
import com.wabestway.recall.trace.entity.RecallOrderEntity;
import com.wabestway.recall.trace.dto.RecallOrderDTO;
import com.wabestway.recall.trace.vo.RecallOrderVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
*
*
* @author wangH
* @company 北京华焱坤泰科技有限公司
* @Time 2023-05-06 17:37:03
*/
@Mapper
public interface RecallOrderDao extends BaseMapper<RecallOrderEntity> {
/**
* 分页查询
* @param page 分页对象
* @param recallOrderDTO
* @return
*/
IPage<RecallOrderVO> queryRecallOrderByCondition(Page<RecallOrderDTO> page, @Param("recallOrderDTO")RecallOrderDTO recallOrderDTO);
/**
* 条件查询,不分页
* @param recallOrderDTO
* @return
*/
List<RecallOrderVO> queryRecallOrderListNoPage(@Param("recallOrderDTO")RecallOrderDTO recallOrderDTO);
/**
* 根据id更新
* @param recallOrder 对象
* @return
*/
void updateRecallOrderById(@Param("recallOrder")RecallOrderEntity recallOrder);
/**
* 根据id查询详情
* @param id
* @return
*/
RecallOrderVO queryRecallOrderById(@Param("id") String id);
}
@@ -0,0 +1,51 @@
package com.wabestway.recall.trace.dao;
import com.wabestway.recall.trace.entity.RecallRecordEntity;
import com.wabestway.recall.trace.dto.RecallRecordDTO;
import com.wabestway.recall.trace.vo.RecallRecordVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
*
*
* @author wangH
* @company 北京华焱坤泰科技有限公司
* @Time 2023-05-06 17:37:03
*/
@Mapper
public interface RecallRecordDao extends BaseMapper<RecallRecordEntity> {
/**
* 分页查询
* @param page 分页对象
* @param recallRecordDTO
* @return
*/
IPage<RecallRecordVO> queryRecallRecordByCondition(Page<RecallRecordDTO> page, @Param("recallRecordDTO")RecallRecordDTO recallRecordDTO);
/**
* 条件查询,不分页
* @param recallRecordDTO
* @return
*/
List<RecallRecordVO> queryRecallRecordListNoPage(@Param("recallRecordDTO")RecallRecordDTO recallRecordDTO);
/**
* 根据id更新
* @param recallRecord 对象
* @return
*/
void updateRecallRecordById(@Param("recallRecord")RecallRecordEntity recallRecord);
/**
* 根据id查询详情
* @param id
* @return
*/
RecallRecordVO queryRecallRecordById(@Param("id") String id);
}
@@ -0,0 +1,77 @@
package com.wabestway.recall.trace.dto;
import java.io.Serializable;
import lombok.Data;
import com.wabestway.commons.http.PageDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
*
*
* @author wangH
* @company 北京华焱坤泰科技有限公司
* @Time 2023-05-06 17:37:03
*/
@Data
@ApiModel
public class RecallOrderDTO extends PageDTO implements Serializable {
private static final long serialVersionUID = 1L;
/** 主键 */
@ApiModelProperty(value = "主键")
private String id;
/** 产品编码 */
@ApiModelProperty(value = "产品编码")
private String productCode;
/** 产品名称 */
@ApiModelProperty(value = "产品名称")
private String productName;
/** 保单号 */
@ApiModelProperty(value = "保单号")
private String policyNo;
/** 投保人名称 */
@ApiModelProperty(value = "投保人名称")
private String holderName;
/** 投保人手机号 */
@ApiModelProperty(value = "投保人手机号")
private String holderPhone;
/** 保险公司名称 */
@ApiModelProperty(value = "保险公司名称")
private String supplierName;
/** 是否记录完整0-否1-是 */
@ApiModelProperty(value = "是否记录完整0-否1-是")
private String complete;
/** 是否已归档 0-否1-是 */
@ApiModelProperty(value = "是否已归档 0-否1-是 ")
private String archived;
/** 完成日期 */
@ApiModelProperty(value = "完成日期")
private Long completeDate;
/** 归档日期 */
@ApiModelProperty(value = "归档日期")
private Long archivedDate;
/** 保单起始日期 */
@ApiModelProperty(value = "保单起始日期")
private String startDate;
/** 保单结束日期 */
@ApiModelProperty(value = "保单结束日期")
private String endDate;
/** 生成视频文件ID */
@ApiModelProperty(value = "生成视频文件ID")
private String fileId;
/** 生成视频文件地址 */
@ApiModelProperty(value = "生成视频文件地址")
private String fileUrl;
/** 业务订单ID */
@ApiModelProperty(value = "业务订单ID")
private String orderId;
/** 回溯记录跟踪ID */
@ApiModelProperty(value = "回溯记录跟踪ID")
private String traceId;
/** 可回溯记录appKey */
@ApiModelProperty(value = "可回溯记录appKey")
private String appKey;
}
@@ -0,0 +1,44 @@
package com.wabestway.recall.trace.dto;
import java.io.Serializable;
import lombok.Data;
import com.wabestway.commons.http.PageDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
*
*
* @author wangH
* @company 北京华焱坤泰科技有限公司
* @Time 2023-05-06 17:37:03
*/
@Data
@ApiModel
public class RecallRecordDTO extends PageDTO implements Serializable {
private static final long serialVersionUID = 1L;
/** 主键 */
@ApiModelProperty(value = "主键")
private String id;
/** 产品编码 */
@ApiModelProperty(value = "产品编码")
private String productCode;
/** 产品名称 */
@ApiModelProperty(value = "产品名称")
private String productName;
/** 模块 */
@ApiModelProperty(value = "模块")
private String module;
/** 页面说明 */
@ApiModelProperty(value = "页面说明")
private String content;
/** 记录事件 */
@ApiModelProperty(value = "记录事件")
private Blob events;
/** 回溯记录跟踪ID */
@ApiModelProperty(value = "回溯记录跟踪ID")
private String traceId;
}
@@ -0,0 +1,66 @@
package com.wabestway.recall.trace.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
/**
*
*
* @author wangH
* @company 北京华焱坤泰科技有限公司
* @Time 2023-05-06 17:37:03
*/
@Data
@TableName(value = "recall_order")
public class RecallOrderEntity {
/** 主键 */
@TableId
private String id;
/** 产品编码 */
private String productCode;
/** 产品名称 */
private String productName;
/** 保单号 */
private String policyNo;
/** 投保人名称 */
private String holderName;
/** 投保人手机号 */
private String holderPhone;
/** 保险公司名称 */
private String supplierName;
/** 是否记录完整0-否1-是 */
private String complete;
/** 是否已归档 0-否1-是 */
private String archived;
/** 完成日期 */
private Long completeDate;
/** 归档日期 */
private Long archivedDate;
/** 保单起始日期 */
private String startDate;
/** 保单结束日期 */
private String endDate;
/** 生成视频文件ID */
private String fileId;
/** 生成视频文件地址 */
private String fileUrl;
/** 业务订单ID */
private String orderId;
/** 回溯记录跟踪ID */
private String traceId;
/** 租户ID */
private String tenantId;
/** 可回溯记录appKey */
private String appKey;
/** 创建人 */
private String createBy;
/** 创建时间 */
private Long createTime;
/** 更新人 */
private String updateBy;
/** 更新时间 */
private Long updateTime;
}
@@ -0,0 +1,38 @@
package com.wabestway.recall.trace.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
/**
*
*
* @author wangH
* @company 北京华焱坤泰科技有限公司
* @Time 2023-05-06 17:37:03
*/
@Data
@TableName(value = "recall_record")
public class RecallRecordEntity {
/** 主键 */
@TableId
private String id;
/** 产品编码 */
private String productCode;
/** 产品名称 */
private String productName;
/** 模块 */
private String module;
/** 页面说明 */
private String content;
/** 记录事件 */
private Blob events;
/** 回溯记录跟踪ID */
private String traceId;
/** 创建人 */
private String createBy;
/** 创建时间 */
private Long createTime;
}
@@ -0,0 +1,48 @@
package com.wabestway.recall.trace.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.wabestway.recall.trace.entity.RecallOrderEntity;
import com.wabestway.recall.trace.dto.RecallOrderDTO;
import com.wabestway.recall.trace.vo.RecallOrderVO;
import java.util.List;
/**
*
*
* @author wangH
* @company 北京华焱坤泰科技有限公司
* @Time 2023-05-06 17:37:03
*/
public interface RecallOrderService extends IService<RecallOrderEntity> {
/**
* 分页查询
* @param page 分页对象
* @param recallOrderDTO
* @return
*/
IPage<RecallOrderVO> queryRecallOrderByCondition(long page, long size, RecallOrderDTO recallOrderDTO);
/**
* 条件查询,不分页
* @param recallOrderDTO
* @return
*/
List<RecallOrderVO> queryRecallOrderListNoPage(RecallOrderDTO recallOrderDTO);
/**
* 根据id更新
* @param recallOrder 对象
* @return
*/
void updateRecallOrderById(RecallOrderEntity recallOrder);
/**
* 根据id查询详情
* @param id
* @return
*/
RecallOrderVO queryRecallOrderById(String id);
}
@@ -0,0 +1,48 @@
package com.wabestway.recall.trace.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.wabestway.recall.trace.entity.RecallRecordEntity;
import com.wabestway.recall.trace.dto.RecallRecordDTO;
import com.wabestway.recall.trace.vo.RecallRecordVO;
import java.util.List;
/**
*
*
* @author wangH
* @company 北京华焱坤泰科技有限公司
* @Time 2023-05-06 17:37:03
*/
public interface RecallRecordService extends IService<RecallRecordEntity> {
/**
* 分页查询
* @param page 分页对象
* @param recallRecordDTO
* @return
*/
IPage<RecallRecordVO> queryRecallRecordByCondition(long page, long size, RecallRecordDTO recallRecordDTO);
/**
* 条件查询,不分页
* @param recallRecordDTO
* @return
*/
List<RecallRecordVO> queryRecallRecordListNoPage(RecallRecordDTO recallRecordDTO);
/**
* 根据id更新
* @param recallRecord 对象
* @return
*/
void updateRecallRecordById(RecallRecordEntity recallRecord);
/**
* 根据id查询详情
* @param id
* @return
*/
RecallRecordVO queryRecallRecordById(String id);
}
@@ -0,0 +1,46 @@
package com.wabestway.recall.trace.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.metadata.OrderItem;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wabestway.recall.trace.dao.RecallOrderDao;
import com.wabestway.recall.trace.entity.RecallOrderEntity;
import com.wabestway.recall.trace.dto.RecallOrderDTO;
import com.wabestway.recall.trace.vo.RecallOrderVO;
import com.wabestway.recall.trace.service.RecallOrderService;
import java.util.List;
/**
*
*
* @author wangH
* @company 北京华焱坤泰科技有限公司
* @Time 2023-05-06 17:37:03
*/
@Service
public class RecallOrderServiceImpl extends ServiceImpl<RecallOrderDao, RecallOrderEntity> implements RecallOrderService {
@Override
public IPage<RecallOrderVO> queryRecallOrderByCondition(long page, long size, RecallOrderDTO recallOrderDTO) {
Page<RecallOrderDTO> paramReq = new Page<>(page,size);
paramReq.addOrder(new OrderItem().setColumn("create_time").setAsc(false));//创建时间降序排序
IPage<RecallOrderVO> iPage = baseMapper.queryRecallOrderByCondition(paramReq, recallOrderDTO);
return iPage;
}
public List<RecallOrderVO> queryRecallOrderListNoPage(RecallOrderDTO recallOrderDTO) {
return baseMapper.queryRecallOrderListNoPage(recallOrderDTO);
}
@Override
public void updateRecallOrderById(RecallOrderEntity recallOrder) {
baseMapper.updateRecallOrderById(recallOrder);
}
@Override
public RecallOrderVO queryRecallOrderById(String id ) {
return baseMapper.queryRecallOrderById(id);
}
}
@@ -0,0 +1,46 @@
package com.wabestway.recall.trace.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.metadata.OrderItem;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wabestway.recall.trace.dao.RecallRecordDao;
import com.wabestway.recall.trace.entity.RecallRecordEntity;
import com.wabestway.recall.trace.dto.RecallRecordDTO;
import com.wabestway.recall.trace.vo.RecallRecordVO;
import com.wabestway.recall.trace.service.RecallRecordService;
import java.util.List;
/**
*
*
* @author wangH
* @company 北京华焱坤泰科技有限公司
* @Time 2023-05-06 17:37:03
*/
@Service
public class RecallRecordServiceImpl extends ServiceImpl<RecallRecordDao, RecallRecordEntity> implements RecallRecordService {
@Override
public IPage<RecallRecordVO> queryRecallRecordByCondition(long page, long size, RecallRecordDTO recallRecordDTO) {
Page<RecallRecordDTO> paramReq = new Page<>(page,size);
paramReq.addOrder(new OrderItem().setColumn("create_time").setAsc(false));//创建时间降序排序
IPage<RecallRecordVO> iPage = baseMapper.queryRecallRecordByCondition(paramReq, recallRecordDTO);
return iPage;
}
public List<RecallRecordVO> queryRecallRecordListNoPage(RecallRecordDTO recallRecordDTO) {
return baseMapper.queryRecallRecordListNoPage(recallRecordDTO);
}
@Override
public void updateRecallRecordById(RecallRecordEntity recallRecord) {
baseMapper.updateRecallRecordById(recallRecord);
}
@Override
public RecallRecordVO queryRecallRecordById(String id ) {
return baseMapper.queryRecallRecordById(id);
}
}
@@ -0,0 +1,87 @@
package com.wabestway.recall.trace.vo;
import java.io.Serializable;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
*
*
* @author wangH
* @company 北京华焱坤泰科技有限公司
* @Time 2023-05-06 17:37:03
*/
@Data
@ApiModel
public class RecallOrderVO implements Serializable {
private static final long serialVersionUID = 1L;
/** 主键 */
@ApiModelProperty(value = "主键")
private String id;
/** 产品编码 */
@ApiModelProperty(value = "产品编码")
private String productCode;
/** 产品名称 */
@ApiModelProperty(value = "产品名称")
private String productName;
/** 保单号 */
@ApiModelProperty(value = "保单号")
private String policyNo;
/** 投保人名称 */
@ApiModelProperty(value = "投保人名称")
private String holderName;
/** 投保人手机号 */
@ApiModelProperty(value = "投保人手机号")
private String holderPhone;
/** 保险公司名称 */
@ApiModelProperty(value = "保险公司名称")
private String supplierName;
/** 是否记录完整0-否1-是 */
@ApiModelProperty(value = "是否记录完整0-否1-是")
private String complete;
/** 是否已归档 0-否1-是 */
@ApiModelProperty(value = "是否已归档 0-否1-是 ")
private String archived;
/** 完成日期 */
@ApiModelProperty(value = "完成日期")
private Long completeDate;
/** 归档日期 */
@ApiModelProperty(value = "归档日期")
private Long archivedDate;
/** 保单起始日期 */
@ApiModelProperty(value = "保单起始日期")
private String startDate;
/** 保单结束日期 */
@ApiModelProperty(value = "保单结束日期")
private String endDate;
/** 生成视频文件ID */
@ApiModelProperty(value = "生成视频文件ID")
private String fileId;
/** 生成视频文件地址 */
@ApiModelProperty(value = "生成视频文件地址")
private String fileUrl;
/** 业务订单ID */
@ApiModelProperty(value = "业务订单ID")
private String orderId;
/** 回溯记录跟踪ID */
@ApiModelProperty(value = "回溯记录跟踪ID")
private String traceId;
/** 可回溯记录appKey */
@ApiModelProperty(value = "可回溯记录appKey")
private String appKey;
/** 创建人 */
@ApiModelProperty(value = "创建人")
private String createBy;
/** 创建时间 */
@ApiModelProperty(value = "创建时间")
private Long createTime;
/** 更新人 */
@ApiModelProperty(value = "更新人")
private String updateBy;
/** 更新时间 */
@ApiModelProperty(value = "更新时间")
private Long updateTime;
}
@@ -0,0 +1,48 @@
package com.wabestway.recall.trace.vo;
import java.io.Serializable;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
*
*
* @author wangH
* @company 北京华焱坤泰科技有限公司
* @Time 2023-05-06 17:37:03
*/
@Data
@ApiModel
public class RecallRecordVO implements Serializable {
private static final long serialVersionUID = 1L;
/** 主键 */
@ApiModelProperty(value = "主键")
private String id;
/** 产品编码 */
@ApiModelProperty(value = "产品编码")
private String productCode;
/** 产品名称 */
@ApiModelProperty(value = "产品名称")
private String productName;
/** 模块 */
@ApiModelProperty(value = "模块")
private String module;
/** 页面说明 */
@ApiModelProperty(value = "页面说明")
private String content;
/** 记录事件 */
@ApiModelProperty(value = "记录事件")
private Blob events;
/** 回溯记录跟踪ID */
@ApiModelProperty(value = "回溯记录跟踪ID")
private String traceId;
/** 创建人 */
@ApiModelProperty(value = "创建人")
private String createBy;
/** 创建时间 */
@ApiModelProperty(value = "创建时间")
private Long createTime;
}
@@ -0,0 +1,236 @@
<?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.wabestway.recall.trace.dao.RecallOrderDao">
<sql id="queryRecallOrderSql">
t.id id,
t.product_code productCode,
t.product_name productName,
t.policy_no policyNo,
t.holder_name holderName,
t.holder_phone holderPhone,
t.supplier_name supplierName,
t.complete complete,
t.archived archived,
t.complete_date completeDate,
t.archived_date archivedDate,
t.start_date startDate,
t.end_date endDate,
t.file_id fileId,
t.file_url fileUrl,
t.order_id orderId,
t.trace_id traceId,
t.tenant_id tenantId,
t.app_key appKey,
t.create_by createBy,
t.create_time createTime,
t.update_by updateBy,
t.update_time updateTime
</sql>
<select id="queryRecallOrderByCondition"
parameterType="com.wabestway.recall.trace.dto.RecallOrderDTO"
resultType="com.wabestway.recall.trace.vo.RecallOrderVO">
select
<include refid="queryRecallOrderSql"/>
from
recall_order t
where 1 = 1
<if test="recallOrderDTO.id != null and recallOrderDTO.id != '' ">
and t.id = #{recallOrderDTO.id}
</if>
<if test="recallOrderDTO.productCode != null and recallOrderDTO.productCode != '' ">
and t.product_code = #{recallOrderDTO.productCode}
</if>
<if test="recallOrderDTO.productName != null and recallOrderDTO.productName != '' ">
and t.product_name = #{recallOrderDTO.productName}
</if>
<if test="recallOrderDTO.policyNo != null and recallOrderDTO.policyNo != '' ">
and t.policy_no = #{recallOrderDTO.policyNo}
</if>
<if test="recallOrderDTO.holderName != null and recallOrderDTO.holderName != '' ">
and t.holder_name = #{recallOrderDTO.holderName}
</if>
<if test="recallOrderDTO.holderPhone != null and recallOrderDTO.holderPhone != '' ">
and t.holder_phone = #{recallOrderDTO.holderPhone}
</if>
<if test="recallOrderDTO.supplierName != null and recallOrderDTO.supplierName != '' ">
and t.supplier_name = #{recallOrderDTO.supplierName}
</if>
<if test="recallOrderDTO.complete != null and recallOrderDTO.complete != '' ">
and t.complete = #{recallOrderDTO.complete}
</if>
<if test="recallOrderDTO.archived != null and recallOrderDTO.archived != '' ">
and t.archived = #{recallOrderDTO.archived}
</if>
<if test="recallOrderDTO.completeDate != null ">
and t.complete_date = #{recallOrderDTO.completeDate}
</if>
<if test="recallOrderDTO.archivedDate != null ">
and t.archived_date = #{recallOrderDTO.archivedDate}
</if>
<if test="recallOrderDTO.startDate != null and recallOrderDTO.startDate != '' ">
and t.start_date = #{recallOrderDTO.startDate}
</if>
<if test="recallOrderDTO.endDate != null and recallOrderDTO.endDate != '' ">
and t.end_date = #{recallOrderDTO.endDate}
</if>
<if test="recallOrderDTO.fileId != null and recallOrderDTO.fileId != '' ">
and t.file_id = #{recallOrderDTO.fileId}
</if>
<if test="recallOrderDTO.fileUrl != null and recallOrderDTO.fileUrl != '' ">
and t.file_url = #{recallOrderDTO.fileUrl}
</if>
<if test="recallOrderDTO.orderId != null and recallOrderDTO.orderId != '' ">
and t.order_id = #{recallOrderDTO.orderId}
</if>
<if test="recallOrderDTO.traceId != null and recallOrderDTO.traceId != '' ">
and t.trace_id = #{recallOrderDTO.traceId}
</if>
<if test="recallOrderDTO.appKey != null and recallOrderDTO.appKey != '' ">
and t.app_key = #{recallOrderDTO.appKey}
</if>
</select>
<select id="queryRecallOrderListNoPage"
parameterType="com.wabestway.recall.trace.dto.RecallOrderDTO"
resultType="com.wabestway.recall.trace.vo.RecallOrderVO">
select
<include refid="queryRecallOrderSql"/>
from recall_order t
where 1 = 1
<if test="recallOrderDTO.id != null and recallOrderDTO.id != '' ">
and t.id = #{recallOrderDTO.id}
</if>
<if test="recallOrderDTO.productCode != null and recallOrderDTO.productCode != '' ">
and t.product_code = #{recallOrderDTO.productCode}
</if>
<if test="recallOrderDTO.productName != null and recallOrderDTO.productName != '' ">
and t.product_name = #{recallOrderDTO.productName}
</if>
<if test="recallOrderDTO.policyNo != null and recallOrderDTO.policyNo != '' ">
and t.policy_no = #{recallOrderDTO.policyNo}
</if>
<if test="recallOrderDTO.holderName != null and recallOrderDTO.holderName != '' ">
and t.holder_name = #{recallOrderDTO.holderName}
</if>
<if test="recallOrderDTO.holderPhone != null and recallOrderDTO.holderPhone != '' ">
and t.holder_phone = #{recallOrderDTO.holderPhone}
</if>
<if test="recallOrderDTO.supplierName != null and recallOrderDTO.supplierName != '' ">
and t.supplier_name = #{recallOrderDTO.supplierName}
</if>
<if test="recallOrderDTO.complete != null and recallOrderDTO.complete != '' ">
and t.complete = #{recallOrderDTO.complete}
</if>
<if test="recallOrderDTO.archived != null and recallOrderDTO.archived != '' ">
and t.archived = #{recallOrderDTO.archived}
</if>
<if test="recallOrderDTO.completeDate != null ">
and t.complete_date = #{recallOrderDTO.completeDate}
</if>
<if test="recallOrderDTO.archivedDate != null ">
and t.archived_date = #{recallOrderDTO.archivedDate}
</if>
<if test="recallOrderDTO.startDate != null and recallOrderDTO.startDate != '' ">
and t.start_date = #{recallOrderDTO.startDate}
</if>
<if test="recallOrderDTO.endDate != null and recallOrderDTO.endDate != '' ">
and t.end_date = #{recallOrderDTO.endDate}
</if>
<if test="recallOrderDTO.fileId != null and recallOrderDTO.fileId != '' ">
and t.file_id = #{recallOrderDTO.fileId}
</if>
<if test="recallOrderDTO.fileUrl != null and recallOrderDTO.fileUrl != '' ">
and t.file_url = #{recallOrderDTO.fileUrl}
</if>
<if test="recallOrderDTO.orderId != null and recallOrderDTO.orderId != '' ">
and t.order_id = #{recallOrderDTO.orderId}
</if>
<if test="recallOrderDTO.traceId != null and recallOrderDTO.traceId != '' ">
and t.trace_id = #{recallOrderDTO.traceId}
</if>
<if test="recallOrderDTO.appKey != null and recallOrderDTO.appKey != '' ">
and t.app_key = #{recallOrderDTO.appKey}
</if>
</select>
<select id="queryRecallOrderById" resultType="com.wabestway.recall.trace.vo.RecallOrderVO">
select
<include refid="queryRecallOrderSql"/>
from recall_order t
where t.id= #{id}
</select>
<update id="updateRecallOrderById" parameterType="com.wabestway.recall.trace.entity.RecallOrderEntity">
update recall_order t
<set>
<if test="recallOrder.id != null and recallOrder.id != '' ">
t.id = #{recallOrder.id},
</if>
<if test="recallOrder.productCode != null and recallOrder.productCode != '' ">
t.product_code = #{recallOrder.productCode},
</if>
<if test="recallOrder.productName != null and recallOrder.productName != '' ">
t.product_name = #{recallOrder.productName},
</if>
<if test="recallOrder.policyNo != null and recallOrder.policyNo != '' ">
t.policy_no = #{recallOrder.policyNo},
</if>
<if test="recallOrder.holderName != null and recallOrder.holderName != '' ">
t.holder_name = #{recallOrder.holderName},
</if>
<if test="recallOrder.holderPhone != null and recallOrder.holderPhone != '' ">
t.holder_phone = #{recallOrder.holderPhone},
</if>
<if test="recallOrder.supplierName != null and recallOrder.supplierName != '' ">
t.supplier_name = #{recallOrder.supplierName},
</if>
<if test="recallOrder.complete != null and recallOrder.complete != '' ">
t.complete = #{recallOrder.complete},
</if>
<if test="recallOrder.archived != null and recallOrder.archived != '' ">
t.archived = #{recallOrder.archived},
</if>
<if test="recallOrder.completeDate != null ">
t.complete_date = #{recallOrder.completeDate},
</if>
<if test="recallOrder.archivedDate != null ">
t.archived_date = #{recallOrder.archivedDate},
</if>
<if test="recallOrder.startDate != null and recallOrder.startDate != '' ">
t.start_date = #{recallOrder.startDate},
</if>
<if test="recallOrder.endDate != null and recallOrder.endDate != '' ">
t.end_date = #{recallOrder.endDate},
</if>
<if test="recallOrder.fileId != null and recallOrder.fileId != '' ">
t.file_id = #{recallOrder.fileId},
</if>
<if test="recallOrder.fileUrl != null and recallOrder.fileUrl != '' ">
t.file_url = #{recallOrder.fileUrl},
</if>
<if test="recallOrder.orderId != null and recallOrder.orderId != '' ">
t.order_id = #{recallOrder.orderId},
</if>
<if test="recallOrder.traceId != null and recallOrder.traceId != '' ">
t.trace_id = #{recallOrder.traceId},
</if>
<if test="recallOrder.appKey != null and recallOrder.appKey != '' ">
t.app_key = #{recallOrder.appKey},
</if>
<if test="recallOrder.updateBy != null and recallOrder.updateBy != '' ">
t.update_by = #{recallOrder.updateBy},
</if>
<if test="recallOrder.updateTime != null ">
t.update_time = #{recallOrder.updateTime},
</if>
</set>
where t.id= #{recallOrder.id}
</update>
</mapper>
@@ -0,0 +1,117 @@
<?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.wabestway.recall.trace.dao.RecallRecordDao">
<sql id="queryRecallRecordSql">
t.id id,
t.product_code productCode,
t.product_name productName,
t.module module,
t.content content,
t.events events,
t.trace_id traceId,
t.create_by createBy,
t.create_time createTime
</sql>
<select id="queryRecallRecordByCondition"
parameterType="com.wabestway.recall.trace.dto.RecallRecordDTO"
resultType="com.wabestway.recall.trace.vo.RecallRecordVO">
select
<include refid="queryRecallRecordSql"/>
from
recall_record t
where 1 = 1
<if test="recallRecordDTO.id != null and recallRecordDTO.id != '' ">
and t.id = #{recallRecordDTO.id}
</if>
<if test="recallRecordDTO.productCode != null and recallRecordDTO.productCode != '' ">
and t.product_code = #{recallRecordDTO.productCode}
</if>
<if test="recallRecordDTO.productName != null and recallRecordDTO.productName != '' ">
and t.product_name = #{recallRecordDTO.productName}
</if>
<if test="recallRecordDTO.module != null and recallRecordDTO.module != '' ">
and t.module = #{recallRecordDTO.module}
</if>
<if test="recallRecordDTO.content != null and recallRecordDTO.content != '' ">
and t.content = #{recallRecordDTO.content}
</if>
<if test="recallRecordDTO.events != null ">
and t.events = #{recallRecordDTO.events}
</if>
<if test="recallRecordDTO.traceId != null and recallRecordDTO.traceId != '' ">
and t.trace_id = #{recallRecordDTO.traceId}
</if>
</select>
<select id="queryRecallRecordListNoPage"
parameterType="com.wabestway.recall.trace.dto.RecallRecordDTO"
resultType="com.wabestway.recall.trace.vo.RecallRecordVO">
select
<include refid="queryRecallRecordSql"/>
from recall_record t
where 1 = 1
<if test="recallRecordDTO.id != null and recallRecordDTO.id != '' ">
and t.id = #{recallRecordDTO.id}
</if>
<if test="recallRecordDTO.productCode != null and recallRecordDTO.productCode != '' ">
and t.product_code = #{recallRecordDTO.productCode}
</if>
<if test="recallRecordDTO.productName != null and recallRecordDTO.productName != '' ">
and t.product_name = #{recallRecordDTO.productName}
</if>
<if test="recallRecordDTO.module != null and recallRecordDTO.module != '' ">
and t.module = #{recallRecordDTO.module}
</if>
<if test="recallRecordDTO.content != null and recallRecordDTO.content != '' ">
and t.content = #{recallRecordDTO.content}
</if>
<if test="recallRecordDTO.events != null ">
and t.events = #{recallRecordDTO.events}
</if>
<if test="recallRecordDTO.traceId != null and recallRecordDTO.traceId != '' ">
and t.trace_id = #{recallRecordDTO.traceId}
</if>
</select>
<select id="queryRecallRecordById" resultType="com.wabestway.recall.trace.vo.RecallRecordVO">
select
<include refid="queryRecallRecordSql"/>
from recall_record t
where t.id= #{id}
</select>
<update id="updateRecallRecordById" parameterType="com.wabestway.recall.trace.entity.RecallRecordEntity">
update recall_record t
<set>
<if test="recallRecord.id != null and recallRecord.id != '' ">
t.id = #{recallRecord.id},
</if>
<if test="recallRecord.productCode != null and recallRecord.productCode != '' ">
t.product_code = #{recallRecord.productCode},
</if>
<if test="recallRecord.productName != null and recallRecord.productName != '' ">
t.product_name = #{recallRecord.productName},
</if>
<if test="recallRecord.module != null and recallRecord.module != '' ">
t.module = #{recallRecord.module},
</if>
<if test="recallRecord.content != null and recallRecord.content != '' ">
t.content = #{recallRecord.content},
</if>
<if test="recallRecord.events != null ">
t.events = #{recallRecord.events},
</if>
<if test="recallRecord.traceId != null and recallRecord.traceId != '' ">
t.trace_id = #{recallRecord.traceId},
</if>
</set>
where t.id= #{recallRecord.id}
</update>
</mapper>
+38
View File
@@ -0,0 +1,38 @@
target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/
### IntelliJ IDEA ###
.idea/modules.xml
.idea/jarRepositories.xml
.idea/compiler.xml
.idea/libraries/
*.iws
*.iml
*.ipr
### Eclipse ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
!**/src/main/**/build/
!**/src/test/**/build/
### VS Code ###
.vscode/
### Mac OS ###
.DS_Store
+105
View File
@@ -0,0 +1,105 @@
<?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">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.wabestway.recall</groupId>
<artifactId>afis-recall</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>afis-recall-web</artifactId>
<packaging>jar</packaging>
<properties>
<java.version>1.8</java.version>
<spring-cloud.version>Hoxton.SR9</spring-cloud.version>
<spring-cloud-alibaba.version>2.2.3.RELEASE</spring-cloud-alibaba.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
</dependency>
<dependency>
<groupId>com.wabestway.engine</groupId>
<artifactId>afis-engine-api</artifactId>
<version>2.5</version>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-mongodb-reactive</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webflux</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.projectreactor</groupId>
<artifactId>reactor-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>2.0.17</version>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring-cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-alibaba-dependencies</artifactId>
<version>${spring-cloud-alibaba.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<excludes>
<exclude>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
</project>
@@ -0,0 +1,69 @@
package com.wabestway.recall.trace.controller;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import com.wabestway.recall.trace.dto.RecallOrderDTO;
import com.wabestway.recall.trace.vo.RecallOrderVO;
import com.wabestway.recall.trace.service.RecallOrderApiService;
import com.wabestway.commons.http.Paging;
import com.wabestway.commons.http.ResObj;
/**
*
*
* @author wangH
* @company 北京华焱坤泰科技有限公司
* @Time 2023-05-06 17:37:03
*/
@RestController
@RequestMapping("/trace/recallOrder")
@Api(tags = {"-接口"}, description = "-接口")
public class RecallOrderController {
@Autowired
private RecallOrderApiService recallOrderApiService;
/**
* 列表
*/
@PostMapping("/list")
@ApiOperation(value = "分页列表查询", notes = "条件分页查询列表", httpMethod = "POST")
public ResObj<Paging<RecallOrderVO>> list(@RequestBody RecallOrderDTO paramRequest) {
return recallOrderApiService.list(paramRequest);
}
/**
* 信息
*/
@GetMapping("/info/{id}")
@ApiOperation(value = "根据id查详情", notes = "根据id查详情", httpMethod = "GET")
public ResObj<RecallOrderVO> info(@PathVariable("id") String id) {
return recallOrderApiService.getRecallOrder(id);
}
/**
* 保存
*/
@PostMapping("/save")
@ApiOperation(value = "保存", notes = "保存", httpMethod = "POST")
public ResObj saveRecallOrder(@RequestBody RecallOrderDTO paramRequest) {
return recallOrderApiService.saveRecallOrder(paramRequest);
}
/**
* 修改
*/
@PostMapping("/update")
@ApiOperation(value = "修改", notes = "修改", httpMethod = "POST")
public ResObj updateRecallOrder(@RequestBody RecallOrderDTO paramRequest) {
return recallOrderApiService.updateRecallOrder(paramRequest);
}
@PostMapping("/changeStatus")
@ApiOperation(value = "启禁用更新", notes = "启禁用更新", httpMethod = "POST")
public ResObj changeStatus(@RequestBody RecallOrderDTO paramRequest) {
return recallOrderApiService.changeStatus(paramRequest.getId(), paramRequest.getStatus());
}
}
@@ -0,0 +1,69 @@
package com.wabestway.recall.trace.controller;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import com.wabestway.recall.trace.dto.RecallRecordDTO;
import com.wabestway.recall.trace.vo.RecallRecordVO;
import com.wabestway.recall.trace.service.RecallRecordApiService;
import com.wabestway.commons.http.Paging;
import com.wabestway.commons.http.ResObj;
/**
*
*
* @author wangH
* @company 北京华焱坤泰科技有限公司
* @Time 2023-05-06 17:37:03
*/
@RestController
@RequestMapping("/trace/recallRecord")
@Api(tags = {"-接口"}, description = "-接口")
public class RecallRecordController {
@Autowired
private RecallRecordApiService recallRecordApiService;
/**
* 列表
*/
@PostMapping("/list")
@ApiOperation(value = "分页列表查询", notes = "条件分页查询列表", httpMethod = "POST")
public ResObj<Paging<RecallRecordVO>> list(@RequestBody RecallRecordDTO paramRequest) {
return recallRecordApiService.list(paramRequest);
}
/**
* 信息
*/
@GetMapping("/info/{id}")
@ApiOperation(value = "根据id查详情", notes = "根据id查详情", httpMethod = "GET")
public ResObj<RecallRecordVO> info(@PathVariable("id") String id) {
return recallRecordApiService.getRecallRecord(id);
}
/**
* 保存
*/
@PostMapping("/save")
@ApiOperation(value = "保存", notes = "保存", httpMethod = "POST")
public ResObj saveRecallRecord(@RequestBody RecallRecordDTO paramRequest) {
return recallRecordApiService.saveRecallRecord(paramRequest);
}
/**
* 修改
*/
@PostMapping("/update")
@ApiOperation(value = "修改", notes = "修改", httpMethod = "POST")
public ResObj updateRecallRecord(@RequestBody RecallRecordDTO paramRequest) {
return recallRecordApiService.updateRecallRecord(paramRequest);
}
@PostMapping("/changeStatus")
@ApiOperation(value = "启禁用更新", notes = "启禁用更新", httpMethod = "POST")
public ResObj changeStatus(@RequestBody RecallRecordDTO paramRequest) {
return recallRecordApiService.changeStatus(paramRequest.getId(), paramRequest.getStatus());
}
}
@@ -0,0 +1,54 @@
package com.wabestway.recall.trace.service;
import java.util.List;
import com.wabestway.recall.trace.dto.RecallOrderDTO;
import com.wabestway.recall.trace.vo.RecallOrderVO;
import com.wabestway.commons.http.Paging;
import com.wabestway.commons.http.ResObj;
/**
*
*
* @author wangH
* @company 北京华焱坤泰科技有限公司
* @Time 2023-05-06 17:37:03
*/
public interface RecallOrderApiService {
/**
* 列表
* @param paramReq
* @return
*/
ResObj<Paging<RecallOrderVO>> list(RecallOrderDTO paramReq);
/**
* 查询详情
* @param id
* @return
*/
ResObj<RecallOrderVO> getRecallOrder(String id);
/**
* 保存
* @param paramReq
* @return
*/
ResObj saveRecallOrder(RecallOrderDTO paramReq);
/**
* 修改
* @param paramReq
* @return
*/
ResObj updateRecallOrder(RecallOrderDTO paramReq);
/**
* 启禁用
* @param id
* @param status
* @return
*/
ResObj changeStatus(String id, String status);
}
@@ -0,0 +1,54 @@
package com.wabestway.recall.trace.service;
import java.util.List;
import com.wabestway.recall.trace.dto.RecallRecordDTO;
import com.wabestway.recall.trace.vo.RecallRecordVO;
import com.wabestway.commons.http.Paging;
import com.wabestway.commons.http.ResObj;
/**
*
*
* @author wangH
* @company 北京华焱坤泰科技有限公司
* @Time 2023-05-06 17:37:03
*/
public interface RecallRecordApiService {
/**
* 列表
* @param paramReq
* @return
*/
ResObj<Paging<RecallRecordVO>> list(RecallRecordDTO paramReq);
/**
* 查询详情
* @param id
* @return
*/
ResObj<RecallRecordVO> getRecallRecord(String id);
/**
* 保存
* @param paramReq
* @return
*/
ResObj saveRecallRecord(RecallRecordDTO paramReq);
/**
* 修改
* @param paramReq
* @return
*/
ResObj updateRecallRecord(RecallRecordDTO paramReq);
/**
* 启禁用
* @param id
* @param status
* @return
*/
ResObj changeStatus(String id, String status);
}
@@ -0,0 +1,85 @@
package com.wabestway.recall.trace.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.wabestway.commons.http.Paging;
import com.wabestway.commons.http.ResObj;
import com.wabestway.commons.enums.DataValidEnum;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.BeanUtils;
import com.wabestway.ins.utils.UUIDUtil;
import com.wabestway.recall.trace.entity.RecallOrderEntity;
import com.wabestway.recall.trace.dto.RecallOrderDTO;
import com.wabestway.recall.trace.vo.RecallOrderVO;
import com.wabestway.recall.trace.service.RecallOrderApiService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.wabestway.recall.trace.util.HeaderDataUtil;
/**
*
*
* @author wangH
* @company 北京华焱坤泰科技有限公司
* @Time 2023-05-06 17:37:03
*/
@Service
public class RecallOrderApiServiceImpl implements RecallOrderApiService {
@Autowired
private RecallOrderService recallOrderService;
@Override
public ResObj<Paging<RecallOrderVO>> list(RecallOrderDTO paramReq) {
IPage<RecallOrderVO> resultPage = recallOrderService.queryRecallOrderByCondition(paramReq.getPage(), paramReq.getPageSize(), paramReq);
Paging<RecallOrderVO> paging = new Paging(resultPage.getRecords(), paramReq.getPage(), resultPage.getSize(), resultPage.getTotal());
return ResObj.ok(paging);
}
@Override
public ResObj<RecallOrderVO> getRecallOrder(String id) {
RecallOrderVO recallOrderVO = recallOrderService.queryRecallOrderById(id);
return ResObj.ok(recallOrderVO);
}
@Transactional
@Override
public ResObj saveRecallOrder(RecallOrderDTO paramReq) {
RecallOrderEntity recallOrder = new RecallOrderEntity();
BeanUtils.copyProperties(paramReq, recallOrder);
recallOrder.setId(UUIDUtil.generate());//赋值id
recallOrder.setStatus(DataValidEnum.VALID.getCode());
recallOrder.setCreateBy(HeaderDataUtil.getUserId());//创建人
recallOrder.setCreateTime(System.currentTimeMillis());//创建时间
recallOrder.setUpdateBy(HeaderDataUtil.getUserId());//更新人
recallOrder.setUpdateTime(System.currentTimeMillis());//更新时间
recallOrderService.save(recallOrder);
return ResObj.ok();
}
@Transactional
@Override
public ResObj updateRecallOrder(RecallOrderDTO paramReq) {
RecallOrderEntity recallOrder = new RecallOrderEntity();
BeanUtils.copyProperties(paramReq, recallOrder);
recallOrder.setUpdateBy(HeaderDataUtil.getUserId());//更新人
recallOrder.setUpdateTime(System.currentTimeMillis());//更新时间
recallOrderService.updateById(recallOrder);
return ResObj.ok();
}
@Transactional
@Override
public ResObj changeStatus(String id, String status) {
RecallOrderEntity recallOrder = new RecallOrderEntity();
recallOrder.setId(id);
recallOrder.setStatus(status);
recallOrder.setUpdateBy(HeaderDataUtil.getUserId());
recallOrder.setUpdateTime(System.currentTimeMillis());
recallOrderService.updateRecallOrderById(recallOrder);
return ResObj.ok();
}
}
@@ -0,0 +1,85 @@
package com.wabestway.recall.trace.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.wabestway.commons.http.Paging;
import com.wabestway.commons.http.ResObj;
import com.wabestway.commons.enums.DataValidEnum;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.BeanUtils;
import com.wabestway.ins.utils.UUIDUtil;
import com.wabestway.recall.trace.entity.RecallRecordEntity;
import com.wabestway.recall.trace.dto.RecallRecordDTO;
import com.wabestway.recall.trace.vo.RecallRecordVO;
import com.wabestway.recall.trace.service.RecallRecordApiService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.wabestway.recall.trace.util.HeaderDataUtil;
/**
*
*
* @author wangH
* @company 北京华焱坤泰科技有限公司
* @Time 2023-05-06 17:37:03
*/
@Service
public class RecallRecordApiServiceImpl implements RecallRecordApiService {
@Autowired
private RecallRecordService recallRecordService;
@Override
public ResObj<Paging<RecallRecordVO>> list(RecallRecordDTO paramReq) {
IPage<RecallRecordVO> resultPage = recallRecordService.queryRecallRecordByCondition(paramReq.getPage(), paramReq.getPageSize(), paramReq);
Paging<RecallRecordVO> paging = new Paging(resultPage.getRecords(), paramReq.getPage(), resultPage.getSize(), resultPage.getTotal());
return ResObj.ok(paging);
}
@Override
public ResObj<RecallRecordVO> getRecallRecord(String id) {
RecallRecordVO recallRecordVO = recallRecordService.queryRecallRecordById(id);
return ResObj.ok(recallRecordVO);
}
@Transactional
@Override
public ResObj saveRecallRecord(RecallRecordDTO paramReq) {
RecallRecordEntity recallRecord = new RecallRecordEntity();
BeanUtils.copyProperties(paramReq, recallRecord);
recallRecord.setId(UUIDUtil.generate());//赋值id
recallRecord.setStatus(DataValidEnum.VALID.getCode());
recallRecord.setCreateBy(HeaderDataUtil.getUserId());//创建人
recallRecord.setCreateTime(System.currentTimeMillis());//创建时间
recallRecord.setUpdateBy(HeaderDataUtil.getUserId());//更新人
recallRecord.setUpdateTime(System.currentTimeMillis());//更新时间
recallRecordService.save(recallRecord);
return ResObj.ok();
}
@Transactional
@Override
public ResObj updateRecallRecord(RecallRecordDTO paramReq) {
RecallRecordEntity recallRecord = new RecallRecordEntity();
BeanUtils.copyProperties(paramReq, recallRecord);
recallRecord.setUpdateBy(HeaderDataUtil.getUserId());//更新人
recallRecord.setUpdateTime(System.currentTimeMillis());//更新时间
recallRecordService.updateById(recallRecord);
return ResObj.ok();
}
@Transactional
@Override
public ResObj changeStatus(String id, String status) {
RecallRecordEntity recallRecord = new RecallRecordEntity();
recallRecord.setId(id);
recallRecord.setStatus(status);
recallRecord.setUpdateBy(HeaderDataUtil.getUserId());
recallRecord.setUpdateTime(System.currentTimeMillis());
recallRecordService.updateRecallRecordById(recallRecord);
return ResObj.ok();
}
}
+34 -85
View File
@@ -1,107 +1,56 @@
<?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">
<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">
<modelVersion>4.0.0</modelVersion>
<groupId>com.wabestway.recall</groupId>
<artifactId>afis-recall</artifactId>
<packaging>pom</packaging>
<version>1.0-SNAPSHOT</version>
<modules>
<module>afis-recall-web</module>
<module>afis-recall-service</module>
</modules>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.12.RELEASE</version>
<version>2.2.11.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.wabestway.recall</groupId>
<artifactId>afis-recall</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>afis-recall</name>
<description>afis-recall</description>
<properties>
<java.version>1.8</java.version>
<spring-cloud.version>Hoxton.SR9</spring-cloud.version>
<spring-cloud-alibaba.version>2.2.3.RELEASE</spring-cloud-alibaba.version>
<knife4j.version>2.0.3</knife4j.version>
<swagger.version>2.9.2</swagger.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>${swagger.version}</version>
</dependency>
<dependency>
<groupId>com.wabestway.engine</groupId>
<artifactId>afis-engine-api</artifactId>
<version>2.5</version>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>${swagger.version}</version>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-mongodb-reactive</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webflux</artifactId>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-spring-boot-starter</artifactId>
<!--在引用时请在maven中央仓库搜索最新版本号-->
<version>${knife4j.version}</version>
</dependency>
<!--lombok插件 -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.6</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.projectreactor</groupId>
<artifactId>reactor-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>2.0.17</version>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring-cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-alibaba-dependencies</artifactId>
<version>${spring-cloud-alibaba.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<excludes>
<exclude>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
</project>
</project>
-7
View File
@@ -1,7 +0,0 @@
server:
port: 9235
spring:
data:
mongodb:
uri: mongodb://localhost:27017/recall
@@ -1,7 +0,0 @@
server:
port: 9235
spring:
data:
mongodb:
uri: mongodb://localhost:27017/recall
@@ -1 +0,0 @@
spring.data.mongodb.uri=mongodb://localhost:27017/recall
-1
View File
@@ -1 +0,0 @@
-16
View File
@@ -1,16 +0,0 @@
spring:
application:
name: afis-recall
cloud:
nacos:
config:
file-extension: yaml
server-addr: 192.168.0.141:8848
namespace: ns-car-dev
discovery:
#Nacos服务注册中心地址
server-addr: 192.168.0.141:8848
namespace: ns-car-dev
main:
allow-bean-definition-overriding: true
-17
View File
@@ -1,17 +0,0 @@
spring:
profiles: prod
application:
name: afis-recall
cloud:
nacos:
config:
file-extension: yaml
server-addr: 192.168.0.249:8848,192.168.0.203:8848
namespace: yxb-prod
discovery:
#Nacos服务注册中心地址
server-addr: 192.168.0.249:8848,192.168.0.203:8848
namespace: yxb-prod
main:
allow-bean-definition-overriding: true
-16
View File
@@ -1,16 +0,0 @@
spring:
profiles: sit
application:
name: afis-recall
cloud:
nacos:
config:
file-extension: yaml
server-addr: 10.255.255.177:8848
namespace: ns-car-sit
discovery:
#Nacos服务注册中心地址
server-addr: 10.255.255.177:8848
namespace: ns-car-sit
main:
allow-bean-definition-overriding: true
-16
View File
@@ -1,16 +0,0 @@
spring:
profiles: uat
application:
name: afis-recall
cloud:
nacos:
config:
file-extension: yaml
server-addr: 192.168.1.128:9010
namespace: ns-car-uat
discovery:
#Nacos服务注册中心地址
server-addr: 192.168.1.128:9010
namespace: ns-car-uat
main:
allow-bean-definition-overriding: true
-3
View File
@@ -1,3 +0,0 @@
spring:
profiles:
active: native
@@ -1,69 +0,0 @@
package com.wabestway.recall;
import com.alibaba.fastjson.JSONArray;
import org.junit.jupiter.api.Test;
import javax.script.*;
import java.io.*;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Base64;
import java.util.Comparator;
import java.util.List;
import java.util.zip.GZIPInputStream;
public class FFmpeg {
@Test
public void TestMp4() throws IOException {
String jsonData = new String(Files.readAllBytes(Paths.get("C:","Users/Administrator/Desktop","traces.json")), StandardCharsets.UTF_8);
// 创建临时目录
Path tempDir = null;
try {
tempDir = Files.createTempDirectory("example");
} catch (IOException e) {
e.printStackTrace();
}
System.out.println("Created temporary directory: " + tempDir);
try {
File tempFile = File.createTempFile("traces", ".json", tempDir.toFile());
FileWriter fw = new FileWriter(tempFile);
BufferedWriter bw = new BufferedWriter(fw);
bw.write(jsonData);
bw.flush();
bw.close();
fw.close();
String[] command = {"C:\\Users\\Administrator\\AppData\\Roaming\\npm\\ts-node", "E:\\Develop\\trace-transform\\src\\index.ts"};
ProcessBuilder processBuilder = new ProcessBuilder(command);
processBuilder.directory(tempDir.toFile());
// 在临时目录下执行命令
Process process = processBuilder.start();
// 读取命令输出
BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()));
String line;
while ((line = reader.readLine()) != null) {
System.out.println(line);
}
reader.close();
// 等待命令执行完成
int exitCode = process.waitFor();
System.out.println("Command exited with code " + exitCode);
} catch (IOException | InterruptedException e) {
e.printStackTrace();
} finally {
// 删除临时目录
Files.walk(tempDir)
.sorted(Comparator.reverseOrder())
.map(Path::toFile)
.forEach(File::delete);
}
}
}
@@ -1,15 +0,0 @@
package com.wabestway.recall;
import org.junit.Test;
import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
public class JSEngine {
@Test
public void TestEngine(){
ScriptEngineManager manager = new ScriptEngineManager();
ScriptEngine engine = manager.getEngineByName("js");
System.out.printf(engine.toString());
}
}