gomod引用

This commit is contained in:
2025-12-12 16:20:47 +08:00
parent 0393931e91
commit a4ba4dd715
27 changed files with 2886 additions and 87 deletions

View File

@@ -41,10 +41,10 @@ func (d *paymentConfig) GetByTenantAndMethod(ctx context.Context, tenantID, payM
// Update 更新支付配置
func (d *paymentConfig) Update(ctx context.Context, config *entity.PaymentConfig) error {
filter := bson.M{"_id": config.ID}
filter := bson.M{"_id": config.Id}
update := bson.M{
"$set": bson.M{
"tenant_id": config.TenantID,
"tenant_id": config.TenantId,
"pay_method": config.PayMethod,
"config_name": config.ConfigName,
"description": config.Description,
@@ -120,8 +120,8 @@ var PaymentRecord = new(paymentRecord)
// Create 创建支付记录
func (d *paymentRecord) Create(ctx context.Context, record *entity.PaymentRecord) error {
record.CreatedAt = time.Now().Unix()
record.UpdatedAt = time.Now().Unix()
record.CreatedAt = time.Now()
record.UpdatedAt = time.Now()
_, err := mongo.Insert(ctx, []interface{}{record}, consts.PaymentRecordCollection)
return err
@@ -165,8 +165,8 @@ var RefundRecord = new(refundRecord)
// Create 创建退款记录
func (d *refundRecord) Create(ctx context.Context, record *entity.RefundRecord) error {
record.CreatedAt = time.Now().Unix()
record.UpdatedAt = time.Now().Unix()
record.CreatedAt = time.Now()
record.UpdatedAt = time.Now()
_, err := mongo.Insert(ctx, []interface{}{record}, consts.RefundRecordCollection)
return err