소스 검색

feat: 记录兑换时兑换码的ID (close #286)

CalciumIon 1 년 전
부모
커밋
bd7222118a
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      model/redemption.go

+ 1 - 1
model/redemption.go

@@ -78,7 +78,7 @@ func Redeem(key string, userId int) (quota int, err error) {
 	if err != nil {
 		return 0, errors.New("兑换失败," + err.Error())
 	}
-	RecordLog(userId, LogTypeTopup, fmt.Sprintf("通过兑换码充值 %s", common.LogQuota(redemption.Quota)))
+	RecordLog(userId, LogTypeTopup, fmt.Sprintf("通过兑换码充值 %s,兑换码ID %d", common.LogQuota(redemption.Quota), redemption.Id))
 	return redemption.Quota, nil
 }