fix: 会员状态/订单支付时间显示(gtime.Format 需用 Y-m-d H:i:s 令牌,原输出字面量)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -57,7 +57,7 @@ func (c *member) OrderStatus(ctx context.Context, req *dto.MemberOrderStatusReq)
|
|||||||
}
|
}
|
||||||
paidAt := ""
|
paidAt := ""
|
||||||
if order.PaidAt != nil {
|
if order.PaidAt != nil {
|
||||||
paidAt = order.PaidAt.Format("2006-01-02 15:04:05")
|
paidAt = order.PaidAt.Format("Y-m-d H:i:s")
|
||||||
}
|
}
|
||||||
return &dto.MemberOrderStatusRes{Status: order.Status, TradeNo: order.TradeNo, PaidAt: paidAt}, nil
|
return &dto.MemberOrderStatusRes{Status: order.Status, TradeNo: order.TradeNo, PaidAt: paidAt}, nil
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ func (s *memberService) Status(ctx context.Context, userId int64) (*MemberStatus
|
|||||||
return st, nil
|
return st, nil
|
||||||
}
|
}
|
||||||
st.IsVip = true
|
st.IsVip = true
|
||||||
st.ExpireAt = um.ExpireAt.Format("2006-01-02 15:04:05")
|
st.ExpireAt = um.ExpireAt.Format("Y-m-d H:i:s")
|
||||||
if plan, _ := dao.MemberPlan.GetOne(ctx, um.PlanId); plan != nil {
|
if plan, _ := dao.MemberPlan.GetOne(ctx, um.PlanId); plan != nil {
|
||||||
st.PlanName = plan.Name
|
st.PlanName = plan.Name
|
||||||
st.Benefits = parseBenefits(plan.Features)
|
st.Benefits = parseBenefits(plan.Features)
|
||||||
|
|||||||
Reference in New Issue
Block a user