debug: 添加资产回收店铺查询的调试日志
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 7m3s
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 7m3s
在 RecallCards 方法中添加日志,用于诊断平台账号回收资产失败的问题: - 记录操作者店铺ID - 记录请求查询的店铺IDs - 记录实际查询到的店铺数量和IDs - 记录直属下级店铺集合 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -419,11 +419,26 @@ func (s *Service) RecallCards(ctx context.Context, req *dto.RecallStandaloneCard
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
// 调试日志:记录查询结果
|
||||||
|
s.logger.Info("批量查询店铺结果",
|
||||||
|
zap.Any("operator_shop_id", operatorShopID),
|
||||||
|
zap.Uints("requested_shop_ids", shopIDs),
|
||||||
|
zap.Int("returned_shops_count", len(shops)),
|
||||||
|
zap.Uints("returned_shop_ids", func() []uint {
|
||||||
|
ids := make([]uint, len(shops))
|
||||||
|
for i, shop := range shops {
|
||||||
|
ids[i] = shop.ID
|
||||||
|
}
|
||||||
|
return ids
|
||||||
|
}()))
|
||||||
for _, shop := range shops {
|
for _, shop := range shops {
|
||||||
if s.isDirectSubordinate(operatorShopID, shop) {
|
if s.isDirectSubordinate(operatorShopID, shop) {
|
||||||
directSubordinateSet[shop.ID] = true
|
directSubordinateSet[shop.ID] = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// 调试日志:记录直属下级集合
|
||||||
|
s.logger.Info("直属下级店铺集合",
|
||||||
|
zap.Any("direct_subordinate_set", directSubordinateSet))
|
||||||
}
|
}
|
||||||
|
|
||||||
// 4. 检查绑定设备的卡
|
// 4. 检查绑定设备的卡
|
||||||
|
|||||||
Reference in New Issue
Block a user