From b1756d3c3d767873647c6ab5785e8d02be8433ac Mon Sep 17 00:00:00 2001 From: Leufolium Date: Mon, 22 Jul 2024 19:23:13 +0800 Subject: [PATCH 1/3] by Robin at 20240722; fixed Location err --- bizcommon/util/util.go | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/bizcommon/util/util.go b/bizcommon/util/util.go index d155d84d..af1782cd 100644 --- a/bizcommon/util/util.go +++ b/bizcommon/util/util.go @@ -83,7 +83,10 @@ func Convert2SqlArr(a ...any) string { // 获取整点时间戳 func GetHourStartTimeStamp(t time.Time) int64 { - loc, _ := time.LoadLocation("Asia/Shanghai") + loc, err := time.LoadLocation("Asia/Shanghai") + if err != nil { + loc = time.FixedZone("CST", 8*3600) + } timeStr := fmt.Sprintf("%02d-%02d-%02d %02d:00:00", t.Year(), t.Month(), t.Day(), t.Hour()) duetimecst, err := time.ParseInLocation("2006-1-2 15:04:05", timeStr, loc) if err != nil { @@ -94,7 +97,10 @@ func GetHourStartTimeStamp(t time.Time) int64 { // 获取30分时间戳 func GetHourHalfTimeStamp(t time.Time) int64 { - loc, _ := time.LoadLocation("Asia/Shanghai") + loc, err := time.LoadLocation("Asia/Shanghai") + if err != nil { + loc = time.FixedZone("CST", 8*3600) + } timeStr := fmt.Sprintf("%02d-%02d-%02d %02d:30:00", t.Year(), t.Month(), t.Day(), t.Hour()) duetimecst, err := time.ParseInLocation("2006-1-2 15:04:05", timeStr, loc) if err != nil { @@ -105,7 +111,10 @@ func GetHourHalfTimeStamp(t time.Time) int64 { // 获取整分时间戳 func GetMinuteStartTimeStamp(t time.Time) int64 { - loc, _ := time.LoadLocation("Asia/Shanghai") + loc, err := time.LoadLocation("Asia/Shanghai") + if err != nil { + loc = time.FixedZone("CST", 8*3600) + } timeStr := fmt.Sprintf("%02d-%02d-%02d %02d:%02d:00", t.Year(), t.Month(), t.Day(), t.Hour(), t.Minute()) duetimecst, err := time.ParseInLocation("2006-1-2 15:04:05", timeStr, loc) if err != nil { @@ -123,7 +132,10 @@ func GetTodayZeroTime() time.Time { // 获取0点时间戳 func GetDayStartTimeStamp(t time.Time) int64 { - loc, _ := time.LoadLocation("Asia/Shanghai") + loc, err := time.LoadLocation("Asia/Shanghai") + if err != nil { + loc = time.FixedZone("CST", 8*3600) + } timeStr := fmt.Sprintf("%02d-%02d-%02d 00:00:00", t.Year(), t.Month(), t.Day()) duetimecst, err := time.ParseInLocation("2006-1-2 15:04:05", timeStr, loc) if err != nil { From 9bec776bdfd59563a6029e533409e0978cccba3f Mon Sep 17 00:00:00 2001 From: Leufolium Date: Mon, 22 Jul 2024 19:30:39 +0800 Subject: [PATCH 2/3] 1 --- etc/mix/mix-prod-offline.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/etc/mix/mix-prod-offline.yaml b/etc/mix/mix-prod-offline.yaml index e45cec3b..c93ad8a9 100644 --- a/etc/mix/mix-prod-offline.yaml +++ b/etc/mix/mix-prod-offline.yaml @@ -57,6 +57,14 @@ alipay_myts: alipay_root_cert_path: "/app/wishpal-ironfan-offline/etc/mix/alipaycert_myts/alipayRootCert.crt" alipay_public_cert_path: "/app/wishpal-ironfan-offline/etc/mix/alipaycert_myts/alipayCertPublicKey_RSA2.crt" +alipay_lx01: + appid: "2021004153681591" + private_key: "MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCNlFVmQzpE296r66hKWA45bG82LjA/8a/v8WT9CMGYNvvn9q7aqP2gt0k1xIDxzQkX66Dnwdkb8zSlEsTD+biOUQP/jQpje8hbbVMxBV9eC1gxdSLEOunCF8mE0vlRQSjNQZhigwMbJKydPSSqwCkwoIYdR63uUYpNFNQoIbBL4b2L/urDvWIU7e61aAmWJeohUUmU0cWa7qo2lLcLBM7m5VH1kQQGAutEagxVezgkUB9rRMr2c/gcoFFDLxDODE4Rp8sRsSlY2sUSDWhaHV59DrwzVeq1IFtW8oNxOUcuxh5UhC/NcFMWZrxwajaZhw8lz2sCLT2rQ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Pad938N1AoGBAKeG3wdQDe2M1QblI8kLZGKvY85/Sn6Kg4XEDh409QnLH2teC/MBtVglRjb6HV+Vmsg4nmGbwSrZ41B8Orxj4s0dAaqGzR/mf8X6eSxCnOo5AdAHbQoj55G3qjoq+QX0G+V1oBjCQ70GxhKLkJvaiRK0+7rWNz5bYu0UK86a7UrY" + notify_url: "https://api.tiefen.fun/ext/vas/alipay_callback" + app_cert_path: "/app/wishpal-ironfan-offline/etc/mix/alipaycert_lx01/appCertPublicKey_2021004153681591.crt" + alipay_root_cert_path: "/app/wishpal-ironfan-offline/etc/mix/alipaycert_lx01/alipayRootCert.crt" + alipay_public_cert_path: "/app/wishpal-ironfan-offline/etc/mix/alipaycert_lx01/alipayCertPublicKey_RSA2.crt" + wxpay: mchid: "1665016206" appid: "wxc28fd8aaf31984b6" @@ -75,6 +83,14 @@ wxpay_tfz: notify_url: "https://api.tiefen.fun/ext/vas/wxpay_callback" app_secret: "ebc325109b91087e22f046bc8ac5c940" +wxpay_tiefanzone: + mchid: "1679775327" + appid: "wx9ef291dbf4684ace" + serial_no: "64BB9C68FD441858D428D73182AB4D62D27A5DE2" + apiv3_key: "5QwY1XMK1HW3JQwGKbA3mfJ5cdsTQGjR" + private_key_path: "/app/wishpal-ironfan/etc/mix/wxpaycert_tiefanzone/apiclient_key.pem" + notify_url: "https://api.tiefen.fun/ext/vas/wxpay_callback" + apollo: app_id: "wishpal_live_service" cluster: "dev" From 2c2564d9dc4411aaddba2ed3f6844f667eb85f30 Mon Sep 17 00:00:00 2001 From: Leufolium Date: Mon, 22 Jul 2024 19:30:57 +0800 Subject: [PATCH 3/3] 1 --- etc/mix/mix-prod-offline.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/mix/mix-prod-offline.yaml b/etc/mix/mix-prod-offline.yaml index c93ad8a9..0659f17a 100644 --- a/etc/mix/mix-prod-offline.yaml +++ b/etc/mix/mix-prod-offline.yaml @@ -88,7 +88,7 @@ wxpay_tiefanzone: appid: "wx9ef291dbf4684ace" serial_no: "64BB9C68FD441858D428D73182AB4D62D27A5DE2" apiv3_key: "5QwY1XMK1HW3JQwGKbA3mfJ5cdsTQGjR" - private_key_path: "/app/wishpal-ironfan/etc/mix/wxpaycert_tiefanzone/apiclient_key.pem" + private_key_path: "/app/wishpal-ironfan-offline/etc/mix/wxpaycert_tiefanzone/apiclient_key.pem" notify_url: "https://api.tiefen.fun/ext/vas/wxpay_callback" apollo: