sync: 对齐小程序 v1.0.2 生产代码并脱敏
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"fmt"
|
||||
"sort"
|
||||
"strings"
|
||||
"git.5iot.com/iotlcm-public/iotlcm-app/internal/library/batchmetadata"
|
||||
|
||||
"git.5iot.com/iotlcm-public/iotlcm-app/internal/consts"
|
||||
"git.5iot.com/iotlcm-public/iotlcm-app/internal/dao"
|
||||
@@ -79,6 +80,8 @@ func (s *sAppCard) RenewBatchPrepare(ctx context.Context, param *model.AppCardRe
|
||||
req := batchimport.SubmitRequest{
|
||||
BizParams: param,
|
||||
SourceType: consts.BatchSourceTypeBatchSelect,
|
||||
SourceChannel: batchmetadata.MiniProgram,
|
||||
ExecutionMode: batchmetadata.Bulk,
|
||||
BatchType: consts.BatchTypePrepare,
|
||||
FailureBatchType: consts.BatchTypeRenew,
|
||||
SkipExecute: true,
|
||||
@@ -174,7 +177,7 @@ func (s *sAppCard) RenewBatchSubmit(ctx context.Context, param *model.AppCardRen
|
||||
if err = s.insertAppRenewBatchOrderItem(ctx, tx, user, batch, orderId, orderSn, batchNo, "", duration.Months, singleCardAmount, totalAmount, minBeginAt, maxEndAt, cardPeriods, now); err != nil {
|
||||
return err
|
||||
}
|
||||
return s.insertAppRenewSubmitBatch(ctx, tx, user, batch, batchNo, "", orderSn, duration.Months, singleCardAmount, totalAmount, minBeginAt, maxEndAt, cardPeriods, buyerNote, now)
|
||||
return s.insertAppRenewSubmitBatch(ctx, tx, user, batch, batchNo, "", orderSn, duration.Months, singleCardAmount, totalAmount, minBeginAt, maxEndAt, cardPeriods, buyerNote, batchmetadata.Bulk, now)
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -462,6 +465,8 @@ func (s *sAppCard) insertAppRenewPrepareBatch(ctx context.Context, tx gdb.TX, us
|
||||
BatchStatus: consts.BatchStatusSuccess,
|
||||
BatchAsyncStatus: consts.BatchAsyncStatusSuccess,
|
||||
SourceType: consts.BatchSourceTypeBatchSelect,
|
||||
SourceChannel: batchmetadata.MiniProgram,
|
||||
ExecutionMode: batchmetadata.Bulk,
|
||||
SourceBatchNo: batchNo,
|
||||
IsCrossDept: 0,
|
||||
TargetDeptId: batch.Party.CustomerAgentId,
|
||||
@@ -513,7 +518,7 @@ func (s *sAppCard) insertAppRenewPrepareBatch(ctx context.Context, tx gdb.TX, us
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *sAppCard) insertAppRenewSubmitBatch(ctx context.Context, tx gdb.TX, user *entity.SysUser, batch *appRenewBatchContext, batchNo string, sourceBatchNo string, orderSn string, durationMonths int, singleCardAmount float64, totalAmount float64, beginAt, endAt *gtime.Time, cardPeriods []map[string]any, buyerNote string, now *gtime.Time) error {
|
||||
func (s *sAppCard) insertAppRenewSubmitBatch(ctx context.Context, tx gdb.TX, user *entity.SysUser, batch *appRenewBatchContext, batchNo string, sourceBatchNo string, orderSn string, durationMonths int, singleCardAmount float64, totalAmount float64, beginAt, endAt *gtime.Time, cardPeriods []map[string]any, buyerNote string, executionMode int, now *gtime.Time) error {
|
||||
sourceBatchNo = appRenewEffectiveSourceBatchNo(batchNo, sourceBatchNo)
|
||||
quantity := len(batch.Items)
|
||||
logFiles, err := s.ensureAppRenewBatchLogFiles(ctx, tx, user, batch, nil, batchNo, sourceBatchNo, orderSn, durationMonths, singleCardAmount, totalAmount, beginAt, endAt, cardPeriods, buyerNote, now)
|
||||
@@ -531,7 +536,9 @@ func (s *sAppCard) insertAppRenewSubmitBatch(ctx context.Context, tx gdb.TX, use
|
||||
BatchStatus: consts.BatchStatusSuccess,
|
||||
BatchAsyncStatus: consts.BatchAsyncStatusSuccess,
|
||||
SourceType: consts.BatchSourceTypeBatchSelect,
|
||||
SourceChannel: batchmetadata.MiniProgram,
|
||||
SourceBatchNo: strings.TrimSpace(sourceBatchNo),
|
||||
ExecutionMode: batchmetadata.NormalizeMode(executionMode),
|
||||
IsCrossDept: 0,
|
||||
TargetDeptId: batch.Party.CustomerAgentId,
|
||||
DeptId: batch.Party.CreatedDept,
|
||||
|
||||
Reference in New Issue
Block a user