Compare commits
No commits in common. "93702d06c4aad3d6e7f6d757bc21975dd42cc074" and "d1f5f1a2d636b4f739606ba3d96b6672998eb193" have entirely different histories.
93702d06c4
...
d1f5f1a2d6
@ -198,37 +198,6 @@ public class SystemOtherConfigService : ApplicationService
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 清除指定渠道充值收款码。Channel=alipay|wechat;清除后对应 URL 为空。
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="channel">渠道:alipay / wechat。</param>
|
|
||||||
[HttpPost("/system/other-config/payment-qr/clear")]
|
|
||||||
public async Task<PaymentReceiveQrOutput> ClearPaymentReceiveQrAsync([FromQuery] string channel)
|
|
||||||
{
|
|
||||||
var normalized = (channel ?? string.Empty).Trim().ToLowerInvariant();
|
|
||||||
if (normalized is not (PaymentQrChannelAlipay or PaymentQrChannelWechat))
|
|
||||||
{
|
|
||||||
throw new BusinessException("渠道仅支持 alipay 或 wechat");
|
|
||||||
}
|
|
||||||
|
|
||||||
var entity = await EnsurePaymentReceiveQrConfigAsync();
|
|
||||||
if (normalized == PaymentQrChannelAlipay)
|
|
||||||
{
|
|
||||||
entity.AppKey = null;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
entity.Remark = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
await SystemOtherConfigRepository.UpdateAsync(entity);
|
|
||||||
return new PaymentReceiveQrOutput
|
|
||||||
{
|
|
||||||
AlipayUrl = FileStorage.GetPublicUrl(entity.AppKey),
|
|
||||||
WechatUrl = FileStorage.GetPublicUrl(entity.Remark)
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取品牌 Logo(系统顶栏 / 官网 / 网站标签 / 启动页吉祥物)。未配置时对应 URL 为空(前端回退本地默认图)。匿名可读。
|
/// 获取品牌 Logo(系统顶栏 / 官网 / 网站标签 / 启动页吉祥物)。未配置时对应 URL 为空(前端回退本地默认图)。匿名可读。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -283,45 +252,6 @@ public class SystemOtherConfigService : ApplicationService
|
|||||||
return MapBrandLogoOutput(entity);
|
return MapBrandLogoOutput(entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 清除指定渠道的品牌 Logo。Channel=portal|site|favicon|mascot;清除后前端显示文字 LOGO。
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="channel">渠道:portal / site / favicon / mascot。</param>
|
|
||||||
[HttpPost("/system/other-config/brand-logo/clear")]
|
|
||||||
public async Task<BrandLogoOutput> ClearBrandLogoAsync([FromQuery] string channel)
|
|
||||||
{
|
|
||||||
var normalized = (channel ?? string.Empty).Trim().ToLowerInvariant();
|
|
||||||
if (normalized is not (
|
|
||||||
BrandLogoChannelPortal
|
|
||||||
or BrandLogoChannelSite
|
|
||||||
or BrandLogoChannelFavicon
|
|
||||||
or BrandLogoChannelMascot))
|
|
||||||
{
|
|
||||||
throw new BusinessException("渠道仅支持 portal、site、favicon 或 mascot");
|
|
||||||
}
|
|
||||||
|
|
||||||
var entity = await EnsureBrandLogoConfigAsync();
|
|
||||||
if (normalized == BrandLogoChannelPortal)
|
|
||||||
{
|
|
||||||
entity.AppKey = null;
|
|
||||||
}
|
|
||||||
else if (normalized == BrandLogoChannelSite)
|
|
||||||
{
|
|
||||||
entity.Remark = null;
|
|
||||||
}
|
|
||||||
else if (normalized == BrandLogoChannelFavicon)
|
|
||||||
{
|
|
||||||
entity.BaseUrl = null;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
entity.AppSecret = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
await SystemOtherConfigRepository.UpdateAsync(entity);
|
|
||||||
return MapBrandLogoOutput(entity);
|
|
||||||
}
|
|
||||||
|
|
||||||
private BrandLogoOutput MapBrandLogoOutput(SystemOtherConfig? entity) =>
|
private BrandLogoOutput MapBrandLogoOutput(SystemOtherConfig? entity) =>
|
||||||
new()
|
new()
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user