From fe3cf04a0a7d245b1a73cb71dfc82df79d1ace88 Mon Sep 17 00:00:00 2001 From: yixian Date: Thu, 30 Apr 2020 17:12:12 +1000 Subject: [PATCH] document update --- src/document/Dockerfile | 2 +- src/document/openapi/cn/components_order.yml | 7 ++ src/document/openapi/en/components_order.yml | 8 ++ .../impls/CityPartnerPrizeServiceImpl.java | 77 ++++--------------- 4 files changed, 30 insertions(+), 64 deletions(-) diff --git a/src/document/Dockerfile b/src/document/Dockerfile index e184393d5..e3caa7550 100644 --- a/src/document/Dockerfile +++ b/src/document/Dockerfile @@ -1,4 +1,4 @@ -FROM nginx:1.17 +FROM nginx:alpine COPY openapi/ /usr/share/nginx/html/openapi COPY default.conf /etc/nginx/conf.d/default.conf diff --git a/src/document/openapi/cn/components_order.yml b/src/document/openapi/cn/components_order.yml index ea5149033..f81e1132f 100644 --- a/src/document/openapi/cn/components_order.yml +++ b/src/document/openapi/cn/components_order.yml @@ -23,6 +23,13 @@ orderBasic: operator: type: string description: 操作人员标识 + expire: + type: string + default: 5m + pattern: ^\d(m|h)$ + description: | + 超时时间,默认5m,如果商户端有全局配置则取商户配置 + 格式:数字+m/h,m=分钟,h=小时,最小1m,最大24h orderWithChannel: allOf: - $ref: '#/orderBasic' diff --git a/src/document/openapi/en/components_order.yml b/src/document/openapi/en/components_order.yml index 26c44a097..4b461527e 100644 --- a/src/document/openapi/en/components_order.yml +++ b/src/document/openapi/en/components_order.yml @@ -23,6 +23,14 @@ orderBasic: operator: type: string description: mark of operator + expire: + type: string + pattern: ^\d+(m|h)$ + default: 5m + description: | + format: digits with 'm' or 'h' tail. m=minutes, h=hours. + default is 5m. if merchants has a global configuration in our backend, it will take the configuration. + no shorter than 1m and no longer than 24h orderWithChannel: allOf: - $ref: '#/orderBasic' diff --git a/src/main/java/au/com/royalpay/payment/manage/citypartner/core/impls/CityPartnerPrizeServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/citypartner/core/impls/CityPartnerPrizeServiceImpl.java index 349aa4013..be3090c38 100644 --- a/src/main/java/au/com/royalpay/payment/manage/citypartner/core/impls/CityPartnerPrizeServiceImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/citypartner/core/impls/CityPartnerPrizeServiceImpl.java @@ -1,88 +1,39 @@ package au.com.royalpay.payment.manage.citypartner.core.impls; -import java.io.IOException; -import java.io.OutputStream; -import java.math.BigDecimal; -import java.math.RoundingMode; -import java.text.ParseException; -import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.Calendar; -import java.util.Date; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.stream.Collectors; -import java.util.zip.ZipEntry; -import java.util.zip.ZipOutputStream; - -import javax.annotation.Resource; -import javax.servlet.http.HttpServletResponse; -import javax.swing.plaf.basic.BasicScrollPaneUI; - -import au.com.royalpay.payment.manage.mappers.system.ClientBankAccountMapper; -import au.com.royalpay.payment.manage.mappers.system.ClientRateMapper; -import au.com.royalpay.payment.tools.CommonConsts; -import au.com.royalpay.payment.tools.merchants.core.MerchantInfoProvider; -import org.apache.commons.collections.CollectionUtils; -import org.apache.commons.io.IOUtils; -import org.apache.commons.lang3.RandomStringUtils; -import org.apache.commons.lang3.StringUtils; -import org.apache.commons.lang3.time.DateFormatUtils; -import org.apache.commons.lang3.time.DateUtils; -import org.apache.poi.hssf.usermodel.HSSFCellStyle; -import org.apache.poi.hssf.usermodel.HSSFFont; -import org.apache.poi.hssf.usermodel.HSSFWorkbook; -import org.apache.poi.hssf.util.HSSFColor; -import org.apache.poi.ss.usermodel.*; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - -import com.alibaba.fastjson.JSONObject; - import au.com.royalpay.payment.manage.citypartner.beans.AgentCommissionAnalysis; import au.com.royalpay.payment.manage.citypartner.beans.CityPartnerCommissionAnalysis; import au.com.royalpay.payment.manage.citypartner.beans.ReferrerCommissionAnalysis; import au.com.royalpay.payment.manage.citypartner.core.CityPartnerPrizeService; -import au.com.royalpay.payment.manage.mappers.financial.FinancialAgentCommissionDetailMapper; -import au.com.royalpay.payment.manage.mappers.financial.FinancialAgentCommissionMapper; -import au.com.royalpay.payment.manage.mappers.financial.FinancialPartnerCommissionDetailMapper; -import au.com.royalpay.payment.manage.mappers.financial.FinancialPartnerCommissionMapper; -import au.com.royalpay.payment.manage.mappers.financial.FinancialReferrerCommissionDetailMapper; -import au.com.royalpay.payment.manage.mappers.financial.FinancialReferrerCommissionMapper; -import au.com.royalpay.payment.manage.mappers.financial.FinancialSeniorPartnerCommissionDetailMapper; -import au.com.royalpay.payment.manage.mappers.financial.FinancialSeniorPartnerCommissionMapper; +import au.com.royalpay.payment.manage.mappers.financial.*; import au.com.royalpay.payment.manage.mappers.payment.TransactionMapper; import au.com.royalpay.payment.manage.mappers.system.OrgMapper; import au.com.royalpay.payment.tools.CommonConsts; import au.com.royalpay.payment.tools.env.SysConfigManager; import au.com.royalpay.payment.tools.exceptions.BadRequestException; import au.com.royalpay.payment.tools.exceptions.ServerErrorException; - +import au.com.royalpay.payment.tools.merchants.core.MerchantInfoProvider; import com.alibaba.fastjson.JSONObject; - import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang3.time.DateFormatUtils; import org.apache.commons.lang3.time.DateUtils; +import org.apache.poi.hssf.usermodel.HSSFCellStyle; +import org.apache.poi.hssf.usermodel.HSSFFont; +import org.apache.poi.hssf.usermodel.HSSFWorkbook; +import org.apache.poi.hssf.util.HSSFColor; +import org.apache.poi.ss.usermodel.*; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import java.io.OutputStream; import java.math.BigDecimal; +import java.math.RoundingMode; import java.text.ParseException; import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.Calendar; -import java.util.Collections; -import java.util.Date; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import javax.annotation.Resource; +import java.util.*; +import java.util.stream.Collectors; /** * Created by yixian on 2017-03-08.