时区文件更新

This commit is contained in:
wuchao 2024-06-27 15:56:47 +08:00
parent cf002110d4
commit 697e3d7f4b
4 changed files with 7 additions and 2 deletions

View File

@ -24,7 +24,8 @@
# 创建最终镜像用于运行编译后的Go程序 # 创建最终镜像用于运行编译后的Go程序
FROM alpine FROM alpine
#设置时区 #设置时区
ENV TimeZone=Asia/Shanghai RUN apk add --no-cache tzdata
ENV TZ=Asia/Shanghai
WORKDIR /app WORKDIR /app
# 将编译好的二进制文件从构建阶段复制到运行阶段 # 将编译好的二进制文件从构建阶段复制到运行阶段

View File

@ -56,7 +56,7 @@ func OrderQuery(c *gin.Context) {
_, rsp := services.YouChuOrderQuery(order) _, rsp := services.YouChuOrderQuery(order)
utils.Log(nil, "三方订单查询", rsp) utils.Log(nil, "三方订单查询", rsp)
if rsp.OrderSta == "03" { if rsp.OrderSta == "03" {
err := services.OrdersUpdateService(front.OrdersUpdateRequest{Id: order.Id, Status: common.ORDER_STATUS_PAY}) err := services.OrdersUpdateService(front.OrdersUpdateRequest{Id: order.Id, Status: common.ORDER_STATUS_PAY, OrgTxnSeq: rsp.OrderNo})
if err != nil { if err != nil {
controllers.Error(c, 500, "订单更新失败") controllers.Error(c, 500, "订单更新失败")
return return

View File

@ -69,4 +69,5 @@ type OrdersUpdateRequest struct {
Id int `json:"id" validate:"required" form:"id" validate:"required" example:"1"` Id int `json:"id" validate:"required" form:"id" validate:"required" example:"1"`
Status int `json:"status" form:"status" validate:"oneof=1 2 3 4" example:"1"` // '状态(1/待支付,2/已支付,3/已完成4/取消5作废)' Status int `json:"status" form:"status" validate:"oneof=1 2 3 4" example:"1"` // '状态(1/待支付,2/已支付,3/已完成4/取消5作废)'
VoucherLink string `json:"voucher_link"` VoucherLink string `json:"voucher_link"`
OrgTxnSeq string `json:"orgTxnSeq"`
} }

View File

@ -121,6 +121,9 @@ func OrdersUpdateService(req front.OrdersUpdateRequest) (err error) {
if req.VoucherLink != "" { if req.VoucherLink != "" {
order.VoucherLink = req.VoucherLink order.VoucherLink = req.VoucherLink
} }
if req.OrgTxnSeq != "" {
order.OrgTxnSeq = req.OrgTxnSeq
}
_, err = repo.Where("Id = ?", req.Id).Update(&order) _, err = repo.Where("Id = ?", req.Id).Update(&order)
return return
} }