chore(lint): 改进代码样式 (#1124)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
github-actions[bot] 2025-02-20 02:01:45 +09:00 committed by GitHub
parent 085e95cd48
commit b494390373
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 10 deletions

View File

@ -630,12 +630,12 @@ func (sql *fishdb) refreshStroeInfo() (ok bool, err error) {
Duration: time.Now().Unix(), Duration: time.Now().Unix(),
Name: "初始木竿", Name: "初始木竿",
Type: "pole", Type: "pole",
Price: priceList["木竿"]+priceList["木竿"] * discountList["木竿"]/100, Price: priceList["木竿"] + priceList["木竿"]*discountList["木竿"]/100,
Other: "30/0/0/0", Other: "30/0/0/0",
} }
_ = sql.db.Find("store", &thingInfo, "WHERE Name = '初始木竿'") _ = sql.db.Find("store", &thingInfo, "WHERE Name = '初始木竿'")
thingInfo.Number ++ thingInfo.Number++
if thingInfo.Number > 5{ if thingInfo.Number > 5 {
thingInfo.Number = 1 thingInfo.Number = 1
} }
_ = sql.db.Insert("store", &thingInfo) _ = sql.db.Insert("store", &thingInfo)

View File

@ -472,8 +472,8 @@ func init() {
thingPice := (priceList[info.Name] - (durationList[info.Name] - durable) - maintenance*2 + thingPice := (priceList[info.Name] - (durationList[info.Name] - durable) - maintenance*2 +
induceLevel*600*discountList["诱钓"]/100 + induceLevel*600*discountList["诱钓"]/100 +
favorLevel*1800*discountList["海之眷顾"]/100) * discountList[info.Name] / 100 favorLevel*1800*discountList["海之眷顾"]/100) * discountList[info.Name] / 100
if strings.Contains(thingName, "初始木竿"){ if strings.Contains(thingName, "初始木竿") {
thingPice = priceList["木竿"]+priceList["木竿"] * discountList["木竿"]/100 thingPice = priceList["木竿"] + priceList["木竿"]*discountList["木竿"]/100
} }
pice = append(pice, thingPice) pice = append(pice, thingPice)
} else { } else {
@ -621,7 +621,7 @@ func init() {
Number: 1, Number: 1,
Other: thing.Other, Other: thing.Other,
} }
if thingName == "初始木竿"{ if thingName == "初始木竿" {
newCommodity.Name = "木竿" newCommodity.Name = "木竿"
} }
} else { } else {
@ -800,8 +800,8 @@ func drawStroeInfoImage(stroeInfo []store) (picImage image.Image, err error) {
induceLevel, _ := strconv.Atoi(poleInfo[2]) induceLevel, _ := strconv.Atoi(poleInfo[2])
favorLevel, _ := strconv.Atoi(poleInfo[3]) favorLevel, _ := strconv.Atoi(poleInfo[3])
pice = (priceList[info.Name] - (durationList[info.Name] - durable) - maintenance*2 + induceLevel*600 + favorLevel*1800) * discountList[info.Name] / 100 pice = (priceList[info.Name] - (durationList[info.Name] - durable) - maintenance*2 + induceLevel*600 + favorLevel*1800) * discountList[info.Name] / 100
if strings.Contains(name, "初始木竿"){ if strings.Contains(name, "初始木竿") {
pice = priceList["木竿"]+priceList["木竿"] * discountList["木竿"]/100 pice = priceList["木竿"] + priceList["木竿"]*discountList["木竿"]/100
} }
} else { } else {
pice = priceList[info.Name] * discountList[info.Name] / 100 pice = priceList[info.Name] * discountList[info.Name] / 100