Merge branch 'master' of http://121.41.2.71:3000/wyw/mh_jy_safe
This commit is contained in:
commit
772b5fd3b9
@ -501,7 +501,10 @@ namespace APT.FM.WebApi.Controllers.Api.FM
|
||||
}
|
||||
entity.USER_ID = modelUOld.ID;
|
||||
entity.CREATE_TIME = DateTime.Now;
|
||||
entity.USERNAME_TRANSFER = APT.Infrastructure.Api.AppContext.CurrentSession.UserName;
|
||||
if (APT.Infrastructure.Api.AppContext.CurrentSession.UserID.HasValue)
|
||||
{
|
||||
entity.USERNAME_TRANSFER = GetEntity<T_FM_USER>(e => e.ID == APT.Infrastructure.Api.AppContext.CurrentSession.UserID.Value)?.NAME;
|
||||
}
|
||||
this.UnifiedCommit(() =>
|
||||
{
|
||||
UpdateEntityNoCommit(entity);
|
||||
|
||||
@ -357,13 +357,16 @@ namespace APT.PF.WebApiControllers.Api.PF
|
||||
return SafeExecute(() =>
|
||||
{
|
||||
var result = GetEntity<T_PF_ANNOURCEMENT>(null, filter, null);
|
||||
result.CREATE_USER_NAME = "";
|
||||
if (result.CREATER_ID.HasValue)
|
||||
{
|
||||
result.CREATE_USER_NAME = GetEntity<T_FM_USER>(result.CREATER_ID.Value).NAME;
|
||||
}
|
||||
else
|
||||
//try { result.CREATE_USER_NAME = GetEntity<T_FM_USER>(result.CREATER_ID.Value).NAME; }
|
||||
//catch { }
|
||||
var conndefault = ConfigurationManager.ConnectionStrings["default"];
|
||||
using (var context = new MigrationContext(conndefault))
|
||||
{
|
||||
result.CREATE_USER_NAME = "";
|
||||
result.CREATE_USER_NAME = context.GetEntity<T_FM_USER>(e => e.ID == result.CREATER_ID.Value, null)?.NAME;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
});
|
||||
@ -383,7 +386,7 @@ namespace APT.PF.WebApiControllers.Api.PF
|
||||
DateTime dtS = DateTime.Now.Date;
|
||||
Expression<Func<T_PF_ANNOURCEMENT, bool>> expression = e => !e.IS_DELETED && e.START <= dtS && e.ISPUBLISH;
|
||||
expression = expression.And(e => e.END == null || e.END >= dtS);
|
||||
var result =GetOrderEntities(expression, pageFilter, null);
|
||||
var result = GetOrderEntities(expression, pageFilter, null);
|
||||
return result;
|
||||
});
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user