diff --git a/bizcommon/util/util.go b/bizcommon/util/util.go index 371379ce..019f1716 100644 --- a/bizcommon/util/util.go +++ b/bizcommon/util/util.go @@ -119,7 +119,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 { @@ -130,7 +133,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 { @@ -141,7 +147,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 { @@ -159,7 +168,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 { diff --git a/etc/mix/mix-prod-offline.yaml b/etc/mix/mix-prod-offline.yaml index 77ee41c5..8e35ceed 100644 --- a/etc/mix/mix-prod-offline.yaml +++ b/etc/mix/mix-prod-offline.yaml @@ -83,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-offline/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"