Please enter the commit message for your changes. Lines starting

with '#' will be ignored, and an empty message aborts the commit.

On branch develop
Your branch is up to date with 'goflyapp/develop'.

Changes to be committed:
	modified:   zlt-business/order-center/src/main/java/com/central/order/controller/OrderController.java
	modified:   zlt-business/order-center/src/main/java/com/central/order/controller/WxPayController.java
	modified:   zlt-business/order-center/src/main/java/com/central/order/enums/OrderStatusChangeEnum.java
	modified:   zlt-business/order-center/src/main/java/com/central/order/service/impl/OrderServiceImpl.java
	modified:   zlt-business/order-center/src/main/resources/mapper/MessageMapper.xml
This commit is contained in:
2025-04-16 02:08:02 +08:00
parent ec04ebe97a
commit 3c1d538cc9
5 changed files with 20 additions and 17 deletions
@@ -18,7 +18,10 @@ import com.central.order.feign.UserCenterService;
import com.central.order.model.*;
import com.central.order.service.*;
import com.wechat.pay.java.service.payments.jsapi.JsapiServiceExtension;
import com.wechat.pay.java.service.payments.jsapi.model.*;
import com.wechat.pay.java.service.payments.jsapi.model.Amount;
import com.wechat.pay.java.service.payments.jsapi.model.Payer;
import com.wechat.pay.java.service.payments.jsapi.model.PrepayRequest;
import com.wechat.pay.java.service.payments.jsapi.model.PrepayWithRequestPaymentResponse;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Parameters;
@@ -259,12 +262,12 @@ public class OrderController {
request.setPayer(payer);
// 设置分账信息
SettleInfo settleInfo = new SettleInfo();
settleInfo.setProfitSharing(true); // 直接设置分账标识为true
request.setSettleInfo(settleInfo);
// 4. 创建分账记录
ProfitSharing profitSharing = profitSharingService.createProfitSharing(order);
// SettleInfo settleInfo = new SettleInfo();
// settleInfo.setProfitSharing(true); // 直接设置分账标识为true
// request.setSettleInfo(settleInfo);
//
// // 4. 创建分账记录
// ProfitSharing profitSharing = profitSharingService.createProfitSharing(order);
// 5. 调用支付接口
PrepayWithRequestPaymentResponse response = service.prepayWithRequestPayment(request);
@@ -102,13 +102,13 @@ public class WxPayController {
// 这里可以添加更新数据库订单状态的代码
// 4. 更新分账记录
profitSharingService.updateTransactionId(
transaction.getOutTradeNo(),
transaction.getTransactionId()
);
// profitSharingService.updateTransactionId(
// transaction.getOutTradeNo(),
// transaction.getTransactionId()
// );
// 5. 发起分账请求
profitSharingService.executeProfitSharing(transaction.getOutTradeNo());
// profitSharingService.executeProfitSharing(transaction.getOutTradeNo());
} else {
// 其他支付状态,如支付中、失败等
System.out.println("支付状态:" + tradeState + ",商户订单号:" + outTradeNo);
@@ -19,9 +19,9 @@ public enum OrderStatusChangeEnum {
"服务完成通知", "您的订单 #{orderNo} 服务已完成"),
// 素材上传相关
UPLOADING(OrderStatus.COMPLETE.getId(), OrderStatus.UPLOADING.getId(),
UPLOADING(OrderStatus.DOING.getId(), OrderStatus.UPLOADING.getId(),
"素材上传通知", "您的订单 #{orderNo} 正在上传素材"),
UPLOADED(OrderStatus.UPLOADING.getId(), OrderStatus.UPLOADED.getId(),
UPLOADED(OrderStatus.UPLOADING.getId(), OrderStatus.COMPLETE.getId(),
"素材上传完成通知", "您的订单 #{orderNo} 素材已上传完成"),
// 退款相关
@@ -176,7 +176,7 @@ public class OrderServiceImpl extends SuperServiceImpl<OrderMapper, Order> imple
oldOrder.getOrderStatus(),
order.getOrderStatus(),
oldOrder.getUserId(),
String.format("订单金额:%.2f元",
String.format("订单金额:%.2f分",
order.getOrderAmount() != null && !order.getOrderAmount().isEmpty()
? Double.parseDouble(order.getOrderAmount().trim())
: 0.0)
@@ -13,9 +13,9 @@
<include refid="Base_Column_List"/>
FROM sys_message
<where>
<if test="tenantId != null and tenantId != ''">
<!--<if test="tenantId != null and tenantId != ''">
AND tenant_id = #{tenantId}
</if>
</if>-->
<!-- 使用params.前缀访问Map中的值 -->
<if test="params != null">
<if test="params.type != null">