add point totalConsumed
This commit is contained in:
@@ -12,9 +12,9 @@
|
||||
|
||||
<insert id="insertIfAbsent">
|
||||
INSERT INTO `gao_point_account` (
|
||||
`id`, `store_id`, `customer_id`, `balance`, `total_earned`, `total_revoked`, `total_adjusted`, `version`, `created_at`, `updated_at`, `deleted_at`
|
||||
`id`, `store_id`, `customer_id`, `balance`, `total_earned`, `total_consumed`, `total_revoked`, `total_adjusted`, `version`, `created_at`, `updated_at`, `deleted_at`
|
||||
) VALUES (
|
||||
#{account.id}, #{account.storeId}, #{account.customerId}, #{account.balance}, #{account.totalEarned}, #{account.totalRevoked}, #{account.totalAdjusted}, #{account.version}, #{account.createdAt}, #{account.updatedAt}, #{account.deletedAt}
|
||||
#{account.id}, #{account.storeId}, #{account.customerId}, #{account.balance}, #{account.totalEarned}, #{account.totalConsumed}, #{account.totalRevoked}, #{account.totalAdjusted}, #{account.version}, #{account.createdAt}, #{account.updatedAt}, #{account.deletedAt}
|
||||
)
|
||||
ON DUPLICATE KEY UPDATE `id` = `id`
|
||||
</insert>
|
||||
@@ -33,6 +33,7 @@
|
||||
SET
|
||||
`balance` = `balance` + #{delta},
|
||||
`total_earned` = `total_earned` + #{totalEarnedDelta},
|
||||
`total_consumed` = `total_consumed` + #{totalConsumedDelta},
|
||||
`total_revoked` = `total_revoked` + #{totalRevokedDelta},
|
||||
`total_adjusted` = `total_adjusted` + #{totalAdjustedDelta},
|
||||
`version` = `version` + 1,
|
||||
|
||||
Reference in New Issue
Block a user