- 修复 fsql.InsertOrUpdate CanInsert=false,CanUpdate=true (mysql/pgsql)不生效的 bug;

This commit is contained in:
2881099
2022-11-01 18:12:31 +08:00
parent 2d2e3640c9
commit 2bd621da20
11 changed files with 166 additions and 24 deletions

View File

@ -429,6 +429,15 @@ namespace base_entity
BaseEntity.Initialization(fsql, () => _asyncUow.Value);
#endregion
var sqlt0a1 = fsql.InsertOrUpdate<>()
.SetSource(new
{
ID = 1,
= "NIKE",
})
.ToSql();
fsql.UseMessagePackMap();
fsql.Delete<MessagePackMapInfo>().Where("1=1").ExecuteAffrows();
@ -1605,4 +1614,42 @@ namespace base_entity
}
}
public class
{
/// <summary>
/// ID
/// </summary>
[Column(Name = "ID", IsPrimary = true)]
public int ID { get; set; }
/// <summary>
/// 店铺名称
/// </summary>
[Column(Name = "店铺名称")]
public string { get; set; }
/// <summary>
/// 日期
/// </summary>
[Column(Name = "日期")]
public DateTime { get; set; }
/// <summary>
/// 品牌名称
/// </summary>
[Column(Name = "品牌名称")]
public string { get; set; }
/// <summary>
/// 成交金额
/// </summary>
[Column(Name = "成交金额")]
public decimal? { get; set; }
/// <summary>
/// 更新时间
/// </summary>
[Column(Name = "更新时间", CanInsert = false, CanUpdate = true, ServerTime = DateTimeKind.Local)]
public DateTime { get; set; }
}
}