fix 联合索引,年份
This commit is contained in:
@@ -9,24 +9,24 @@ namespace Dlhis.Entity.Canteen.Entities;
|
||||
[SugarTable(TableName = "UserBalanceUploadRecords", TableDescription = "用户消费上传记录表")]
|
||||
public class UserBalanceUploadRecordEntity : SugarBaseEntity
|
||||
{
|
||||
/// <summary>
|
||||
/// 学工号
|
||||
/// </summary>
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "学工号", UniqueGroupNameList = new[] { "idx_UserBalances_useCode" })]
|
||||
public string UserCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 年份
|
||||
/// </summary>
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "年份")]
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "年份", UniqueGroupNameList = new[] { "idx_UserBalances_useCode" })]
|
||||
public int Year { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 月份
|
||||
/// </summary>
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "月份")]
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "月份", UniqueGroupNameList = new[] { "idx_UserBalances_useCode" })]
|
||||
public int Month { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 学工号
|
||||
/// </summary>
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "学工号", UniqueGroupNameList = new[] { "idx_UserBalances_useCode" })]
|
||||
public string UserCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 消费
|
||||
/// </summary>
|
||||
|
||||
@@ -23,9 +23,12 @@ public class CostUploadJob : BaseJob
|
||||
var jipApi = serviceProvider.GetService<IJinkoJipApi>();
|
||||
|
||||
var now = DateTime.Now;
|
||||
|
||||
var year = now.Month == 1 ? now.Year - 1 : now.Year;
|
||||
var month = now.Month == 1 ? 12 : now.Month - 1;
|
||||
var s = new DateTime(2025, month, 1);
|
||||
var e = new DateTime(2025, month + 1, 1);
|
||||
|
||||
var s = new DateTime(year, month, 1);
|
||||
var e = new DateTime(year, month + 1, 1);
|
||||
var endDayOfMonth = e.AddDays(-1);
|
||||
|
||||
//从余额找人
|
||||
|
||||
Reference in New Issue
Block a user