更换update返回结果为int

This commit is contained in:
不做码农
2021-12-14 21:51:19 +08:00
parent 50c48077d7
commit 487c7f31ff
9 changed files with 37 additions and 38 deletions

View File

@@ -15,8 +15,6 @@ namespace ZR.Admin.WebApi.Controllers
[LogActionFilter]
public class BaseController : ControllerBase
{
private static readonly NLog.Logger logger = NLog.LogManager.GetCurrentClassLogger();
public static string TIME_FORMAT_FULL = "yyyy-MM-dd HH:mm:ss";
public static string TIME_FORMAT_FULL_2 = "MM-dd HH:mm:ss";

View File

@@ -95,7 +95,7 @@ namespace ZR.Admin.WebApi.Controllers.System
throw new CustomException($"修改岗位{post.PostName}失败,岗位编码已存在");
}
post.Update_by = User.Identity.Name;
return ToResponse(ToJson(PostService.Update(post) ? 1 : 0));
return ToResponse(PostService.Update(post));
}
/// <summary>

View File

@@ -141,7 +141,7 @@ namespace ZR.Admin.WebApi.Controllers
Update_by = User.Identity.Name,
Update_time = DateTime.Now
});
if (response)
if (response > 0)
{
//先暂停原先的任务
var respon = await _schedulerServer.UpdateTaskScheduleAsync(tasksQz, tasksQz.JobGroup);