update: 新增查询订单是否有收据的接口
							parent
							
								
									a161249e63
								
							
						
					
					
						commit
						79217aaaac
					
				|  | @ -323,6 +323,33 @@ namespace Guru | |||
|             } | ||||
|         } | ||||
| 
 | ||||
|         public Product GetProduct(string productName) | ||||
|         { | ||||
|             if (_storeController == null || _storeController.products == null) | ||||
|             { | ||||
|                 var info = GetInfo(productName); | ||||
|                 if (info != null) | ||||
|                 { | ||||
|                     return _storeController.products.WithID(info.Id); | ||||
|                 } | ||||
|             } | ||||
| 
 | ||||
|             return null; | ||||
|         } | ||||
| 
 | ||||
|         /// <summary> | ||||
|         /// 当前的商品是否已经持有收据了 | ||||
|         /// </summary> | ||||
|         /// <param name="productName"></param> | ||||
|         /// <returns></returns> | ||||
|         public bool IsProductHasReceipt(string productName) | ||||
|         { | ||||
|             var product = GetProduct(productName); | ||||
|             if (product != null) return product.hasReceipt; | ||||
|             return false; | ||||
|         } | ||||
| 
 | ||||
| 
 | ||||
|         #endregion | ||||
| 
 | ||||
|         #region 订单验证器 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 huyufei
						huyufei