Initial commit

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-15 13:57:10 +08:00
co-authored by Claude Opus 5
commit 8679200f41
1897 changed files with 257900 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
package wdtaxmod
import (
"fmt"
"91porn-server/common/db"
"91porn-server/common/log"
"91porn-server/models"
"go.mongodb.org/mongo-driver/bson"
)
const table = models.WithdrawTariff
func coll() *db.MongoTool {
return mdb.Coll(table)
}
func GetWithDrawTariff() (wt WithdrawTariff, err error) {
if err = coll().FindOne(&wt, bson.M{"_id": 1}); err != nil {
log.Warn(fmt.Sprintf("[METHOD-%s]==> Model %s %s fail error:%+v:", "GetWithDrawTariff", table, "FindOne", err))
}
return
}
func UpdateWithDrawTariff(set WithdrawTariffSelector) (modifyCount int64, err error) {
res, err := coll().UpsertOne(bson.M{"_id": 1}, bson.M{
"$set": set,
})
if err != nil {
log.Warn(fmt.Sprintf("[METHOD-%s]==> Model %s %s fail error:%+v:", "UpdateWithDrawTariff", table, "UpsertOne", err))
return
}
modifyCount = res.ModifiedCount
return
}