Selaa lähdekoodia

智能柜项目提交

skyline 2 kuukautta sitten
vanhempi
säilyke
53a4d0c8b8

+ 1 - 1
haha-admin-web/src/layout/components/lay-footer/index.vue

@@ -8,7 +8,7 @@ const TITLE = getConfig("Title");
   <footer
     class="layout-footer text-[rgba(0,0,0,0.6)] dark:text-[rgba(220,220,242,0.8)]"
   >
-    Copyright © 2020-present
+    Copyright © 2026
     <span class="hover:text-primary!">
       &nbsp;{{ TITLE }}
     </span>

+ 1 - 1
haha-admin-web/src/views/login/index.vue

@@ -210,7 +210,7 @@ useEventListener(document, "keydown", ({ code }) => {
     <div
       class="w-full flex-c absolute bottom-3 text-sm text-[rgba(0,0,0,0.6)] dark:text-[rgba(220,220,242,0.8)]"
     >
-      Copyright © 2020-present
+      Copyright © 2026
       <span class="hover:text-primary!">
         &nbsp;{{ title }}
       </span>

+ 4 - 0
haha-admin-web/src/views/timed-discount/utils/hook.tsx

@@ -228,6 +228,7 @@ export function useTimedDiscount() {
       width: "900px",
       draggable: true,
       fullscreen: deviceDetection(),
+      alignCenter: true,
       contentRenderer: () => (
         <div>
           <ElDescriptions column={2} border>
@@ -295,6 +296,7 @@ export function useTimedDiscount() {
       width: "1100px",
       draggable: true,
       fullscreen: deviceDetection(),
+      alignCenter: true,
       contentRenderer: () => renderForm(formData),
       beforeSure: async (done) => {
         if (!validateForm(formData)) return;
@@ -340,6 +342,7 @@ export function useTimedDiscount() {
       width: "1100px",
       draggable: true,
       fullscreen: deviceDetection(),
+      alignCenter: true,
       contentRenderer: () => renderForm(formData),
       beforeSure: async (done) => {
         if (!validateForm(formData)) return;
@@ -797,6 +800,7 @@ export function useTimedDiscountRecord() {
       width: "1000px",
       draggable: true,
       fullscreen: deviceDetection(),
+      alignCenter: true,
       contentRenderer: () => (
         <div>
           <ElDescriptions column={3} border class="mb-4">

+ 11 - 11
haha-miniapp/src/main/resources/application.yml

@@ -74,17 +74,17 @@ server:
 
 # 微信相关配置
 wechat:
-  # 支付配置
-  pay:
-    app-id: wxef6ffc2591d04b1b
-    mch-id: 1888888888
-    mch-key: 88888888888888888888888888888888
-    v3-api-key: 88888888888888888888888888888888
-    notify-url: http://localhost:7077/api/payment/callback/wechat
-    private-key-path: classpath:cert/apiclient_key.pem
-    merchant-serial-number: YOUR_MERCHANT_SERIAL_NUMBER
-    service-id: YOUR_PAY_SCORE_SERVICE_ID
-    pay-score-notify-url: http://localhost:7077/api/payment/callback/wechat_payscore
+  # 支付配置 - 暂时屏蔽,等微信商户注册好后再配置
+  # pay:
+  #   app-id: wxef6ffc2591d04b1b
+  #   mch-id: 1888888888
+  #   mch-key: 88888888888888888888888888888888
+  #   v3-api-key: 88888888888888888888888888888888
+  #   notify-url: http://localhost:7077/api/payment/callback/wechat
+  #   private-key-path: classpath:cert/apiclient_key.pem
+  #   merchant-serial-number: YOUR_MERCHANT_SERIAL_NUMBER
+  #   service-id: YOUR_PAY_SCORE_SERVICE_ID
+  #   pay-score-notify-url: http://localhost:7077/api/payment/callback/wechat_payscore
   # 小程序配置
   miniapp:
     app-id: your_wechat_miniapp_appid

+ 3 - 20
haha-service/src/main/java/com/haha/service/payment/config/WxPayConfig.java

@@ -15,7 +15,6 @@ import org.springframework.context.annotation.Configuration;
 import org.springframework.core.io.Resource;
 import org.springframework.core.io.ResourceLoader;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Qualifier;
 
 import jakarta.annotation.PostConstruct;
 import java.io.IOException;
@@ -73,7 +72,6 @@ public class WxPayConfig {
         log.info("初始化微信支付 V3 SDK 配置 - 商户号: {}, AppID: {}", mchId, appId);
         
         try {
-            // 读取私钥内容
             String privateKeyContent = loadPrivateKey();
             
             Config config = new RSAAutoCertificateConfig.Builder()
@@ -88,8 +86,7 @@ public class WxPayConfig {
         } catch (Exception e) {
             log.error("微信支付 V3 SDK 配置初始化失败: {}", e.getMessage());
             log.warn("微信支付功能将不可用,请检查配置参数和证书文件");
-            // 返回 null,下游 Bean 创建时会跳过
-            return null;
+            throw new IllegalStateException("微信支付配置初始化失败: " + e.getMessage(), e);
         }
     }
     
@@ -98,10 +95,6 @@ public class WxPayConfig {
      */
     @Bean
     public JsapiServiceExtension jsapiServiceExtension(Config wxPaySdkConfig) {
-        if (wxPaySdkConfig == null) {
-            log.warn("微信支付 SDK 配置未初始化,JSAPI 服务不可用");
-            return null;
-        }
         return new JsapiServiceExtension.Builder().config(wxPaySdkConfig).build();
     }
     
@@ -110,10 +103,6 @@ public class WxPayConfig {
      */
     @Bean
     public RefundService wxRefundService(Config wxPaySdkConfig) {
-        if (wxPaySdkConfig == null) {
-            log.warn("微信支付 SDK 配置未初始化,退款服务不可用");
-            return null;
-        }
         return new RefundService.Builder().config(wxPaySdkConfig).build();
     }
     
@@ -122,11 +111,6 @@ public class WxPayConfig {
      */
     @Bean
     public NotificationParser wxNotificationParser(Config wxPaySdkConfig) {
-        if (wxPaySdkConfig == null) {
-            log.warn("微信支付 SDK 配置未初始化,回调通知解析不可用");
-            return null;
-        }
-        // RSAAutoCertificateConfig 实现了 NotificationConfig 接口
         return new NotificationParser((NotificationConfig) wxPaySdkConfig);
     }
     
@@ -148,14 +132,13 @@ public class WxPayConfig {
      * 自动处理请求签名和响应验签
      */
     @Bean
-    @ConditionalOnProperty(name = "wechat.pay.mch-id")
-    public com.wechat.pay.java.core.http.HttpClient wxPayHttpClient(
-            @Qualifier("wxPaySdkConfig") com.wechat.pay.java.core.Config wxPaySdkConfig) {
+    public com.wechat.pay.java.core.http.HttpClient wxPayHttpClient(Config wxPaySdkConfig) {
         return new com.wechat.pay.java.core.http.DefaultHttpClientBuilder()
                 .config(wxPaySdkConfig)
                 .build();
     }
 
+    
     @PostConstruct
     public void logConfig() {
         log.info("微信支付配置加载完成 - AppID: {}, 商户号: {}, 回调地址: {}", appId, mchId, notifyUrl);