소스 검색

feat:微信绑定

刘云鑫 1 주 전
부모
커밋
74b603f181

+ 2 - 2
alien-dining/src/main/java/shop/alien/dining/strategy/payment/impl/WeChatPartnerPaymentMininProgramStrategyImpl.java

@@ -238,7 +238,7 @@ public class WeChatPartnerPaymentMininProgramStrategyImpl implements PaymentStra
             log.info("[WeChatPartnerMinin] 换新商户单号 orderNo={}, payTradeNo={}", orderNo, newPayTradeNo);
             storeOrder.setCouponId(couponId);
             storeOrder.setPayUserId(payerId);
-            storeOrder.setServiceFee(new BigDecimal(serviceFee));
+//            storeOrder.setServiceFee(new BigDecimal(serviceFee));
             storeOrder.setDiscountAmount(new BigDecimal(discountAmount));
             storeOrder.setPayAmount(new BigDecimal(payAmount));
             if (!storeOrderService.updateById(storeOrder)) {
@@ -447,7 +447,7 @@ public class WeChatPartnerPaymentMininProgramStrategyImpl implements PaymentStra
                         }
                     }
                     try {
-                        storeOrderService.resetTableAfterPayment(storeOrder.getTableId(), storeOrder.getMenuType());
+                        storeOrderService.resetTableAfterPayment(storeOrder.getTableId());
                         log.info("[WeChatPartnerMinin] 支付后重置餐桌 tableId={}", storeOrder.getTableId());
                     } catch (Exception e) {
                         log.error("[WeChatPartnerMinin] 重置餐桌失败 tableId={}", storeOrder.getTableId(), e);

+ 9 - 5
alien-job/src/main/java/shop/alien/job/feign/AlienStoreFeign.java

@@ -2,11 +2,7 @@ package shop.alien.job.feign;
 
 import com.alibaba.fastjson.JSONObject;
 import org.springframework.cloud.openfeign.FeignClient;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.*;
 import shop.alien.entity.result.R;
 
 import java.util.Map;
@@ -95,6 +91,14 @@ public interface AlienStoreFeign {
     R<Integer> retryRefundFailed();
 
     /**
+     * 特约商户进件:申请单号查询申请状态(转发微信 GET .../applyment_id/{applyment_id})。
+     * 需在配置中提供 {@code feign.alienStore.url} 指向 alien-store 根地址。
+     *
+     * @param applymentId 微信支付申请单号
+     */
+    @GetMapping("/payment/wechatPartner/v3/applyment4sub/applyment/applyment_id/{applyment_id}")
+    R<Map<String, Object>> queryWechatPartnerApplymentState(@PathVariable("applyment_id") Long applymentId);
+    /**
      * 服务费规则定时任务:自动关闭已过期的自定义日期规则
      *
      * @return R.data 为本次关闭数量

+ 7 - 0
alien-store/src/main/java/shop/alien/store/feign/DiningServiceFeign.java

@@ -673,4 +673,11 @@ public interface DiningServiceFeign {
      */
     @PostMapping(value = "/dining/file/upload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
     R<String> uploadFile(@RequestPart("file") MultipartFile file);
+
+    /**
+     * 支付成功后重置餐桌与购物车(与 alien-dining {@code StoreOrderService.resetTableAfterPayment} 一致),供微信回调等业务使用。
+     */
+    @PostMapping("/payment/internal/resetTableAfterPayment")
+    R<Void> resetTableAfterPaymentInternal(
+            @RequestParam("tableId") Integer tableId);
 }