|
|
@ -40,7 +40,7 @@ namespace BBWYB.Server.Business |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public long SaveShopSetting(ShopSettingRequest shopSettingRequest) |
|
|
|
public string SaveShopSetting(ShopSettingRequest shopSettingRequest) |
|
|
|
{ |
|
|
|
//根据shopId查询mds shop的主键Id
|
|
|
|
var shopId = shopSettingRequest.ShopId.ToString(); |
|
|
@ -48,13 +48,13 @@ namespace BBWYB.Server.Business |
|
|
|
if (mdsShop == null) |
|
|
|
throw new BusinessException($"mds未找到shopId {shopSettingRequest.ShopId}"); |
|
|
|
|
|
|
|
if (shopSettingRequest.PurchaseAccountId == 0) |
|
|
|
if (string.IsNullOrEmpty(shopSettingRequest.PurchaseAccountId) || shopSettingRequest.PurchaseAccountId == "0") |
|
|
|
{ |
|
|
|
shopSettingRequest.PurchaseAccountId = idGenerator.NewLong(); |
|
|
|
shopSettingRequest.PurchaseAccountId = idGenerator.NewLong().ToString(); |
|
|
|
|
|
|
|
var mdspa = new Purchaseaccount() |
|
|
|
{ |
|
|
|
Id = shopSettingRequest.PurchaseAccountId.ToString(), |
|
|
|
Id = shopSettingRequest.PurchaseAccountId, |
|
|
|
AccountName = shopSettingRequest.AccountName, |
|
|
|
AppKey = shopSettingRequest.AppKey, |
|
|
|
AppSecret = shopSettingRequest.AppSecret, |
|
|
@ -70,7 +70,7 @@ namespace BBWYB.Server.Business |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
fsqlManager.MDSfsql.Update<Purchaseaccount>(shopSettingRequest.PurchaseAccountId.ToString()) |
|
|
|
fsqlManager.MDSfsql.Update<Purchaseaccount>(shopSettingRequest.PurchaseAccountId) |
|
|
|
.Set(pa => pa.AppKey, shopSettingRequest.AppKey) |
|
|
|
.Set(pa => pa.AppSecret, shopSettingRequest.AppSecret) |
|
|
|
.Set(pa => pa.AppToken, shopSettingRequest.AppToken) |
|
|
|