Table of Contents

Interface IProductAssociationChecker

Namespace
CMS.Plugin.ProductManagement.Abstractions
Assembly
CMS.Plugin.ProductManagement.Abstractions.dll

产品关联检测

public interface IProductAssociationChecker

Methods

HasBeenAssociationAsync(IEnumerable<Guid>)

判断产品是否被关联(批量),关联后无法删除.

Task<List<(Guid usedId, string UsedObject)>> HasBeenAssociationAsync(IEnumerable<Guid> productIds)

Parameters

productIds IEnumerable<Guid>

产品型号标识集合

Returns

Task<List<(Guid usedId, string UsedObject)>>

HasBeenAssociationAsync(Guid)

判断产品是否被关联,关联后无法删除.

Task<(bool IsUsed, string UsedObject)> HasBeenAssociationAsync(Guid productId)

Parameters

productId Guid

产品型号标识

Returns

Task<(bool IsUsed, string UsedObject)>

返回是否被关联,及关联的对象,如:"XXX配方"

HasBeenUsedAsync(IEnumerable<Guid>)

判断产品是否已被数据关联使用(批量),使用后无法编辑,删除

Task<List<(Guid usedId, string UsedObject)>> HasBeenUsedAsync(IEnumerable<Guid> productIds)

Parameters

productIds IEnumerable<Guid>

产品型号标识集合

Returns

Task<List<(Guid usedId, string UsedObject)>>

HasBeenUsedAsync(Guid)

判断产品是否已被数据关联使用,使用后无法编辑,删除

Task<(bool IsUsed, string UsedObject)> HasBeenUsedAsync(Guid productId)

Parameters

productId Guid

产品型号标识

Returns

Task<(bool IsUsed, string UsedObject)>

返回是否被应用,及应用的对象,如:"XXX配方"

HasFormulaAsync(Guid)

检查产品是否被配方关联.

Task<bool> HasFormulaAsync(Guid productId)

Parameters

productId Guid

Returns

Task<bool>