Browse Source

提交

groupmealmanage
gwbvipvip 6 months ago
parent
commit
666e1fa9ce
7 changed files with 13 additions and 22 deletions
  1. BIN
     
  2. BIN
     
  3. +8
    -19
      BPA.SAAS.Manage.Application/AExternalPlatform/Service/Material/Services/MaterialService.cs
  4. +1
    -1
      BPA.SAAS.Manage.Application/AExternalPlatform/Service/ThirdpartyPush/Services/ThirdpartyPushService.cs
  5. +1
    -1
      BPA.SAAS.Manage.Application/DataBase/Services/GoodsService.cs
  6. +2
    -1
      BPA.SAAS.Manage.Core/DbContext.cs
  7. +1
    -0
      BPA.SAAS.Manage.Core/SqlSugarDb.cs

BIN
View File


BIN
View File


+ 8
- 19
BPA.SAAS.Manage.Application/AExternalPlatform/Service/Material/Services/MaterialService.cs View File

@@ -37,8 +37,6 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Material.Service
/// <returns></returns>
public async Task<PageUtil<List<MaterialDto>>> GetMaterialPageList(MaterialPageInputDto inputDto)
{


int total = new RefAsync<int>();
var data = SqlSugarDb.Db.Queryable<BPA_Batching, BPA_BatchingType, BPA_BatchingUint>((a, b, c) =>
new JoinQueryInfos(JoinType.Left, a.Batching_Type == b.Id,
@@ -264,27 +262,18 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Material.Service
}
else
{
if (material != null && material.Id == materialData.Id)
if (material != null && material.Id != materialData.Id)
{
throw Oops.Oh(ErrorCodeEnum.Code10017);
}

materialData = new BPA_Batching()
{
Id = Guid.NewGuid().ToString(),
GroupId = CurrentUser.GroupId,
Aittribute = 0,
Batching_Name = materia.Name,
Batching_Type = typeData.Id,
Code = materia.Code,
Price = 0,
Specs = "",
outstockUint = uintData.Id,
Status = CommonStatus.ENABLE,
StockUint = uintData.Id,
TypeID = typeData.Id,
IsDeleted = 0,
};

materialData.Batching_Name = materia.Name;
materialData.Code = materia.Code;
materialData.Batching_Type = typeData.Id;
materialData.StockUint = uintData.Id;
materialData.outstockUint = uintData.Id;
materialData.TypeID = typeData.Id;
SqlSugarDb.Db.Updateable(materialData).ExecuteCommand();
}
SqlSugarDb.Db.Ado.CommitTran();


+ 1
- 1
BPA.SAAS.Manage.Application/AExternalPlatform/Service/ThirdpartyPush/Services/ThirdpartyPushService.cs View File

@@ -143,7 +143,7 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.ThirdpartyPush.S
productKey = b.Key,
productName = b.Name,
productVersion = c.Vesion,
type = 2
type = 2,

})
.ToListAsync();


+ 1
- 1
BPA.SAAS.Manage.Application/DataBase/Services/GoodsService.cs View File

@@ -96,7 +96,7 @@ namespace BPA.SAAS.Manage.Application.DataBase.Services
GoodsTypeName = b.IsDeleted == 0 ? b.Name : "",
Descritption = a.Descritption,
IsDeleted = a.IsDeleted,
a.GroupId,
// CreateAt = a.CreateAt,
GoodsUintId = a.GoodsUintId,
ForeignKeyRe = a.ForeignKeyRe,


+ 2
- 1
BPA.SAAS.Manage.Core/DbContext.cs View File

@@ -34,9 +34,10 @@ namespace BPA.SAAS.Manage.Core
};

SqlSugarDb.SqlSugarScope(configConnection);

SqlSugarDb.SqlSugarScopeLog(new ConnectionConfig()
{
ConnectionString = App.GetConfig<List<ConnectionConfig>>("ConnectionConfigs")[1].ConnectionString,
ConnectionString = connectionConfigs[1].ConnectionString,
DbType = DbType.MySql,//设置数据库类型
IsAutoCloseConnection = true,//自动释放数据务,如果存在事务,在事务结束后释放
InitKeyType = InitKeyType.Attribute, //从实体特性中读取主键自增列信息


+ 1
- 0
BPA.SAAS.Manage.Core/SqlSugarDb.cs View File

@@ -32,6 +32,7 @@ namespace BPA.KitChen.GroupMeal.SqlSugar
};
db.Aop.OnLogExecuted = (sql, pars) =>
{
Console.WriteLine($"当前SQL语句:【{sql}】,参数:【{string.Join(",", pars.Select(t => t.Value))}】");
//sql 执行后
};
db.Aop.OnError = ex =>


Loading…
Cancel
Save