Ver código fonte

Merge branch 'master' of 123.57.209.16:bjquanjiang/DigitalScholl

西昌缴费二期
liangkun 4 anos atrás
pai
commit
187750be78
19 arquivos alterados com 308 adições e 23 exclusões
  1. +47
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/LoginUserBindController.cs
  2. +34
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LoginUserBind/BindAccountIndex.cshtml
  3. +59
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LoginUserBind/BindAccountIndex.js
  4. +6
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LoginUserBind/Form.js
  5. +6
    -4
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LoginUserBind/Index.js
  6. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  7. +5
    -3
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminTheme5.cshtml
  8. +13
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/script/lr-admin.js
  9. +10
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/Default/Index.js
  10. +9
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageFive/Index.js
  11. +9
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageFour/Index.js
  12. +9
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageOne/Index.js
  13. +9
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageSix/Index.js
  14. +9
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageThree/Index.js
  15. +9
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageTwo/Index.js
  16. +25
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LoginUserBind/LoginUserBindBLL.cs
  17. +3
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LoginUserBind/LoginUserBindEntity.cs
  18. +8
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LoginUserBind/LoginUserBindIBLL.cs
  19. +36
    -11
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LoginUserBind/LoginUserBindService.cs

+ 47
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/LoginUserBindController.cs Ver arquivo

@@ -3,6 +3,8 @@ using System.Data;
using Learun.Application.TwoDevelopment.EducationalAdministration;
using System.Web.Mvc;
using System.Collections.Generic;
using System;
using Learun.Application.Organization;

namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
{
@@ -16,6 +18,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
public class LoginUserBindController : MvcControllerBase
{
private LoginUserBindIBLL loginUserBindIBLL = new LoginUserBindBLL();
private UserIBLL userIBLL = new UserBLL();

#region 视图功能

@@ -28,6 +31,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
{
return View();
}

/// <summary>
/// 表单页
/// <summary>
@@ -37,6 +41,16 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
{
return View();
}

/// <summary>
/// 主页面【切换账号】
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult BindAccountIndex()
{
return View();
}
#endregion

#region 获取数据
@@ -114,7 +128,39 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
[AjaxOnly]
public ActionResult SaveForm(string keyValue, string strEntity)
{
UserInfo userInfo = LoginUserInfo.Get(); LoginUserBindEntity entity = strEntity.ToObject<LoginUserBindEntity>();
UserInfo userInfo = LoginUserInfo.Get();
LoginUserBindEntity entity = strEntity.ToObject<LoginUserBindEntity>();
if (entity.BindUserAccount == userInfo.account)
{
return Fail("绑定账号不能为登录用户账号!");
}
//判断账号是否已绑定
if (string.IsNullOrEmpty(keyValue))
{
var aa = loginUserBindIBLL.GetEntityByBindUserAccount(entity.BindUserAccount, userInfo.userId);
if (aa != null)
{
return Fail("绑定账号已存在!");
}
}
else
{
var aa = loginUserBindIBLL.GetEntityByBindUserAccount(entity.BindUserAccount, userInfo.userId);
if (aa != null && aa.Id != keyValue)
{
return Fail("绑定账号已存在!");
}
}
//判断账号、密码是否可以登录
var model = userIBLL.CheckLogin(entity.BindUserAccount, entity.BindUserPasswordTemp);
if (!model.LoginOk)
{
return Fail(model.LoginMsg);
}
entity.BindUserId = model.F_UserId;
entity.CreateUserId = userInfo.userId;
entity.CreateUserName = userInfo.realName;
entity.CreateTime = DateTime.Now;
loginUserBindIBLL.SaveEntity(userInfo,keyValue,entity);
return Success("保存成功!");
}


+ 34
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LoginUserBind/BindAccountIndex.cshtml Ver arquivo

@@ -0,0 +1,34 @@
@{
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 class="lr-layout-tool-item">
<div id="multiple_condition_query">
<div class="lr-query-formcontent">
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">绑定账号</div>
<input id="BindUserAccount" type="text" class="form-control" />
</div>
</div>
</div>
</div>
</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">
<a id="lr_login" 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/LoginUserBind/BindAccountIndex.js")

+ 59
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LoginUserBind/BindAccountIndex.js Ver arquivo

@@ -0,0 +1,59 @@
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
* Copyright (c) 2013-2018 北京泉江科技有限公司
* 创建人:超级管理员
* 日 期:2020-11-19 14:39
* 描 述:多账号绑定
*/
var refreshGirdData;
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
page.initGird();
page.bind();
},
bind: function () {
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 220, 400);
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 登录
$('#lr_login').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
var account = $('#gridtable').jfGridValue('BindUserAccount');
var pwd = $('#gridtable').jfGridValue('BindUserPassword');
//安全退出;自动登录;
learun.httpAsyncPost('/Login/OutLogin', {}, function (data) {
window.location.href = "/Login/Index?isBindAccountLogin=1&bindUserName=" + account + "&bindUserPassword=" + pwd;
});
}
});
},
// 初始化列表
initGird: function () {
$('#gridtable').jfGrid({
url: top.$.rootUrl + '/EducationalAdministration/LoginUserBind/GetPageList',
headData: [
{ label: "绑定账号", name: "BindUserAccount", width: 150, align: "left" },
],
mainId: 'Id',
isPage: true,
sidx: 'CreateTime desc'
});
page.search();
},
search: function (param) {
param = param || {};
param.CreateUserId = learun.clientdata.get(['userinfo']).userId;
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
page.search();
};
page.init();
}

+ 6
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LoginUserBind/Form.js Ver arquivo

@@ -21,7 +21,7 @@ var bootstrap = function ($, learun) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/LoginUserBind/GetFormData?keyValue=' + keyValue, function (data) {
for (var id in data) {
if (!!data[id].length && data[id].length > 0) {
$('#' + id ).jfGridSet('refreshdata', data[id]);
$('#' + id).jfGridSet('refreshdata', data[id]);
}
else {
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
@@ -36,8 +36,12 @@ var bootstrap = function ($, learun) {
if (!$('body').lrValidform()) {
return false;
}
var data = $('body').lrGetFormData();
data.BindUserAccount = $('#BindUserAccount').val().trim();
data.BindUserPassword = $('#BindUserPassword').val().trim();
data.BindUserPasswordTemp = $.md5(data.BindUserPassword);
var postData = {
strEntity: JSON.stringify($('body').lrGetFormData())
strEntity: JSON.stringify(data)
};
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/LoginUserBind/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调


+ 6
- 4
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LoginUserBind/Index.js Ver arquivo

@@ -68,16 +68,18 @@ var bootstrap = function ($, learun) {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/EducationalAdministration/LoginUserBind/GetPageList',
headData: [
{ label: "绑定账号", name: "BindUserAccount", width: 100, align: "left"},
{ label: "绑定密码", name: "BindUserPassword", width: 100, align: "left"},
{ label: "绑定账号", name: "BindUserAccount", width: 150, align: "left"},
{ label: "绑定时间", name: "CreateTime", width: 130, align: "left"},
],
mainId:'Id',
isPage: true
});
isPage: true,
sidx:'CreateTime desc'
});
page.search();
},
search: function (param) {
param = param || {};
param.CreateUserId = learun.clientdata.get(['userinfo']).userId;
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) });
}
};


+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj Ver arquivo

@@ -927,6 +927,7 @@
<Content Include="Areas\EducationalAdministration\Views\LessonInfo\FormNoMajor.js" />
<Content Include="Areas\EducationalAdministration\Views\LessonInfo\IndexNoMajor.js" />
<Content Include="Areas\EducationalAdministration\Views\LoginUserBind\Form.js" />
<Content Include="Areas\EducationalAdministration\Views\LoginUserBind\BindAccountIndex.js" />
<Content Include="Areas\EducationalAdministration\Views\PracticeBase\Form.js" />
<Content Include="Areas\EducationalAdministration\Views\PracticeBase\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\R_EnterBuilding\ClassReport.js" />
@@ -6864,6 +6865,7 @@
<Content Include="Areas\AssetManagementSystem\Views\Ass_AllocationItem\Form.cshtml" />
<Content Include="Areas\AssetManagementSystem\Views\Ass_AllocationItem\Index.cshtml" />
<Content Include="Areas\AssetManagementSystem\Views\Ass_Acceptance\ViewForm.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\LoginUserBind\BindAccountIndex.cshtml" />
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" />
<Content Include="Views\Login\Default-beifen.cshtml" />
<None Include="Properties\PublishProfiles\FolderProfile1.pubxml" />


+ 5
- 3
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminTheme5.cshtml Ver arquivo

@@ -52,8 +52,10 @@
</div>
</div>
@Html.AppendJsFile("/Views/Home/AdminTheme5/index.js")
@Html.AppendJsFile("/Views/Login/ACLogon.js")
<script>
$(function() {
//$(".lr-frame-tabs").css("top", "56px")
})

var Ip = "@ViewBag.Ip";
var ACIp = "@ViewBag.ACIp";
var ACIp2 = "@ViewBag.ACIp2";
</script>

+ 13
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/script/lr-admin.js Ver arquivo

@@ -74,6 +74,7 @@ var loaddfimg;
_html += '<li><a href="javascript:void(0);" id="lr_cancelweixinbind_btn"><i class="fa fa-unlock"></i>解绑微信</a></li>';
_html += '<li><a href="javascript:void(0);" id="lr_schedule_btn"><i class="fa fa-calendar"></i>我的日程</a></li>';
_html += '<li><a href="javascript:void(0);" id="lr_onlineuser_btn"><i class="fa fa-user"></i>在线人员</a></li>';
_html += '<li><a href="javascript:void(0);" id="lr_loginuserbind_btn"><i class="fa fa-group"></i>切换账号</a></li>';
if (loginInfo.isSystem) {
_html += '<li><a href="javascript:void(0);" id="lr_clearredis_btn"><i class="fa fa-refresh"></i>清空缓存</a></li>';
}
@@ -85,6 +86,7 @@ var loaddfimg;
$('#lr_userinfo_btn').on('click', page.openUserCenter);
$('#lr_clearredis_btn').on('click', page.clearredis);
$('#lr_onlineuser_btn').on('click', page.openOnlineUser);
$('#lr_loginuserbind_btn').on('click', page.openLoginUserBind);
$('#lr_cancelweixinbind_btn').on('click', page.cancelWeiXinBind);
},
loginout: function () { // 安全退出
@@ -146,7 +148,17 @@ var loaddfimg;
btn: null
});
},

openLoginUserBind: function () {
// 打开切换账号
learun.layerForm({
id: "LoginUserBindList",
title: '切换账号',
url: top.$.rootUrl + '/EducationalAdministration/LoginUserBind/BindAccountIndex',
width: 1000,
height: 600,
btn: null
});
},
// 全屏按钮
fullScreenInit: function () {
var _html = '<div class="lr_frame_fullscreen"><a href="javascript:void(0);" id="lr_fullscreen_btn" title="全屏"><i class="fa fa-arrows-alt"></i></a></div>';


+ 10
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/Default/Index.js Ver arquivo

@@ -9,8 +9,17 @@
"use strict";
var source = request('source');
var keyValue = request('keyValue');
var isBindAccountLogin = request('isBindAccountLogin');//切换账号登录
var bindUserName = request('bindUserName');//绑定账号
var bindUserPassword = request('bindUserPassword');//绑定账号密码
var lrPage = {
init: function () {
//切换账号登录时:登录页赋值,触发登录事件;
if (isBindAccountLogin == 1) {
$("#lr_username").val(bindUserName);
$("#lr_password").val(bindUserPassword);
lrPage.login();
}

$('#psw_change').css({
'background': 'url(' + $.rootUrl + '/Content/images/Login/psw0.png) no-repeat center center'
@@ -158,7 +167,7 @@
}
else
window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/Home/Index";
//window.location.href = "/Home/Index";
//window.location.href = "/Home/Index";
}
}
else if (res.code == 400) {


+ 9
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageFive/Index.js Ver arquivo

@@ -9,8 +9,17 @@
"use strict";
var source = request('source');
var keyValue = request('keyValue');
var isBindAccountLogin = request('isBindAccountLogin');//切换账号登录
var bindUserName = request('bindUserName');//绑定账号
var bindUserPassword = request('bindUserPassword');//绑定账号密码
var lrPage = {
init: function () {
//切换账号登录时:登录页赋值,触发登录事件;
if (isBindAccountLogin == 1) {
$("#lr_username").val(bindUserName);
$("#lr_password").val(bindUserPassword);
lrPage.login();
}

$('#psw_change').css({
'background': 'url(' + $.rootUrl + '/Content/images/Login/psw0.png) no-repeat center center'


+ 9
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageFour/Index.js Ver arquivo

@@ -9,8 +9,17 @@
"use strict";
var source = request('source');
var keyValue = request('keyValue');
var isBindAccountLogin = request('isBindAccountLogin');//切换账号登录
var bindUserName = request('bindUserName');//绑定账号
var bindUserPassword = request('bindUserPassword');//绑定账号密码
var lrPage = {
init: function () {
//切换账号登录时:登录页赋值,触发登录事件;
if (isBindAccountLogin == 1) {
$("#lr_username").val(bindUserName);
$("#lr_password").val(bindUserPassword);
lrPage.login();
}

$('#psw_change').css({
'background': 'url(' + $.rootUrl + '/Content/images/Login/psw0.png) no-repeat center center'


+ 9
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageOne/Index.js Ver arquivo

@@ -9,8 +9,17 @@
"use strict";
var source = request('source');
var keyValue = request('keyValue');
var isBindAccountLogin = request('isBindAccountLogin');//切换账号登录
var bindUserName = request('bindUserName');//绑定账号
var bindUserPassword = request('bindUserPassword');//绑定账号密码
var lrPage = {
init: function () {
//切换账号登录时:登录页赋值,触发登录事件;
if (isBindAccountLogin == 1) {
$("#lr_username").val(bindUserName);
$("#lr_password").val(bindUserPassword);
lrPage.login();
}

$('#psw_change').css({
'background': 'url(' + $.rootUrl + '/Content/images/Login/psw0.png) no-repeat center center'


+ 9
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageSix/Index.js Ver arquivo

@@ -9,8 +9,17 @@
"use strict";
var source = request('source');
var keyValue = request('keyValue');
var isBindAccountLogin = request('isBindAccountLogin');//切换账号登录
var bindUserName = request('bindUserName');//绑定账号
var bindUserPassword = request('bindUserPassword');//绑定账号密码
var lrPage = {
init: function () {
//切换账号登录时:登录页赋值,触发登录事件;
if (isBindAccountLogin == 1) {
$("#lr_username").val(bindUserName);
$("#lr_password").val(bindUserPassword);
lrPage.login();
}

$('#psw_change').css({
'background': 'url(' + $.rootUrl + '/Content/images/Login/psw0.png) no-repeat center center'


+ 9
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageThree/Index.js Ver arquivo

@@ -9,8 +9,17 @@
"use strict";
var source = request('source');
var keyValue = request('keyValue');
var isBindAccountLogin = request('isBindAccountLogin');//切换账号登录
var bindUserName = request('bindUserName');//绑定账号
var bindUserPassword = request('bindUserPassword');//绑定账号密码
var lrPage = {
init: function () {
//切换账号登录时:登录页赋值,触发登录事件;
if (isBindAccountLogin == 1) {
$("#lr_username").val(bindUserName);
$("#lr_password").val(bindUserPassword);
lrPage.login();
}

$('#psw_change').css({
'background': 'url(' + $.rootUrl + '/Content/images/Login/psw0.png) no-repeat center center'


+ 9
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageTwo/Index.js Ver arquivo

@@ -9,8 +9,17 @@
"use strict";
var source = request('source');
var keyValue = request('keyValue');
var isBindAccountLogin = request('isBindAccountLogin');//切换账号登录
var bindUserName = request('bindUserName');//绑定账号
var bindUserPassword = request('bindUserPassword');//绑定账号密码
var lrPage = {
init: function () {
//切换账号登录时:登录页赋值,触发登录事件;
if (isBindAccountLogin == 1) {
$("#lr_username").val(bindUserName);
$("#lr_password").val(bindUserPassword);
lrPage.login();
}

$('#psw_change').css({
'background': 'url(' + $.rootUrl + '/Content/images/Login/psw0.png) no-repeat center center'


+ 25
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LoginUserBind/LoginUserBindBLL.cs Ver arquivo

@@ -91,6 +91,31 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}

/// <summary>
/// 获取实体
/// </summary>
/// <param name="bindUserAccount">绑定账号</param>
/// <param name="userId">登录用户</param>
/// <returns></returns>
public LoginUserBindEntity GetEntityByBindUserAccount(string bindUserAccount, string userId)
{
try
{
return loginUserBindService.GetEntityByBindUserAccount(bindUserAccount, userId);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

#region 提交数据


+ 3
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LoginUserBind/LoginUserBindEntity.cs Ver arquivo

@@ -69,6 +69,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
#endregion
#region 扩展字段
[NotMapped]
public string BindUserPasswordTemp { get; set; }

#endregion
}
}


+ 8
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LoginUserBind/LoginUserBindIBLL.cs Ver arquivo

@@ -34,6 +34,14 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// <summary>
/// <returns></returns>
LoginUserBindEntity GetLoginUserBindEntity(string keyValue);

/// <summary>
/// 获取实体
/// </summary>
/// <param name="bindUserAccount">绑定账号</param>
/// <param name="userId">登录用户</param>
/// <returns></returns>
LoginUserBindEntity GetEntityByBindUserAccount(string bindUserAccount, string userId);
#endregion

#region 提交数据


+ 36
- 11
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LoginUserBind/LoginUserBindService.cs Ver arquivo

@@ -30,12 +30,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(@"
t.Id,
t.BindUserAccount,
t.BindUserPassword
");
strSql.Append("SELECT t.* ");
strSql.Append(" FROM LoginUserBind t ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
@@ -46,7 +41,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
dp.Add("BindUserAccount", "%" + queryParam["BindUserAccount"].ToString() + "%", DbType.String);
strSql.Append(" AND t.BindUserAccount Like @BindUserAccount ");
}
return this.BaseRepository().FindList<LoginUserBindEntity>(strSql.ToString(),dp, pagination);
if (!queryParam["CreateUserId"].IsEmpty())
{
dp.Add("CreateUserId", queryParam["CreateUserId"].ToString(), DbType.String);
strSql.Append(" AND t.CreateUserId = @CreateUserId ");
}
return this.BaseRepository().FindList<LoginUserBindEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{
@@ -87,7 +87,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
dp.Add("BindUserAccount", "%" + queryParam["BindUserAccount"].ToString() + "%", DbType.String);
strSql.Append(" AND t.BindUserAccount Like @BindUserAccount ");
}
return this.BaseRepository().FindList<LoginUserBindEntity>(strSql.ToString(),dp);
return this.BaseRepository().FindList<LoginUserBindEntity>(strSql.ToString(), dp);
}
catch (Exception ex)
{
@@ -126,6 +126,31 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}

/// <summary>
/// 获取实体
/// </summary>
/// <param name="bindUserAccount">绑定账号</param>
/// <param name="userId">登录用户</param>
/// <returns></returns>
public LoginUserBindEntity GetEntityByBindUserAccount(string bindUserAccount, string userId)
{
try
{
return this.BaseRepository().FindEntity<LoginUserBindEntity>(x => x.BindUserAccount == bindUserAccount && x.CreateUserId == userId);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

#endregion

#region 提交数据
@@ -139,7 +164,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
try
{
this.BaseRepository().Delete<LoginUserBindEntity>(t=>t.Id == keyValue);
this.BaseRepository().Delete<LoginUserBindEntity>(t => t.Id == keyValue);
}
catch (Exception ex)
{
@@ -159,13 +184,13 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
public void SaveEntity( UserInfo userInfo, string keyValue, LoginUserBindEntity entity)
public void SaveEntity(UserInfo userInfo, string keyValue, LoginUserBindEntity entity)
{
try
{
if (!string.IsNullOrEmpty(keyValue))
{
entity.Modify(keyValue,userInfo);
entity.Modify(keyValue, userInfo);
this.BaseRepository().Update(entity);
}
else


Carregando…
Cancelar
Salvar