切换主体
This commit is contained in:
parent
0e1ed3b426
commit
be2adefb91
|
|
@ -31,6 +31,7 @@ func (this *VoucherBiz) RegisterTag(ctx context.Context, id int32) error {
|
|||
}
|
||||
}
|
||||
|
||||
_ = this.ProductRepo.DelCacheByProductNo(ctx, stock.ProductNo)
|
||||
_, err = this.ProductRepo.GetByProductNo(ctx, stock.ProductNo)
|
||||
|
||||
return err
|
||||
|
|
|
|||
|
|
@ -12,5 +12,6 @@ type ProductRepo interface {
|
|||
GetByBatchNo(ctx context.Context, batchNo string) (*bo.ProductBo, error)
|
||||
GetByMchStockId(ctx context.Context, mchId, stockId string) (*bo.ProductBo, error)
|
||||
GetByProductNo(ctx context.Context, productNo string) (*bo.ProductBo, error)
|
||||
DelCacheByProductNo(ctx context.Context, productNo string) error
|
||||
UpdateByWxResp(ctx context.Context, id int32, req *do.WxResp) error
|
||||
}
|
||||
|
|
|
|||
|
|
@ -131,6 +131,15 @@ func (r *ProductRepoImpl) GetByMchStockId(ctx context.Context, mchId, stockId st
|
|||
return r.ToBo(item), nil
|
||||
}
|
||||
|
||||
func (r *ProductRepoImpl) DelCacheByProductNo(ctx context.Context, productNo string) error {
|
||||
|
||||
c := vo.ProductQueryKey.BuildCache([]string{productNo})
|
||||
|
||||
_, _ = r.rdb.Rdb.Del(ctx, c.Key).Result()
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (r *ProductRepoImpl) GetByProductNo(ctx context.Context, productNo string) (*bo.ProductBo, error) {
|
||||
|
||||
c := vo.ProductQueryKey.BuildCache([]string{productNo})
|
||||
|
|
|
|||
Loading…
Reference in New Issue