feat: 添加批量检查物品数量的方法并优化宠物融合逻辑
Some checks failed
ci/woodpecker/push/my-first-workflow Pipeline failed
Some checks failed
ci/woodpecker/push/my-first-workflow Pipeline failed
在物品服务中添加CheakItemM方法用于批量检查物品数量 修改宠物融合逻辑使用新方法进行物品检查
This commit is contained in:
@@ -67,6 +67,13 @@ func (s *ItemService) CheakItem(id uint32) int64 {
|
||||
m.Where("item_id", id).Scan(&ttt)
|
||||
return ttt.ItemCnt
|
||||
}
|
||||
func (s *ItemService) CheakItemM(id ...uint32) []model.Item {
|
||||
var ttt []model.Item
|
||||
m := s.dbm(s.Model)
|
||||
|
||||
m.WhereIn("item_id", id).Scan(&ttt)
|
||||
return ttt
|
||||
}
|
||||
|
||||
// /添加进来的物品一定是保证存在的
|
||||
type ItemService struct {
|
||||
|
||||
Reference in New Issue
Block a user