同步master分支差异
This commit is contained in:
@@ -269,9 +269,9 @@ namespace ZR.Admin.WebApi.Controllers
|
||||
dto.GenTable = genTableInfo;
|
||||
//自定义路径
|
||||
if (genTableInfo.GenType == "1")
|
||||
{
|
||||
{
|
||||
string tempPath = WebHostEnvironment.ContentRootPath;
|
||||
var parentPath = Directory.GetParent(tempPath)?.Parent?.FullName;
|
||||
var parentPath = tempPath[..tempPath.LastIndexOf(@"\")];
|
||||
//代码生成文件夹路径
|
||||
dto.GenCodePath = genTableInfo.GenPath.IsEmpty() ? parentPath : genTableInfo.GenPath;
|
||||
}
|
||||
|
||||
@@ -44,11 +44,11 @@ namespace ZR.Admin.WebApi.Controllers
|
||||
{
|
||||
var predicate = Expressionable.Create<SysConfig>();
|
||||
|
||||
predicate = predicate.AndIF(!parm.ConfigType.IsEmpty(),m => m.ConfigType == parm.ConfigType);
|
||||
predicate = predicate.AndIF(!parm.ConfigName.IsEmpty(),m => m.ConfigName.Contains(parm.ConfigType));
|
||||
predicate = predicate.AndIF(!parm.ConfigKey.IsEmpty(),m => m.ConfigKey.Contains(parm.ConfigKey));
|
||||
predicate = predicate.AndIF(!parm.BeginTime.IsEmpty(),m => m.Create_time >= parm.BeginTime );
|
||||
predicate = predicate.AndIF(!parm.BeginTime.IsEmpty(),m => m.Create_time <= parm.EndTime);
|
||||
predicate = predicate.AndIF(!parm.ConfigType.IsEmpty(), m => m.ConfigType == parm.ConfigType);
|
||||
predicate = predicate.AndIF(!parm.ConfigName.IsEmpty(), m => m.ConfigName.Contains(parm.ConfigType));
|
||||
predicate = predicate.AndIF(!parm.ConfigKey.IsEmpty(), m => m.ConfigKey.Contains(parm.ConfigKey));
|
||||
predicate = predicate.AndIF(!parm.BeginTime.IsEmpty(), m => m.Create_time >= parm.BeginTime);
|
||||
predicate = predicate.AndIF(!parm.BeginTime.IsEmpty(), m => m.Create_time <= parm.EndTime);
|
||||
|
||||
var response = _SysConfigService.GetPages(predicate.ToExpression(), parm);
|
||||
|
||||
@@ -78,11 +78,11 @@ namespace ZR.Admin.WebApi.Controllers
|
||||
[AllowAnonymous]
|
||||
public IActionResult GetConfigKey(string configKey)
|
||||
{
|
||||
var response = _SysConfigService.Queryable().First(f=> f.ConfigKey == configKey);
|
||||
var response = _SysConfigService.Queryable().First(f => f.ConfigKey == configKey);
|
||||
|
||||
return SUCCESS(response?.ConfigValue);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 添加参数配置
|
||||
/// </summary>
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
using Infrastructure.Attribute;
|
||||
using Infrastructure.Enums;
|
||||
using Infrastructure.Model;
|
||||
using Mapster;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System;
|
||||
using ZR.Admin.WebApi.Extensions;
|
||||
using ZR.Admin.WebApi.Filters;
|
||||
using ZR.Common;
|
||||
using ZR.Model;
|
||||
using ZR.Model.System;
|
||||
using ZR.Model.System.Dto;
|
||||
using ZR.Service.System.IService;
|
||||
|
||||
namespace ZR.Admin.WebApi.Controllers.System
|
||||
@@ -55,13 +58,14 @@ namespace ZR.Admin.WebApi.Controllers.System
|
||||
/// <summary>
|
||||
/// 添加字典类型
|
||||
/// </summary>
|
||||
/// <param name="dict"></param>
|
||||
/// <param name="dto"></param>
|
||||
/// <returns></returns>
|
||||
[ActionPermissionFilter(Permission = "system:dict:add")]
|
||||
[Log(Title = "字典操作", BusinessType = BusinessType.INSERT)]
|
||||
[HttpPost("edit")]
|
||||
public IActionResult Add([FromBody] SysDictType dict)
|
||||
public IActionResult Add([FromBody] SysDictTypeDto dto)
|
||||
{
|
||||
SysDictType dict = dto.Adapt<SysDictType>();
|
||||
if (UserConstants.NOT_UNIQUE.Equals(SysDictService.CheckDictTypeUnique(dict)))
|
||||
{
|
||||
return ToResponse(ApiResult.Error($"新增字典'{dict.DictName}'失败,字典类型已存在"));
|
||||
@@ -74,14 +78,15 @@ namespace ZR.Admin.WebApi.Controllers.System
|
||||
/// <summary>
|
||||
/// 修改字典类型
|
||||
/// </summary>
|
||||
/// <param name="dict"></param>
|
||||
/// <param name="dto"></param>
|
||||
/// <returns></returns>
|
||||
[ActionPermissionFilter(Permission = "system:dict:edit")]
|
||||
[Log(Title = "字典操作", BusinessType = BusinessType.UPDATE)]
|
||||
[Route("edit")]
|
||||
[HttpPut]
|
||||
public IActionResult Edit([FromBody] SysDictType dict)
|
||||
public IActionResult Edit([FromBody] SysDictTypeDto dto)
|
||||
{
|
||||
SysDictType dict = dto.Adapt<SysDictType>();
|
||||
if (UserConstants.NOT_UNIQUE.Equals(SysDictService.CheckDictTypeUnique(dict)))
|
||||
{
|
||||
return ToResponse(ApiResult.Error($"修改字典'{dict.DictName}'失败,字典类型已存在"));
|
||||
|
||||
@@ -62,7 +62,7 @@ namespace ZR.Admin.WebApi.Controllers.System
|
||||
|
||||
predicate = predicate.AndIF(!string.IsNullOrEmpty(parm.NoticeTitle), m => m.NoticeTitle.Contains(parm.NoticeTitle));
|
||||
predicate = predicate.AndIF(!string.IsNullOrEmpty(parm.NoticeType), m => m.NoticeType == parm.NoticeType);
|
||||
predicate = predicate.AndIF(!string.IsNullOrEmpty(parm.CreateBy), m => m.Create_by.Contains(parm.CreateBy) || m.Update_by.Contains(parm.CreateBy));
|
||||
predicate = predicate.AndIF(!string.IsNullOrEmpty(parm.CreateBy), m => m.Create_by.Contains(parm.CreateBy) || m.Update_by.Contains(parm.CreateBy));
|
||||
predicate = predicate.AndIF(!string.IsNullOrEmpty(parm.Status), m => m.Status == parm.Status);
|
||||
var response = _SysNoticeService.GetPages(predicate.ToExpression(), parm);
|
||||
return SUCCESS(response);
|
||||
@@ -110,7 +110,7 @@ namespace ZR.Admin.WebApi.Controllers.System
|
||||
it.Create_by,
|
||||
it.Create_time
|
||||
});
|
||||
|
||||
|
||||
return SUCCESS(result);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user