mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-10-02 18:26:38 +08:00
add paymentAmount logic
This commit is contained in:
parent
9b1f623be0
commit
d42c9546ec
@ -15,6 +15,7 @@ import net.lab1024.smartadmin.module.system.wxpay.wxPayModel.WxPayEntity;
|
|||||||
import net.lab1024.smartadmin.util.MapRemoveNullUtil;
|
import net.lab1024.smartadmin.util.MapRemoveNullUtil;
|
||||||
import net.lab1024.smartadmin.util.SmartHttpUtil;
|
import net.lab1024.smartadmin.util.SmartHttpUtil;
|
||||||
import net.lab1024.smartadmin.util.SmartIPUtil;
|
import net.lab1024.smartadmin.util.SmartIPUtil;
|
||||||
|
import org.apache.poi.hpsf.Decimal;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
@ -24,9 +25,11 @@ import java.io.BufferedReader;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.net.Inet4Address;
|
import java.net.Inet4Address;
|
||||||
import java.net.InetAddress;
|
import java.net.InetAddress;
|
||||||
import java.net.URLEncoder;
|
import java.net.URLEncoder;
|
||||||
|
import java.text.DecimalFormat;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@ -117,7 +120,8 @@ public class WxpayService {
|
|||||||
// 更新订单状态
|
// 更新订单状态
|
||||||
if ("SUCCESS".equals(sortedMap.get("result_code"))) {
|
if ("SUCCESS".equals(sortedMap.get("result_code"))) {
|
||||||
String outTradeNo = sortedMap.get("out_trade_no"); // 流水号
|
String outTradeNo = sortedMap.get("out_trade_no"); // 流水号
|
||||||
String totalFee = sortedMap.get("total_fee"); // 交易金额
|
DecimalFormat df = new DecimalFormat("0.00");
|
||||||
|
String totalFee = StringUtil.toString(df.format(df.format(Double.parseDouble(sortedMap.get("total_fee")) / 100))); // 交易金额
|
||||||
OrderEntity orderEntity = orderService.findByOrderId(outTradeNo);
|
OrderEntity orderEntity = orderService.findByOrderId(outTradeNo);
|
||||||
String [] products = orderEntity.getProductCode().split(",");
|
String [] products = orderEntity.getProductCode().split(",");
|
||||||
ProductMasterQueryEntity productMasterQueryEntity = new ProductMasterQueryEntity();
|
ProductMasterQueryEntity productMasterQueryEntity = new ProductMasterQueryEntity();
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
######################### server ###################
|
######################### server ###################
|
||||||
server.servlet.context-path=/smart-admin-api
|
server.servlet.context-path=/royalcanin
|
||||||
server.port=10088
|
server.port=10086
|
||||||
spring.profiles.active=@profiles.active@
|
spring.profiles.active=@profiles.active@
|
||||||
|
|
||||||
######################### tomcat ###################
|
######################### tomcat ###################
|
||||||
server.tomcat.basedir=/home/logs/smart-admin/tomcat-logs
|
server.tomcat.basedir=/home/royalcanin-prod/tomcat-9/smart-admin/tomcat-logs
|
||||||
server.tomcat.accesslog.enabled=true
|
server.tomcat.accesslog.enabled=true
|
||||||
server.tomcat.accesslog.pattern=%t %{X-Forwarded-For}i %a "%r" %s %D (%D ms)
|
server.tomcat.accesslog.pattern=%t %{X-Forwarded-For}i %a "%r" %s %D (%D ms)
|
||||||
|
|
||||||
@ -23,9 +23,9 @@ spring.servlet.multipart.max-request-size=30MB
|
|||||||
file-upload-service.path=/home/upload/smart-admin-file
|
file-upload-service.path=/home/upload/smart-admin-file
|
||||||
|
|
||||||
######################### database #########################
|
######################### database #########################
|
||||||
spring.datasource.url=jdbc:mysql://172.16.0.201:3306/smart-admin-prod?autoReconnect=true&useServerPreparedStmts=false&rewriteBatchedStatements=true&characterEncoding=UTF-8&useSSL=false&allowMultiQueries=true
|
spring.datasource.url=jdbc:mysql://rc-hub-mysql.mysql.database.chinacloudapi.cn/smart-admin-prod?autoReconnect=true&useServerPreparedStmts=false&rewriteBatchedStatements=true&characterEncoding=UTF-8&useSSL=false&allowMultiQueries=true
|
||||||
spring.datasource.username=smart-admin
|
spring.datasource.username=azureuser@rc-hub-mysql
|
||||||
spring.datasource.password=Admin@123457
|
spring.datasource.password=(G=q0D5ez2Fz
|
||||||
spring.datasource.initial-size=2
|
spring.datasource.initial-size=2
|
||||||
spring.datasource.min-idle=1
|
spring.datasource.min-idle=1
|
||||||
spring.datasource.max-active=100
|
spring.datasource.max-active=100
|
||||||
|
Loading…
Reference in New Issue
Block a user