9 changed files with 102 additions and 4 deletions
@ -0,0 +1,29 @@ |
|||||
|
using Coldairarrow.Entity.BBWY; |
||||
|
using Coldairarrow.IBusiness.BBWY; |
||||
|
using Coldairarrow.Util; |
||||
|
using Coldairarrow.Util.DataAccess; |
||||
|
using EFCore.Sharding; |
||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Text; |
||||
|
using System.Threading.Tasks; |
||||
|
|
||||
|
namespace Coldairarrow.Business.BBWY |
||||
|
{ |
||||
|
public class productskuBusiness : BaseBusiness<productsku>, IproductskuBusiness, ITransientDependency |
||||
|
{ |
||||
|
public productskuBusiness(IBBWYDbAccessor db) |
||||
|
: base(db) |
||||
|
{ |
||||
|
} |
||||
|
|
||||
|
public bool CheckHasSku(string sku) |
||||
|
{ |
||||
|
var model= Db.GetIQueryable<productsku>().FirstOrDefault(c => c.Id == sku); |
||||
|
if (model == null) |
||||
|
return false; |
||||
|
return true; |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,30 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
using System.ComponentModel.DataAnnotations.Schema; |
||||
|
using System.Linq; |
||||
|
using System.Text; |
||||
|
using System.Threading.Tasks; |
||||
|
|
||||
|
namespace Coldairarrow.Entity.BBWY |
||||
|
{ |
||||
|
[Table("productsku")] |
||||
|
public class productsku |
||||
|
{ |
||||
|
[Key, Column(Order = 1)] |
||||
|
public string Id { get; set; } |
||||
|
public string ProductId { get; set; } |
||||
|
public decimal Price { get; set; } |
||||
|
|
||||
|
public string Title { get; set; } |
||||
|
public string Logo { get; set; } |
||||
|
|
||||
|
public long ShopId { get; set; } |
||||
|
|
||||
|
public int Platform { get; set; } |
||||
|
|
||||
|
public DateTime CreateTime { get; set; } |
||||
|
|
||||
|
public int State { get; set; } |
||||
|
} |
||||
|
} |
@ -0,0 +1,13 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Text; |
||||
|
using System.Threading.Tasks; |
||||
|
|
||||
|
namespace Coldairarrow.IBusiness.BBWY |
||||
|
{ |
||||
|
public interface IproductskuBusiness |
||||
|
{ |
||||
|
bool CheckHasSku(string sku); |
||||
|
} |
||||
|
} |
Loading…
Reference in new issue