Administrator 4 years ago
parent
commit
10a2633739

+ 51 - 0
.gitignore

@@ -6,3 +6,54 @@ debug
 packages
 *.exe
 logs
+/Lottomat.Application/Lottomat.Application.Admin/bin
+/Lottomat.Application/Lottomat.Application.Busines/bin
+/Lottomat.Application/Lottomat.Application.Busines/obj
+/Lottomat.Application/Lottomat.Application.Cache/obj
+/Lottomat.Application/Lottomat.Application.Cache/bin
+/Lottomat.Application/Lottomat.Application.Code/obj
+/Lottomat.Application/Lottomat.Application.Code/bin
+/Lottomat.Application/Lottomat.Application.Entity/obj
+/Lottomat.Application/Lottomat.Application.Entity/bin
+/Lottomat.Application/Lottomat.Application.IService/bin
+/Lottomat.Application/Lottomat.Application.IService/obj
+/Lottomat.Application/Lottomat.Application.Mapping/obj
+/Lottomat.Application/Lottomat.Application.Mapping/bin
+/Lottomat.Application/Lottomat.Application.Service/bin
+/Lottomat.Application/Lottomat.Application.Service/obj
+/Lottomat.Application/Lottomat.Application.SystemAutoJob/bin
+/Lottomat.Application/Lottomat.Application.SystemAutoJob/obj
+/Lottomat.Cache/CP.Cache/bin
+/Lottomat.Cache/CP.Cache/obj
+/Lottomat.Cache/Lottomat.Cache/bin
+/Lottomat.Cache/Lottomat.Cache/obj
+/Lottomat.Cache/Lottomat.Cache.Factory/bin
+/Lottomat.Cache/Lottomat.Cache.Factory/obj
+/Lottomat.Cache/Lottomat.Cache.Memcached/bin
+/Lottomat.Cache/Lottomat.Cache.Memcached/obj
+/Lottomat.Cache/Lottomat.Cache.Redis/bin
+/Lottomat.Cache/Lottomat.Cache.Redis/obj
+/Lottomat.CodeGenerator/obj
+/Lottomat.CodeGenerator/bin
+/Lottomat.Data/Lottomat.Data/obj
+/Lottomat.Data/Lottomat.Data/bin
+/Lottomat.Data/Lottomat.Data.Dapper/bin
+/Lottomat.Data/Lottomat.Data.Dapper/obj
+/Lottomat.Data/Lottomat.Data.EF/bin
+/Lottomat.Data/Lottomat.Data.EF/obj
+/Lottomat.Data/Lottomat.Data.Repository/bin
+/Lottomat.Data/Lottomat.Data.Repository/obj
+/Lottomat.SOA.API/obj
+/Lottomat.SOA.API/bin
+/Lottomat.Util/Lottomat.Util/obj
+/Lottomat.Util/Lottomat.Util/bin
+/Lottomat.Util/Lottomat.Util.Extension/bin
+/Lottomat.Util/Lottomat.Util.Extension/obj
+/Lottomat.Util/Lottomat.Util.Ioc/bin
+/Lottomat.Util/Lottomat.Util.Ioc/obj
+/Lottomat.Util/Lottomat.Util.Log/bin
+/Lottomat.Util/Lottomat.Util.Log/obj
+/Lottomat.Util/Lottomat.Util.Offices/bin
+/Lottomat.Util/Lottomat.Util.Offices/obj
+/Lottomat.Util/Lottomat.Util.WebControl/bin
+/Lottomat.Util/Lottomat.Util.WebControl/obj

+ 1 - 1
.nuget/NuGet.targets

@@ -13,7 +13,7 @@
         <RequireRestoreConsent Condition=" '$(RequireRestoreConsent)' != 'false' ">true</RequireRestoreConsent>
 
         <!-- Download NuGet.exe if it does not already exist -->
-        <DownloadNuGetExe Condition=" '$(DownloadNuGetExe)' == '' ">false</DownloadNuGetExe>
+        <DownloadNuGetExe Condition=" '$(DownloadNuGetExe)' == '' ">true</DownloadNuGetExe>
     </PropertyGroup>
 
     <ItemGroup Condition=" '$(PackageSources)' == '' ">

+ 2 - 8
Lottomat.Application/Lottomat.Application.Admin/Areas/BaseManage/Controllers/UserController.cs

@@ -250,15 +250,9 @@ namespace Lottomat.Application.Admin.Areas.BaseManage.Controllers
         [HttpPost]
         [ValidateAntiForgeryToken]
         [AjaxOnly]
-        public ActionResult SaveForm(string keyValue, string strUserEntity, string formInstanceId, string strModuleFormInstanceEntity)
+        public ActionResult SaveForm(string keyValue, UserEntity roleEntity)
         {
-            UserEntity userEntity = strUserEntity.ToObject<UserEntity>();
-            ModuleFormInstanceEntity moduleFormInstanceEntity = strModuleFormInstanceEntity.ToObject<ModuleFormInstanceEntity>();
-
-
-            string objectId = userBLL.SaveForm(keyValue, userEntity);
-            moduleFormInstanceEntity.ObjectId = objectId;
-            moduleFormInstanceBll.SaveEntity(formInstanceId, moduleFormInstanceEntity);
+            userBLL.SaveForm(keyValue, roleEntity);
             return Success("操作成功。");
         }
         /// <summary>

+ 9 - 8
Lottomat.Application/Lottomat.Application.Admin/Areas/BaseManage/Views/User/Form.cshtml

@@ -1,6 +1,6 @@
 @{
     ViewBag.Title = "用户管理";
-    Layout = "~/Views/Shared/_FlowForm.cshtml";
+    Layout = "~/Views/Shared/_Form.cshtml";
 }
 <script>
     var keyValue = request('keyValue');
@@ -139,16 +139,17 @@
         if (!$('#form1').Validform()) {
             return false;
         }
+        //var postData = $("#form1").GetWebControls(keyValue);
+        //postData["DutyName"] = $("#DutyId").attr('data-text');
+        //postData["PostName"] = $("#PostId").attr('data-text');
+        //postData["Manager"] = $("#ManagerId").attr('data-text');
+        //var _instanceData = $("#frmpreview").frmGetData();
+        //console.log(_instanceData);
+        //var moduleFormInstanceEntity = { "FormId": formId, "FormInstanceJson": JSON.stringify(_instanceData) };
         var postData = $("#form1").GetWebControls(keyValue);
-        postData["DutyName"] = $("#DutyId").attr('data-text');
-        postData["PostName"] = $("#PostId").attr('data-text');
-        postData["Manager"] = $("#ManagerId").attr('data-text');
-        var _instanceData = $("#frmpreview").frmGetData();
-        var moduleFormInstanceEntity = { "FormId": formId, "FormInstanceJson": JSON.stringify(_instanceData) };
-
         $.SaveForm({
             url: "../../BaseManage/User/SaveForm",
-            param: { "keyValue": keyValue, "strUserEntity": JSON.stringify(postData), "FormInstanceId": instanceId, "strModuleFormInstanceEntity": JSON.stringify(moduleFormInstanceEntity) },
+            param: postData,
             loading: "正在保存数据...",
             success: function (data) {
                 $.currentIframe().$("#gridTable").trigger("reloadGrid");

+ 4 - 2
Lottomat.Application/Lottomat.Application.Entity/LotteryNumberManage/Parameter/BaseParameterEntity.cs

@@ -1,4 +1,6 @@
-namespace Lottomat.Application.Entity.LotteryNumberManage.Parameter
+using System;
+
+namespace Lottomat.Application.Entity.LotteryNumberManage.Parameter
 {
     /// <summary>
     /// 基础参数实体
@@ -8,7 +10,7 @@
         /// <summary>
         /// 校验值,一般为时间戳
         /// </summary>
-        public string t { get; set; }
+        public string t { get; set; } = DateTime.Now.ToString("yyyy-MM-dd mm:ss");
         /// <summary>
         /// APPKey
         /// </summary>

+ 1 - 1
Lottomat.Application/Lottomat.Application.Entity/LotteryNumberManage/Parameter/SaveAdvertisementArgEntity.cs

@@ -13,7 +13,7 @@ namespace Lottomat.Application.Entity.LotteryNumberManage.Parameter
         public string Id { get; set; }
 
         /// <summary>
-        /// 0-主站 1-开奖号 2-手机站
+        /// 0-主站 1-开奖号 2-手机站 3-彩吧资讯 4-彩吧图库
         /// </summary>
         public string Which { get; set; }
         /// <summary>

+ 23 - 3
Lottomat.Application/Lottomat.Application.Service/InformationManage/AdvertisementService.cs

@@ -33,10 +33,30 @@ namespace Lottomat.Application.Service.InformationManage
             JObject queryParam = queryJson.ToJObject();
             if (queryParam != null)
             {
-                if (!queryParam["CategoryId"].IsEmpty())
+                if (!queryParam["Term"].IsEmpty())
                 {
-                    string CategoryId = queryParam["CategoryId"].ToString();
-                    expression = expression.And(t => t.CategoryId.Contains(CategoryId));
+                    string term = queryParam["Term"].ToString();
+                    if (!string.IsNullOrEmpty(term))
+                    {
+                        expression = expression.And(t => t.Title.Contains(term));
+                    }
+                }
+                if (!queryParam["Category"].IsEmpty())
+                {
+                    string category = queryParam["Category"].ToString();
+                    if (!string.IsNullOrEmpty(category))
+                    {
+                        expression = expression.And(t => t.CategoryId == category);
+                    }
+                }
+                if (!queryParam["IsEnable"].IsEmpty())
+                {
+                    string isEnable = queryParam["IsEnable"].ToString();
+                    if (!string.IsNullOrEmpty(isEnable))
+                    {
+                        bool i = isEnable == "true" ? true : false;
+                        expression = expression.And(t => t.IsEnable ==i );
+                    }
                 }
             }
 

+ 20 - 15
Lottomat.Data/Lottomat.Data.EF/Database.cs

@@ -434,24 +434,29 @@ namespace Lottomat.Data.EF
             MethodCallExpression resultExp = null;
 
             var tempData = dbcontext.Set<T>().Where(condition);
-            string[] _order = orderField.Split(',');
-            foreach (string item in _order)
-            {
-                string _orderPart = item;
-                _orderPart = Regex.Replace(_orderPart, @"\s+", " ");
-                string[] _orderArry = _orderPart.Split(' ');
-                string _orderField = _orderArry[0];
-                bool sort = isAsc;
-                if (_orderArry.Length == 2)
+            if (!string.IsNullOrEmpty(orderField))
+            {
+                string[] _order = orderField.Split(',');
+                foreach (string item in _order)
                 {
-                    isAsc = _orderArry[1].ToUpper() == "ASC" ? true : false;
+                    string _orderPart = item;
+                    _orderPart = Regex.Replace(_orderPart, @"\s+", " ");
+                    string[] _orderArry = _orderPart.Split(' ');
+                    string _orderField = _orderArry[0];
+                    bool sort = isAsc;
+                    if (_orderArry.Length == 2)
+                    {
+                        isAsc = _orderArry[1].ToUpper() == "ASC" ? true : false;
+                    }
+                    var parameter = Expression.Parameter(typeof(T), "t");
+                    var property = typeof(T).GetProperty(_orderField);
+                    var propertyAccess = Expression.MakeMemberAccess(parameter, property);
+                    var orderByExp = Expression.Lambda(propertyAccess, parameter);
+                    resultExp = Expression.Call(typeof(Queryable), isAsc ? "OrderBy" : "OrderByDescending", new Type[] { typeof(T), property.PropertyType }, tempData.Expression, Expression.Quote(orderByExp));
                 }
-                var parameter = Expression.Parameter(typeof(T), "t");
-                var property = typeof(T).GetProperty(_orderField);
-                var propertyAccess = Expression.MakeMemberAccess(parameter, property);
-                var orderByExp = Expression.Lambda(propertyAccess, parameter);
-                resultExp = Expression.Call(typeof(Queryable), isAsc ? "OrderBy" : "OrderByDescending", new Type[] { typeof(T), property.PropertyType }, tempData.Expression, Expression.Quote(orderByExp));
             }
+            
+            
             tempData = tempData.Provider.CreateQuery<T>(resultExp);
             total = tempData.Count();
             tempData = tempData.Skip<T>(pageSize * (pageIndex - 1)).Take<T>(pageSize).AsQueryable();