public ActionResult GetWctBasConfigInfo() { try { var result = _wctBasConfigRepository.FirstOrDefault(c => c.BG_NO == AbpSession.BG_NO && c.DEL_FLAG == 1).ToDto(); return(Success("获取成功", result)); } catch (Exception ex) { return(Fail(ex.Message)); } }
/// <summary> /// 校验app应用信息 /// </summary> /// <param name="dto"></param> /// <param name="rm"></param> /// <returns></returns> public ReturnMsg CheckAppInfo(WctAppMstrDto dto, ReturnMsg rm) { var basConfig = _wctBasConfigRepository.FirstOrDefault(c => c.BG_NO == AbpSession.BG_NO); if (basConfig == null) { rm.IsSuccess = false; rm.msg = "请先维护微信基础配置"; return(rm); } if (dto.APP_SORT == null) { rm.IsSuccess = false; rm.msg = "请填写序号"; return(rm); } if (dto.APP_SORT < 0) { rm.IsSuccess = false; rm.msg = "序号必须大于0"; return(rm); } if (string.IsNullOrEmpty(dto.UDF2)) { rm.IsSuccess = false; rm.msg = "模块KEY不可为空"; return(rm); } if (string.IsNullOrEmpty(dto.UDF3)) { rm.IsSuccess = false; rm.msg = "模块图标不可为空"; return(rm); } if (string.IsNullOrEmpty(dto.WCT_MODULE_TYPE)) { rm.IsSuccess = false; rm.msg = "模块类型不可为空"; return(rm); } if (dto.WCT_MODULE_TYPE == "1") { if (string.IsNullOrEmpty(dto.SYS_MODULE_IDS)) { rm.IsSuccess = false; rm.msg = "请选择子模块"; return(rm); } if (dto.appItemList == null || dto.appItemList.Count == 0) { rm.IsSuccess = false; rm.msg = "请选择子模块"; return(rm); } } var result = new List <WctAppMstr>(); result = GetExpressionResult(dto.Id, c => c.APP_SORT == dto.APP_SORT && c.APP_KEY == "primary"); if (result.Count > 0) { rm.IsSuccess = false; rm.msg = "该序号已存在,请修改"; return(rm); } result = GetExpressionResult(dto.Id, c => c.WCT_MODULE_ID == dto.WCT_MODULE_ID && c.APP_KEY == "primary"); if (result.Count > 0) { rm.IsSuccess = false; rm.msg = "该关联模块已存在,请修改"; return(rm); } rm.IsSuccess = true; rm.result = JsonConvert.SerializeObject(basConfig.REDIS_NUM); return(rm); }