From 7ef1054cff149db6b21f8b00cd402883f6f5a843 Mon Sep 17 00:00:00 2001 From: 移动系统liao <liaoxujun@qq.com> Date: 星期五, 17 五月 2024 14:10:28 +0800 Subject: [PATCH] 增加工作招聘设置排序字段 --- CoreCms.Net.Repository/baifenbingfa/Job_jobSetingRepository.cs | 7 ++- CoreCms.Net.Web.Admin/wwwroot/views/baifenbingfa/job_jobseting/details.html | 13 +++++- CoreCms.Net.Web.Admin/wwwroot/views/baifenbingfa/job_jobseting/edit.html | 15 +++++++ CoreCms.Net.Web.Admin/wwwroot/views/baifenbingfa/job_jobseting/index.html | 1 CoreCms.Net.Web.Admin/wwwroot/views/baifenbingfa/job_jobseting/create.html | 16 ++++++++ CoreCms.Net.Model/Entities/baifenbingfa/job/jobSeting.cs | 6 +++ CoreCms.Net.Web.Admin/Controllers/baifenbingfa/Job_jobSetingController.cs | 3 + 7 files changed, 55 insertions(+), 6 deletions(-) diff --git a/CoreCms.Net.Model/Entities/baifenbingfa/job/jobSeting.cs b/CoreCms.Net.Model/Entities/baifenbingfa/job/jobSeting.cs index 27771e2..4c48400 100644 --- a/CoreCms.Net.Model/Entities/baifenbingfa/job/jobSeting.cs +++ b/CoreCms.Net.Model/Entities/baifenbingfa/job/jobSeting.cs @@ -48,5 +48,11 @@ /// 鏄惁鏈夋晥 /// </summary> public bool isEN { get; set; } = false; + + /// <summary> + /// 鎺掑簭 + /// </summary> + [SugarColumn(IsNullable =true)] + public int? sort { get; set; } = 0; } } diff --git a/CoreCms.Net.Repository/baifenbingfa/Job_jobSetingRepository.cs b/CoreCms.Net.Repository/baifenbingfa/Job_jobSetingRepository.cs index 4426a19..09028f5 100644 --- a/CoreCms.Net.Repository/baifenbingfa/Job_jobSetingRepository.cs +++ b/CoreCms.Net.Repository/baifenbingfa/Job_jobSetingRepository.cs @@ -81,6 +81,7 @@ oldModel.createBy = entity.createBy; oldModel.upDataBy = entity.upDataBy; oldModel.isdelete = entity.isdelete; + oldModel.sort = entity.sort; //浜嬬墿澶勭悊杩囩▼缁撴潫 var bl = await DbClient.Updateable(oldModel).ExecuteCommandHasChangeAsync(); @@ -190,7 +191,8 @@ createBy = p.createBy, upDataBy = p.upDataBy, isdelete = p.isdelete, - + sort = p.sort + }).With(SqlWith.NoLock).ToPageListAsync(pageIndex, pageSize, totalCount); } else @@ -211,6 +213,7 @@ createBy = p.createBy, upDataBy = p.upDataBy, isdelete = p.isdelete, + sort=p.sort }).ToPageListAsync(pageIndex, pageSize, totalCount); } @@ -220,7 +223,7 @@ public async Task<List<Job_jobSeting>> QueryAsyncALL() { - var page = await DbClient.Queryable<Job_jobSeting>().Where(x => x.isEN == true&&x.isdelete==false).ToListAsync(); + var page = await DbClient.Queryable<Job_jobSeting>().Where(x => x.isEN == true&&x.isdelete==false).OrderBy(x=>x.sort).ToListAsync(); return page; } diff --git a/CoreCms.Net.Web.Admin/Controllers/baifenbingfa/Job_jobSetingController.cs b/CoreCms.Net.Web.Admin/Controllers/baifenbingfa/Job_jobSetingController.cs index db91653..810ff71 100644 --- a/CoreCms.Net.Web.Admin/Controllers/baifenbingfa/Job_jobSetingController.cs +++ b/CoreCms.Net.Web.Admin/Controllers/baifenbingfa/Job_jobSetingController.cs @@ -312,7 +312,8 @@ data.isEN=entity.isEN; data.jobDescription = entity.jobDescription; data.requirements = entity.requirements; - data.location = entity.location; + data.location = entity.location; + data.sort = entity.sort; var jm = await _Job_jobSetingServices.UpdateAsync(data); return jm; } diff --git a/CoreCms.Net.Web.Admin/wwwroot/views/baifenbingfa/job_jobseting/create.html b/CoreCms.Net.Web.Admin/wwwroot/views/baifenbingfa/job_jobseting/create.html index da9f4d6..24e5d7e 100644 --- a/CoreCms.Net.Web.Admin/wwwroot/views/baifenbingfa/job_jobseting/create.html +++ b/CoreCms.Net.Web.Admin/wwwroot/views/baifenbingfa/job_jobseting/create.html @@ -1,3 +1,12 @@ +<!-- + * @FilePath: create.html + * @Author: 灏忛渚� + * @Date: 2024-05-15 14:27:56 + * @LastEditors: Please set LastEditors + * @LastEditTime: 2024-05-17 14:06:01 + * Copyright: 2024 MinTinge CO.,LTD. All Rights Reserved. + * @Descripttion: 鍐欏叆浣犵殑鎻忚堪 +--> <script type="text/html" template lay-done="layui.data.done(d);"> <div class="layui-form coreshop-form layui-form-pane" lay-filter="LAY-app-Job_jobSeting-createForm" id="LAY-app-Job_jobSeting-createForm"> @@ -37,6 +46,13 @@ <input name="requirements" lay-verType="tips" lay-verify="required" class="layui-input" placeholder="璇疯緭鍏ュ矖浣嶈姹傦紝鍒楀嚭鐢宠鑰呴渶瑕佹弧瓒崇殑鏁欒偛鑳屾櫙銆佹妧鑳姐�佺粡楠屽拰璧勬牸銆�" lay-reqText="璇疯緭鍏ュ矖浣嶈姹傦紝鍒楀嚭鐢宠鑰呴渶瑕佹弧瓒崇殑鏁欒偛鑳屾櫙銆佹妧鑳姐�佺粡楠屽拰璧勬牸銆�" /> </div> </div> + <div class="layui-form-item" pane> + <label for="isEN" class="layui-form-label layui-form-required">鎺掑簭</label> + <div class="layui-input-block"> + <input type="number" value="0" name="sort" class="layui-input" > + </div> + </div> + <div class="layui-form-item" pane> <label for="isEN" class="layui-form-label layui-form-required">鏄惁涓婃灦</label> diff --git a/CoreCms.Net.Web.Admin/wwwroot/views/baifenbingfa/job_jobseting/details.html b/CoreCms.Net.Web.Admin/wwwroot/views/baifenbingfa/job_jobseting/details.html index 6e9289f..36a3c8f 100644 --- a/CoreCms.Net.Web.Admin/wwwroot/views/baifenbingfa/job_jobseting/details.html +++ b/CoreCms.Net.Web.Admin/wwwroot/views/baifenbingfa/job_jobseting/details.html @@ -2,8 +2,8 @@ * @FilePath: details.html * @Author: 灏忛渚� * @Date: 2024-05-15 14:27:56 - * @LastEditors: - * @LastEditTime: 2024-05-15 17:01:59 + * @LastEditors: Please set LastEditors + * @LastEditTime: 2024-05-17 14:02:41 * Copyright: 2024 MinTinge CO.,LTD. All Rights Reserved. * @Descripttion: 鍐欏叆浣犵殑鎻忚堪 --> @@ -61,7 +61,14 @@ {{ d.params.data.requirements || '' }} </td> </tr> - + <tr> + <td> + <label for="sort">鎺掑簭</label> + </td> + <td> + {{d.params.data.sort}} + </td> + </tr> <tr> <td> <label for="isEN">鏄惁涓婃灦</label> diff --git a/CoreCms.Net.Web.Admin/wwwroot/views/baifenbingfa/job_jobseting/edit.html b/CoreCms.Net.Web.Admin/wwwroot/views/baifenbingfa/job_jobseting/edit.html index f3e4bfd..96990e8 100644 --- a/CoreCms.Net.Web.Admin/wwwroot/views/baifenbingfa/job_jobseting/edit.html +++ b/CoreCms.Net.Web.Admin/wwwroot/views/baifenbingfa/job_jobseting/edit.html @@ -1,3 +1,12 @@ +<!-- + * @FilePath: edit.html + * @Author: 灏忛渚� + * @Date: 2024-05-15 14:27:56 + * @LastEditors: Please set LastEditors + * @LastEditTime: 2024-05-17 14:04:18 + * Copyright: 2024 MinTinge CO.,LTD. All Rights Reserved. + * @Descripttion: 鍐欏叆浣犵殑鎻忚堪 +--> <script type="text/html" template lay-done="layui.data.sendParams(d);"> <div class="layui-form coreshop-form layui-form-pane" lay-filter="LAY-app-Job_jobSeting-editForm" id="LAY-app-Job_jobSeting-editForm"> <input type="hidden" name="id" value="{{d.params.data.id || '' }}" /> @@ -37,6 +46,12 @@ <input name="requirements" lay-verType="tips" lay-verify="required" class="layui-input" placeholder="璇疯緭鍏ュ矖浣嶈姹傦紝鍒楀嚭鐢宠鑰呴渶瑕佹弧瓒崇殑鏁欒偛鑳屾櫙銆佹妧鑳姐�佺粡楠屽拰璧勬牸銆�" lay-reqText="璇疯緭鍏ュ矖浣嶈姹傦紝鍒楀嚭鐢宠鑰呴渶瑕佹弧瓒崇殑鏁欒偛鑳屾櫙銆佹妧鑳姐�佺粡楠屽拰璧勬牸銆�" value="{{d.params.data.requirements || '' }}" /> </div> </div> + <div class="layui-form-item" pane> + <label for="sort" class="layui-form-label layui-form-required">鎺掑簭</label> + <div class="layui-input-block"> + <input type="number" name="sort" class="layui-input" value="{{ d.params.data.sort }}" > + </div> + </div> <div class="layui-form-item" pane> <label for="isEN" class="layui-form-label layui-form-required">鏄惁涓婃灦</label> diff --git a/CoreCms.Net.Web.Admin/wwwroot/views/baifenbingfa/job_jobseting/index.html b/CoreCms.Net.Web.Admin/wwwroot/views/baifenbingfa/job_jobseting/index.html index 4ab058e..64b776c 100644 --- a/CoreCms.Net.Web.Admin/wwwroot/views/baifenbingfa/job_jobseting/index.html +++ b/CoreCms.Net.Web.Admin/wwwroot/views/baifenbingfa/job_jobseting/index.html @@ -132,6 +132,7 @@ { field: 'location', title: '宸ヤ綔鍦扮偣', sort: false,width: 105 }, { field: 'jobDescription', title: '宸ヤ綔鎻忚堪', sort: false }, { field: 'requirements', title: '宀椾綅瑕佹眰', sort: false }, + { field: 'sort', title: '鎺掑簭', sort: false,width: 105 }, { field: 'isEN', title: '鏄惁涓婃灦', width: 95, templet: '#switch_isEN', sort: false , unresize: true}, { field: 'createTime', title: '寤虹珛鏃堕棿', width: 130, sort: false}, -- Gitblit v1.9.1