All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
feat(fight): 新增疲惫状态并优化睡眠状态机制 - 实现疲惫状态(StatusTired),仅限制攻击技能,允许属性技能正常使用 - 重构睡眠状态,改为在被攻击且未miss时立即解除,而非技能使用后 - 修复寄生种子效果触发时机,改为回合开始时触发 - 调整寄生效果的目标为技能施放者而非
57 lines
1.1 KiB
Go
57 lines
1.1 KiB
Go
package main
|
|
|
|
import (
|
|
"database/sql"
|
|
"fmt"
|
|
"log"
|
|
|
|
_ "github.com/lib/pq"
|
|
)
|
|
|
|
func main() {
|
|
const dsn = "user=user_YrK4j7 password=password_jSDm76 host=43.248.3.21 port=5432 dbname=bl sslmode=disable timezone=Asia/Shanghai"
|
|
|
|
db, err := sql.Open("postgres", dsn)
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
defer db.Close()
|
|
|
|
var (
|
|
id int64
|
|
cdkCode string
|
|
cdkType int64
|
|
exchangeRemainCount int64
|
|
bindUserID int64
|
|
validEndTime sql.NullTime
|
|
remark sql.NullString
|
|
)
|
|
|
|
err = db.QueryRow(`
|
|
select id, cdk_code, type, exchange_remain_count, bind_user_id, valid_end_time, remark
|
|
from config_gift_cdk
|
|
where cdk_code = $1
|
|
`, "nrTbdXFBhKkaTdDk").Scan(
|
|
&id,
|
|
&cdkCode,
|
|
&cdkType,
|
|
&exchangeRemainCount,
|
|
&bindUserID,
|
|
&validEndTime,
|
|
&remark,
|
|
)
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
|
|
fmt.Printf("id=%d\ncdk_code=%s\ntype=%d\nexchange_remain_count=%d\nbind_user_id=%d\nvalid_end_time=%v\nremark=%q\n",
|
|
id,
|
|
cdkCode,
|
|
cdkType,
|
|
exchangeRemainCount,
|
|
bindUserID,
|
|
validEndTime.Time,
|
|
remark.String,
|
|
)
|
|
}
|