/// <summary> /// 保存实体数据(新增、修改) /// <param name="keyValue">主键</param> /// <summary> /// <returns></returns> public void SaveEntity(int keyValue, dm_alipay_templateEntity entity) { try { if (keyValue > 0) { entity.Modify(keyValue); this.BaseRepository("dm_data").Update(entity); } else { entity.Create(); this.BaseRepository("dm_data").Insert(entity); } #region 清除缓存信息 UserInfo loginUserInfo = LoginUserInfo.Get(); string cacheKey = "AliPayTemplate" + loginUserInfo.appId; redisCache.Remove(cacheKey, 7); #endregion } catch (Exception ex) { if (ex is ExceptionEx) { throw; } else { throw ExceptionEx.ThrowServiceException(ex); } } }
/// <summary> /// 保存实体数据(新增、修改) /// <param name="keyValue">主键</param> /// <summary> /// <returns></returns> public void SaveEntity(int keyValue, dm_alipay_templateEntity entity) { try { dM_Alipay_TemplateService.SaveEntity(keyValue, entity); } catch (Exception ex) { if (ex is ExceptionEx) { throw; } else { throw ExceptionEx.ThrowBusinessException(ex); } } }
public dm_alipay_templateEntity GetEntityByCache(int templateID, string appid) { try { dm_alipay_templateEntity dm_Alipay_TemplateEntity = GetListByCache(appid).Where(t => t.id == templateID).FirstOrDefault(); return(dm_Alipay_TemplateEntity); } catch (Exception ex) { if (ex is ExceptionEx) { throw; } else { throw ExceptionEx.ThrowServiceException(ex); } } }