Selaa lähdekoodia

【新增】数据中心增加“信息推送管理”;

西昌缴费二期
dyy 4 vuotta sitten
vanhempi
commit
bfc090c94b
13 muutettua tiedostoa jossa 833 lisäystä ja 0 poistoa
  1. +153
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Sys_InformationPushController.cs
  2. +15
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_InformationPush/Form.cshtml
  3. +53
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_InformationPush/Form.js
  4. +32
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_InformationPush/Index.cshtml
  5. +137
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_InformationPush/Index.js
  6. +5
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  7. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/Sys_InformationPushMap.cs
  8. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj
  9. +125
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_InformationPush/Sys_InformationPushBLL.cs
  10. +85
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_InformationPush/Sys_InformationPushEntity.cs
  11. +48
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_InformationPush/Sys_InformationPushIBLL.cs
  12. +146
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_InformationPush/Sys_InformationPushService.cs
  13. +4
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj

+ 153
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Sys_InformationPushController.cs Näytä tiedosto

@@ -0,0 +1,153 @@
using Learun.Util;
using System.Data;
using Learun.Application.TwoDevelopment.EducationalAdministration;
using System.Web.Mvc;
using System.Collections.Generic;
using System;

namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2020-11-20 14:53
/// 描 述:信息推送管理
/// </summary>
public class Sys_InformationPushController : MvcControllerBase
{
private Sys_InformationPushIBLL sys_InformationPushIBLL = new Sys_InformationPushBLL();

#region 视图功能

/// <summary>
/// 主页面
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Index()
{
return View();
}
/// <summary>
/// 表单页
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Form()
{
return View();
}
#endregion

#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetPageList(string pagination, string queryJson)
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var data = sys_InformationPushIBLL.GetPageList(paginationobj, queryJson);
var jsonData = new
{
rows = data,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records
};
return Success(jsonData);
}
/// <summary>
/// 获取表单数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetFormData(string keyValue)
{
var Sys_InformationPushData = sys_InformationPushIBLL.GetSys_InformationPushEntity(keyValue);
var jsonData = new
{
Sys_InformationPush = Sys_InformationPushData,
};
return Success(jsonData);
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DeleteForm(string keyValue)
{
sys_InformationPushIBLL.DeleteEntity(keyValue);
return Success("删除成功!");
}
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="strEntity">实体</param>
/// <returns></returns>
[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
public ActionResult SaveForm(string keyValue, string strEntity)
{
var userInfo = LoginUserInfo.Get();
Sys_InformationPushEntity entity = strEntity.ToObject<Sys_InformationPushEntity>();
if (string.IsNullOrEmpty(keyValue))
{
entity.CreateUserId = userInfo.userId;
entity.CreateUserName = userInfo.realName;
entity.CreateTime = DateTime.Now;
}
else
{
entity.ModifyUserId = userInfo.userId;
entity.ModifyUserName = userInfo.realName;
entity.ModifyTime = DateTime.Now;
}
sys_InformationPushIBLL.SaveEntity(keyValue, entity);

return Success("保存成功!");
}

/// <summary>
/// 开启/关闭
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DoOpen(string keyValue, bool status)
{
var userInfo = LoginUserInfo.Get();
var entity = sys_InformationPushIBLL.GetSys_InformationPushEntity(keyValue);
if (entity == null)
{
return Fail("当前推送项目不存在!");
}
entity.Status = status;
entity.ModifyUserId = userInfo.userId;
entity.ModifyUserName = userInfo.realName;
entity.ModifyTime = DateTime.Now;
sys_InformationPushIBLL.SaveEntity(keyValue, entity);
return Success("操作成功!");
}
#endregion

}
}

+ 15
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_InformationPush/Form.cshtml Näytä tiedosto

@@ -0,0 +1,15 @@
@{
ViewBag.Title = "信息推送管理";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-12 lr-form-item" data-table="Sys_InformationPush" >
<div class="lr-form-item-title">推送项目<font face="宋体">*</font></div>
<div id="PushItem" isvalid="yes" checkexpession="NotNull" ></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="Sys_InformationPush" >
<div class="lr-form-item-title">是否开启<font face="宋体">*</font></div>
<div id="Status" isvalid="yes" checkexpession="NotNull" ></div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Sys_InformationPush/Form.js")

+ 53
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_InformationPush/Form.js Näytä tiedosto

@@ -0,0 +1,53 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2020-11-20 14:53
* 描 述:信息推送管理
*/
var acceptClick;
var keyValue = request('keyValue');
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
page.bind();
page.initData();
},
bind: function () {
$('#PushItem').lrDataItemSelect({ code: 'InformationPushItem' });
$('#Status').lrDataItemSelect({ code: 'YesOrNoBit' });
$('#Status').lrselectSet("false");
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Sys_InformationPush/GetFormData?keyValue=' + keyValue, function (data) {
for (var id in data) {
if (!!data[id].length && data[id].length > 0) {
$('#' + id ).jfGridSet('refreshdata', data[id]);
}
else {
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
}
});
}
}
};
// 保存数据
acceptClick = function (callBack) {
if (!$('body').lrValidform()) {
return false;
}
var postData = {
strEntity: JSON.stringify($('body').lrGetFormData())
};
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Sys_InformationPush/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

+ 32
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_InformationPush/Index.cshtml Näytä tiedosto

@@ -0,0 +1,32 @@
@{
/**/

ViewBag.Title = "信息推送管理";
Layout = "~/Views/Shared/_Index.cshtml";
}
<div class="lr-layout ">
<div class="lr-layout-center">
<div class="lr-layout-wrap lr-layout-wrap-notitle ">
<div class="lr-layout-tool">
<div class="lr-layout-tool-left">
</div>
<div class="lr-layout-tool-right">
<div class=" btn-group btn-group-sm">
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a>
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;新增</a>
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;编辑</a>
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
<a id="lr_open" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;开启</a>
<a id="lr_close" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;关闭</a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Sys_InformationPush/Index.js")

+ 137
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_InformationPush/Index.js Näytä tiedosto

@@ -0,0 +1,137 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2020-11-20 14:53
* 描 述:信息推送管理
*/
var refreshGirdData;
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
page.initGird();
page.bind();
},
bind: function () {
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 新增
$('#lr_add').on('click', function () {
learun.layerForm({
id: 'form',
title: '新增',
url: top.$.rootUrl + '/EducationalAdministration/Sys_InformationPush/Form',
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
});
// 编辑
$('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'form',
title: '编辑',
url: top.$.rootUrl + '/EducationalAdministration/Sys_InformationPush/Form?keyValue=' + keyValue,
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
}
});
// 删除
$('#lr_delete').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/Sys_InformationPush/DeleteForm', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
//  开启
$('#lr_open').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
var status = $('#gridtable').jfGridValue('Status');
if (status == true) {
learun.alert.warning("该推送项目已开启!");
return false;
}
learun.layerConfirm('是否确认开启该项!', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/EducationalAdministration/Sys_InformationPush/DoOpen', { keyValue: keyValue, status: true }, function () {
refreshGirdData();
});
}
});
}
});
//  关闭
$('#lr_close').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
var status = $('#gridtable').jfGridValue('Status');
if (status != true) {
learun.alert.warning("该推送项目暂未开启!");
return false;
}
learun.layerConfirm('是否确认关闭该项!', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/EducationalAdministration/Sys_InformationPush/DoOpen', { keyValue: keyValue, status: false }, function () {
refreshGirdData();
});
}
});
}
});
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/EducationalAdministration/Sys_InformationPush/GetPageList',
headData: [
{
label: "推送项目", name: "PushItem", width: 150, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'InformationPushItem',
callback: function (_data) {
callback(_data.text);
}
});
}
},
{
label: "是否开启", name: "Status", width: 100, align: "left",
formatter: function (cellvalue) {
return cellvalue == true ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>";
}
},
],
mainId: 'Id',
isPage: true
});
page.search();
},
search: function (param) {
param = param || {};
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
$('#gridtable').jfGridSet('reload');
};
page.init();
}

+ 5
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj Näytä tiedosto

@@ -789,6 +789,7 @@
<Compile Include="Areas\PersonnelManagement\Controllers\ADR_AddApplyController.cs" />
<Compile Include="Areas\AssetManagementSystem\Controllers\Ass_AcceptanceController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\LoginUserBindController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\Sys_InformationPushController.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\DropOutIndex.js" />
@@ -6104,6 +6105,10 @@
<Content Include="Areas\EducationalAdministration\Views\LoginUserBind\Index.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\LoginUserBind\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\LoginUserBind\Form.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Sys_InformationPush\Index.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Sys_InformationPush\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\Sys_InformationPush\Form.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Sys_InformationPush\Form.js" />
</ItemGroup>
<ItemGroup>
<Folder Include="Areas\LR_Desktop\Models\" />


+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/Sys_InformationPushMap.cs Näytä tiedosto

@@ -0,0 +1,29 @@
using Learun.Application.TwoDevelopment.EducationalAdministration;
using System.Data.Entity.ModelConfiguration;

namespace Learun.Application.Mapping
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2020-11-20 14:53
/// 描 述:信息推送管理
/// </summary>
public class Sys_InformationPushMap : EntityTypeConfiguration<Sys_InformationPushEntity>
{
public Sys_InformationPushMap()
{
#region 表、主键
//表
this.ToTable("SYS_INFORMATIONPUSH");
//主键
this.HasKey(t => t.Id);
#endregion

#region 配置关系
#endregion
}
}
}


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj Näytä tiedosto

@@ -541,6 +541,7 @@
<Compile Include="PersonnelManagement\ADR_AddApplyMap.cs" />
<Compile Include="AssetManagementSystem\Ass_AcceptanceMap.cs" />
<Compile Include="EducationalAdministration\LoginUserBindMap.cs" />
<Compile Include="EducationalAdministration\Sys_InformationPushMap.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj">


+ 125
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_InformationPush/Sys_InformationPushBLL.cs Näytä tiedosto

@@ -0,0 +1,125 @@
using Learun.Util;
using System;
using System.Data;
using System.Collections.Generic;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2020-11-20 14:53
/// 描 述:信息推送管理
/// </summary>
public class Sys_InformationPushBLL : Sys_InformationPushIBLL
{
private Sys_InformationPushService sys_InformationPushService = new Sys_InformationPushService();

#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<Sys_InformationPushEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
return sys_InformationPushService.GetPageList(pagination, queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取Sys_InformationPush表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public Sys_InformationPushEntity GetSys_InformationPushEntity(string keyValue)
{
try
{
return sys_InformationPushService.GetSys_InformationPushEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
try
{
sys_InformationPushService.DeleteEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
/// <returns></returns>
public void SaveEntity(string keyValue, Sys_InformationPushEntity entity)
{
try
{
sys_InformationPushService.SaveEntity(keyValue, entity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

}
}

+ 85
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_InformationPush/Sys_InformationPushEntity.cs Näytä tiedosto

@@ -0,0 +1,85 @@
using Learun.Util;
using System;
using System.ComponentModel.DataAnnotations.Schema;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2020-11-20 14:53
/// 描 述:信息推送管理
/// </summary>
public class Sys_InformationPushEntity
{
#region 实体成员
/// <summary>
/// Id
/// </summary>
[Column("ID")]
public string Id { get; set; }
/// <summary>
/// 推送项目
/// </summary>
[Column("PUSHITEM")]
public string PushItem { get; set; }
/// <summary>
/// 开关状态
/// </summary>
[Column("STATUS")]
public bool? Status { get; set; }
/// <summary>
/// 创建用户
/// </summary>
[Column("CREATEUSERID")]
public string CreateUserId { get; set; }
/// <summary>
/// 创建用户名称
/// </summary>
[Column("CREATEUSERNAME")]
public string CreateUserName { get; set; }
/// <summary>
/// 创建时间
/// </summary>
[Column("CREATETIME")]
public DateTime? CreateTime { get; set; }
/// <summary>
/// 编辑用户
/// </summary>
[Column("MODIFYUSERID")]
public string ModifyUserId { get; set; }
/// <summary>
/// 编辑用户名称
/// </summary>
[Column("MODIFYUSERNAME")]
public string ModifyUserName { get; set; }
/// <summary>
/// 编辑时间
/// </summary>
[Column("MODIFYTIME")]
public DateTime? ModifyTime { get; set; }
#endregion

#region 扩展操作
/// <summary>
/// 新增调用
/// </summary>
public void Create()
{
this.Id = Guid.NewGuid().ToString();
}
/// <summary>
/// 编辑调用
/// </summary>
/// <param name="keyValue"></param>
public void Modify(string keyValue)
{
this.Id = keyValue;
}
#endregion
#region 扩展字段
#endregion
}
}


+ 48
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_InformationPush/Sys_InformationPushIBLL.cs Näytä tiedosto

@@ -0,0 +1,48 @@
using Learun.Util;
using System.Data;
using System.Collections.Generic;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2020-11-20 14:53
/// 描 述:信息推送管理
/// </summary>
public interface Sys_InformationPushIBLL
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<Sys_InformationPushEntity> GetPageList(Pagination pagination, string queryJson);
/// <summary>
/// 获取Sys_InformationPush表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
Sys_InformationPushEntity GetSys_InformationPushEntity(string keyValue);
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
void DeleteEntity(string keyValue);
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
void SaveEntity(string keyValue, Sys_InformationPushEntity entity);
#endregion

}
}

+ 146
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_InformationPush/Sys_InformationPushService.cs Näytä tiedosto

@@ -0,0 +1,146 @@
using Dapper;
using Learun.DataBase.Repository;
using Learun.Util;
using System;
using System.Collections.Generic;
using System.Data;
using System.Text;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2020-11-20 14:53
/// 描 述:信息推送管理
/// </summary>
public class Sys_InformationPushService : RepositoryFactory
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">查询参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<Sys_InformationPushEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(@"
t.Id,
t.PushItem,
t.Status
");
strSql.Append(" FROM Sys_InformationPush t ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
return this.BaseRepository().FindList<Sys_InformationPushEntity>(strSql.ToString(),dp, pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取Sys_InformationPush表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public Sys_InformationPushEntity GetSys_InformationPushEntity(string keyValue)
{
try
{
return this.BaseRepository().FindEntity<Sys_InformationPushEntity>(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
try
{
this.BaseRepository().Delete<Sys_InformationPushEntity>(t=>t.Id == keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
public void SaveEntity(string keyValue, Sys_InformationPushEntity entity)
{
try
{
if (!string.IsNullOrEmpty(keyValue))
{
entity.Modify(keyValue);
this.BaseRepository().Update(entity);
}
else
{
entity.Create();
this.BaseRepository().Insert(entity);
}
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

#endregion

}
}

+ 4
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj Näytä tiedosto

@@ -1585,6 +1585,10 @@
<Compile Include="EducationalAdministration\LoginUserBind\LoginUserBindService.cs" />
<Compile Include="EducationalAdministration\LoginUserBind\LoginUserBindBLL.cs" />
<Compile Include="EducationalAdministration\LoginUserBind\LoginUserBindIBLL.cs" />
<Compile Include="EducationalAdministration\Sys_InformationPush\Sys_InformationPushEntity.cs" />
<Compile Include="EducationalAdministration\Sys_InformationPush\Sys_InformationPushService.cs" />
<Compile Include="EducationalAdministration\Sys_InformationPush\Sys_InformationPushBLL.cs" />
<Compile Include="EducationalAdministration\Sys_InformationPush\Sys_InformationPushIBLL.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj">


Ladataan…
Peruuta
Tallenna