Merge branch 'release' into 'master'
Release See merge request wanghao/afis-recall!8
This commit is contained in:
@@ -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
|
||||
@@ -0,0 +1,100 @@
|
||||
<?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>
|
||||
|
||||
<groupId>com.wabestway.recall</groupId>
|
||||
<artifactId>afis-recall-api</artifactId>
|
||||
<version>1.0.0</version>
|
||||
|
||||
|
||||
<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>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.wabestway.common</groupId>
|
||||
<artifactId>afis-web-common</artifactId>
|
||||
<version>1.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-openfeign</artifactId>
|
||||
<version>2.2.3.RELEASE</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.google.code.gson</groupId>
|
||||
<artifactId>gson</artifactId>
|
||||
<version>2.8.6</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.springfox</groupId>
|
||||
<artifactId>springfox-swagger2</artifactId>
|
||||
<version>3.0.0</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-models</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-models</artifactId>
|
||||
<version>1.5.22</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<!--lombok插件 -->
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>1.18.6</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-openfeign-core</artifactId>
|
||||
<version>2.2.3.RELEASE</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
<id>release</id>
|
||||
<name>Nexus Release Repository</name>
|
||||
<url>http://dev.wabestway.com/nexus/repository/maven-releases/</url>
|
||||
</repository>
|
||||
<snapshotRepository>
|
||||
<!-- 需与server id一致 -->
|
||||
<id>snapshot</id>
|
||||
<name>Nexus Snapshot Repository</name>
|
||||
<url>http://dev.wabestway.com/nexus/repository/maven-snapshots/</url>
|
||||
</snapshotRepository>
|
||||
</distributionManagement>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>none</phase>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.wabestway.recall.api.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class TraceRecord {
|
||||
/**
|
||||
* 业务订单ID
|
||||
*/
|
||||
private String orderId;
|
||||
/**
|
||||
* 产品编码
|
||||
*/
|
||||
private String supplierProductCode;
|
||||
/**
|
||||
* 产品名称
|
||||
*/
|
||||
private String supplierProductName;
|
||||
/**
|
||||
* 保单号
|
||||
*/
|
||||
private String policyNo;
|
||||
/**
|
||||
* 投保人名称
|
||||
*/
|
||||
private String holderName;
|
||||
/**
|
||||
* 投保人手机号
|
||||
*/
|
||||
private String holderPhone;
|
||||
/**
|
||||
* 保险公司名称
|
||||
*/
|
||||
private String supplierName;
|
||||
/**
|
||||
* 保单起始日期
|
||||
*/
|
||||
private String startDate;
|
||||
/**
|
||||
* 保单结束日期
|
||||
*/
|
||||
private String endDate;
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.wabestway.recall.api.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class TraceUpDTO {
|
||||
private String batchId;
|
||||
private Long batchTime;
|
||||
List<TraceRecord> records;
|
||||
}
|
||||
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
package com.wabestway.recall.api.fallback;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.wabestway.commons.http.ResObj;
|
||||
import com.wabestway.recall.api.dto.TraceUpDTO;
|
||||
import com.wabestway.recall.api.feign.TraceFeignClient;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
@Slf4j
|
||||
public class TraceFeignClientFallback implements TraceFeignClient {
|
||||
|
||||
@Override
|
||||
public ResObj batchTraceUp(TraceUpDTO traceUpDTO) {
|
||||
log.error("回溯业务数据更新:{}", JSON.toJSONString(traceUpDTO));
|
||||
return ResObj.fail("服务不可用");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.wabestway.recall.api.feign;
|
||||
|
||||
import com.wabestway.commons.http.ResObj;
|
||||
import com.wabestway.recall.api.dto.TraceUpDTO;
|
||||
import com.wabestway.recall.api.fallback.TraceFeignClientFallback;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
|
||||
@FeignClient(value = "afis-recall", fallback = TraceFeignClientFallback.class)
|
||||
public interface TraceFeignClient {
|
||||
@RequestMapping(method = RequestMethod.POST, value ="/api/traceUp")
|
||||
ResObj batchTraceUp(@RequestBody TraceUpDTO traceUpDTO);
|
||||
}
|
||||
@@ -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
|
||||
@@ -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>1.0-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.RecallApiEntity;
|
||||
import com.wabestway.recall.trace.dto.RecallApiDTO;
|
||||
import com.wabestway.recall.trace.vo.RecallApiVO;
|
||||
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-15 09:59:12
|
||||
*/
|
||||
@Mapper
|
||||
public interface RecallApiDao extends BaseMapper<RecallApiEntity> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param page 分页对象
|
||||
* @param recallApiDTO
|
||||
* @return
|
||||
*/
|
||||
IPage<RecallApiVO> queryRecallApiByCondition(Page<RecallApiDTO> page, @Param("recallApiDTO")RecallApiDTO recallApiDTO);
|
||||
|
||||
/**
|
||||
* 条件查询,不分页
|
||||
* @param recallApiDTO
|
||||
* @return
|
||||
*/
|
||||
List<RecallApiVO> queryRecallApiListNoPage(@Param("recallApiDTO")RecallApiDTO recallApiDTO);
|
||||
|
||||
/**
|
||||
* 根据id更新
|
||||
* @param recallApi 对象
|
||||
* @return
|
||||
*/
|
||||
void updateRecallApiById(@Param("recallApi")RecallApiEntity recallApi);
|
||||
|
||||
/**
|
||||
* 根据id查询详情
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
RecallApiVO queryRecallApiById(@Param("id") String id);
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
package com.wabestway.recall.trace.dao;
|
||||
|
||||
import com.wabestway.recall.trace.entity.RecallProductEntity;
|
||||
import com.wabestway.recall.trace.dto.RecallProductDTO;
|
||||
import com.wabestway.recall.trace.vo.RecallProductVO;
|
||||
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-15 09:59:12
|
||||
*/
|
||||
@Mapper
|
||||
public interface RecallProductDao extends BaseMapper<RecallProductEntity> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param page 分页对象
|
||||
* @param recallProductDTO
|
||||
* @return
|
||||
*/
|
||||
IPage<RecallProductVO> queryRecallProductByCondition(Page<RecallProductDTO> page, @Param("recallProductDTO")RecallProductDTO recallProductDTO);
|
||||
|
||||
/**
|
||||
* 条件查询,不分页
|
||||
* @param recallProductDTO
|
||||
* @return
|
||||
*/
|
||||
List<RecallProductVO> queryRecallProductListNoPage(@Param("recallProductDTO")RecallProductDTO recallProductDTO);
|
||||
|
||||
/**
|
||||
* 根据id更新
|
||||
* @param recallProduct 对象
|
||||
* @return
|
||||
*/
|
||||
void updateRecallProductById(@Param("recallProduct")RecallProductEntity recallProduct);
|
||||
|
||||
/**
|
||||
* 根据id查询详情
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
RecallProductVO queryRecallProductById(@Param("id") String id);
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
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);
|
||||
|
||||
List<RecallRecordVO> queryTraceRecords(@Param("traceId") String traceId);
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
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-15 09:59:12
|
||||
*/
|
||||
@Data
|
||||
@ApiModel
|
||||
public class RecallApiDTO extends PageDTO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** */
|
||||
@ApiModelProperty(value = "")
|
||||
private String id;
|
||||
/** 可回溯调用appKey */
|
||||
@ApiModelProperty(value = "可回溯调用appKey")
|
||||
private String appKey;
|
||||
/** 调用方名称 */
|
||||
@ApiModelProperty(value = "调用方名称")
|
||||
private String name;
|
||||
/** 备注 */
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
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 = "租户ID")
|
||||
private String tenantId;
|
||||
/** 产品编码 */
|
||||
@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;
|
||||
|
||||
}
|
||||
+44
@@ -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-15 09:59:12
|
||||
*/
|
||||
@Data
|
||||
@ApiModel
|
||||
public class RecallProductDTO 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 supplierCode;
|
||||
/** 保险公司名称 */
|
||||
@ApiModelProperty(value = "保险公司名称")
|
||||
private String supplierName;
|
||||
/** 是否归档 0-否1-是 */
|
||||
@ApiModelProperty(value = "是否归档 0-否1-是 ")
|
||||
private String archived;
|
||||
/** 是否记录轨迹 0-否1-是 */
|
||||
@ApiModelProperty(value = "是否记录轨迹 0-否1-是 ")
|
||||
private String tracked;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package com.wabestway.recall.trace.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
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 List<String> events;
|
||||
/** 回溯记录跟踪ID */
|
||||
@ApiModelProperty(value = "回溯记录跟踪ID")
|
||||
private String traceId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
package com.wabestway.recall.trace.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* @author wangH
|
||||
* @company 北京华焱坤泰科技有限公司
|
||||
* @Time 2023-05-06 17:37:03
|
||||
*/
|
||||
@Data
|
||||
@ApiModel
|
||||
public class TraceDTO 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 List<String> events;
|
||||
/**
|
||||
* 回溯记录跟踪ID
|
||||
*/
|
||||
@ApiModelProperty(value = "回溯记录跟踪ID")
|
||||
private String traceId;
|
||||
/**
|
||||
* 回溯订单Id
|
||||
*/
|
||||
@ApiModelProperty(value = "回溯订单Id")
|
||||
private String orderId;
|
||||
/**
|
||||
* 是否最后提交
|
||||
*/
|
||||
@ApiModelProperty(value = "是否最后提交")
|
||||
private boolean last;
|
||||
/**
|
||||
* 调用接口appKey
|
||||
*/
|
||||
@ApiModelProperty(value = "调用接口appKey")
|
||||
private String appKey;
|
||||
|
||||
|
||||
}
|
||||
+38
@@ -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-15 09:59:12
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "recall_api")
|
||||
public class RecallApiEntity {
|
||||
/** */
|
||||
@TableId
|
||||
private String id;
|
||||
/** 可回溯调用appKey */
|
||||
private String appKey;
|
||||
/** 调用方名称 */
|
||||
private String name;
|
||||
/** 租户Id */
|
||||
private String tenantId;
|
||||
/** 备注 */
|
||||
private String remark;
|
||||
/** 创建人 */
|
||||
private String createBy;
|
||||
/** 创建时间 */
|
||||
private Long createTime;
|
||||
/** 更新人 */
|
||||
private String updateBy;
|
||||
/** 更新时间 */
|
||||
private Long updateTime;
|
||||
|
||||
}
|
||||
+66
@@ -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;
|
||||
|
||||
}
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
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-15 09:59:12
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "recall_product")
|
||||
public class RecallProductEntity {
|
||||
/** */
|
||||
@TableId
|
||||
private String id;
|
||||
/** 产品编码 */
|
||||
private String productCode;
|
||||
/** 产品名称 */
|
||||
private String productName;
|
||||
/** 保险公司编码 */
|
||||
private String supplierCode;
|
||||
/** 保险公司名称 */
|
||||
private String supplierName;
|
||||
/** 是否归档 0-否1-是 */
|
||||
private String archived;
|
||||
/** 是否记录轨迹 0-否1-是 */
|
||||
private String tracked;
|
||||
/** 租户Id */
|
||||
private String tenantId;
|
||||
/** 创建人 */
|
||||
private String createBy;
|
||||
/** 创建时间 */
|
||||
private Long createTime;
|
||||
/** 更新人 */
|
||||
private String updateBy;
|
||||
/** 更新时间 */
|
||||
private Long updateTime;
|
||||
|
||||
}
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
package com.wabestway.recall.trace.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
|
||||
import com.wabestway.recall.trace.handler.ListTypeHandler;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @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;
|
||||
/** 记录事件 */
|
||||
@TableField(typeHandler = ListTypeHandler.class)
|
||||
private List<String> events;
|
||||
/** 回溯记录跟踪ID */
|
||||
private String traceId;
|
||||
/** 创建人 */
|
||||
private String createBy;
|
||||
/** 创建时间 */
|
||||
private Long createTime;
|
||||
|
||||
}
|
||||
+73
@@ -0,0 +1,73 @@
|
||||
package com.wabestway.recall.trace.handler;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import org.apache.ibatis.type.JdbcType;
|
||||
import org.apache.ibatis.type.MappedJdbcTypes;
|
||||
import org.apache.ibatis.type.MappedTypes;
|
||||
import org.apache.ibatis.type.TypeHandler;
|
||||
|
||||
import java.sql.CallableStatement;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@MappedTypes(value = {List.class})
|
||||
@MappedJdbcTypes(value = {JdbcType.BLOB})
|
||||
public class ListTypeHandler implements TypeHandler<List<String>> {
|
||||
private ObjectMapper objectMapper = new ObjectMapper();
|
||||
|
||||
@Override
|
||||
public void setParameter(PreparedStatement ps, int i, List<String> strings, JdbcType jdbcType) throws SQLException {
|
||||
String jsonStr = null;
|
||||
try {
|
||||
jsonStr = objectMapper.writeValueAsString(strings);
|
||||
} catch (JsonProcessingException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
ps.setString(i, jsonStr);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getResult(ResultSet rs, String s) throws SQLException {
|
||||
String str = rs.getString(s);
|
||||
List<String> newList = new ArrayList<>();
|
||||
try {
|
||||
newList = objectMapper.readValue(str, new TypeReference<List<String>>() {
|
||||
});
|
||||
} catch (JsonProcessingException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
return newList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getResult(ResultSet rs, int i) throws SQLException {
|
||||
String str = rs.getString(i);
|
||||
List<String> newList = new ArrayList<>();
|
||||
try {
|
||||
newList = objectMapper.readValue(str, new TypeReference<List<String>>() {
|
||||
});
|
||||
} catch (JsonProcessingException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
return newList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getResult(CallableStatement cs, int i) throws SQLException {
|
||||
String str = cs.getString(i);
|
||||
List<String> newList = new ArrayList<>();
|
||||
try {
|
||||
newList = objectMapper.readValue(str, new TypeReference<List<String>>() {
|
||||
});
|
||||
} catch (JsonProcessingException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
return newList;
|
||||
}
|
||||
}
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
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.RecallApiEntity;
|
||||
import com.wabestway.recall.trace.dto.RecallApiDTO;
|
||||
import com.wabestway.recall.trace.vo.RecallApiVO;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author wangH
|
||||
* @company 北京华焱坤泰科技有限公司
|
||||
* @Time 2023-05-15 09:59:12
|
||||
*/
|
||||
public interface RecallApiService extends IService<RecallApiEntity> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param page 分页对象
|
||||
* @param recallApiDTO
|
||||
* @return
|
||||
*/
|
||||
IPage<RecallApiVO> queryRecallApiByCondition(long page, long size, RecallApiDTO recallApiDTO);
|
||||
|
||||
/**
|
||||
* 条件查询,不分页
|
||||
* @param recallApiDTO
|
||||
* @return
|
||||
*/
|
||||
List<RecallApiVO> queryRecallApiListNoPage(RecallApiDTO recallApiDTO);
|
||||
|
||||
/**
|
||||
* 根据id更新
|
||||
* @param recallApi 对象
|
||||
* @return
|
||||
*/
|
||||
void updateRecallApiById(RecallApiEntity recallApi);
|
||||
|
||||
/**
|
||||
* 根据id查询详情
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
RecallApiVO queryRecallApiById(String id);
|
||||
|
||||
/**
|
||||
* 查询调用app归属租户
|
||||
* @param appKey
|
||||
* @return
|
||||
*/
|
||||
String queryApiTenant(String appKey);
|
||||
}
|
||||
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
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;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @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);
|
||||
|
||||
/**
|
||||
* 根据id更新
|
||||
* @param recallOrder 对象
|
||||
* @return
|
||||
*/
|
||||
void updateRecallOrderById(RecallOrderEntity recallOrder);
|
||||
|
||||
/**
|
||||
* 根据id查询详情
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
RecallOrderVO queryRecallOrderById(String id);
|
||||
|
||||
/**
|
||||
* 根据业务订单Id 查询回溯订单
|
||||
* @param orderId
|
||||
* @return
|
||||
*/
|
||||
RecallOrderEntity queryRecallOrderByOrderId(String orderId);
|
||||
|
||||
/**
|
||||
* 根据回溯轨迹ID 查询回溯订单
|
||||
* @param traceId
|
||||
* @return
|
||||
*/
|
||||
RecallOrderEntity queryRecallOrderByTraceId(String traceId);
|
||||
}
|
||||
|
||||
+48
@@ -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.RecallProductEntity;
|
||||
import com.wabestway.recall.trace.dto.RecallProductDTO;
|
||||
import com.wabestway.recall.trace.vo.RecallProductVO;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author wangH
|
||||
* @company 北京华焱坤泰科技有限公司
|
||||
* @Time 2023-05-15 09:59:12
|
||||
*/
|
||||
public interface RecallProductService extends IService<RecallProductEntity> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param page 分页对象
|
||||
* @param recallProductDTO
|
||||
* @return
|
||||
*/
|
||||
IPage<RecallProductVO> queryRecallProductByCondition(long page, long size, RecallProductDTO recallProductDTO);
|
||||
|
||||
/**
|
||||
* 条件查询,不分页
|
||||
* @param recallProductDTO
|
||||
* @return
|
||||
*/
|
||||
List<RecallProductVO> queryRecallProductListNoPage(RecallProductDTO recallProductDTO);
|
||||
|
||||
/**
|
||||
* 根据id更新
|
||||
* @param recallProduct 对象
|
||||
* @return
|
||||
*/
|
||||
void updateRecallProductById(RecallProductEntity recallProduct);
|
||||
|
||||
/**
|
||||
* 根据id查询详情
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
RecallProductVO queryRecallProductById(String id);
|
||||
}
|
||||
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
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);
|
||||
|
||||
/**
|
||||
* 根据traceId 查询列表
|
||||
* @param traceId
|
||||
* @return
|
||||
*/
|
||||
List<RecallRecordVO> queryTraceRecords(String traceId);
|
||||
}
|
||||
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
package com.wabestway.recall.trace.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.metadata.OrderItem;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
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.RecallApiDao;
|
||||
import com.wabestway.recall.trace.entity.RecallApiEntity;
|
||||
import com.wabestway.recall.trace.dto.RecallApiDTO;
|
||||
import com.wabestway.recall.trace.vo.RecallApiVO;
|
||||
import com.wabestway.recall.trace.service.RecallApiService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author wangH
|
||||
* @company 北京华焱坤泰科技有限公司
|
||||
* @Time 2023-05-15 09:59:12
|
||||
*/
|
||||
@Service
|
||||
public class RecallApiServiceImpl extends ServiceImpl<RecallApiDao, RecallApiEntity> implements RecallApiService {
|
||||
|
||||
@Override
|
||||
public IPage<RecallApiVO> queryRecallApiByCondition(long page, long size, RecallApiDTO recallApiDTO) {
|
||||
Page<RecallApiDTO> paramReq = new Page<>(page, size);
|
||||
paramReq.addOrder(new OrderItem().setColumn("create_time").setAsc(false));//创建时间降序排序
|
||||
IPage<RecallApiVO> iPage = baseMapper.queryRecallApiByCondition(paramReq, recallApiDTO);
|
||||
return iPage;
|
||||
}
|
||||
|
||||
public List<RecallApiVO> queryRecallApiListNoPage(RecallApiDTO recallApiDTO) {
|
||||
return baseMapper.queryRecallApiListNoPage(recallApiDTO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateRecallApiById(RecallApiEntity recallApi) {
|
||||
baseMapper.updateRecallApiById(recallApi);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RecallApiVO queryRecallApiById(String id) {
|
||||
return baseMapper.queryRecallApiById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String queryApiTenant(String appKey) {
|
||||
LambdaQueryWrapper<RecallApiEntity> query = Wrappers.lambdaQuery();
|
||||
query.eq(RecallApiEntity::getAppKey, appKey);
|
||||
query.last("limit 1");
|
||||
RecallApiEntity recallApi = baseMapper.selectOne(query);
|
||||
if (recallApi != null) {
|
||||
return recallApi.getTenantId();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
+58
@@ -0,0 +1,58 @@
|
||||
package com.wabestway.recall.trace.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.metadata.OrderItem;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
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;
|
||||
|
||||
/**
|
||||
* @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;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void updateRecallOrderById(RecallOrderEntity recallOrder) {
|
||||
baseMapper.updateRecallOrderById(recallOrder);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RecallOrderVO queryRecallOrderById(String id) {
|
||||
return baseMapper.queryRecallOrderById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RecallOrderEntity queryRecallOrderByOrderId(String orderId) {
|
||||
LambdaQueryWrapper<RecallOrderEntity> orderQuery = Wrappers.lambdaQuery();
|
||||
orderQuery.eq(RecallOrderEntity::getOrderId, orderId);
|
||||
orderQuery.last("limit 1");
|
||||
return baseMapper.selectOne(orderQuery);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RecallOrderEntity queryRecallOrderByTraceId(String traceId) {
|
||||
LambdaQueryWrapper<RecallOrderEntity> orderQuery = Wrappers.lambdaQuery();
|
||||
orderQuery.eq(RecallOrderEntity::getTraceId, traceId);
|
||||
orderQuery.last("limit 1");
|
||||
return baseMapper.selectOne(orderQuery);
|
||||
}
|
||||
}
|
||||
+46
@@ -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.RecallProductDao;
|
||||
import com.wabestway.recall.trace.entity.RecallProductEntity;
|
||||
import com.wabestway.recall.trace.dto.RecallProductDTO;
|
||||
import com.wabestway.recall.trace.vo.RecallProductVO;
|
||||
import com.wabestway.recall.trace.service.RecallProductService;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author wangH
|
||||
* @company 北京华焱坤泰科技有限公司
|
||||
* @Time 2023-05-15 09:59:12
|
||||
*/
|
||||
@Service
|
||||
public class RecallProductServiceImpl extends ServiceImpl<RecallProductDao, RecallProductEntity> implements RecallProductService {
|
||||
|
||||
@Override
|
||||
public IPage<RecallProductVO> queryRecallProductByCondition(long page, long size, RecallProductDTO recallProductDTO) {
|
||||
Page<RecallProductDTO> paramReq = new Page<>(page,size);
|
||||
paramReq.addOrder(new OrderItem().setColumn("create_time").setAsc(false));//创建时间降序排序
|
||||
IPage<RecallProductVO> iPage = baseMapper.queryRecallProductByCondition(paramReq, recallProductDTO);
|
||||
return iPage;
|
||||
}
|
||||
|
||||
public List<RecallProductVO> queryRecallProductListNoPage(RecallProductDTO recallProductDTO) {
|
||||
return baseMapper.queryRecallProductListNoPage(recallProductDTO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateRecallProductById(RecallProductEntity recallProduct) {
|
||||
baseMapper.updateRecallProductById(recallProduct);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RecallProductVO queryRecallProductById(String id ) {
|
||||
return baseMapper.queryRecallProductById(id);
|
||||
}
|
||||
}
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
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);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RecallRecordVO> queryTraceRecords(String traceId) {
|
||||
return baseMapper.queryTraceRecords(traceId);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
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-15 09:59:12
|
||||
*/
|
||||
@Data
|
||||
@ApiModel
|
||||
public class RecallApiVO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** */
|
||||
@ApiModelProperty(value = "")
|
||||
private String id;
|
||||
/** 可回溯调用appKey */
|
||||
@ApiModelProperty(value = "可回溯调用appKey")
|
||||
private String appKey;
|
||||
/** 调用方名称 */
|
||||
@ApiModelProperty(value = "调用方名称")
|
||||
private String name;
|
||||
/** 备注 */
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String remark;
|
||||
/** 创建人 */
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private String createBy;
|
||||
/** 创建时间 */
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Long createTime;
|
||||
/** 更新人 */
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private String updateBy;
|
||||
/** 更新时间 */
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private Long updateTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,134 @@
|
||||
package com.wabestway.recall.trace.vo;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
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 = "创建时间")
|
||||
@JsonProperty(value = "createAt")
|
||||
private Long createTime;
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private String updateBy;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private Long updateTime;
|
||||
|
||||
private List<String> events;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
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-15 09:59:12
|
||||
*/
|
||||
@Data
|
||||
@ApiModel
|
||||
public class RecallProductVO 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 supplierCode;
|
||||
/** 保险公司名称 */
|
||||
@ApiModelProperty(value = "保险公司名称")
|
||||
private String supplierName;
|
||||
/** 是否归档 0-否1-是 */
|
||||
@ApiModelProperty(value = "是否归档 0-否1-是 ")
|
||||
private String archived;
|
||||
/** 是否记录轨迹 0-否1-是 */
|
||||
@ApiModelProperty(value = "是否记录轨迹 0-否1-是 ")
|
||||
private String tracked;
|
||||
/** 创建人 */
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private String createBy;
|
||||
/** 创建时间 */
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Long createTime;
|
||||
/** 更新人 */
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private String updateBy;
|
||||
/** 更新时间 */
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private Long updateTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.wabestway.recall.trace.vo;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
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 List<String> events;
|
||||
/** 回溯记录跟踪ID */
|
||||
@ApiModelProperty(value = "回溯记录跟踪ID")
|
||||
private String traceId;
|
||||
/** 创建人 */
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private String createBy;
|
||||
/** 创建时间 */
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Long createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
<?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.RecallApiDao">
|
||||
|
||||
<sql id="queryRecallApiSql">
|
||||
t.id id,
|
||||
t.app_key appKey,
|
||||
t.name name,
|
||||
t.tenant_id tenantId,
|
||||
t.remark remark,
|
||||
t.create_by createBy,
|
||||
t.create_time createTime,
|
||||
t.update_by updateBy,
|
||||
t.update_time updateTime
|
||||
</sql>
|
||||
|
||||
<select id="queryRecallApiByCondition"
|
||||
parameterType="com.wabestway.recall.trace.dto.RecallApiDTO"
|
||||
resultType="com.wabestway.recall.trace.vo.RecallApiVO">
|
||||
select
|
||||
<include refid="queryRecallApiSql"/>
|
||||
from
|
||||
recall_api t
|
||||
where 1 = 1
|
||||
|
||||
<if test="recallApiDTO.id != null and recallApiDTO.id != '' ">
|
||||
and t.id = #{recallApiDTO.id}
|
||||
</if>
|
||||
<if test="recallApiDTO.appKey != null and recallApiDTO.appKey != '' ">
|
||||
and t.app_key = #{recallApiDTO.appKey}
|
||||
</if>
|
||||
<if test="recallApiDTO.name != null and recallApiDTO.name != '' ">
|
||||
and t.name = #{recallApiDTO.name}
|
||||
</if>
|
||||
<if test="recallApiDTO.remark != null and recallApiDTO.remark != '' ">
|
||||
and t.remark = #{recallApiDTO.remark}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="queryRecallApiListNoPage"
|
||||
parameterType="com.wabestway.recall.trace.dto.RecallApiDTO"
|
||||
resultType="com.wabestway.recall.trace.vo.RecallApiVO">
|
||||
select
|
||||
<include refid="queryRecallApiSql"/>
|
||||
from recall_api t
|
||||
where 1 = 1
|
||||
|
||||
<if test="recallApiDTO.id != null and recallApiDTO.id != '' ">
|
||||
and t.id = #{recallApiDTO.id}
|
||||
</if>
|
||||
<if test="recallApiDTO.appKey != null and recallApiDTO.appKey != '' ">
|
||||
and t.app_key = #{recallApiDTO.appKey}
|
||||
</if>
|
||||
<if test="recallApiDTO.name != null and recallApiDTO.name != '' ">
|
||||
and t.name = #{recallApiDTO.name}
|
||||
</if>
|
||||
<if test="recallApiDTO.remark != null and recallApiDTO.remark != '' ">
|
||||
and t.remark = #{recallApiDTO.remark}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="queryRecallApiById" resultType="com.wabestway.recall.trace.vo.RecallApiVO">
|
||||
select
|
||||
<include refid="queryRecallApiSql"/>
|
||||
from recall_api t
|
||||
where t.id= #{id}
|
||||
</select>
|
||||
|
||||
<update id="updateRecallApiById" parameterType="com.wabestway.recall.trace.entity.RecallApiEntity">
|
||||
update recall_api t
|
||||
|
||||
<set>
|
||||
<if test="recallApi.id != null and recallApi.id != '' ">
|
||||
t.id = #{recallApi.id},
|
||||
</if>
|
||||
<if test="recallApi.appKey != null and recallApi.appKey != '' ">
|
||||
t.app_key = #{recallApi.appKey},
|
||||
</if>
|
||||
<if test="recallApi.name != null and recallApi.name != '' ">
|
||||
t.name = #{recallApi.name},
|
||||
</if>
|
||||
<if test="recallApi.remark != null and recallApi.remark != '' ">
|
||||
t.remark = #{recallApi.remark},
|
||||
</if>
|
||||
<if test="recallApi.updateBy != null and recallApi.updateBy != '' ">
|
||||
t.update_by = #{recallApi.updateBy},
|
||||
</if>
|
||||
<if test="recallApi.updateTime != null ">
|
||||
t.update_time = #{recallApi.updateTime},
|
||||
</if>
|
||||
</set>
|
||||
where t.id= #{recallApi.id}
|
||||
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -0,0 +1,239 @@
|
||||
<?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.tenantId != null and recallOrderDTO.tenantId != '' ">
|
||||
and t.tenant_id = #{recallOrderDTO.tenantId}
|
||||
</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,126 @@
|
||||
<?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.RecallProductDao">
|
||||
|
||||
<sql id="queryRecallProductSql">
|
||||
t.id id,
|
||||
t.product_code productCode,
|
||||
t.product_name productName,
|
||||
t.supplier_code supplierCode,
|
||||
t.supplier_name supplierName,
|
||||
t.archived archived,
|
||||
t.tracked tracked,
|
||||
t.tenant_id tenantId,
|
||||
t.create_by createBy,
|
||||
t.create_time createTime,
|
||||
t.update_by updateBy,
|
||||
t.update_time updateTime
|
||||
</sql>
|
||||
|
||||
<select id="queryRecallProductByCondition"
|
||||
parameterType="com.wabestway.recall.trace.dto.RecallProductDTO"
|
||||
resultType="com.wabestway.recall.trace.vo.RecallProductVO">
|
||||
select
|
||||
<include refid="queryRecallProductSql"/>
|
||||
from
|
||||
recall_product t
|
||||
where 1 = 1
|
||||
|
||||
<if test="recallProductDTO.id != null and recallProductDTO.id != '' ">
|
||||
and t.id = #{recallProductDTO.id}
|
||||
</if>
|
||||
<if test="recallProductDTO.productCode != null and recallProductDTO.productCode != '' ">
|
||||
and t.product_code = #{recallProductDTO.productCode}
|
||||
</if>
|
||||
<if test="recallProductDTO.productName != null and recallProductDTO.productName != '' ">
|
||||
and t.product_name = #{recallProductDTO.productName}
|
||||
</if>
|
||||
<if test="recallProductDTO.supplierCode != null and recallProductDTO.supplierCode != '' ">
|
||||
and t.supplier_code = #{recallProductDTO.supplierCode}
|
||||
</if>
|
||||
<if test="recallProductDTO.supplierName != null and recallProductDTO.supplierName != '' ">
|
||||
and t.supplier_name = #{recallProductDTO.supplierName}
|
||||
</if>
|
||||
<if test="recallProductDTO.archived != null and recallProductDTO.archived != '' ">
|
||||
and t.archived = #{recallProductDTO.archived}
|
||||
</if>
|
||||
<if test="recallProductDTO.tracked != null and recallProductDTO.tracked != '' ">
|
||||
and t.tracked = #{recallProductDTO.tracked}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="queryRecallProductListNoPage"
|
||||
parameterType="com.wabestway.recall.trace.dto.RecallProductDTO"
|
||||
resultType="com.wabestway.recall.trace.vo.RecallProductVO">
|
||||
select
|
||||
<include refid="queryRecallProductSql"/>
|
||||
from recall_product t
|
||||
where 1 = 1
|
||||
|
||||
<if test="recallProductDTO.id != null and recallProductDTO.id != '' ">
|
||||
and t.id = #{recallProductDTO.id}
|
||||
</if>
|
||||
<if test="recallProductDTO.productCode != null and recallProductDTO.productCode != '' ">
|
||||
and t.product_code = #{recallProductDTO.productCode}
|
||||
</if>
|
||||
<if test="recallProductDTO.productName != null and recallProductDTO.productName != '' ">
|
||||
and t.product_name = #{recallProductDTO.productName}
|
||||
</if>
|
||||
<if test="recallProductDTO.supplierCode != null and recallProductDTO.supplierCode != '' ">
|
||||
and t.supplier_code = #{recallProductDTO.supplierCode}
|
||||
</if>
|
||||
<if test="recallProductDTO.supplierName != null and recallProductDTO.supplierName != '' ">
|
||||
and t.supplier_name = #{recallProductDTO.supplierName}
|
||||
</if>
|
||||
<if test="recallProductDTO.archived != null and recallProductDTO.archived != '' ">
|
||||
and t.archived = #{recallProductDTO.archived}
|
||||
</if>
|
||||
<if test="recallProductDTO.tracked != null and recallProductDTO.tracked != '' ">
|
||||
and t.tracked = #{recallProductDTO.tracked}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="queryRecallProductById" resultType="com.wabestway.recall.trace.vo.RecallProductVO">
|
||||
select
|
||||
<include refid="queryRecallProductSql"/>
|
||||
from recall_product t
|
||||
where t.id= #{id}
|
||||
</select>
|
||||
|
||||
<update id="updateRecallProductById" parameterType="com.wabestway.recall.trace.entity.RecallProductEntity">
|
||||
update recall_product t
|
||||
|
||||
<set>
|
||||
<if test="recallProduct.id != null and recallProduct.id != '' ">
|
||||
t.id = #{recallProduct.id},
|
||||
</if>
|
||||
<if test="recallProduct.productCode != null and recallProduct.productCode != '' ">
|
||||
t.product_code = #{recallProduct.productCode},
|
||||
</if>
|
||||
<if test="recallProduct.productName != null and recallProduct.productName != '' ">
|
||||
t.product_name = #{recallProduct.productName},
|
||||
</if>
|
||||
<if test="recallProduct.supplierCode != null and recallProduct.supplierCode != '' ">
|
||||
t.supplier_code = #{recallProduct.supplierCode},
|
||||
</if>
|
||||
<if test="recallProduct.supplierName != null and recallProduct.supplierName != '' ">
|
||||
t.supplier_name = #{recallProduct.supplierName},
|
||||
</if>
|
||||
<if test="recallProduct.archived != null and recallProduct.archived != '' ">
|
||||
t.archived = #{recallProduct.archived},
|
||||
</if>
|
||||
<if test="recallProduct.tracked != null and recallProduct.tracked != '' ">
|
||||
t.tracked = #{recallProduct.tracked},
|
||||
</if>
|
||||
<if test="recallProduct.updateBy != null and recallProduct.updateBy != '' ">
|
||||
t.update_by = #{recallProduct.updateBy},
|
||||
</if>
|
||||
<if test="recallProduct.updateTime != null ">
|
||||
t.update_time = #{recallProduct.updateTime},
|
||||
</if>
|
||||
</set>
|
||||
where t.id= #{recallProduct.id}
|
||||
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -0,0 +1,129 @@
|
||||
<?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">
|
||||
<resultMap id="queryOrderRecordMap" type="com.wabestway.recall.trace.vo.RecallRecordVO">
|
||||
<result column="events" property="events"
|
||||
typeHandler="com.wabestway.recall.trace.handler.ListTypeHandler"></result>
|
||||
</resultMap>
|
||||
<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>
|
||||
|
||||
<select id="queryTraceRecords" resultMap="queryOrderRecordMap">
|
||||
select
|
||||
<include refid="queryRecallRecordSql"/>
|
||||
from recall_record t
|
||||
where t.trace_id = #{traceId}
|
||||
order by t.create_time asc
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -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
|
||||
@@ -0,0 +1,152 @@
|
||||
<?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>1.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>afis-recall-web</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<properties>
|
||||
<spring-cloud.version>Hoxton.SR9</spring-cloud.version>
|
||||
<spring-cloud-alibaba.version>2.2.1.RELEASE</spring-cloud-alibaba.version>
|
||||
|
||||
<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>
|
||||
<alibaba.boot.druid>1.1.22</alibaba.boot.druid>
|
||||
</properties>
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.xuxueli</groupId>
|
||||
<artifactId>xxl-job-core</artifactId>
|
||||
<version>2.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.wabestway.recall</groupId>
|
||||
<artifactId>afis-recall-api</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.wabestway.recall</groupId>
|
||||
<artifactId>afis-recall-service</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-boot-starter</artifactId>
|
||||
<version>${mybatisplus.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-generator</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>druid-spring-boot-starter</artifactId>
|
||||
<version>${alibaba.boot.druid}</version>
|
||||
</dependency>
|
||||
<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.wabestway.auth</groupId>
|
||||
<artifactId>afis-auth-api</artifactId>
|
||||
<version>1.3</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-web</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,30 @@
|
||||
package com.wabestway.recall;
|
||||
|
||||
import org.springframework.beans.factory.ObjectProvider;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||
import org.springframework.boot.autoconfigure.http.HttpMessageConverters;
|
||||
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
||||
import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.http.converter.HttpMessageConverter;
|
||||
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@SpringBootApplication
|
||||
@EnableDiscoveryClient
|
||||
@EnableFeignClients(basePackages = {"com.wabestway.engine"})
|
||||
public class AfisRecallApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(AfisRecallApplication.class, args);
|
||||
}
|
||||
|
||||
@Bean
|
||||
@ConditionalOnMissingBean
|
||||
public HttpMessageConverters messageConverters(ObjectProvider<HttpMessageConverter<?>> converters) {
|
||||
return new HttpMessageConverters(converters.orderedStream().collect(Collectors.toList()));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.wabestway.recall.config;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
/**
|
||||
* Created by king on 2021/5/9.
|
||||
*/
|
||||
@Configuration
|
||||
@ConditionalOnClass(value = {PaginationInterceptor.class})
|
||||
public class MybatisPlusConfig {
|
||||
|
||||
@Autowired
|
||||
private DataSource dataSource;
|
||||
|
||||
@Bean
|
||||
public PaginationInterceptor paginationInterceptor() {
|
||||
PaginationInterceptor paginationInterceptor = new PaginationInterceptor();
|
||||
return paginationInterceptor;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.wabestway.recall.feign;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.wabestway.commons.http.ResObj;
|
||||
import com.wabestway.recall.api.dto.TraceUpDTO;
|
||||
import com.wabestway.recall.api.feign.TraceFeignClient;
|
||||
import com.wabestway.recall.trace.entity.RecallOrderEntity;
|
||||
import com.wabestway.recall.trace.service.RecallOrderService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@Slf4j
|
||||
public class TraceFeignClientImpl implements TraceFeignClient {
|
||||
@Autowired
|
||||
private RecallOrderService recallOrderService;
|
||||
|
||||
@Override
|
||||
public ResObj batchTraceUp(TraceUpDTO traceUpDTO) {
|
||||
log.info("同步请求数据:{}", JSON.toJSONString(traceUpDTO));
|
||||
if (traceUpDTO != null && traceUpDTO.getRecords() != null) {
|
||||
traceUpDTO.getRecords().forEach(order -> {
|
||||
RecallOrderEntity recallOrderEntity = recallOrderService.queryRecallOrderByOrderId(order.getOrderId());
|
||||
if (recallOrderEntity != null) {
|
||||
recallOrderEntity.setPolicyNo(order.getPolicyNo());
|
||||
recallOrderEntity.setHolderName(order.getHolderName());
|
||||
recallOrderEntity.setHolderPhone(order.getHolderPhone());
|
||||
recallOrderEntity.setStartDate(order.getStartDate());
|
||||
recallOrderEntity.setEndDate(order.getEndDate());
|
||||
recallOrderEntity.setSupplierName(order.getSupplierName());
|
||||
recallOrderEntity.setUpdateTime(System.currentTimeMillis());
|
||||
recallOrderService.updateRecallOrderById(recallOrderEntity);
|
||||
}
|
||||
});
|
||||
}
|
||||
return ResObj.ok();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.wabestway.recall.jobtask;
|
||||
|
||||
import com.wabestway.recall.trace.service.RecallOrderApiService;
|
||||
import com.xxl.job.core.biz.model.ReturnT;
|
||||
import com.xxl.job.core.handler.annotation.XxlJob;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Slf4j
|
||||
@Component
|
||||
public class GenVideoJobHandler {
|
||||
@Autowired
|
||||
private RecallOrderApiService recallOrderApiService;
|
||||
|
||||
@XxlJob("VideoGenJobHandler")
|
||||
public ReturnT<String> genRecallVideo() {
|
||||
log.info("[定时器:回溯视频]-开始执行");
|
||||
recallOrderApiService.traceVideo();
|
||||
log.info("[定时器:回溯视频]-执行完成");
|
||||
return ReturnT.SUCCESS;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.wabestway.recall.jobtask;
|
||||
|
||||
import com.xxl.job.core.executor.impl.XxlJobSpringExecutor;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@Configuration
|
||||
public class XXLJobConfig {
|
||||
|
||||
private Logger logger = LoggerFactory.getLogger(XXLJobConfig.class);
|
||||
|
||||
@Value("${xxl.job.admin.addresses}")
|
||||
private String adminAddresses;
|
||||
|
||||
@Value("${xxl.job.accessToken}")
|
||||
private String accessToken;
|
||||
|
||||
@Value("${xxl.job.executor.appname}")
|
||||
private String appname;
|
||||
|
||||
@Value("${xxl.job.executor.port:-1}")
|
||||
private int port;
|
||||
|
||||
@Value("${xxl.job.executor.logpath}")
|
||||
private String logPath;
|
||||
|
||||
@Value("${xxl.job.executor.logretentiondays}")
|
||||
private int logRetentionDays;
|
||||
|
||||
@Bean
|
||||
public XxlJobSpringExecutor xxlJobExecutor() {
|
||||
logger.info(">>>>>>>>>>> xxl-job config init.");
|
||||
XxlJobSpringExecutor xxlJobSpringExecutor = new XxlJobSpringExecutor();
|
||||
xxlJobSpringExecutor.setAdminAddresses(adminAddresses);
|
||||
xxlJobSpringExecutor.setAppname(appname);
|
||||
xxlJobSpringExecutor.setPort(port);
|
||||
xxlJobSpringExecutor.setAccessToken(accessToken);
|
||||
xxlJobSpringExecutor.setLogPath(logPath);
|
||||
xxlJobSpringExecutor.setLogRetentionDays(logRetentionDays);
|
||||
|
||||
return xxlJobSpringExecutor;
|
||||
}
|
||||
|
||||
}
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
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.RecallApiDTO;
|
||||
import com.wabestway.recall.trace.vo.RecallApiVO;
|
||||
import com.wabestway.recall.trace.service.RecallApiApiService;
|
||||
import com.wabestway.commons.http.Paging;
|
||||
import com.wabestway.commons.http.ResObj;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author wangH
|
||||
* @company 北京华焱坤泰科技有限公司
|
||||
* @Time 2023-05-15 09:59:12
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/trace/recallApi")
|
||||
@Api(tags = {"-接口"}, description = "-接口")
|
||||
public class RecallApiController {
|
||||
@Autowired
|
||||
private RecallApiApiService recallApiApiService;
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@PostMapping("/list")
|
||||
@ApiOperation(value = "分页列表查询", notes = "条件分页查询列表", httpMethod = "POST")
|
||||
public ResObj<Paging<RecallApiVO>> list(@RequestBody RecallApiDTO paramRequest) {
|
||||
return recallApiApiService.list(paramRequest);
|
||||
}
|
||||
|
||||
/**
|
||||
* 信息
|
||||
*/
|
||||
@GetMapping("/info/{id}")
|
||||
@ApiOperation(value = "根据id查详情", notes = "根据id查详情", httpMethod = "GET")
|
||||
public ResObj<RecallApiVO> info(@PathVariable("id") String id) {
|
||||
return recallApiApiService.getRecallApi(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@PostMapping("/save")
|
||||
@ApiOperation(value = "保存", notes = "保存", httpMethod = "POST")
|
||||
public ResObj saveRecallApi(@RequestBody RecallApiDTO paramRequest) {
|
||||
return recallApiApiService.saveRecallApi(paramRequest);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@PostMapping("/update")
|
||||
@ApiOperation(value = "修改", notes = "修改", httpMethod = "POST")
|
||||
public ResObj updateRecallApi(@RequestBody RecallApiDTO paramRequest) {
|
||||
return recallApiApiService.updateRecallApi(paramRequest);
|
||||
}
|
||||
}
|
||||
+67
@@ -0,0 +1,67 @@
|
||||
package com.wabestway.recall.trace.controller;
|
||||
|
||||
|
||||
import com.wabestway.recall.util.HeaderDataUtil;
|
||||
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("/order")
|
||||
@Api(tags = {"-接口"}, description = "-接口")
|
||||
public class RecallOrderController {
|
||||
private final RecallOrderApiService recallOrderApiService;
|
||||
|
||||
public RecallOrderController(RecallOrderApiService recallOrderApiService) {
|
||||
this.recallOrderApiService = recallOrderApiService;
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@PostMapping("/list")
|
||||
@ApiOperation(value = "分页列表查询", notes = "条件分页查询列表", httpMethod = "POST")
|
||||
public ResObj<Paging<RecallOrderVO>> list(@RequestBody RecallOrderDTO paramRequest) {
|
||||
paramRequest.setTenantId(null);
|
||||
return recallOrderApiService.list(paramRequest);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/tenant/list")
|
||||
@ApiOperation(value = "租户分页列表查询", notes = "条件分页查询列表", httpMethod = "POST")
|
||||
public ResObj<Paging<RecallOrderVO>> tenantList(@RequestBody RecallOrderDTO paramRequest) {
|
||||
paramRequest.setTenantId(HeaderDataUtil.getTenantId());
|
||||
return recallOrderApiService.list(paramRequest);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 信息
|
||||
*/
|
||||
@PostMapping("/info/{id}")
|
||||
@ApiOperation(value = "根据id查详情", notes = "根据id查详情", httpMethod = "GET")
|
||||
public ResObj<RecallOrderVO> info(@PathVariable("id") String id) {
|
||||
return recallOrderApiService.getRecallOrderByOrderId(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成回溯MP4文件
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/ffmpeg")
|
||||
public ResObj createMp4() {
|
||||
return recallOrderApiService.traceVideo();
|
||||
}
|
||||
|
||||
}
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
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.RecallProductDTO;
|
||||
import com.wabestway.recall.trace.vo.RecallProductVO;
|
||||
import com.wabestway.recall.trace.service.RecallProductApiService;
|
||||
import com.wabestway.commons.http.Paging;
|
||||
import com.wabestway.commons.http.ResObj;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author wangH
|
||||
* @company 北京华焱坤泰科技有限公司
|
||||
* @Time 2023-05-15 09:59:12
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/trace/recallProduct")
|
||||
@Api(tags = {"-接口"}, description = "-接口")
|
||||
public class RecallProductController {
|
||||
@Autowired
|
||||
private RecallProductApiService recallProductApiService;
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@PostMapping("/list")
|
||||
@ApiOperation(value = "分页列表查询", notes = "条件分页查询列表", httpMethod = "POST")
|
||||
public ResObj<Paging<RecallProductVO>> list(@RequestBody RecallProductDTO paramRequest) {
|
||||
return recallProductApiService.list(paramRequest);
|
||||
}
|
||||
|
||||
/**
|
||||
* 信息
|
||||
*/
|
||||
@GetMapping("/info/{id}")
|
||||
@ApiOperation(value = "根据id查详情", notes = "根据id查详情", httpMethod = "GET")
|
||||
public ResObj<RecallProductVO> info(@PathVariable("id") String id) {
|
||||
return recallProductApiService.getRecallProduct(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@PostMapping("/save")
|
||||
@ApiOperation(value = "保存", notes = "保存", httpMethod = "POST")
|
||||
public ResObj saveRecallProduct(@RequestBody RecallProductDTO paramRequest) {
|
||||
return recallProductApiService.saveRecallProduct(paramRequest);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@PostMapping("/update")
|
||||
@ApiOperation(value = "修改", notes = "修改", httpMethod = "POST")
|
||||
public ResObj updateRecallProduct(@RequestBody RecallProductDTO paramRequest) {
|
||||
return recallProductApiService.updateRecallProduct(paramRequest);
|
||||
}
|
||||
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
package com.wabestway.recall.trace.controller;
|
||||
|
||||
import com.wabestway.recall.trace.dto.TraceDTO;
|
||||
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.service.RecallRecordApiService;
|
||||
import com.wabestway.commons.http.ResObj;
|
||||
|
||||
|
||||
/**
|
||||
* @author wangH
|
||||
* @company 北京华焱坤泰科技有限公司
|
||||
* @Time 2023-05-06 17:37:03
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/track")
|
||||
@Api(tags = {"-接口"}, description = "-接口")
|
||||
public class RecallRecordController {
|
||||
@Autowired
|
||||
private RecallRecordApiService recallRecordApiService;
|
||||
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@PostMapping("/save")
|
||||
@ApiOperation(value = "保存", notes = "保存", httpMethod = "POST")
|
||||
public ResObj saveRecallRecord(@RequestBody TraceDTO record) {
|
||||
return recallRecordApiService.save(record);
|
||||
}
|
||||
|
||||
}
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
package com.wabestway.recall.trace.service;
|
||||
|
||||
|
||||
import com.wabestway.recall.trace.dto.RecallApiDTO;
|
||||
import com.wabestway.recall.trace.vo.RecallApiVO;
|
||||
import com.wabestway.commons.http.Paging;
|
||||
import com.wabestway.commons.http.ResObj;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author wangH
|
||||
* @company 北京华焱坤泰科技有限公司
|
||||
* @Time 2023-05-15 09:59:12
|
||||
*/
|
||||
public interface RecallApiApiService {
|
||||
|
||||
/**
|
||||
* 列表
|
||||
* @param paramReq
|
||||
* @return
|
||||
*/
|
||||
ResObj<Paging<RecallApiVO>> list(RecallApiDTO paramReq);
|
||||
|
||||
/**
|
||||
* 查询详情
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
ResObj<RecallApiVO> getRecallApi(String id);
|
||||
|
||||
/**
|
||||
* 保存
|
||||
* @param paramReq
|
||||
* @return
|
||||
*/
|
||||
ResObj saveRecallApi(RecallApiDTO paramReq);
|
||||
|
||||
/**
|
||||
* 修改
|
||||
* @param paramReq
|
||||
* @return
|
||||
*/
|
||||
ResObj updateRecallApi(RecallApiDTO paramReq);
|
||||
|
||||
}
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
package com.wabestway.recall.trace.service;
|
||||
|
||||
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);
|
||||
|
||||
ResObj<RecallOrderVO> getRecallOrderByOrderId(String orderId);
|
||||
|
||||
/**
|
||||
* 根据回溯文件生成MP4视频
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
ResObj traceVideo();
|
||||
}
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
package com.wabestway.recall.trace.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.wabestway.recall.trace.dto.RecallProductDTO;
|
||||
import com.wabestway.recall.trace.vo.RecallProductVO;
|
||||
import com.wabestway.commons.http.Paging;
|
||||
import com.wabestway.commons.http.ResObj;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author wangH
|
||||
* @company 北京华焱坤泰科技有限公司
|
||||
* @Time 2023-05-15 09:59:12
|
||||
*/
|
||||
public interface RecallProductApiService {
|
||||
|
||||
/**
|
||||
* 列表
|
||||
* @param paramReq
|
||||
* @return
|
||||
*/
|
||||
ResObj<Paging<RecallProductVO>> list(RecallProductDTO paramReq);
|
||||
|
||||
/**
|
||||
* 查询详情
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
ResObj<RecallProductVO> getRecallProduct(String id);
|
||||
|
||||
/**
|
||||
* 保存
|
||||
* @param paramReq
|
||||
* @return
|
||||
*/
|
||||
ResObj saveRecallProduct(RecallProductDTO paramReq);
|
||||
|
||||
/**
|
||||
* 修改
|
||||
* @param paramReq
|
||||
* @return
|
||||
*/
|
||||
ResObj updateRecallProduct(RecallProductDTO paramReq);
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
package com.wabestway.recall.trace.service;
|
||||
|
||||
|
||||
import com.wabestway.recall.trace.dto.TraceDTO;
|
||||
import com.wabestway.commons.http.ResObj;
|
||||
|
||||
|
||||
/**
|
||||
* @author wangH
|
||||
* @company 北京华焱坤泰科技有限公司
|
||||
* @Time 2023-05-06 17:37:03
|
||||
*/
|
||||
public interface RecallRecordApiService {
|
||||
|
||||
/**
|
||||
* 回溯数据记录
|
||||
*
|
||||
* @param record
|
||||
* @return
|
||||
*/
|
||||
ResObj save(TraceDTO record);
|
||||
|
||||
}
|
||||
+74
@@ -0,0 +1,74 @@
|
||||
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.recall.util.HeaderDataUtil;
|
||||
import com.wabestway.recall.util.ShortAppKeyGenerator;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import com.wabestway.ins.utils.UUIDUtil;
|
||||
import com.wabestway.recall.trace.entity.RecallApiEntity;
|
||||
import com.wabestway.recall.trace.dto.RecallApiDTO;
|
||||
import com.wabestway.recall.trace.vo.RecallApiVO;
|
||||
import com.wabestway.recall.trace.service.RecallApiApiService;
|
||||
import com.wabestway.recall.trace.service.RecallApiService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* @author wangH
|
||||
* @company 北京华焱坤泰科技有限公司
|
||||
* @Time 2023-05-15 09:59:12
|
||||
*/
|
||||
@Service
|
||||
public class RecallApiApiServiceImpl implements RecallApiApiService {
|
||||
@Autowired
|
||||
private RecallApiService recallApiService;
|
||||
|
||||
@Override
|
||||
public ResObj<Paging<RecallApiVO>> list(RecallApiDTO paramReq) {
|
||||
IPage<RecallApiVO> resultPage = recallApiService.queryRecallApiByCondition(paramReq.getPage(), paramReq.getPageSize(), paramReq);
|
||||
|
||||
Paging<RecallApiVO> paging = new Paging(resultPage.getRecords(), paramReq.getPage(), resultPage.getSize(), resultPage.getTotal());
|
||||
return ResObj.ok(paging);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResObj<RecallApiVO> getRecallApi(String id) {
|
||||
RecallApiVO recallApiVO = recallApiService.queryRecallApiById(id);
|
||||
|
||||
return ResObj.ok(recallApiVO);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
@Override
|
||||
public ResObj saveRecallApi(RecallApiDTO paramReq) {
|
||||
RecallApiEntity recallApi = new RecallApiEntity();
|
||||
BeanUtils.copyProperties(paramReq, recallApi);
|
||||
|
||||
recallApi.setId(UUIDUtil.generate());//赋值id
|
||||
recallApi.setAppKey(ShortAppKeyGenerator.generate());
|
||||
recallApi.setTenantId(HeaderDataUtil.getTenantId());
|
||||
recallApi.setCreateBy(HeaderDataUtil.getUserId());//创建人
|
||||
recallApi.setCreateTime(System.currentTimeMillis());//创建时间
|
||||
recallApi.setUpdateBy(HeaderDataUtil.getUserId());//更新人
|
||||
recallApi.setUpdateTime(System.currentTimeMillis());//更新时间
|
||||
|
||||
recallApiService.save(recallApi);
|
||||
return ResObj.ok();
|
||||
}
|
||||
|
||||
@Transactional
|
||||
@Override
|
||||
public ResObj updateRecallApi(RecallApiDTO paramReq) {
|
||||
RecallApiEntity recallApi = new RecallApiEntity();
|
||||
paramReq.setAppKey(null);
|
||||
BeanUtils.copyProperties(paramReq, recallApi);
|
||||
recallApi.setUpdateBy(HeaderDataUtil.getUserId());//更新人
|
||||
recallApi.setUpdateTime(System.currentTimeMillis());//更新时间
|
||||
recallApiService.updateById(recallApi);
|
||||
return ResObj.ok();
|
||||
}
|
||||
|
||||
}
|
||||
+190
@@ -0,0 +1,190 @@
|
||||
package com.wabestway.recall.trace.service.impl;
|
||||
|
||||
import cn.hutool.core.io.FileUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.wabestway.commons.http.Paging;
|
||||
import com.wabestway.commons.http.ResObj;
|
||||
import com.wabestway.engine.api.dfs.UploadFileDTO;
|
||||
import com.wabestway.engine.api.dfs.UploadRespVO;
|
||||
import com.wabestway.engine.api.feign.DfsStorageFeignClient;
|
||||
import com.wabestway.recall.trace.entity.RecallOrderEntity;
|
||||
import com.wabestway.recall.trace.service.RecallOrderService;
|
||||
import com.wabestway.recall.trace.service.RecallRecordService;
|
||||
import com.wabestway.recall.trace.vo.RecallRecordVO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
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 java.io.*;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author wangH
|
||||
* @company 北京华焱坤泰科技有限公司
|
||||
* @Time 2023-05-06 17:37:03
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class RecallOrderApiServiceImpl implements RecallOrderApiService {
|
||||
@Autowired
|
||||
private RecallOrderService recallOrderService;
|
||||
@Autowired
|
||||
private DfsStorageFeignClient storageFeignClient;
|
||||
@Autowired
|
||||
private RecallRecordService recallRecordService;
|
||||
|
||||
@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> getRecallOrderByOrderId(String orderId) {
|
||||
RecallOrderVO recallOrderVO = new RecallOrderVO();
|
||||
RecallOrderEntity recallOrderEntity = recallOrderService.queryRecallOrderByOrderId(orderId);
|
||||
if (recallOrderEntity != null) {
|
||||
BeanUtils.copyProperties(recallOrderEntity, recallOrderVO);
|
||||
|
||||
List<RecallRecordVO> recordList = recallRecordService.queryTraceRecords(recallOrderEntity.getTraceId());
|
||||
log.info(JSON.toJSONString(recordList));
|
||||
List<String> events = recordList.stream()
|
||||
.flatMap(entity -> entity.getEvents().stream())
|
||||
.collect(Collectors.toList());
|
||||
recallOrderVO.setEvents(events);
|
||||
}
|
||||
return ResObj.ok(recallOrderVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResObj traceVideo() {
|
||||
LambdaQueryWrapper<RecallOrderEntity> orderQuery = Wrappers.lambdaQuery();
|
||||
orderQuery.eq(RecallOrderEntity::getComplete, "1");
|
||||
orderQuery.isNull(RecallOrderEntity::getFileId);
|
||||
orderQuery.orderByDesc(RecallOrderEntity::getCompleteDate);
|
||||
//orderQuery.last("limit 1");
|
||||
List<RecallOrderEntity> orderList = recallOrderService.getBaseMapper().selectList(orderQuery);
|
||||
orderList.forEach(order -> {
|
||||
|
||||
List<RecallRecordVO> recordList = recallRecordService.queryTraceRecords(order.getTraceId());
|
||||
List<String> events = recordList.stream()
|
||||
.flatMap(entity -> entity.getEvents().stream())
|
||||
.collect(Collectors.toList());
|
||||
JSONArray array = JSONArray.parseArray(JSON.toJSONString(events));
|
||||
try {
|
||||
createVideo(order, array.toJSONString());
|
||||
} catch (IOException ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
});
|
||||
return ResObj.ok();
|
||||
}
|
||||
|
||||
void createVideo(RecallOrderEntity fo, String jsonData) throws IOException {
|
||||
|
||||
// 创建临时目录
|
||||
Path tempDir = null;
|
||||
try {
|
||||
tempDir = Files.createTempDirectory("ts");
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
System.out.println("Created temporary directory: " + tempDir);
|
||||
|
||||
try {
|
||||
File tempFile = new File(tempDir.toFile(), "traces.json");
|
||||
FileWriter fw = new FileWriter(tempFile);
|
||||
BufferedWriter bw = new BufferedWriter(fw);
|
||||
bw.write(jsonData);
|
||||
bw.flush();
|
||||
bw.close();
|
||||
fw.close();
|
||||
/*String[] command = {"ts-node", " /opt/rrvideo/src/cli.ts --input traces.json"};
|
||||
ProcessBuilder processBuilder = new ProcessBuilder(command);
|
||||
processBuilder.directory(tempDir.toFile());
|
||||
// 在临时目录下执行命令
|
||||
Process p1 = processBuilder.start();
|
||||
|
||||
Thread processThread = new Thread(() -> {
|
||||
try {
|
||||
// 读取命令输出
|
||||
BufferedReader reader = new BufferedReader(new InputStreamReader(p1.getInputStream()));
|
||||
String line;
|
||||
while ((line = reader.readLine()) != null) {
|
||||
System.out.println(line);
|
||||
}
|
||||
reader.close();
|
||||
// 等待命令执行完成
|
||||
int exitCode = p1.waitFor();
|
||||
|
||||
System.out.println("Command exited with code " + exitCode);
|
||||
} catch (InterruptedException | IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
});
|
||||
processThread.start();*/
|
||||
try {
|
||||
String[] cmd = {"rrvideo", "--input", "traces.json"};
|
||||
ProcessBuilder processBuilder = new ProcessBuilder(cmd);
|
||||
processBuilder.directory(tempDir.toFile());
|
||||
System.out.printf(processBuilder.command().toString());
|
||||
Process process = processBuilder.start();
|
||||
|
||||
// 捕获输出
|
||||
BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()));
|
||||
String line;
|
||||
while ((line = reader.readLine()) != null) {
|
||||
System.out.println(line);
|
||||
}
|
||||
|
||||
// 等待进程结束
|
||||
int exitCode = process.waitFor();
|
||||
System.out.println("Command exited with code " + exitCode);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
File file = new File(tempDir.toFile(), "video.mp4");
|
||||
if (file.exists()) {
|
||||
log.info(String.valueOf(file.length()));
|
||||
//byte[] fileBytes = Files.readAllBytes(file.toPath());
|
||||
byte[] fileBytes = FileUtil.readBytes(file);
|
||||
String titles = fo.getOrderId() + ".mp4";
|
||||
UploadFileDTO uploadFileDTO = new UploadFileDTO(fileBytes, "RECALL", titles);
|
||||
|
||||
ResObj<UploadRespVO> uploadResObj = storageFeignClient.uploadBytes(uploadFileDTO);
|
||||
log.info(JSON.toJSONString(uploadResObj));
|
||||
if (uploadResObj.isOk()) {
|
||||
fo.setFileId(uploadResObj.getData().getFileId());
|
||||
fo.setFileUrl(uploadResObj.getData().getFileUrl());
|
||||
fo.setUpdateTime(System.currentTimeMillis());
|
||||
recallOrderService.updateRecallOrderById(fo);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
log.error(e.getMessage());
|
||||
} finally {
|
||||
// 删除临时目录
|
||||
Files.walk(tempDir)
|
||||
.sorted(Comparator.reverseOrder())
|
||||
.map(Path::toFile)
|
||||
.forEach(File::delete);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
+73
@@ -0,0 +1,73 @@
|
||||
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 com.wabestway.recall.util.HeaderDataUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import com.wabestway.ins.utils.UUIDUtil;
|
||||
import com.wabestway.recall.trace.entity.RecallProductEntity;
|
||||
import com.wabestway.recall.trace.dto.RecallProductDTO;
|
||||
import com.wabestway.recall.trace.vo.RecallProductVO;
|
||||
import com.wabestway.recall.trace.service.RecallProductApiService;
|
||||
import com.wabestway.recall.trace.service.RecallProductService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
||||
/**
|
||||
* @author wangH
|
||||
* @company 北京华焱坤泰科技有限公司
|
||||
* @Time 2023-05-15 09:59:12
|
||||
*/
|
||||
@Service
|
||||
public class RecallProductApiServiceImpl implements RecallProductApiService {
|
||||
@Autowired
|
||||
private RecallProductService recallProductService;
|
||||
|
||||
@Override
|
||||
public ResObj<Paging<RecallProductVO>> list(RecallProductDTO paramReq) {
|
||||
IPage<RecallProductVO> resultPage = recallProductService.queryRecallProductByCondition(paramReq.getPage(), paramReq.getPageSize(), paramReq);
|
||||
|
||||
Paging<RecallProductVO> paging = new Paging(resultPage.getRecords(), paramReq.getPage(), resultPage.getSize(), resultPage.getTotal());
|
||||
return ResObj.ok(paging);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResObj<RecallProductVO> getRecallProduct(String id) {
|
||||
RecallProductVO recallProductVO = recallProductService.queryRecallProductById(id);
|
||||
|
||||
return ResObj.ok(recallProductVO);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
@Override
|
||||
public ResObj saveRecallProduct(RecallProductDTO paramReq) {
|
||||
RecallProductEntity recallProduct = new RecallProductEntity();
|
||||
BeanUtils.copyProperties(paramReq, recallProduct);
|
||||
|
||||
recallProduct.setId(UUIDUtil.generate());//赋值id
|
||||
recallProduct.setCreateBy(HeaderDataUtil.getUserId());//创建人
|
||||
recallProduct.setCreateTime(System.currentTimeMillis());//创建时间
|
||||
recallProduct.setUpdateBy(HeaderDataUtil.getUserId());//更新人
|
||||
recallProduct.setUpdateTime(System.currentTimeMillis());//更新时间
|
||||
|
||||
recallProductService.save(recallProduct);
|
||||
return ResObj.ok();
|
||||
}
|
||||
|
||||
@Transactional
|
||||
@Override
|
||||
public ResObj updateRecallProduct(RecallProductDTO paramReq) {
|
||||
RecallProductEntity recallProduct = new RecallProductEntity();
|
||||
BeanUtils.copyProperties(paramReq, recallProduct);
|
||||
recallProduct.setUpdateBy(HeaderDataUtil.getUserId());//更新人
|
||||
recallProduct.setUpdateTime(System.currentTimeMillis());//更新时间
|
||||
recallProductService.updateById(recallProduct);
|
||||
return ResObj.ok();
|
||||
}
|
||||
|
||||
}
|
||||
+90
@@ -0,0 +1,90 @@
|
||||
package com.wabestway.recall.trace.service.impl;
|
||||
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
||||
import com.wabestway.commons.http.ResObj;
|
||||
import com.wabestway.recall.trace.dto.TraceDTO;
|
||||
import com.wabestway.recall.trace.entity.RecallOrderEntity;
|
||||
import com.wabestway.recall.trace.entity.RecallRecordEntity;
|
||||
import com.wabestway.recall.trace.service.RecallApiService;
|
||||
import com.wabestway.recall.trace.service.RecallOrderService;
|
||||
import com.wabestway.recall.trace.service.RecallRecordService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import com.wabestway.recall.trace.service.RecallRecordApiService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import java.util.UUID;
|
||||
|
||||
|
||||
/**
|
||||
* @author wangH
|
||||
* @company 北京华焱坤泰科技有限公司
|
||||
* @Time 2023-05-06 17:37:03
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class RecallRecordApiServiceImpl implements RecallRecordApiService {
|
||||
@Autowired
|
||||
private RecallRecordService recallRecordService;
|
||||
@Autowired
|
||||
private RecallOrderService recallOrderService;
|
||||
@Autowired
|
||||
private RecallApiService recallApiService;
|
||||
|
||||
@Override
|
||||
public ResObj save(TraceDTO record) {
|
||||
Objects.requireNonNull(record);
|
||||
|
||||
String traceId = StringUtils.isBlank(record.getTraceId()) ? UUID.randomUUID().toString().replace("-", "") : record.getTraceId();
|
||||
|
||||
boolean isLastEvent = record.isLast();
|
||||
RecallOrderEntity order = Optional.ofNullable(Optional.ofNullable(record.getOrderId())
|
||||
.map(recallOrderService::queryRecallOrderByOrderId)
|
||||
.orElse(null))
|
||||
.orElseGet(() -> Optional.ofNullable(recallOrderService.queryRecallOrderByTraceId(traceId)).orElseGet(() -> {
|
||||
RecallOrderEntity newOrder = new RecallOrderEntity();
|
||||
newOrder.setId(UUID.randomUUID().toString().replace("-", ""));
|
||||
Optional.ofNullable(record.getOrderId())
|
||||
.ifPresent(newOrder::setOrderId);
|
||||
newOrder.setTraceId(traceId);
|
||||
newOrder.setProductCode(record.getProductCode());
|
||||
newOrder.setProductName(record.getProductName());
|
||||
newOrder.setCreateTime(System.currentTimeMillis());
|
||||
newOrder.setUpdateTime(System.currentTimeMillis());
|
||||
newOrder.setAppKey(record.getAppKey());
|
||||
newOrder.setArchived("0");
|
||||
newOrder.setComplete(isLastEvent ? "1" : "0");
|
||||
String tenantId = recallApiService.queryApiTenant(record.getAppKey());
|
||||
Optional.ofNullable(tenantId)
|
||||
.ifPresent(newOrder::setTenantId);
|
||||
if (isLastEvent) {
|
||||
newOrder.setCompleteDate(System.currentTimeMillis());
|
||||
}
|
||||
recallOrderService.save(newOrder);
|
||||
return newOrder;
|
||||
}));
|
||||
if (isLastEvent && !"1".equals(order.getComplete())) {
|
||||
order.setComplete("1");
|
||||
Optional.ofNullable(record.getOrderId())
|
||||
.ifPresent(order::setOrderId);
|
||||
order.setCompleteDate(System.currentTimeMillis());
|
||||
order.setUpdateTime(System.currentTimeMillis());
|
||||
recallOrderService.updateRecallOrderById(order);
|
||||
}
|
||||
record.setTraceId(traceId);
|
||||
RecallRecordEntity recallRecord = new RecallRecordEntity();
|
||||
BeanUtils.copyProperties(record, recallRecord);
|
||||
recallRecord.setId(UUID.randomUUID().toString().replace("-", ""));
|
||||
recallRecord.setCreateTime(System.currentTimeMillis());
|
||||
recallRecordService.save(recallRecord);
|
||||
|
||||
record.setEvents(null);
|
||||
log.info("保存数据:{}", JSON.toJSONString(record));
|
||||
return ResObj.ok(record);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,111 @@
|
||||
package com.wabestway.recall.util;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.wabestway.auth.api.user.ReqOrgInfo;
|
||||
import com.wabestway.auth.api.user.ReqTenantInfo;
|
||||
import com.wabestway.auth.api.user.ReqUser;
|
||||
import com.wabestway.auth.api.user.TokenObj;
|
||||
import com.wabestway.commons.exception.AlertException;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.web.context.request.RequestContextHolder;
|
||||
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.net.URLDecoder;
|
||||
|
||||
public class HeaderDataUtil {
|
||||
private static Logger logger = LoggerFactory.getLogger(HeaderDataUtil.class);
|
||||
|
||||
public HeaderDataUtil() {
|
||||
}
|
||||
|
||||
public static ReqUser getUserData() {
|
||||
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes())
|
||||
.getRequest();
|
||||
ReqUser reqUser = null;
|
||||
try {
|
||||
String header = request.getHeader(TokenObj._USER);
|
||||
if (header != null) {
|
||||
String str = URLDecoder.decode(header, "UTF-8");
|
||||
logger.info("用户信息:{}", str);
|
||||
reqUser = new Gson().fromJson(str, ReqUser.class);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("用户信息转化异常", e);
|
||||
throw new AlertException("未获取到header用户信息!");
|
||||
}
|
||||
|
||||
return reqUser;
|
||||
}
|
||||
|
||||
public static ReqOrgInfo getOrgInfoData() {
|
||||
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes())
|
||||
.getRequest();
|
||||
ReqOrgInfo orgInfo = null;
|
||||
try {
|
||||
String header = request.getHeader(TokenObj._ORG);
|
||||
if (header != null) {
|
||||
String str = URLDecoder.decode(header, "UTF-8");
|
||||
logger.info("机构信息:{}", str);
|
||||
orgInfo = new Gson().fromJson(str, ReqOrgInfo.class);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("机构信息转化异常", e);
|
||||
throw new AlertException("未获取到header机构信息!");
|
||||
}
|
||||
|
||||
return orgInfo;
|
||||
}
|
||||
|
||||
public static ReqTenantInfo getTenantData() {
|
||||
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes())
|
||||
.getRequest();
|
||||
ReqTenantInfo tenant = null;
|
||||
try {
|
||||
String header = request.getHeader(TokenObj._TENANT);
|
||||
if (header != null) {
|
||||
String str = URLDecoder.decode(header, "UTF-8");
|
||||
logger.info("机构信息:{}", str);
|
||||
tenant = new Gson().fromJson(str, ReqTenantInfo.class);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("租户信息转化异常", e);
|
||||
}
|
||||
|
||||
return tenant;
|
||||
}
|
||||
|
||||
public static String getUserId() {
|
||||
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes())
|
||||
.getRequest();
|
||||
String userId = null;
|
||||
try {
|
||||
String header = request.getHeader(TokenObj._USERID);
|
||||
if (header != null) {
|
||||
userId = URLDecoder.decode(header, "UTF-8");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("用户ID信息转化异常", e);
|
||||
}
|
||||
|
||||
return userId;
|
||||
}
|
||||
|
||||
public static String getTenantId() {
|
||||
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes())
|
||||
.getRequest();
|
||||
String tenantId = null;
|
||||
|
||||
try {
|
||||
String header = request.getHeader(TokenObj._TENANTID);
|
||||
if (header != null) {
|
||||
tenantId = URLDecoder.decode(header, "UTF-8");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("租户id信息转化异常", e);
|
||||
}
|
||||
|
||||
return tenantId;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.wabestway.recall.util;
|
||||
|
||||
|
||||
import java.security.MessageDigest;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.security.SecureRandom;
|
||||
import java.util.Arrays;
|
||||
import java.util.UUID;
|
||||
|
||||
public class ShortAppKeyGenerator {
|
||||
private static final char[] BASE62_CHARS = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".toCharArray();
|
||||
|
||||
public static String generate() {
|
||||
String input = System.currentTimeMillis() + "";
|
||||
MessageDigest md = null;
|
||||
try {
|
||||
md = MessageDigest.getInstance("MD5");
|
||||
} catch (NoSuchAlgorithmException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
byte[] bytes = md.digest(input.getBytes());
|
||||
return toBase62(bytes);
|
||||
}
|
||||
|
||||
private static String toBase62(byte[] bytes) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
long num = toLong(bytes);
|
||||
while (num > 0) {
|
||||
int remainder = (int) (num % 62);
|
||||
sb.append(BASE62_CHARS[remainder]);
|
||||
num /= 62;
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
private static long toLong(byte[] bytes) {
|
||||
long result = 0;
|
||||
for (int i = 0; i < 8; i++) {
|
||||
result <<= 8;
|
||||
result |= ((long) (bytes[i] & 0xFF));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
String appKey = generate();
|
||||
System.out.println(appKey); // 输出:pT8bnL3ZTYqdBlUo
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
# nacos
|
||||
@@ -0,0 +1,2 @@
|
||||
server:
|
||||
port: 9235
|
||||
@@ -0,0 +1,16 @@
|
||||
|
||||
#spring:
|
||||
# jackson:
|
||||
# date-format: yyyy-MM-dd HH:mm:ss
|
||||
# time-zone: GMT+8
|
||||
|
||||
mybatis-plus:
|
||||
#MyBaits 别名包扫描路径,通过该属性可以给包中的类注册别名
|
||||
configuration:
|
||||
# 打印控制台
|
||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||
|
||||
spring:
|
||||
freemarker:
|
||||
settings:
|
||||
classic_compatible: true
|
||||
+3
-2
@@ -1,5 +1,5 @@
|
||||
|
||||
spring:
|
||||
profiles: dev
|
||||
application:
|
||||
name: afis-recall
|
||||
cloud:
|
||||
@@ -12,5 +12,6 @@ spring:
|
||||
#Nacos服务注册中心地址
|
||||
server-addr: 192.168.0.141:8848
|
||||
namespace: ns-car-dev
|
||||
|
||||
main:
|
||||
allow-bean-definition-overriding: true
|
||||
allow-bean-definition-overriding: true
|
||||
@@ -0,0 +1,51 @@
|
||||
spring:
|
||||
profiles: native
|
||||
application:
|
||||
name: afis-recall
|
||||
cloud:
|
||||
nacos:
|
||||
config:
|
||||
file-extension: yaml
|
||||
server-addr: 49.7.225.107:8848
|
||||
namespace: native-test
|
||||
discovery:
|
||||
#Nacos服务注册中心地址
|
||||
server-addr: 49.7.225.107:8848
|
||||
namespace: native-test
|
||||
main:
|
||||
allow-bean-definition-overriding: true
|
||||
|
||||
datasource:
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
url: jdbc:mysql://203.189.0.250:13049/afis-agency?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
|
||||
username: yxb-dev
|
||||
password: yxbDev!902
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
platform: mysql
|
||||
druid:
|
||||
initial-size: 2
|
||||
max-active: 100
|
||||
time-between-eviction-runs-millis: 60000
|
||||
min-evictable-idle-time-millis: 300000
|
||||
validation-query: SELECT 1 FROM DUAL
|
||||
test-while-idle: true
|
||||
test-on-borrow: false
|
||||
test-on-return: false
|
||||
pool-prepared-statements: true
|
||||
max-pool-prepared-statement-per-connection-size: 5
|
||||
filter:
|
||||
stat:
|
||||
log-slow-sql: true
|
||||
slow-sql-millis: 2000
|
||||
enabled: true
|
||||
config:
|
||||
enabled: true
|
||||
wall:
|
||||
enabled: true
|
||||
encoding:
|
||||
enabled: true
|
||||
stat-view-servlet:
|
||||
enabled: true
|
||||
url-pattern: /druid/*
|
||||
login-username: admin
|
||||
login-password: admin
|
||||
+2
-2
@@ -7,11 +7,11 @@ spring:
|
||||
nacos:
|
||||
config:
|
||||
file-extension: yaml
|
||||
server-addr: 192.168.0.249:8848,192.168.0.203:8848
|
||||
server-addr: 192.168.208.47:18848,192.168.208.48:18848
|
||||
namespace: yxb-prod
|
||||
discovery:
|
||||
#Nacos服务注册中心地址
|
||||
server-addr: 192.168.0.249:8848,192.168.0.203:8848
|
||||
server-addr: 192.168.208.47:18848,192.168.208.48:18848
|
||||
namespace: yxb-prod
|
||||
main:
|
||||
allow-bean-definition-overriding: true
|
||||
@@ -0,0 +1,135 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration debug="false">
|
||||
<!--定义日志文件的存储地址 勿在 LogBack 的配置中使用相对路径-->
|
||||
<springProperty scope="context" name="LOG_HOME" source="application.log.home" defaultValue="/home/log"/>
|
||||
<springProperty scope="context" name="SERVICE_NAME" source="spring.application.name"/>
|
||||
<!-- 控制台输出 -->
|
||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
|
||||
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] [%X{trace_id}] %-5level %logger{36} - %msg%n</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
<!-- 按照每天生成日志文件 -->
|
||||
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!--日志文件输出的文件名-->
|
||||
<FileNamePattern>${LOG_HOME}/${SERVICE_NAME}/${SERVICE_NAME}.log.%d{yyyy-MM-dd}.log</FileNamePattern>
|
||||
<!--日志文件保留天数-->
|
||||
<MaxHistory>181</MaxHistory>
|
||||
</rollingPolicy>
|
||||
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
|
||||
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} ${PID} %X{trace_id} [%thread] %-5level %logger{50} - %msg%n</pattern>
|
||||
</encoder>
|
||||
<!--日志文件最大的大小-->
|
||||
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
|
||||
<MaxFileSize>10MB</MaxFileSize>
|
||||
</triggeringPolicy>
|
||||
</appender>
|
||||
|
||||
<!-- 2.2 level为 INFO 日志,时间滚动输出 -->
|
||||
<appender name="INFO_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<!-- 正在记录的日志文档的路径及文档名 -->
|
||||
<file>${LOG_HOME}/${SERVICE_NAME}/${SERVICE_NAME}.log</file>
|
||||
<!--日志文档输出格式-->
|
||||
<encoder>
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} ${PID} %X{trace_id} [%thread] %-5level %logger{50} - %msg%n</pattern>
|
||||
<charset>UTF-8</charset>
|
||||
</encoder>
|
||||
<!-- 日志记录器的滚动策略,按日期,按大小记录 -->
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 每天日志归档路径以及格式 -->
|
||||
<fileNamePattern>${LOG_HOME}/${SERVICE_NAME}/${SERVICE_NAME}-info-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
|
||||
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
|
||||
<maxFileSize>100MB</maxFileSize>
|
||||
</timeBasedFileNamingAndTriggeringPolicy>
|
||||
<!--日志文档保留天数-->
|
||||
<maxHistory>181</maxHistory>
|
||||
</rollingPolicy>
|
||||
<!-- 此日志文档只记录info级别的 -->
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<level>info</level>
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<!-- 2.3 level为 WARN 日志,时间滚动输出 -->
|
||||
<appender name="WARN_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<!-- 正在记录的日志文档的路径及文档名 -->
|
||||
<file>${LOG_HOME}/${SERVICE_NAME}/${SERVICE_NAME}-warn.log</file>
|
||||
<!--日志文档输出格式-->
|
||||
<encoder>
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} ${PID} %X{trace_id} [%thread] %-5level %logger{50} - %msg%n</pattern>
|
||||
<charset>UTF-8</charset> <!-- 此处设置字符集 -->
|
||||
</encoder>
|
||||
<!-- 日志记录器的滚动策略,按日期,按大小记录 -->
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<fileNamePattern>${LOG_HOME}/${SERVICE_NAME}/${SERVICE_NAME}-warn-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
|
||||
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
|
||||
<maxFileSize>100MB</maxFileSize>
|
||||
</timeBasedFileNamingAndTriggeringPolicy>
|
||||
<!--日志文档保留天数-->
|
||||
<maxHistory>181</maxHistory>
|
||||
</rollingPolicy>
|
||||
<!-- 此日志文档只记录warn级别的 -->
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<level>warn</level>
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<!-- 2.4 level为 ERROR 日志,时间滚动输出 -->
|
||||
<appender name="ERROR_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<!-- 正在记录的日志文档的路径及文档名 -->
|
||||
<file>${LOG_HOME}/${SERVICE_NAME}/${SERVICE_NAME}-error.log</file>
|
||||
<!--日志文档输出格式-->
|
||||
<encoder>
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} ${PID} %X{trace_id} [%thread] %-5level %logger{50} - %msg%n</pattern>
|
||||
<charset>UTF-8</charset> <!-- 此处设置字符集 -->
|
||||
</encoder>
|
||||
<!-- 日志记录器的滚动策略,按日期,按大小记录 -->
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<fileNamePattern>${LOG_HOME}/${SERVICE_NAME}/${SERVICE_NAME}-error-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
|
||||
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
|
||||
<maxFileSize>100MB</maxFileSize>
|
||||
</timeBasedFileNamingAndTriggeringPolicy>
|
||||
<!--日志文档保留天数-->
|
||||
<maxHistory>181</maxHistory>
|
||||
</rollingPolicy>
|
||||
<!-- 此日志文档只记录ERROR级别的 -->
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<level>ERROR</level>
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
|
||||
<property name="email_subject" value="【Error】: %logger - %msg"/>
|
||||
|
||||
<logger name="com.wabestway" additivity="false">
|
||||
<level value="debug"/>
|
||||
<appender-ref ref="FILE"/>
|
||||
<appender-ref ref="STDOUT"/>
|
||||
</logger>
|
||||
|
||||
<logger name="com.alibaba" additivity="false">
|
||||
<level value="ERROR"/>
|
||||
<appender-ref ref="FILE"/>
|
||||
<appender-ref ref="STDOUT"/>
|
||||
</logger>
|
||||
|
||||
<!-- 在程序的开发测试阶段,可以调整level的级别,常用级别优先级为: -->
|
||||
<!-- TRACE < DEBUG < INFO < WARN < ERROR -->
|
||||
<!-- 日志输出级别 -->
|
||||
<root level="INFO">
|
||||
<appender-ref ref="STDOUT"/>
|
||||
<appender-ref ref="INFO_FILE"/>
|
||||
<appender-ref ref="FILE"/>
|
||||
<appender-ref ref="WARN_FILE"/>
|
||||
<appender-ref ref="ERROR_FILE"/>
|
||||
</root>
|
||||
</configuration>
|
||||
@@ -1,99 +1,53 @@
|
||||
<?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>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
||||
<groupId>io.springfox</groupId>
|
||||
<artifactId>springfox-swagger-ui</artifactId>
|
||||
<version>${swagger.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||
<groupId>io.springfox</groupId>
|
||||
<artifactId>springfox-swagger2</artifactId>
|
||||
<version>${swagger.version}</version>
|
||||
</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>
|
||||
@@ -1,15 +0,0 @@
|
||||
package com.wabestway.recall;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
||||
|
||||
@SpringBootApplication
|
||||
@EnableDiscoveryClient
|
||||
public class AfisRecallApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(AfisRecallApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
package com.wabestway.recall.model;
|
||||
|
||||
import lombok.Data;
|
||||
import org.bson.codecs.pojo.annotations.BsonIgnore;
|
||||
import org.springframework.data.annotation.Id;
|
||||
import org.springframework.data.mongodb.core.index.Indexed;
|
||||
import org.springframework.data.mongodb.core.mapping.Document;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@Document(collection = "orders")
|
||||
public class Order {
|
||||
@Id
|
||||
private String id;
|
||||
private String appKey;
|
||||
private String tenantId;
|
||||
private String productCode;
|
||||
private String productName;
|
||||
@BsonIgnore
|
||||
private List<String> events;
|
||||
@Indexed(unique = true)
|
||||
private String traceId;
|
||||
@Indexed(unique = true)
|
||||
private String orderId;
|
||||
private String complete;
|
||||
private String archived;
|
||||
private String fileId;
|
||||
private String fileUrl;
|
||||
private long createAt;
|
||||
@BsonIgnore
|
||||
private int page;
|
||||
@BsonIgnore
|
||||
private int pageSize;
|
||||
|
||||
private String startDate;
|
||||
private String endDate;
|
||||
private String policyNo;
|
||||
private String holderName;
|
||||
private String holderPhone;
|
||||
private String supplierName;
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
package com.wabestway.recall.model;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class OrderList {
|
||||
private int page;
|
||||
private int pageSize;
|
||||
private long total;
|
||||
private List<Order> list;
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
package com.wabestway.recall.model;
|
||||
|
||||
import lombok.Data;
|
||||
import org.bson.codecs.pojo.annotations.BsonIgnore;
|
||||
import org.springframework.data.annotation.Id;
|
||||
import org.springframework.data.mongodb.core.index.Indexed;
|
||||
import org.springframework.data.mongodb.core.mapping.Document;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@Document(collection = "records")
|
||||
public class Record {
|
||||
@Id
|
||||
private String id;
|
||||
private List<String> events;
|
||||
@Indexed(unique = false)
|
||||
private String traceId;
|
||||
@BsonIgnore
|
||||
private String orderId;
|
||||
private boolean last;
|
||||
private String productCode;
|
||||
private String productName;
|
||||
private long createAt;
|
||||
@BsonIgnore
|
||||
private String appKey;
|
||||
private String module;
|
||||
private String content;
|
||||
}
|
||||
@@ -1,173 +0,0 @@
|
||||
package com.wabestway.recall.model;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@Data
|
||||
public class ResObj<T> {
|
||||
private static final String SUCCESS = "success";
|
||||
|
||||
private static final String FAILURE = "failure";
|
||||
|
||||
private static final Integer SUCCESS_CODE = 200;
|
||||
|
||||
private static final Integer FAILURE_CODE = 400;
|
||||
|
||||
private Integer code;
|
||||
|
||||
private String message;
|
||||
|
||||
private String _trackId;
|
||||
|
||||
private T data;
|
||||
|
||||
private Map extr;
|
||||
|
||||
private long timestamp;
|
||||
|
||||
private Integer _status;
|
||||
|
||||
private ResObj(Integer code, T data) {
|
||||
this.code = code;
|
||||
this.data = data;
|
||||
this.timestamp = System.currentTimeMillis();
|
||||
}
|
||||
|
||||
private ResObj(Integer code, String message, T data) {
|
||||
this.code = code;
|
||||
this.data = data;
|
||||
this.message = message;
|
||||
this.timestamp = System.currentTimeMillis();
|
||||
}
|
||||
|
||||
private ResObj(T data) {
|
||||
this.data = data;
|
||||
this.timestamp = System.currentTimeMillis();
|
||||
}
|
||||
|
||||
private ResObj(Integer code) {
|
||||
this.code = code;
|
||||
this.timestamp = System.currentTimeMillis();
|
||||
}
|
||||
|
||||
public boolean isOk() {
|
||||
return SUCCESS_CODE.equals(this.code);
|
||||
}
|
||||
|
||||
public T data() {
|
||||
return (T) this.data;
|
||||
}
|
||||
|
||||
public Object get(String key) {
|
||||
if (this.data != null && key != null) {
|
||||
return ((Map) this.data).get(key);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public ResObj() {
|
||||
this.timestamp = System.currentTimeMillis();
|
||||
}
|
||||
|
||||
public static ResObj ok() {
|
||||
ResObj o = new ResObj(SUCCESS_CODE);
|
||||
return o;
|
||||
}
|
||||
|
||||
public static ResObj ok(Object data) {
|
||||
ResObj o = new ResObj(SUCCESS_CODE, data);
|
||||
return o;
|
||||
}
|
||||
|
||||
public static ResObj fail(String msg) {
|
||||
ResObj o = new ResObj(FAILURE_CODE, msg, null);
|
||||
return o;
|
||||
}
|
||||
|
||||
|
||||
public static ResObj fail() {
|
||||
ResObj o = new ResObj(FAILURE_CODE);
|
||||
return o;
|
||||
}
|
||||
|
||||
public static ResObj result(Integer code, Object data) {
|
||||
ResObj o = new ResObj(code, data);
|
||||
return o;
|
||||
}
|
||||
|
||||
public static ResObj result(Integer code, String message, Object data) {
|
||||
ResObj o = new ResObj(code, message, data);
|
||||
return o;
|
||||
}
|
||||
|
||||
public Integer getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(Integer code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public void setMessage(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public T getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public ResObj<T> setData(T data) {
|
||||
this.data = data;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Long getTimestamp() {
|
||||
return timestamp;
|
||||
}
|
||||
|
||||
public ResObj setTimestamp(Long timestamp) {
|
||||
this.timestamp = timestamp;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Map getExtr() {
|
||||
return extr;
|
||||
}
|
||||
|
||||
|
||||
public Integer get_status() {
|
||||
return _status;
|
||||
}
|
||||
|
||||
public void set_status(Integer _status) {
|
||||
this._status = _status;
|
||||
}
|
||||
|
||||
public String get_trackId() {
|
||||
return _trackId;
|
||||
}
|
||||
|
||||
public void set_trackId(String _trackId) {
|
||||
this._trackId = _trackId;
|
||||
}
|
||||
|
||||
public ResObj trackId(String _trackId) {
|
||||
this._trackId = _trackId;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
if (message == null) {
|
||||
return "ResObj(" + code + ")";
|
||||
}
|
||||
return "ResObj(" + code + "){" + message + "}";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
package com.wabestway.recall.repository;
|
||||
|
||||
import com.wabestway.recall.model.Order;
|
||||
import org.springframework.data.domain.*;
|
||||
import org.springframework.data.mongodb.repository.ReactiveMongoRepository;
|
||||
import reactor.core.publisher.Flux;
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
public interface OrderRepository extends ReactiveMongoRepository<Order, String> {
|
||||
Mono<Order> findByOrderId(String orderId);
|
||||
|
||||
Mono<Order> findByTraceId(String traceId);
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
package com.wabestway.recall.repository;
|
||||
|
||||
|
||||
import com.wabestway.recall.model.Record;
|
||||
import org.springframework.data.mongodb.repository.ReactiveMongoRepository;
|
||||
import reactor.core.publisher.Flux;
|
||||
|
||||
|
||||
public interface RecordRepository extends ReactiveMongoRepository<Record, String> {
|
||||
Flux<Record> findAllByTraceIdOrderByCreateAtAsc(String traceId);
|
||||
}
|
||||
@@ -1,70 +0,0 @@
|
||||
package com.wabestway.recall.web;
|
||||
|
||||
import com.wabestway.recall.model.Order;
|
||||
import com.wabestway.recall.model.OrderList;
|
||||
import com.wabestway.recall.model.Record;
|
||||
import com.wabestway.recall.model.ResObj;
|
||||
import com.wabestway.recall.repository.OrderRepository;
|
||||
import com.wabestway.recall.repository.RecordRepository;
|
||||
import org.springframework.data.domain.*;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import reactor.core.publisher.Flux;
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/order")
|
||||
public class OrderController {
|
||||
private final RecordRepository recordRepository;
|
||||
private final OrderRepository orderRepository;
|
||||
|
||||
public OrderController(RecordRepository recordRepository, OrderRepository orderRepository) {
|
||||
this.recordRepository = recordRepository;
|
||||
this.orderRepository = orderRepository;
|
||||
}
|
||||
|
||||
@GetMapping
|
||||
public Flux<Order> getAllOrders() {
|
||||
return orderRepository.findAll();
|
||||
}
|
||||
|
||||
@PostMapping("/list")
|
||||
public Mono<ResObj> list(@RequestBody Order order) {
|
||||
OrderList resList = new OrderList();
|
||||
List<Order> list = new ArrayList<>();
|
||||
Sort s = Sort.by("createAt").descending();
|
||||
PageRequest pageRequest = PageRequest.of(order.getPage() - 1, order.getPageSize(), s);
|
||||
ExampleMatcher matcher = ExampleMatcher.matching()
|
||||
.withIgnoreNullValues().withIgnorePaths("createAt", "last", "page", "pageSize");
|
||||
Example<Order> ep = Example.of(order, matcher);
|
||||
Flux<Order> flux = orderRepository.findAll(ep, s);
|
||||
flux.skip(pageRequest.getOffset()).limitRequest(pageRequest.getPageSize()).subscribe(list::add);
|
||||
resList.setList(list);
|
||||
// Mono<List<Order>> listMono = flux.skip(pageRequest.getOffset()).limitRequest(pageRequest.getPageSize()).collectList();
|
||||
// return listMono.flatMap(list -> {
|
||||
// resList.setList(list);
|
||||
// return Mono.just(ResObj.ok(resList));
|
||||
// });
|
||||
return flux.count().flatMap(count -> {
|
||||
resList.setTotal(count);
|
||||
return Mono.just(ResObj.ok(resList));
|
||||
});
|
||||
}
|
||||
|
||||
@PostMapping("/info/{orderId}")
|
||||
public Mono<ResObj> findByOrderId(@PathVariable String orderId) {
|
||||
Mono<Order> forder = orderRepository.findByOrderId(orderId);
|
||||
return forder.flatMap(fo -> {
|
||||
Flux<Record> rs = recordRepository.findAllByTraceIdOrderByCreateAtAsc(fo.getTraceId());
|
||||
Mono<List<List<String>>> es = rs.map(rr -> rr.getEvents()).collectList();
|
||||
Mono<List<String>> events = es.flatMapIterable(lists -> lists).flatMapIterable(list -> list).collectList();
|
||||
return events.flatMap(e -> {
|
||||
fo.setEvents(e);
|
||||
return Mono.just(ResObj.ok(fo));
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -1,104 +0,0 @@
|
||||
package com.wabestway.recall.web;
|
||||
|
||||
import com.wabestway.recall.model.Order;
|
||||
import com.wabestway.recall.model.Record;
|
||||
import com.wabestway.recall.model.ResObj;
|
||||
import com.wabestway.recall.repository.OrderRepository;
|
||||
import com.wabestway.recall.repository.RecordRepository;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import reactor.core.publisher.Flux;
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/track")
|
||||
public class RecallController {
|
||||
private final RecordRepository recordRepository;
|
||||
private final OrderRepository orderRepository;
|
||||
|
||||
public RecallController(RecordRepository recordRepository, OrderRepository orderRepository) {
|
||||
this.recordRepository = recordRepository;
|
||||
this.orderRepository = orderRepository;
|
||||
}
|
||||
|
||||
@GetMapping
|
||||
public Flux<Record> getAllUsers() {
|
||||
return recordRepository.findAll();
|
||||
}
|
||||
|
||||
@PostMapping("/save")
|
||||
public Mono<ResObj> save(@RequestBody Record record) {
|
||||
if (record.getOrderId() != null && !record.getOrderId().isEmpty()) {
|
||||
Mono<Order> order = orderRepository.findByOrderId(record.getOrderId());
|
||||
order.hasElement().subscribe(exit -> {
|
||||
if (!exit) {
|
||||
if (record.getTraceId() != null && !record.getTraceId().isEmpty()) {
|
||||
Mono<Order> tcOrder = orderRepository.findByTraceId(record.getTraceId());
|
||||
tcOrder.filter(to -> to.getId() != null).flatMap(to -> {
|
||||
to.setOrderId(record.getOrderId());
|
||||
if (record.isLast()) {
|
||||
to.setComplete("1");
|
||||
}
|
||||
return orderRepository.save(to);
|
||||
}).subscribe();
|
||||
} else {
|
||||
record.setTraceId(UUID.randomUUID().toString().replace("-", ""));
|
||||
Order forder = new Order();
|
||||
forder.setOrderId(record.getOrderId());
|
||||
forder.setTraceId(record.getTraceId());
|
||||
forder.setProductCode(record.getProductCode());
|
||||
forder.setProductName(record.getProductName());
|
||||
forder.setCreateAt(System.currentTimeMillis());
|
||||
forder.setAppKey(record.getAppKey());
|
||||
forder.setArchived("0");
|
||||
forder.setComplete("0");
|
||||
forder.setHolderName("王五");
|
||||
forder.setHolderPhone("18515064530");
|
||||
forder.setSupplierName("阳光保险");
|
||||
forder.setStartDate("2023-01-01");
|
||||
forder.setEndDate("2035-01-01");
|
||||
if (record.isLast()) {
|
||||
forder.setComplete("1");
|
||||
}
|
||||
orderRepository.save(forder).subscribe();
|
||||
}
|
||||
} else {
|
||||
order.subscribe(to -> {
|
||||
if (record.isLast()) {
|
||||
to.setComplete("1");
|
||||
orderRepository.save(to).subscribe();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
if (record.getTraceId() == null || record.getTraceId().isEmpty()) {
|
||||
record.setTraceId(UUID.randomUUID().toString().replace("-", ""));
|
||||
Order order = new Order();
|
||||
order.setTraceId(record.getTraceId());
|
||||
order.setProductCode(record.getProductCode());
|
||||
order.setProductName(record.getProductName());
|
||||
order.setCreateAt(System.currentTimeMillis());
|
||||
order.setAppKey(record.getAppKey());
|
||||
order.setArchived("0");
|
||||
order.setComplete("0");
|
||||
order.setHolderName("王五");
|
||||
order.setHolderPhone("18515064530");
|
||||
order.setSupplierName("阳光保险");
|
||||
order.setStartDate("2023-01-01");
|
||||
order.setEndDate("2035-01-01");
|
||||
if (record.isLast()) {
|
||||
order.setComplete("1");
|
||||
}
|
||||
orderRepository.save(order).subscribe();
|
||||
}
|
||||
}
|
||||
record.setCreateAt(System.currentTimeMillis());
|
||||
|
||||
return recordRepository.save(record).flatMap(ss -> {
|
||||
ss.setEvents(null);
|
||||
return Mono.just(ResObj.ok(ss));
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -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 +0,0 @@
|
||||
|
||||
@@ -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
|
||||
@@ -1,12 +0,0 @@
|
||||
package com.wabestway.recall;
|
||||
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
public class FFmpeg {
|
||||
@Test
|
||||
public void TestMp4() {
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user