Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion niu/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package niu

import (
"fmt"

"github.com/RomiChan/syncx"
"github.com/jinzhu/gorm"
"github.com/sirupsen/logrus"
Expand All @@ -27,7 +28,6 @@ func ensureTable[T userInfo | AuctionInfo](gid int64, prefix string) error {
}

func tableFor(gid int64, prefix string) *gorm.DB {

switch prefix {
case usr:
err := ensureTable[userInfo](gid, usr)
Expand Down
5 changes: 3 additions & 2 deletions niu/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@ package niu
import (
"errors"
"fmt"
"github.com/google/uuid"
"github.com/jinzhu/gorm"
"os"
"strconv"
"strings"
"sync"

"github.com/google/uuid"
"github.com/jinzhu/gorm"

"github.com/FloatTech/floatbox/file"

"github.com/FloatTech/AnimeAPI/wallet"
Expand Down
6 changes: 3 additions & 3 deletions niu/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ package niu
import (
"errors"
"fmt"
"github.com/google/uuid"
"github.com/jinzhu/gorm"
"math"
"math/rand"
"sort"
"time"

"github.com/google/uuid"
"github.com/jinzhu/gorm"
)

var (
Expand Down Expand Up @@ -259,7 +260,6 @@ func (u *userInfo) checkProps(props, propSort string) error {
}

func (u *userInfo) purchaseItem(productID, quantity int) (money int, err error) {

m := map[int]int{
1: 300, // 伟哥
2: 300, // 媚药
Expand Down