|
|
@ -81,16 +81,27 @@ namespace BBWYB.Server.Business |
|
|
|
return shopSettingRequest.PurchaseAccountId; |
|
|
|
} |
|
|
|
|
|
|
|
public IList<Purchaseaccount> GetPurchaserListByShopId(long shopId) |
|
|
|
public IList<Purchaseaccount> GetPurchaserList(QueryPurchaseAccountRequest request) |
|
|
|
{ |
|
|
|
var shopIdStr = shopId.ToString(); |
|
|
|
var purchasePlatofrmId = request.PurchasePlatofrmId != null ? ((int)request.PurchasePlatofrmId).ToString() : string.Empty; |
|
|
|
var shopIdStr = request.ShopId.ToString(); |
|
|
|
var mdsShop = fsqlManager.MDSfsql.Select<Shops>().Where(s => s.ShopId == shopIdStr).ToOne(); |
|
|
|
var plist = fsqlManager.MDSfsql.Select<Purchaseaccount>().Where(pa => pa.ShopId == mdsShop.Id).ToList(); |
|
|
|
var plist = fsqlManager.MDSfsql.Select<Purchaseaccount>() |
|
|
|
.Where(pa => pa.ShopId == mdsShop.Id && pa.Deleted == 0) |
|
|
|
.WhereIf(!string.IsNullOrEmpty(purchasePlatofrmId), pa => pa.PurchasePlatformId == purchasePlatofrmId) |
|
|
|
.WhereIf(!string.IsNullOrEmpty(request.AccountName), pa => pa.AccountName == request.AccountName) |
|
|
|
.ToList(); |
|
|
|
foreach (var pa in plist) |
|
|
|
pa.ShopId = shopIdStr; |
|
|
|
return plist; |
|
|
|
} |
|
|
|
|
|
|
|
public void DeletePurchaseAccount(long purchaseAccountId) |
|
|
|
{ |
|
|
|
var pk = purchaseAccountId.ToString(); |
|
|
|
fsqlManager.MDSfsql.Update<Purchaseaccount>(pk).Set(pa => pa.Deleted, 1).ExecuteAffrows(); |
|
|
|
} |
|
|
|
|
|
|
|
public IList<OP_QueryExpressCompanyResponse> GetExpressCompanyList(PlatformRequest request) |
|
|
|
{ |
|
|
|
return opPlatformClientFactory.GetClient((SDKAdapter.AdapterEnums.PlatformType)request.Platform) |
|
|
|