Commit 85e41fe9 authored by ysongq's avatar ysongq

Merge branch 'dm_dev' of http://gitlab.ioubuy.cn/yaobenzhang/dm_project into dm_dev

parents 7d84f2ac 934852f2
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<?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.jz.dm</groupId>
<artifactId>jz-dm-parent</artifactId>
<groupId>com.jz.dm</groupId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jz-dm-apigateway</artifactId>
<name>jz-dm-apigateway</name>
<description>jz-dm-apigateway</description>
<dependencies>
<!-- spring-boot -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>
<version>1.5.2.RELEASE</version>
<scope>compile</scope>
</dependency>
<!--<dependency>
<groupId>org.springframework.session</groupId>
<artifactId>spring-session</artifactId>
<version>1.3.0.RELEASE</version>
<scope>compile</scope>
</dependency>-->
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis-spring</artifactId>
<version>1.2.2</version>
<scope>compile</scope>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid</artifactId>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>
<version>3.2.7</version>
<scope>compile</scope>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<!--mybatis-plus自动的维护了mybatis以及mybatis-spring的依赖,
在springboot中这三者不能同时的出现,避免版本的冲突,表示:跳进过这个坑-->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>4.3.2.RELEASE</version>
<scope>compile</scope>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>3.1.1</version>
</dependency>
<!-- 引入Druid依赖,阿里巴巴所提供的数据源 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<version>1.5.2.RELEASE</version>
<scope>compile</scope>
<groupId>com.alibaba</groupId>
<artifactId>druid</artifactId>
<version>1.0.29</version>
</dependency>
<!-- 提供mysql驱动 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.38</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
<version>4.4.10</version>
<artifactId>httpclient</artifactId>
<version>4.5.6</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>6.0.6</version>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>RELEASE</version>
<scope>test</scope>
</dependency>
<!--lang3工具类-->
<dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
<version>3.1.0</version>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient -->
<!--fastJson包-->
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.6</version>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
</dependency>
<dependency>
<groupId>com.jz.common</groupId>
<artifactId>jz-dm-common</artifactId>
<version>1.0.0-SNAPSHOT</version>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.16</version>
<scope>compile</scope>
</dependency>
</dependencies>
......
package com.jz.dm.gateway;
package com.jz.dm;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
/**
* @author key
*/
* @author ZC
* @PACKAGE_NAME: com.jz.dm
* @PROJECT_NAME: jz-dm-parent
* @NAME: ApiGatewayApplication
* @USER: key
* @DATE: 2020-12-2/16:03
* @DAY_NAME_SHORT: 周三
* @Description:
**/
@SpringBootApplication
//@ComponentScan(basePackages = {"com.jz.dm"})
@MapperScan("com.jz.dm.gateway.mapper")
//@ComponentScan(basePackages = {"com.jz"})
@MapperScan("com.jz.dm.mapper")
public class ApiGatewayApplication {
public static void main(String[] args) {
SpringApplication.run(ApiGatewayApplication.class, args);
}
public static void main(String[] args) {
SpringApplication.run(ApiGatewayApplication.class, args);
}
}
package com.jz.dm.gateway.common.exception;
package com.jz.dm.common.exception;
import com.jz.dm.gateway.common.util.ResultCode;
import com.jz.dm.common.util.ResultCode;
/**
* 网关异常
......
package com.jz.dm.gateway.common.exception;
package com.jz.dm.common.exception;
import com.jz.dm.gateway.common.util.ResultCode;
import com.jz.dm.common.util.ResultCode;
/**
* 信息摘要异常
......
package com.jz.dm.gateway.common.exception;
package com.jz.dm.common.exception;
import com.jz.dm.gateway.common.util.ResultCode;
import com.jz.dm.common.util.ResultCode;
/**
* 通知异常
......
package com.jz.dm.gateway.common.exception;
package com.jz.dm.common.exception;
import com.jz.dm.gateway.common.util.ResultCode;
import com.jz.dm.common.util.ResultCode;
/**
* openapi异常
......
package com.jz.dm.gateway.common.exception;
package com.jz.dm.common.exception;
import com.jz.dm.gateway.common.util.ResultCode;
import com.jz.dm.common.util.ResultCode;
/**
* 加密异常
......
package com.jz.dm.gateway.common.exception;
package com.jz.dm.common.exception;
import com.jz.dm.gateway.common.util.ResultCode;
import com.jz.dm.common.util.ResultCode;
/**
* 签名异常
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.jz.dm.gateway.common.util;
package com.jz.dm.common.util;
import org.apache.commons.codec.BinaryDecoder;
import org.apache.commons.codec.BinaryEncoder;
......
/**
* Copyright (c) 2011-2014 All Rights Reserved.
*/
package com.jz.dm.gateway.common.util;
package com.jz.dm.common.util;
/**
* @author Admin
......
package com.jz.dm.gateway.common.util;
package com.jz.dm.common.util;
import java.beans.BeanInfo;
import java.beans.IntrospectionException;
......
package com.jz.dm.gateway.common.util;
package com.jz.dm.common.util;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
......
package com.jz.dm.gateway.common.util;
package com.jz.dm.common.util;
import java.util.HashMap;
import java.util.Map;
......
package com.jz.dm.gateway.common.util;
package com.jz.dm.common.util;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.jz.dm.gateway.common.exception.OpenApiException;
import com.jz.dm.common.exception.OpenApiException;
import java.math.BigDecimal;
import java.math.BigInteger;
......
package com.jz.dm.gateway.common.util;
package com.jz.dm.common.util;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
......
package com.jz.dm.gateway.common.util;
package com.jz.dm.common.util;
import java.util.HashMap;
import java.util.Map;
......
package com.jz.dm.gateway.common.util;
package com.jz.dm.common.util;
import org.apache.commons.codec.binary.Base64;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.commons.codec.binary.Base64;
import javax.crypto.Cipher;
import java.io.ByteArrayOutputStream;
import java.io.UnsupportedEncodingException;
......
package com.jz.dm.gateway.common.util;
package com.jz.dm.common.util;
import org.apache.tomcat.util.http.fileupload.IOUtils;
import org.apache.commons.codec.binary.Base64;
import org.apache.tomcat.util.http.fileupload.IOUtils;
import javax.crypto.Cipher;
import java.io.ByteArrayOutputStream;
import java.security.*;
......@@ -12,6 +13,7 @@ import java.security.spec.PKCS8EncodedKeySpec;
import java.security.spec.X509EncodedKeySpec;
import java.util.HashMap;
import java.util.Map;
public class RSAUtils {
public static final String CHARSET = "UTF-8";
......
package com.jz.dm.gateway.common.util;
package com.jz.dm.common.util;
import com.alibaba.fastjson.PropertyNamingStrategy;
import com.jz.dm.gateway.common.exception.SignatureException;
import com.jz.dm.gateway.model.signtype.Md5;
import com.jz.dm.common.exception.SignatureException;
import com.jz.dm.model.signtype.Md5;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
......
package com.jz.dm.gateway.common.util;
package com.jz.dm.common.util;
import org.apache.commons.lang3.StringUtils;
......
package com.jz.dm.gateway.common.util;
package com.jz.dm.common.util;
import lombok.extern.slf4j.Slf4j;
import org.apache.http.*;
......
package com.jz.dm.config;
import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import com.baomidou.mybatisplus.extension.plugins.pagination.optimize.JsqlParserCountOptimize;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.annotation.EnableTransactionManagement;
/**
* @ClassName: MybatisPlusConfig
* @Author Bellamy
* @Date 2020/11/27
* @Version 1.0
*/
@EnableTransactionManagement
@Configuration
@MapperScan("com.jz.dm.mapper")
public class MybatisPlusConfig {
//@Bean
//public PaginationInterceptor paginationInterceptor() {
// PaginationInterceptor paginationInterceptor = new PaginationInterceptor();
// // 设置请求的页面大于最大页后操作, true调回到首页,false 继续请求 默认false
// // paginationInterceptor.setOverflow(false);
// // 设置最大单页限制数量,默认 500 条,-1 不受限制
// paginationInterceptor.setLimit(500);
// // 开启 count 的 join 优化,只针对部分 left join
// paginationInterceptor.setCountSqlParser(new JsqlParserCountOptimize(true));
// return paginationInterceptor;
//}
}
package com.jz.dm.gateway.constant;
package com.jz.dm.constant;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
......
package com.jz.dm.gateway.controller;
package com.jz.dm.controller;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.PropertyNamingStrategy;
import com.jz.dm.gateway.common.util.JsonUtil;
import com.jz.dm.gateway.gateway.GatewayService;
import com.jz.dm.gateway.model.GatewayRequest;
import com.jz.dm.gateway.model.GatewayResponse;
import com.jz.dm.gateway.model.RequestContext;
import com.jz.dm.common.util.JsonUtil;
import com.jz.dm.gateway.GatewayService;
import com.jz.dm.model.GatewayRequest;
import com.jz.dm.model.GatewayResponse;
import com.jz.dm.model.RequestContext;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.CollectionUtils;
......
package com.jz.dm.gateway.filter;
package com.jz.dm.filter;
import com.jz.dm.gateway.model.GatewayRequest;
import com.jz.dm.gateway.model.GatewayResponse;
import com.jz.dm.gateway.model.RequestContext;
import com.jz.dm.model.GatewayRequest;
import com.jz.dm.model.GatewayResponse;
import com.jz.dm.model.RequestContext;
import org.springframework.core.Ordered;
/**
* 抽象过滤器
* @author key
......
package com.jz.dm.gateway.filter;
package com.jz.dm.filter;
import com.jz.dm.gateway.common.exception.GatewayException;
import com.jz.dm.gateway.common.util.SignType;
import com.jz.dm.gateway.common.util.StringUtil;
import com.jz.dm.gateway.constant.Constants;
import com.jz.dm.gateway.model.GatewayRequest;
import com.jz.dm.gateway.model.GatewayResponse;
import com.jz.dm.gateway.model.enums.Format;
import com.jz.dm.gateway.model.enums.GatewayResultCode;
import com.jz.dm.common.exception.GatewayException;
import com.jz.dm.common.util.SignType;
import com.jz.dm.common.util.StringUtil;
import com.jz.dm.constant.Constants;
import com.jz.dm.model.GatewayRequest;
import com.jz.dm.model.GatewayResponse;
import com.jz.dm.model.enums.Format;
import com.jz.dm.model.enums.GatewayResultCode;
import org.springframework.stereotype.Component;
import java.nio.charset.Charset;
......
package com.jz.dm.gateway.filter;
import com.jz.dm.gateway.common.exception.GatewayException;
import com.jz.dm.gateway.constant.Constants;
import com.jz.dm.gateway.model.GatewayRequest;
import com.jz.dm.gateway.model.GatewayResponse;
import com.jz.dm.gateway.model.RequestContext;
import com.jz.dm.gateway.model.enums.GatewayResultCode;
package com.jz.dm.filter;
import com.jz.dm.common.exception.GatewayException;
import com.jz.dm.constant.Constants;
import com.jz.dm.model.GatewayRequest;
import com.jz.dm.model.GatewayResponse;
import com.jz.dm.model.RequestContext;
import com.jz.dm.model.enums.GatewayResultCode;
import org.springframework.stereotype.Component;
import javax.servlet.http.HttpServletRequest;
......
package com.jz.dm.gateway.filter;
import com.jz.dm.gateway.common.exception.GatewayException;
import com.jz.dm.gateway.constant.Constants;
import com.jz.dm.gateway.model.GatewayRequest;
import com.jz.dm.gateway.model.GatewayResponse;
import com.jz.dm.gateway.model.enums.GatewayResultCode;
import org.springframework.beans.factory.annotation.Value;
package com.jz.dm.filter;
import com.jz.dm.common.exception.GatewayException;
import com.jz.dm.constant.Constants;
import com.jz.dm.model.GatewayRequest;
import com.jz.dm.model.GatewayResponse;
import com.jz.dm.model.enums.GatewayResultCode;
import org.springframework.stereotype.Component;
/**
......
package com.jz.dm.gateway.filter;
package com.jz.dm.filter;
import com.jz.dm.gateway.model.GatewayRequest;
import com.jz.dm.gateway.model.GatewayResponse;
import com.jz.dm.model.GatewayRequest;
import com.jz.dm.model.GatewayResponse;
/**
* 过滤器
......
package com.jz.dm.gateway.filter;
package com.jz.dm.filter;
import com.jz.dm.gateway.model.GatewayRequest;
import com.jz.dm.gateway.model.GatewayResponse;
import com.jz.dm.model.GatewayRequest;
import com.jz.dm.model.GatewayResponse;
/**
* 请求过滤链
......
package com.jz.dm.gateway.filter;
package com.jz.dm.filter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
......
package com.jz.dm.gateway.filter;
package com.jz.dm.filter;
import com.jz.dm.gateway.common.exception.OpenApiException;
import com.jz.dm.gateway.common.util.LogUtil;
import com.jz.dm.gateway.common.util.ResultCode;
import com.jz.dm.gateway.model.GatewayRequest;
import com.jz.dm.gateway.model.GatewayResponse;
import com.jz.dm.gateway.model.enums.GatewayResultCode;
import com.jz.dm.common.exception.OpenApiException;
import com.jz.dm.common.util.LogUtil;
import com.jz.dm.common.util.ResultCode;
import com.jz.dm.model.GatewayRequest;
import com.jz.dm.model.GatewayResponse;
import com.jz.dm.model.enums.GatewayResultCode;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
......
package com.jz.dm.gateway.filter;
package com.jz.dm.filter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
......
package com.jz.dm.gateway.filter;
package com.jz.dm.filter;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.jz.dm.gateway.common.exception.GatewayException;
import com.jz.dm.gateway.common.util.LogUtil;
import com.jz.dm.gateway.constant.Constants;
import com.jz.dm.gateway.constant.LoggingConstants;
import com.jz.dm.gateway.gateway.DefaultOpenApiDispatcher;
import com.jz.dm.gateway.model.*;
import com.jz.dm.gateway.model.enums.GatewayResultCode;
import com.jz.dm.gateway.model.enums.RouteType;
import com.jz.dm.common.exception.GatewayException;
import com.jz.dm.common.util.LogUtil;
import com.jz.dm.constant.Constants;
import com.jz.dm.constant.LoggingConstants;
import com.jz.dm.gateway.DefaultOpenApiDispatcher;
import com.jz.dm.model.enums.GatewayResultCode;
import com.jz.dm.model.enums.RouteType;
import com.jz.dm.model.*;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
......
package com.jz.dm.gateway.filter;
package com.jz.dm.filter;
import com.alibaba.fastjson.JSONException;
import com.alibaba.fastjson.PropertyNamingStrategy;
import com.jz.dm.gateway.common.util.StringUtil;
import com.jz.dm.gateway.common.exception.SignatureException;
import com.jz.dm.gateway.common.util.*;
import com.jz.dm.gateway.model.GatewayRequest;
import com.jz.dm.gateway.model.GatewayResponse;
import com.jz.dm.gateway.model.enums.GatewayResultCode;
import com.jz.dm.common.util.*;
import com.jz.dm.common.exception.SignatureException;
import com.jz.dm.common.util.StringUtil;
import com.jz.dm.constant.Constants;
import com.jz.dm.model.GatewayRequest;
import com.jz.dm.model.GatewayResponse;
import com.jz.dm.model.enums.GatewayResultCode;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.jz.dm.gateway.constant.Constants;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import org.springframework.util.CollectionUtils;
......
package com.jz.dm.gateway.filter;
import com.jz.dm.gateway.common.util.HddHashMap;
import com.jz.dm.gateway.common.util.RSAUtils;
import com.jz.dm.gateway.constant.Constants;
import com.jz.dm.gateway.model.*;
import com.jz.dm.gateway.model.enums.RouteType;
package com.jz.dm.filter;
import com.jz.dm.common.util.HddHashMap;
import com.jz.dm.common.util.RSAUtils;
import com.jz.dm.constant.Constants;
import com.jz.dm.model.enums.RouteType;
import com.jz.dm.model.GatewayRequest;
import com.jz.dm.model.GatewayResponse;
import com.jz.dm.model.OpenApi;
import com.jz.dm.model.RequestContext;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import java.security.interfaces.RSAPublicKey;
......
package com.jz.dm.gateway.gateway;
package com.jz.dm.gateway;
import com.alibaba.fastjson.JSON;
import com.jz.dm.gateway.common.util.StringUtil;
import com.jz.dm.gateway.common.exception.OpenApiException;
import com.jz.dm.gateway.common.util.OpenApiRequest;
import com.jz.dm.gateway.common.util.OpenApiResponse;
import com.jz.dm.gateway.common.util.OpenApiResultCode;
import com.jz.dm.gateway.model.DispatchContext;
import com.jz.dm.common.exception.OpenApiException;
import com.jz.dm.common.util.OpenApiRequest;
import com.jz.dm.common.util.OpenApiResponse;
import com.jz.dm.common.util.OpenApiResultCode;
import com.jz.dm.common.util.StringUtil;
import com.jz.dm.model.DispatchContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
......@@ -19,8 +19,9 @@ import java.util.concurrent.ConcurrentHashMap;
/**
* 默认openapi分发器
*
* @author key
*/
@Component
@Component("defaultOpenApiDispatcher")
public class DefaultOpenApiDispatcher implements OpenApiDispatcher {
private static final Logger LOGGER = LoggerFactory
......
package com.jz.dm.gateway.gateway;
package com.jz.dm.gateway;
import com.jz.dm.gateway.model.GatewayRequest;
import com.jz.dm.gateway.model.GatewayResponse;
import com.jz.dm.model.GatewayRequest;
import com.jz.dm.model.GatewayResponse;
/**
* GatewayService
* @author key
*/
public interface GatewayService {
......
package com.jz.dm.gateway.gateway;
package com.jz.dm.gateway;
import com.jz.dm.gateway.model.DispatchContext;
import com.jz.dm.model.DispatchContext;
/**
* openapi分发器
......
package com.jz.dm.gateway.gateway;
package com.jz.dm.gateway;
import com.jz.dm.gateway.common.util.OpenApiRequest;
import com.jz.dm.gateway.common.util.OpenApiResponse;
import com.jz.dm.common.util.OpenApiRequest;
import com.jz.dm.common.util.OpenApiResponse;
/**
* openapi服务
......
/**
* Copyright (c) 2011-2019 All Rights Reserved.
*/
package com.jz.dm.gateway.gateway.impl;
package com.jz.dm.gateway.impl;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
* API白名单表 服务实现类
*
......
package com.jz.dm.gateway.gateway.impl;
package com.jz.dm.gateway.impl;
import com.jz.dm.gateway.filter.FilterChain;
import com.jz.dm.gateway.filter.FilterChainFactory;
import com.jz.dm.gateway.gateway.GatewayService;
import com.jz.dm.gateway.model.GatewayRequest;
import com.jz.dm.gateway.model.GatewayResponse;
import com.jz.dm.filter.FilterChain;
import com.jz.dm.filter.FilterChainFactory;
import com.jz.dm.gateway.GatewayService;
import com.jz.dm.model.GatewayRequest;
import com.jz.dm.model.GatewayResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* 网关服务
*
* @author key
*/
@Service
@Service("gatewayService")
public class GatewayServiceImpl implements GatewayService {
@Autowired
......
package com.jz.dm.gateway.mapper;
import com.jz.common.base.BaseMapper;
import com.jz.common.entity.DataGoodsApi;
/**
* api商品(TDataGoodsApi)表数据库访问层
*
* @author Bellamy
* @since 2020-12-01 10:41:31
*/
public interface DataGoodsApiDao extends BaseMapper<DataGoodsApi> {
}
\ No newline at end of file
package com.jz.dm.gateway.mapper;
import com.jz.common.base.BaseMapper;
import com.jz.common.entity.DataGoodsApiParams;
/**
* api商品参数配置(TDataGoodsApiParams)表数据库访问层
*
* @author Bellamy
* @since 2020-12-01 10:41:31
*/
public interface DataGoodsApiParamsDao extends BaseMapper<DataGoodsApiParams> {
}
\ No newline at end of file
package com.jz.dm.gateway.service;
/**
* @author ZC
* @PACKAGE_NAME: com.jz.gateway.service
* @PROJECT_NAME: jz-dm-parent
* @NAME: Test
* @USER: key
* @DATE: 2020-11-24/16:21
* @DAY_NAME_SHORT: 周二
* @Description:
**/
public class Test {
}
package com.jz.dm.gateway.model;
package com.jz.dm.model;
import java.io.Serializable;
import java.util.HashMap;
......
package com.jz.dm.gateway.model;
package com.jz.dm.model;
import com.jz.dm.gateway.web.annotation.ParamName;
import com.jz.dm.web.annotation.ParamName;
import java.io.Serializable;
import java.util.HashMap;
......
package com.jz.dm.gateway.model;
package com.jz.dm.model;
import com.alibaba.fastjson.annotation.JSONField;
import com.alibaba.fastjson.annotation.JSONType;
......
package com.jz.dm.gateway.model;
package com.jz.dm.model;
import com.alibaba.fastjson.JSON;
import com.jz.dm.gateway.model.enums.RouteType;
import com.jz.dm.model.enums.RouteType;
import java.util.Date;
import java.util.HashMap;
......
package com.jz.dm.gateway.model;
package com.jz.dm.model;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
......
package com.jz.dm.gateway.model.enums;
package com.jz.dm.model.enums;
import com.jz.dm.gateway.common.util.ResultCode;
import com.jz.dm.common.util.ResultCode;
import java.util.HashMap;
import java.util.Map;
......
package com.jz.dm.gateway.model.signtype;
package com.jz.dm.model.signtype;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
......
package com.jz.dm.gateway.model.signtype;
package com.jz.dm.model.signtype;
import com.jz.dm.gateway.constant.Constants;
import com.jz.dm.constant.Constants;
import com.sun.org.apache.xerces.internal.impl.dv.util.Base64;
import javax.crypto.Cipher;
......
package com.jz.dm.gateway.model.signtype;
package com.jz.dm.model.signtype;
import com.jz.dm.gateway.common.util.Base64;
import com.jz.dm.gateway.common.util.StreamUtil;
import com.jz.dm.common.util.Base64;
import com.jz.dm.common.util.StreamUtil;
import org.apache.commons.lang3.StringUtils;
import java.io.*;
......
package com.jz.dm.gateway.service.trade;
package com.jz.dm.service;
import com.jz.dm.gateway.common.util.OpenApiRequest;
import com.jz.dm.gateway.common.util.OpenApiResponse;
import com.jz.dm.gateway.gateway.OpenApiService;
import lombok.extern.slf4j.Slf4j;
import com.jz.dm.common.util.OpenApiRequest;
import com.jz.dm.common.util.OpenApiResponse;
import com.jz.dm.gateway.OpenApiService;
import org.springframework.stereotype.Service;
@Slf4j
@Service
public class TradeAddService implements OpenApiService {
public class AccountAddService implements OpenApiService {
@Override
public String getOpenApiMethod() {
return "bal.query";
return "account.add";
}
@Override
......@@ -24,6 +19,6 @@ public class TradeAddService implements OpenApiService {
@Override
public void doService(OpenApiRequest request, OpenApiResponse response) {
System.out.println("~~~~~~~~~~~~请求到接口~~~~~~~~~~~~");
System.out.println("请求过来了。。。。。");
}
}
package com.jz.dm.gateway.web.binder;
package com.jz.dm.web.binder;
import org.springframework.beans.MutablePropertyValues;
import org.springframework.web.servlet.mvc.method.annotation.ExtendedServletRequestDataBinder;
......
package com.jz.dm.gateway.web.binder;
package com.jz.dm.web.binder;
import com.jz.dm.gateway.web.annotation.ParamName;
import com.jz.dm.web.annotation.ParamName;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.context.request.NativeWebRequest;
......
# 测试环境配置
server:
port: 8088
#contextPath: /resource
management:
port: 54001
health:
mail:
enabled: false
spring:
profiles: test
datasource:
url: jdbc:mysql://rm-wz9n399q2avsy3k6m4o.mysql.rds.aliyuncs.com:3306/wj-mkt-project?characterEncoding=utf8&useSSL=false
driverClassName: com.mysql.jdbc.Driver
username: root
password: I%ou$buy!ok
type: com.alibaba.druid.pool.DruidDataSource
#监控统计拦截的filters
filters: stat
#配置初始化大小/最小/最大
initialSize: 1
minIdle: 1
maxActive: 20
#获取连接等待超时时间
maxWait: 60000
#间隔多久进行一次检测,检测需要关闭的空闲连接
timeBetweenEvictionRunsMillis: 60000
#一个连接在池中最小生存的时间
minEvictableIdleTimeMillis: 300000
validationQuery: SELECT 'x'
testWhileIdle: true
testOnBorrow: false
testOnReturn: false
#打开PSCache,并指定每个连接上PSCache的大小。
#oracle设为true,mysql设为false。分库分表较多推荐设置为false
poolPreparedStatements: false
maxPoolPreparedStatementPerConnectionSize: 20
cache:
type: CAFFEINE
caffeine:
spec: maximumSize=1000,expireAfterWrite=30s
public-key: rajZdV0xpCox+2vEHFLsKq2o2XVdMaQq
redis:
#database: 0
#host: 119.23.13.83
#port: 8007
#timeout: 5000
cluster:
nodes:
- 192.168.31.167:6379
- 192.168.31.167:6380
- 192.168.31.167:6381
- 192.168.31.167:6382
- 192.168.31.167:6383
- 192.168.31.167:6384
#使用redis管理session设置为redis,否则none
session:
store-type: none
#mybatis的配置
mybatis:
#配置mapper.xml文件所在路径
mapper-locations: classpath:mapper.*/*.xml
#配置映射类所在的包名
type-aliases-package: com.jz.manage.moduls.entity
logging:
level:
com.jz.manage: debug
# 跳过签名
api:
skipFilter: false #是否跳过拦截器
skipIpLimit: true #是否为ip列表
maxPostSize: 1048576 #最大支持上传文件数
supplierId: 200314008093 #供应商ID
# 代发三要素校验定时任务
validCron: 0/1 * * * * *
##测试环境配置
#spring:
#
# #缓存会话
# redis:
# host: r-wz9cnvxpbfm2ir35dh.redis.rds.aliyuncs.com
# password: hdd2020@888
# port: 6379
# timeout: 10000
# lettuce:
# pool:
# max-active: 100 #连接池最大连接数(使用负值表示没有限制)
# max-idle: 100 #连接池中的最大空闲连接
# min-idle: 50 #连接池中的最小空闲连接
# max-wait: 6000 #连接池最大阻塞等待时间(使用负值表示没有限制)
#
# #数据库
# datasource:
# url: jdbc:mysql://172.18.126.216:3306/btcpaydb?serverTimezone=GMT%2B8&characterEncoding=utf8&characterSetResults=utf8&autoReconnect=true&failOverReadOnly=false
# username: root
# password: hdd2020@888
# type: com.zaxxer.hikari.HikariDataSource
# driver-class-name: com.mysql.cj.jdbc.Driver
# hikari:
# minimum-idle: 20
# maximum-pool-size: 100
# auto-commit: true
# idle-timeout: 30000
# pool-name: MyHikariCP
# max-lifetime: 1800000
# connection-timeout: 30000
# connection-test-query: SELECT 1
#数据源
spring:
security:
basic:
enabled: false
datasource:
url: jdbc:mysql://rm-wz9n399q2avsy3k6m4o.mysql.rds.aliyuncs.com:3306/wj-mkt-project?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false
username: root
password: I%ou$buy!ok
driver-class-name: com.mysql.jdbc.Driver
druid:
# 初始化时建立物理连接的个数。初始化发生在显示调用init方法,或者第一次getConnection时
initialSize: 1
# 最小连接池数量
minIdle: 1
# 最大连接池数量
maxActive: 10
# 配置获取连接等待超时的时间
maxWait: 10000
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
timeBetweenEvictionRunsMillis: 60000
# 配置一个连接在池中最小生存的时间,单位是毫秒
minEvictableIdleTimeMillis: 300000
# 验证连接有效与否的SQL,不同的数据配置不同
validationQuery: select 1
# 建议配置为true,不影响性能,并且保证安全性。
# 申请连接的时候检测,如果空闲时间大于
# timeBetweenEvictionRunsMillis,
# 执行validationQuery检测连接是否有效。
testWhileIdle: true
# 申请连接时执行validationQuery检测连接是否有效,做了这个配置会降低性能。
# 这里建议配置为TRUE,防止取到的连接不可用
testOnBorrow: true
# 归还连接时执行validationQuery检测连接是否有效,做了这个配置会降低性能
testOnReturn: false
# 是否缓存preparedStatement,也就是PSCache。
# PSCache对支持游标的数据库性能提升巨大,比如说oracle。
# 在mysql5.5以下的版本中没有PSCache功能,建议关闭掉。
# 作者在5.5版本中使用PSCache,通过监控界面发现PSCache有缓存命中率记录,
# 该应该是支持PSCache。
# 打开PSCache,并且指定每个连接上PSCache的大小
poolPreparedStatements: true
maxPoolPreparedStatementPerConnectionSize: 20
# 属性类型是字符串,通过别名的方式配置扩展插件,
# 常用的插件有:
# 监控统计用的filter:stat
# 日志用的filter:log4j
# 防御sql注入的filter:wall
filters: stat
# ====================MybatisPlus====================
mybatis-plus:
# 如果是放在src/main/java目录下 classpath:/com/yourpackage/*/mapper/*Mapper.xml
# 如果是放在resource目录 classpath:/mapper/*Mapper.xml
mapper-locations: classpath*:com/frame/**/**.xml,classpath*:mapping/**/**.xml
#实体扫描,多个package用逗号或者分号分隔
typeAliasesPackage: com.frame.**.entity,com.frame.**.dto
global-config:
#刷新mapper 调试神器
db-config:
#主键类型 0:"数据库ID自增", 1:"用户输入ID",2:"全局唯一ID (数字类型唯一ID)", 3:"全局唯一ID UUID";
id-type: UUID
#字段策略 0:"忽略判断",1:"非 NULL 判断"),2:"非空判断"
field-strategy: 2
#驼峰下划线转换
column-underline: false
#数据库大写下划线转换
# capital-mode: true
#逻辑删除配置
logic-delete-value: 1
logic-not-delete-value: 0
refresh: true
configuration:
#配置返回数据库(column下划线命名&&返回java实体是驼峰命名),自动匹配无需as(没开启这个,SQL需要写as: select user_id as userId)
map-underscore-to-camel-case: true
cache-enabled: false
#配置JdbcTypeForNull, oracle数据库必须配置
jdbc-type-for-null: 'null'
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
database-id: mysql
\ No newline at end of file
# 系统信息
info:
app:
name: "@project.name@"
description: "@project.description@"
version: "@project.version@"
spring-boot-version: "@project.parent.version@"
#服务端口和项目名称
server:
port: 8088
servlet:
context-path: /
#日志打印
logging:
level:
com.netflix.discovery: 'OFF'
org.springframework.cloud: 'DEBUG'
#SPRING配置文件
spring:
application:
name: 九章数据平台
aop:
proxy-target-class: true
profiles:
active: test
sysProperties:
session-timeout: 3600
developerList:
- name: 九章
value:
active: test #默认使用的配置文件
#MyBatis
#mybatis-plus:
# mapper-locations: classpath:/mapper/**/*.xml
# typeAliasesPackage: com.jz.common.entity
# #type-handlers-package: com.btcpay.commons.typehandler
# global-config:
# id-type: 1
# field-strategy: 2
# db-column-underline: true
# refresh-mapper: true
# configuration:
# map-underscore-to-camel-case: true
# cache-enabled: false
# #log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<substitutionProperty name="log.proj" value="gateway" />
<!-- 服务器 -->
<substitutionProperty name="log.base" value="/logs/${log.proj}" />
<!-- 本地 -->
<!-- <substitutionProperty name="log.base" value="/Users/luoyichang/Desktop/hdd/logs/${log.proj}" />-->
<substitutionProperty name="max.size" value="100MB" />
<jmxConfigurator />
<appender name="stdout" class="ch.qos.logback.core.ConsoleAppender">
<layout class="ch.qos.logback.classic.PatternLayout">
<pattern>%date [${log.proj}:%thread] %-5level %logger{80} - %msg%n
</pattern>
</layout>
</appender>
<appender name="file.debug" class="ch.qos.logback.core.rolling.RollingFileAppender"><!-- All Log Info -->
<File>${log.base}/${log.proj}.log</File>
<rollingPolicy
class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<FileNamePattern>${log.base}/${log.proj}_%d{yyyy-MM-dd}.%i.log
</FileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy
class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<maxFileSize>${max.size}</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<layout class="ch.qos.logback.classic.PatternLayout">
<pattern>%date [%thread] %-5level %logger{80} - %msg%n</pattern>
</layout>
</appender>
<appender name="file.info" class="ch.qos.logback.core.rolling.RollingFileAppender">
<!-- <File>${log.base}/${log.proj}_info.log</File> -->
<rollingPolicy
class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<FileNamePattern>${log.base}/${log.proj}_info_%d{yyyy-MM-dd}.%i.log
</FileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy
class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<maxFileSize>${max.size}</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<layout class="ch.qos.logback.classic.PatternLayout">
<pattern>%date [%thread] %-5level %logger{80} - %msg%n</pattern>
</layout>
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<level>INFO</level>
<onMatch>ACCEPT</onMatch>
<onMismatch>DENY</onMismatch>
</filter>
</appender>
<appender name="file.error" class="ch.qos.logback.core.rolling.RollingFileAppender">
<rollingPolicy
class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<FileNamePattern>${log.base}/${log.proj}_error_%d{yyyy-MM-dd}.%i.log
</FileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy
class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<maxFileSize>${max.size}</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<layout class="ch.qos.logback.classic.PatternLayout">
<pattern>%date [%thread] %-5level %logger{80} - %msg%n</pattern>
</layout>
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<level>ERROR</level>
<onMatch>ACCEPT</onMatch>
<onMismatch>DENY</onMismatch>
</filter>
</appender>
<appender name="file.warn" class="ch.qos.logback.core.rolling.RollingFileAppender">
<rollingPolicy
class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<FileNamePattern>${log.base}/${log.proj}_warn_%d{yyyy-MM-dd}.%i.log
</FileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy
class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<maxFileSize>${max.size}</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<layout class="ch.qos.logback.classic.PatternLayout">
<pattern>%date [%thread] %-5level %logger{80} - %msg%n</pattern>
</layout>
<filter class="ch.qos.logback.classic.filter.ThresholdFilter"><!-- 临界值过滤器,过滤掉低于指定临界值的日志 -->
<level>WARN</level>
</filter>
</appender>
<!--异步输出 -->
<appender name="async.file.info" class="ch.qos.logback.classic.AsyncAppender">
<discardingThreshold>0</discardingThreshold>
<queueSize>256</queueSize>
<appender-ref ref="file.info" />
</appender>
<appender name="async.file.debug" class="ch.qos.logback.classic.AsyncAppender">
<discardingThreshold>0</discardingThreshold>
<queueSize>256</queueSize>
<appender-ref ref="file.debug" />
</appender>
<appender name="async.file.warn" class="ch.qos.logback.classic.AsyncAppender">
<discardingThreshold>0</discardingThreshold>
<queueSize>256</queueSize>
<appender-ref ref="file.warn" />
</appender>
<appender name="async.file.error" class="ch.qos.logback.classic.AsyncAppender">
<discardingThreshold>0</discardingThreshold>
<queueSize>256</queueSize>
<appender-ref ref="file.error" />
</appender>
<root level="info" additivity="false">
<appender-ref ref="stdout" />
<!-- <appender-ref ref="async.file.debug" /> -->
<appender-ref ref="async.file.info" />
<appender-ref ref="async.file.error" />
<!-- <appender-ref ref="async.file.warn" /> -->
</root>
<logger name="io.lettuce.core.protocol.ConnectionWatchdog" additivity="false">
<appender-ref ref="stdout" />
<level value="ERROR" />
</logger>
<logger name="io.lettuce.core.protocol.ReconnectionHandler" additivity="false">
<appender-ref ref="stdout" />
<level value="ERROR" />
</logger>
</configuration>
\ No newline at end of file
<?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.jz.dm.gateway.mapper.DataGoodsApiDao">
<resultMap type="com.jz.common.entity.DataGoodsApi" id="TDataGoodsApiMap">
<result property="goodsApi" column="goods_api" jdbcType="INTEGER"/>
<result property="dataGoodsId" column="data_goods_id" jdbcType="INTEGER"/>
<result property="apiName" column="api_name" jdbcType="VARCHAR"/>
<result property="requestType" column="request_type" jdbcType="VARCHAR"/>
<result property="apiUrl" column="api_url" jdbcType="VARCHAR"/>
<result property="apiMethod" column="api_method" jdbcType="VARCHAR"/>
<result property="apiProtocl" column="api_protocl" jdbcType="VARCHAR"/>
<result property="returnDataExample" column="return_data_example" jdbcType="VARCHAR"/>
<result property="requestExample" column="request_example" jdbcType="VARCHAR"/>
<result property="returnType" column="return_type" jdbcType="VARCHAR"/>
<result property="apiKey" column="api_key" jdbcType="VARCHAR"/>
<result property="creTime" column="cre_time" jdbcType="TIMESTAMP"/>
<result property="crePerson" column="cre_person" jdbcType="VARCHAR"/>
<result property="uptPerson" column="upt_person" jdbcType="VARCHAR"/>
<result property="uptTime" column="upt_time" jdbcType="TIMESTAMP"/>
<result property="delFlag" column="del_flag" jdbcType="VARCHAR"/>
</resultMap>
</mapper>
\ No newline at end of file
<?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.jz.dm.gateway.mapper.DataGoodsApiParamsDao">
<resultMap type="com.jz.common.entity.DataGoodsApiParams" id="TDataGoodsApiParamsMap">
<result property="apiParamsId" column="api_params_id" jdbcType="INTEGER"/>
<result property="goodsApi" column="goods_api" jdbcType="INTEGER"/>
<result property="paramsDiff" column="params_diff" jdbcType="VARCHAR"/>
<result property="paramsName" column="params_name" jdbcType="VARCHAR"/>
<result property="paramsType" column="params_type" jdbcType="VARCHAR"/>
<result property="paramsDesc" column="params_desc" jdbcType="VARCHAR"/>
<result property="defaultValue" column="default_value" jdbcType="VARCHAR"/>
<result property="remark" column="remark" jdbcType="VARCHAR"/>
<result property="ifRequird" column="if_requird" jdbcType="VARCHAR"/>
<result property="delFlag" column="del_flag" jdbcType="VARCHAR"/>
<result property="creTime" column="cre_time" jdbcType="TIMESTAMP"/>
<result property="uptTime" column="upt_time" jdbcType="TIMESTAMP"/>
</resultMap>
</mapper>
\ No newline at end of file
/**
* Copyright (c) 2011-2014 All Rights Reserved.
*/
package com.jz.dm.gateway;
/**
*
* @author Admin
* @version $Id: Property.java 2014年8月27日 下午6:28:46 $
*/
public class Property {
private static java.util.Properties property = null;
private Property() {
}
public static void init(java.util.Properties props) {
property = props;
}
public static void setProperty(String key, Object value) {
property.put(key, value);
}
public static String getProperty(String key) {
return property.getProperty(key);
}
public static String getProperty(String key, String defaultValue) {
return property.getProperty(key, defaultValue);
}
}
package com.jz.dm.gateway;
import com.jz.dm.ApiGatewayApplication;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest(classes = ApiGatewayApplication.class)// 指定spring-boot的启动类
@ContextConfiguration(initializers = {TestApplicationContextInitializer.class})
public abstract class SpringTestCase {
}
package com.jz.dm.gateway;
import org.springframework.context.ApplicationContextInitializer;
import org.springframework.context.support.GenericApplicationContext;
import org.springframework.core.io.Resource;
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
import org.springframework.core.io.support.PropertiesLoaderUtils;
import org.springframework.core.io.support.ResourcePatternResolver;
import org.springframework.util.CollectionUtils;
import java.io.IOException;
import java.util.Properties;
/**
*
*
* @author zengfan
* @version $Id: TestApplicationContextInitializer.java 2017年6月12日 下午9:30:46 $
*/
public class TestApplicationContextInitializer implements ApplicationContextInitializer<GenericApplicationContext> {
private Properties props = null;
/**
* @see ApplicationContextInitializer#initialize(org.springframework.context.ConfigurableApplicationContext)
*/
@Override
public void initialize(GenericApplicationContext context) {
if (null != props) {
return;
}
props = new Properties();
ResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();
Resource[] resources = null;
try {
resources = resolver.getResources("classpath:properties/*.properties");
for (Resource res : resources) {
Properties properties = PropertiesLoaderUtils.loadProperties(res);
CollectionUtils.mergePropertiesIntoMap(properties, props);
}
Property.init(props);
} catch (IOException e) {
e.printStackTrace();
}
}
}
package domian; /**
* Copyright (c) 2011-2018 All Rights Reserved.
*/
import com.alibaba.fastjson.JSON;
import com.jz.dm.gateway.common.util.TtpayUtils;
import com.jz.dm.gateway.common.util.WebUtils;
import com.jz.dm.gateway.model.signtype.Md5;
import java.util.HashMap;
import java.util.Map;
/**
*
*
* @author Admin
* @version $Id: PushSdkTest.java 2018年4月12日 下午4:31:31 $
*/
public class PushSdkLocalhostTest1 {
private static String uri = "http://localhost:8088/gateway";
public static void main(String[] args) throws Exception {
// 余额查询接口
balQuery();
//委托订单查询
//orderQuery();
//取消订单
//cancelOrder();
//账户信息查询
//accQuery();
//代发订单详情
//orderDetail();
}
protected static void balQuery() {
try {
Map<String, String> data = new HashMap<>();
data.put("appId", "200316008117");
data.put("method", "bal.query");
data.put("charset", "UTF-8");
data.put("signType", "MD5");
data.put("timestamp", String.valueOf(System.currentTimeMillis()));
data.put("version", "1.0.0");
Map<String, String> params = new HashMap<>();
params.put("account_no", "5845342722900679704");
params.put("account_type", "WBANK");
data.put("params", JSON.toJSONString(params));
String dataStr = TtpayUtils.createLinkString(TtpayUtils.filter(data));
String sign = Md5.encrypt(dataStr, "fP6R7cSvQj8JwThFvP1RrOomkHXydHx3", "UTF-8");
data.put("sign", sign);
System.out.println(data);
String rsp = WebUtils.post(uri, data);
System.out.println(rsp);
} catch (Exception e) {
e.printStackTrace();
}
}
//protected static void orderQuery() {
// try {
// Map<String, String> data = new HashMap<>();
// data.put("app_id", "200314008093");
// data.put("method", "trade.query");
// data.put("charset", "UTF-8");
// data.put("sign_type", "MD5");
//
// data.put("timestamp", String.valueOf(System.currentTimeMillis()));
// data.put("version", "1.0.0");
//
// Map<String, String> params = new HashMap<>();
// //商户订单号
// params.put("out_trade_no", "YW202003040013");
// //银行卡号(非必填)
// //params.put("card_no", "6214806601002512988");
// data.put("params", JSON.toJSONString(params));
// String dataStr = TtpayUtils.createLinkString(TtpayUtils.filter(data));
// String sign = Md5.encrypt(dataStr, "fP6R7cSvQj8JwThFvP1RrOomkHXydHx3", "UTF-8");
// data.put("sign", sign);
//
// String rsp = WebUtils.post(uri, data);
// System.out.println(rsp);
// } catch (Exception e) {
// e.printStackTrace();
// }
//}
//
//protected static void cancelOrder() {
// try {
// Map<String, String> data = new HashMap<>();
// data.put("app_id", "200314008092");
// data.put("method", "trade.cancel");
// data.put("charset", "UTF-8");
// data.put("sign_type", "MD5");
//
// data.put("timestamp", String.valueOf(System.currentTimeMillis()));
// data.put("version", "1.0.0");
//
// Map<String, String> params = new HashMap<>();
// params.put("remark", "订单取消");
// //商户订单号
// params.put("out_trade_no", "2020031410810730003");
// data.put("params", JSON.toJSONString(params));
//
// String dataStr = TtpayUtils.createLinkString(TtpayUtils.filter(data));
// String sign = Md5.encrypt(dataStr, "fP6R7cSvQj8JwThFvP1RrOomkHXydHx3", "UTF-8");
// data.put("sign", sign);
//
// String rsp = WebUtils.post(uri, data);
// System.out.println(rsp);
// } catch (Exception e) {
// e.printStackTrace();
// }
//}
//protected static void accQuery() {
// try {
// Map<String, String> data = new HashMap<>();
// data.put("app_id", "200314008092");
// data.put("method", "acc.query");
// data.put("charset", "UTF-8");
// data.put("sign_type", "MD5");
//
// data.put("timestamp", String.valueOf(System.currentTimeMillis()));
// data.put("version", "1.0.0");
//
// Map<String, String> params = new HashMap<>();
// //params.put("remark", "订单取消");
// //商户订单号
// //params.put("out_trade_no", "2020031410810730003");
// data.put("params", JSON.toJSONString(params));
//
// String dataStr = TtpayUtils.createLinkString(TtpayUtils.filter(data));
// String sign = Md5.encrypt(dataStr, "fP6R7cSvQj8JwThFvP1RrOomkHXydHx3", "UTF-8");
// data.put("sign", sign);
//
// String rsp = WebUtils.post(uri, data);
// System.out.println(rsp);
// } catch (Exception e) {
// e.printStackTrace();
// }
//}
//protected static void orderDetail() {
// try {
// Map<String, String> data = new HashMap<>();
// data.put("app_id", "200314008093");
// data.put("method", "trade.detail");
// data.put("charset", "UTF-8");
// data.put("sign_type", "MD5");
//
// data.put("timestamp", String.valueOf(System.currentTimeMillis()));
// data.put("version", "1.0.0");
//
// Map<String, String> params = new HashMap<>();
// //商户订单号
// params.put("out_trade_no", "YW202003040012");
// data.put("params", JSON.toJSONString(params));
//
// String dataStr = TtpayUtils.createLinkString(TtpayUtils.filter(data));
// String sign = Md5.encrypt(dataStr, "fP6R7cSvQj8JwThFvP1RrOomkHXydHx3", "UTF-8");
// data.put("sign", sign);
//
// String rsp = WebUtils.post(uri, data);
// System.out.println(rsp);
// } catch (Exception e) {
// e.printStackTrace();
// }
//}
}
......@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
......@@ -47,11 +48,11 @@ public class DataGoods implements Serializable {
/**
* 数据商品价格
*/
private Double dataPrice;
private BigDecimal dataPrice;
/**
* 优惠价格
*/
private Double discountPrice;
private BigDecimal discountPrice;
/**
* 价格类型:01免费,02收费
*/
......@@ -107,19 +108,19 @@ public class DataGoods implements Serializable {
/**
* 年(元)
*/
private Double yearType;
private BigDecimal yearType;
/**
* 季(元)
*/
private Double seasonType;
private BigDecimal seasonType;
/**
* 月(元)
*/
private Double monthType;
private BigDecimal monthType;
/**
* 次(元)
*/
private Double secondType;
private BigDecimal secondType;
public Long getDataGoodsId() {
......@@ -178,19 +179,19 @@ public class DataGoods implements Serializable {
this.dataPicture = dataPicture;
}
public Double getDataPrice() {
public BigDecimal getDataPrice() {
return dataPrice;
}
public void setDataPrice(Double dataPrice) {
public void setDataPrice(BigDecimal dataPrice) {
this.dataPrice = dataPrice;
}
public Double getDiscountPrice() {
public BigDecimal getDiscountPrice() {
return discountPrice;
}
public void setDiscountPrice(Double discountPrice) {
public void setDiscountPrice(BigDecimal discountPrice) {
this.discountPrice = discountPrice;
}
......@@ -298,35 +299,35 @@ public class DataGoods implements Serializable {
this.delFlag = delFlag;
}
public Double getYearType() {
public BigDecimal getYearType() {
return yearType;
}
public void setYearType(Double yearType) {
public void setYearType(BigDecimal yearType) {
this.yearType = yearType;
}
public Double getSeasonType() {
public BigDecimal getSeasonType() {
return seasonType;
}
public void setSeasonType(Double seasonType) {
public void setSeasonType(BigDecimal seasonType) {
this.seasonType = seasonType;
}
public Double getMonthType() {
public BigDecimal getMonthType() {
return monthType;
}
public void setMonthType(Double monthType) {
public void setMonthType(BigDecimal monthType) {
this.monthType = monthType;
}
public Double getSecondType() {
public BigDecimal getSecondType() {
return secondType;
}
public void setSecondType(Double secondType) {
public void setSecondType(BigDecimal secondType) {
this.secondType = secondType;
}
......
......@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
......@@ -27,7 +28,7 @@ public class FinanceCashOut implements Serializable {
/**
* 提现金额
*/
private Double cashOutMoney;
private BigDecimal cashOutMoney;
/**
* 提现时间
*/
......@@ -90,11 +91,11 @@ public class FinanceCashOut implements Serializable {
this.assetsId = assetsId;
}
public Double getCashOutMoney() {
public BigDecimal getCashOutMoney() {
return cashOutMoney;
}
public void setCashOutMoney(Double cashOutMoney) {
public void setCashOutMoney(BigDecimal cashOutMoney) {
this.cashOutMoney = cashOutMoney;
}
......
......@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
......@@ -27,15 +28,15 @@ public class FinanceCustomerAssets implements Serializable {
/**
* 可用金额
*/
private Double useMoney;
private BigDecimal useMoney;
/**
* 冻结金额
*/
private Double frozenMoney;
private BigDecimal frozenMoney;
/**
* 总金额
*/
private Double totalMoney;
private BigDecimal totalMoney;
/**
* 创建时间
*/
......@@ -74,27 +75,27 @@ public class FinanceCustomerAssets implements Serializable {
this.departmentId = departmentId;
}
public Double getUseMoney() {
public BigDecimal getUseMoney() {
return useMoney;
}
public void setUseMoney(Double useMoney) {
public void setUseMoney(BigDecimal useMoney) {
this.useMoney = useMoney;
}
public Double getFrozenMoney() {
public BigDecimal getFrozenMoney() {
return frozenMoney;
}
public void setFrozenMoney(Double frozenMoney) {
public void setFrozenMoney(BigDecimal frozenMoney) {
this.frozenMoney = frozenMoney;
}
public Double getTotalMoney() {
public BigDecimal getTotalMoney() {
return totalMoney;
}
public void setTotalMoney(Double totalMoney) {
public void setTotalMoney(BigDecimal totalMoney) {
this.totalMoney = totalMoney;
}
......
......@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
......@@ -27,7 +28,7 @@ public class FinanceCustomerBalance implements Serializable {
/**
* 充值金额
*/
private Double balanceMoney;
private BigDecimal balanceMoney;
/**
* 备注
*/
......@@ -70,11 +71,11 @@ public class FinanceCustomerBalance implements Serializable {
this.assetsId = assetsId;
}
public Double getBalanceMoney() {
public BigDecimal getBalanceMoney() {
return balanceMoney;
}
public void setBalanceMoney(Double balanceMoney) {
public void setBalanceMoney(BigDecimal balanceMoney) {
this.balanceMoney = balanceMoney;
}
......
......@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
......@@ -39,7 +40,7 @@ public class FinanceTradeFlow implements Serializable {
/**
* 交易流水金额
*/
private Double tradeMoney;
private BigDecimal tradeMoney;
/**
* 交易类型:01提现,02充值,03付款,04收款,05续费
*/
......@@ -98,11 +99,11 @@ public class FinanceTradeFlow implements Serializable {
this.tradeFlowNumber = tradeFlowNumber;
}
public Double getTradeMoney() {
public BigDecimal getTradeMoney() {
return tradeMoney;
}
public void setTradeMoney(Double tradeMoney) {
public void setTradeMoney(BigDecimal tradeMoney) {
this.tradeMoney = tradeMoney;
}
......
......@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
......@@ -35,7 +36,7 @@ public class Order implements Serializable {
/**
* 订单金额
*/
private Double orderMoney;
private BigDecimal orderMoney;
/**
* 订单时间
*/
......@@ -47,7 +48,7 @@ public class Order implements Serializable {
/**
* 支付金额
*/
private Double paymentMoney;
private BigDecimal paymentMoney;
/**
* 支付时间
*/
......@@ -59,7 +60,7 @@ public class Order implements Serializable {
/**
* 优惠金额
*/
private Double districtMoney;
private BigDecimal districtMoney;
/**
* 购买方式:01年,02季,03月,04次(服务类型)
*/
......@@ -142,11 +143,11 @@ public class Order implements Serializable {
this.orderStatus = orderStatus;
}
public Double getOrderMoney() {
public BigDecimal getOrderMoney() {
return orderMoney;
}
public void setOrderMoney(Double orderMoney) {
public void setOrderMoney(BigDecimal orderMoney) {
this.orderMoney = orderMoney;
}
......@@ -166,11 +167,11 @@ public class Order implements Serializable {
this.sellerId = sellerId;
}
public Double getPaymentMoney() {
public BigDecimal getPaymentMoney() {
return paymentMoney;
}
public void setPaymentMoney(Double paymentMoney) {
public void setPaymentMoney(BigDecimal paymentMoney) {
this.paymentMoney = paymentMoney;
}
......@@ -190,11 +191,11 @@ public class Order implements Serializable {
this.paymentMethod = paymentMethod;
}
public Double getDistrictMoney() {
public BigDecimal getDistrictMoney() {
return districtMoney;
}
public void setDistrictMoney(Double districtMoney) {
public void setDistrictMoney(BigDecimal districtMoney) {
this.districtMoney = districtMoney;
}
......
......@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
......@@ -31,7 +32,7 @@ public class OrderPayment implements Serializable {
/**
* 支付金额
*/
private Double paymentMoney;
private BigDecimal paymentMoney;
/**
* 支付时间
*/
......@@ -43,7 +44,7 @@ public class OrderPayment implements Serializable {
/**
* 优惠金额
*/
private Double districtMoney;
private BigDecimal districtMoney;
/**
* 支付状态
*/
......@@ -86,11 +87,11 @@ public class OrderPayment implements Serializable {
this.sellerId = sellerId;
}
public Double getPaymentMoney() {
public BigDecimal getPaymentMoney() {
return paymentMoney;
}
public void setPaymentMoney(Double paymentMoney) {
public void setPaymentMoney(BigDecimal paymentMoney) {
this.paymentMoney = paymentMoney;
}
......@@ -110,11 +111,11 @@ public class OrderPayment implements Serializable {
this.paymentMethod = paymentMethod;
}
public Double getDistrictMoney() {
public BigDecimal getDistrictMoney() {
return districtMoney;
}
public void setDistrictMoney(Double districtMoney) {
public void setDistrictMoney(BigDecimal districtMoney) {
this.districtMoney = districtMoney;
}
......
......@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
......@@ -27,7 +28,7 @@ public class PlatformAssets implements Serializable {
/**
* 平台金额
*/
private Double platformMoney;
private BigDecimal platformMoney;
/**
* 创建时间
*/
......@@ -66,11 +67,11 @@ public class PlatformAssets implements Serializable {
this.platformUserId = platformUserId;
}
public Double getPlatformMoney() {
public BigDecimal getPlatformMoney() {
return platformMoney;
}
public void setPlatformMoney(Double platformMoney) {
public void setPlatformMoney(BigDecimal platformMoney) {
this.platformMoney = platformMoney;
}
......
......@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
......@@ -67,7 +68,7 @@ public class PlatformLog implements Serializable {
/**
* 数据商品单价
*/
private Double dataPrice;
private BigDecimal dataPrice;
/**
* 价格类型:01免费,02收费
*/
......@@ -198,11 +199,11 @@ public class PlatformLog implements Serializable {
this.downloadAddress = downloadAddress;
}
public Double getDataPrice() {
public BigDecimal getDataPrice() {
return dataPrice;
}
public void setDataPrice(Double dataPrice) {
public void setDataPrice(BigDecimal dataPrice) {
this.dataPrice = dataPrice;
}
......
......@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
......@@ -23,7 +24,7 @@ public class PlatformPaymenyInfo implements Serializable {
/**
* 付款金额
*/
private Double paymentMoney;
private BigDecimal paymentMoney;
/**
* 付款时间
*/
......@@ -62,11 +63,11 @@ public class PlatformPaymenyInfo implements Serializable {
this.paymenyInfoId = paymenyInfoId;
}
public Double getPaymentMoney() {
public BigDecimal getPaymentMoney() {
return paymentMoney;
}
public void setPaymentMoney(Double paymentMoney) {
public void setPaymentMoney(BigDecimal paymentMoney) {
this.paymentMoney = paymentMoney;
}
......
......@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
......@@ -27,7 +28,7 @@ public class PlatformTradeFlowInfo implements Serializable {
/**
* 交易金额
*/
private Double platformTradeMoney;
private BigDecimal platformTradeMoney;
/**
* 交易类型:01收款,02付款
*/
......@@ -70,11 +71,11 @@ public class PlatformTradeFlowInfo implements Serializable {
this.receiveInfoId = receiveInfoId;
}
public Double getPlatformTradeMoney() {
public BigDecimal getPlatformTradeMoney() {
return platformTradeMoney;
}
public void setPlatformTradeMoney(Double platformTradeMoney) {
public void setPlatformTradeMoney(BigDecimal platformTradeMoney) {
this.platformTradeMoney = platformTradeMoney;
}
......
......@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
......@@ -27,7 +28,7 @@ public class PlatfromReceiveInfo implements Serializable {
/**
* 收款金额
*/
private Double receiveMoney;
private BigDecimal receiveMoney;
/**
* 收款时间
*/
......@@ -66,11 +67,11 @@ public class PlatfromReceiveInfo implements Serializable {
this.platformAssetsId = platformAssetsId;
}
public Double getReceiveMoney() {
public BigDecimal getReceiveMoney() {
return receiveMoney;
}
public void setReceiveMoney(Double receiveMoney) {
public void setReceiveMoney(BigDecimal receiveMoney) {
this.receiveMoney = receiveMoney;
}
......
......@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
......@@ -47,11 +48,11 @@ public class DataGoods implements Serializable {
/**
* 数据商品价格
*/
private Double dataPrice;
private BigDecimal dataPrice;
/**
* 优惠价格
*/
private Double discountPrice;
private BigDecimal discountPrice;
/**
* 价格类型:01免费,02收费
*/
......@@ -107,19 +108,19 @@ public class DataGoods implements Serializable {
/**
* 年(元)
*/
private Double yearType;
private BigDecimal yearType;
/**
* 季(元)
*/
private Double seasonType;
private BigDecimal seasonType;
/**
* 月(元)
*/
private Double monthType;
private BigDecimal monthType;
/**
* 次(元)
*/
private Double secondType;
private BigDecimal secondType;
public Long getDataGoodsId() {
......@@ -178,19 +179,19 @@ public class DataGoods implements Serializable {
this.dataPicture = dataPicture;
}
public Double getDataPrice() {
public BigDecimal getDataPrice() {
return dataPrice;
}
public void setDataPrice(Double dataPrice) {
public void setDataPrice(BigDecimal dataPrice) {
this.dataPrice = dataPrice;
}
public Double getDiscountPrice() {
public BigDecimal getDiscountPrice() {
return discountPrice;
}
public void setDiscountPrice(Double discountPrice) {
public void setDiscountPrice(BigDecimal discountPrice) {
this.discountPrice = discountPrice;
}
......@@ -298,35 +299,35 @@ public class DataGoods implements Serializable {
this.delFlag = delFlag;
}
public Double getYearType() {
public BigDecimal getYearType() {
return yearType;
}
public void setYearType(Double yearType) {
public void setYearType(BigDecimal yearType) {
this.yearType = yearType;
}
public Double getSeasonType() {
public BigDecimal getSeasonType() {
return seasonType;
}
public void setSeasonType(Double seasonType) {
public void setSeasonType(BigDecimal seasonType) {
this.seasonType = seasonType;
}
public Double getMonthType() {
public BigDecimal getMonthType() {
return monthType;
}
public void setMonthType(Double monthType) {
public void setMonthType(BigDecimal monthType) {
this.monthType = monthType;
}
public Double getSecondType() {
public BigDecimal getSecondType() {
return secondType;
}
public void setSecondType(Double secondType) {
public void setSecondType(BigDecimal secondType) {
this.secondType = secondType;
}
......
......@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
......@@ -27,7 +28,7 @@ public class FinanceCashOut implements Serializable {
/**
* 提现金额
*/
private Double cashOutMoney;
private BigDecimal cashOutMoney;
/**
* 提现时间
*/
......@@ -90,11 +91,11 @@ public class FinanceCashOut implements Serializable {
this.assetsId = assetsId;
}
public Double getCashOutMoney() {
public BigDecimal getCashOutMoney() {
return cashOutMoney;
}
public void setCashOutMoney(Double cashOutMoney) {
public void setCashOutMoney(BigDecimal cashOutMoney) {
this.cashOutMoney = cashOutMoney;
}
......
......@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
......@@ -27,15 +28,15 @@ public class FinanceCustomerAssets implements Serializable {
/**
* 可用金额
*/
private Double useMoney;
private BigDecimal useMoney;
/**
* 冻结金额
*/
private Double frozenMoney;
private BigDecimal frozenMoney;
/**
* 总金额
*/
private Double totalMoney;
private BigDecimal totalMoney;
/**
* 创建时间
*/
......@@ -74,27 +75,27 @@ public class FinanceCustomerAssets implements Serializable {
this.departmentId = departmentId;
}
public Double getUseMoney() {
public BigDecimal getUseMoney() {
return useMoney;
}
public void setUseMoney(Double useMoney) {
public void setUseMoney(BigDecimal useMoney) {
this.useMoney = useMoney;
}
public Double getFrozenMoney() {
public BigDecimal getFrozenMoney() {
return frozenMoney;
}
public void setFrozenMoney(Double frozenMoney) {
public void setFrozenMoney(BigDecimal frozenMoney) {
this.frozenMoney = frozenMoney;
}
public Double getTotalMoney() {
public BigDecimal getTotalMoney() {
return totalMoney;
}
public void setTotalMoney(Double totalMoney) {
public void setTotalMoney(BigDecimal totalMoney) {
this.totalMoney = totalMoney;
}
......
......@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
......@@ -27,7 +28,7 @@ public class FinanceCustomerBalance implements Serializable {
/**
* 充值金额
*/
private Double balanceMoney;
private BigDecimal balanceMoney;
/**
* 备注
*/
......@@ -70,11 +71,11 @@ public class FinanceCustomerBalance implements Serializable {
this.assetsId = assetsId;
}
public Double getBalanceMoney() {
public BigDecimal getBalanceMoney() {
return balanceMoney;
}
public void setBalanceMoney(Double balanceMoney) {
public void setBalanceMoney(BigDecimal balanceMoney) {
this.balanceMoney = balanceMoney;
}
......
......@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
......@@ -39,7 +40,7 @@ public class FinanceTradeFlow implements Serializable {
/**
* 交易流水金额
*/
private Double tradeMoney;
private BigDecimal tradeMoney;
/**
* 交易类型:01提现,02充值,03付款,04收款,05续费
*/
......@@ -98,11 +99,11 @@ public class FinanceTradeFlow implements Serializable {
this.tradeFlowNumber = tradeFlowNumber;
}
public Double getTradeMoney() {
public BigDecimal getTradeMoney() {
return tradeMoney;
}
public void setTradeMoney(Double tradeMoney) {
public void setTradeMoney(BigDecimal tradeMoney) {
this.tradeMoney = tradeMoney;
}
......
......@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
......@@ -35,7 +36,7 @@ public class Order implements Serializable {
/**
* 订单金额
*/
private Double orderMoney;
private BigDecimal orderMoney;
/**
* 订单时间
*/
......@@ -47,7 +48,7 @@ public class Order implements Serializable {
/**
* 支付金额
*/
private Double paymentMoney;
private BigDecimal paymentMoney;
/**
* 支付时间
*/
......@@ -59,7 +60,7 @@ public class Order implements Serializable {
/**
* 优惠金额
*/
private Double districtMoney;
private BigDecimal districtMoney;
/**
* 购买方式:01年,02季,03月,04次(服务类型)
*/
......@@ -142,11 +143,11 @@ public class Order implements Serializable {
this.orderStatus = orderStatus;
}
public Double getOrderMoney() {
public BigDecimal getOrderMoney() {
return orderMoney;
}
public void setOrderMoney(Double orderMoney) {
public void setOrderMoney(BigDecimal orderMoney) {
this.orderMoney = orderMoney;
}
......@@ -166,11 +167,11 @@ public class Order implements Serializable {
this.sellerId = sellerId;
}
public Double getPaymentMoney() {
public BigDecimal getPaymentMoney() {
return paymentMoney;
}
public void setPaymentMoney(Double paymentMoney) {
public void setPaymentMoney(BigDecimal paymentMoney) {
this.paymentMoney = paymentMoney;
}
......@@ -190,11 +191,11 @@ public class Order implements Serializable {
this.paymentMethod = paymentMethod;
}
public Double getDistrictMoney() {
public BigDecimal getDistrictMoney() {
return districtMoney;
}
public void setDistrictMoney(Double districtMoney) {
public void setDistrictMoney(BigDecimal districtMoney) {
this.districtMoney = districtMoney;
}
......
......@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
......@@ -31,7 +32,7 @@ public class OrderPayment implements Serializable {
/**
* 支付金额
*/
private Double paymentMoney;
private BigDecimal paymentMoney;
/**
* 支付时间
*/
......@@ -43,7 +44,7 @@ public class OrderPayment implements Serializable {
/**
* 优惠金额
*/
private Double districtMoney;
private BigDecimal districtMoney;
/**
* 支付状态
*/
......@@ -86,11 +87,11 @@ public class OrderPayment implements Serializable {
this.sellerId = sellerId;
}
public Double getPaymentMoney() {
public BigDecimal getPaymentMoney() {
return paymentMoney;
}
public void setPaymentMoney(Double paymentMoney) {
public void setPaymentMoney(BigDecimal paymentMoney) {
this.paymentMoney = paymentMoney;
}
......@@ -110,11 +111,11 @@ public class OrderPayment implements Serializable {
this.paymentMethod = paymentMethod;
}
public Double getDistrictMoney() {
public BigDecimal getDistrictMoney() {
return districtMoney;
}
public void setDistrictMoney(Double districtMoney) {
public void setDistrictMoney(BigDecimal districtMoney) {
this.districtMoney = districtMoney;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment