Files
bl/logic/service/room/buy.go
xinian d0cf598ced
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
refactor: 将物品和货币相关字段从uint32改为int64以支持更大数值范围
2026-02-12 04:28:20 +08:00

23 lines
979 B
Go
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package room
import "blazing/logic/service/common"
// C2S_BUY_FITMENT 客户端(前端)向服务端(后端)发送的「购买家具」请求结构体
// 对应前端定义的 C2S_BUY_FITMENT 结构体
type C2S_BUY_FITMENT struct {
Head common.TomeeHeader `cmd:"10004" struc:"skip"` //玩家登录
// ID 家具ID对应前端 id 字段)
ID uint32 `json:"id"` // JSON序列化tag保证与前端字段名一致
// Count 购买数量(对应前端 count 字段)
Count uint32 `json:"count"`
}
type S2C_BUY_FITMENT struct {
// Coins 购买后剩余的赛尔豆(对应前端 coins 字段)
Coins int64 `struc:"uint32"`
// ID 购买的物品ID对应前端 id 字段即家具ID
ID uint32 `json:"id"`
// Count 字段说明前端未调用该参数推测为购买数量与C2S的count对应
// 若后续确认无业务意义,可标注为废弃(如 `// Deprecated: 前端未使用,暂保留字段`
Count uint32 `json:"count"`
}