/// <summary> /// 用户发起砍价分享活动(已废弃) /// </summary> /// <param name="ownerId"></param> /// <param name="apId"></param> /// <returns>1-分享成功,2-该用户已经分享过该商品,3-该商品下架或被禁用,4-该商品已抢光,0-数据库插入失败</returns> public async Task <OperationResult <BargainShareResult> > AddShareBargainAsync(Guid ownerId, int apId, string pid) { string inputStr = $"入参:ownerId={ownerId},apId={apId},pid={pid}"; Logger.Info($"分享砍价活动服务 {nameof(AddShareBargainAsync)} {inputStr}"); if (ownerId == Guid.Empty || apId < 0) { return(OperationResult.FromError <BargainShareResult>(ErrorCode.ParameterError, "参数不正确")); } var result = await BargainManager.AddShareBargain(ownerId, apId, pid); Logger.Info( $"分享砍价活动服务 {nameof(AddShareBargainAsync)} 出参:result={JsonConvert.SerializeObject(result)} {inputStr}"); return(OperationResult.FromResult(result)); }