21
This commit is contained in:
parent
b7efee66ad
commit
2577008314
|
|
@ -11,9 +11,9 @@
|
|||
|
||||
// 测试环境配置 - .NET 10 后端
|
||||
const testing = {
|
||||
baseUrl: 'https://app.zpc-xy.com/honey/api',
|
||||
// baseUrl: 'https://app.zpc-xy.com/honey/api',
|
||||
// baseUrl: 'http://192.168.1.24:5238',
|
||||
// baseUrl: 'http://192.168.195.15:2822',
|
||||
baseUrl: 'http://192.168.195.15:2822',
|
||||
imageUrl: 'https://youdas-1308826010.cos.ap-shanghai.myqcloud.com',
|
||||
loginPage: '',
|
||||
wxAppId: ''
|
||||
|
|
|
|||
|
|
@ -127,6 +127,26 @@ public class DanyeService : IDanyeService
|
|||
return result;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public async Task<bool> ClearContentAsync(int id)
|
||||
{
|
||||
var danye = await _dbContext.Danyes.FirstOrDefaultAsync(d => d.Id == id);
|
||||
if (danye == null)
|
||||
{
|
||||
throw new BusinessException(BusinessErrorCodes.NotFound, "单页不存在");
|
||||
}
|
||||
|
||||
// 清空内容,设置为空字符串
|
||||
danye.Content = string.Empty;
|
||||
danye.UpdateTime = GetUnixTimestamp();
|
||||
|
||||
var result = await _dbContext.SaveChangesAsync() > 0;
|
||||
|
||||
_logger.LogInformation("清空单页内容: Id={Id}, Title={Title}", id, danye.Title);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
#region Private Helper Methods
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user