Commit fe95c38d authored by 黄奎's avatar 黄奎

代码优化

parent 60e88abf
using Edu.Common.Enum; using Edu.Model.Entity.OKR;
using Edu.Model.Entity.OKR;
using Edu.Model.ViewModel.OKR; using Edu.Model.ViewModel.OKR;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text;
using VT.FW.DB.Dapper;
namespace Edu.Repository.OKR namespace Edu.Repository.OKR
{ {
...@@ -13,35 +10,6 @@ namespace Edu.Repository.OKR ...@@ -13,35 +10,6 @@ namespace Edu.Repository.OKR
/// </summary> /// </summary>
public class RB_OKR_AttentionRepository : BaseRepository<RB_OKR_Attention> public class RB_OKR_AttentionRepository : BaseRepository<RB_OKR_Attention>
{ {
/// <summary>
/// 获取分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="demodel"></param>
/// <returns></returns>
//public List<RB_OKR_Comment_ViewModel> GetPageList(int pageIndex, int pageSize, out long rowsCount, RB_OKR_Comment_ViewModel demodel)
//{
// string where = $@" 1=1 and State <> 3";
// if (demodel.Group_Id > 0)
// {
// where += $@" and {nameof(RB_OKR_Comment_ViewModel.Group_Id)} ={demodel.Group_Id}";
// }
// if (demodel.PeriodId > 0)
// {
// where += $@" and {nameof(RB_OKR_Comment_ViewModel.PeriodId)} ={demodel.PeriodId}";
// }
// if (demodel.State > 0)
// {
// where += $@" and {nameof(RB_OKR_Comment_ViewModel.State)} ={demodel.State}";
// }
// string sql = $@" select * from RB_OKR_Comment where {where} order by Id desc";
// return GetPage<RB_OKR_Comment_ViewModel>(pageIndex, pageSize, out rowsCount, sql).ToList();
//}
/// <summary> /// <summary>
/// 获取列表 /// 获取列表
/// </summary> /// </summary>
......
...@@ -14,7 +14,6 @@ namespace Edu.Repository.OKR ...@@ -14,7 +14,6 @@ namespace Edu.Repository.OKR
/// </summary> /// </summary>
public class RB_OKR_CommentRepository : BaseRepository<RB_OKR_Comment> public class RB_OKR_CommentRepository : BaseRepository<RB_OKR_Comment>
{ {
/// <summary> /// <summary>
/// 获取分页列表 /// 获取分页列表
/// </summary> /// </summary>
...@@ -58,7 +57,6 @@ namespace Edu.Repository.OKR ...@@ -58,7 +57,6 @@ namespace Edu.Repository.OKR
{ {
where += $@" and {nameof(RB_OKR_Comment_ViewModel.ParentId)} ={demodel.ParentId}"; where += $@" and {nameof(RB_OKR_Comment_ViewModel.ParentId)} ={demodel.ParentId}";
} }
string sql = $@" select * from RB_OKR_Comment where {where} order by Id desc"; string sql = $@" select * from RB_OKR_Comment where {where} order by Id desc";
return GetPage<RB_OKR_Comment_ViewModel>(pageIndex, pageSize, out rowsCount, sql).ToList(); return GetPage<RB_OKR_Comment_ViewModel>(pageIndex, pageSize, out rowsCount, sql).ToList();
} }
......
...@@ -14,7 +14,6 @@ namespace Edu.Repository.OKR ...@@ -14,7 +14,6 @@ namespace Edu.Repository.OKR
/// </summary> /// </summary>
public class RB_OKR_KeyResultRepository : BaseRepository<RB_OKR_KeyResult> public class RB_OKR_KeyResultRepository : BaseRepository<RB_OKR_KeyResult>
{ {
/// <summary> /// <summary>
/// 获取分页列表 /// 获取分页列表
/// </summary> /// </summary>
......
...@@ -14,7 +14,6 @@ namespace Edu.Repository.OKR ...@@ -14,7 +14,6 @@ namespace Edu.Repository.OKR
/// </summary> /// </summary>
public class RB_OKR_MatterRepository : BaseRepository<RB_OKR_Matter> public class RB_OKR_MatterRepository : BaseRepository<RB_OKR_Matter>
{ {
/// <summary> /// <summary>
/// 获取列表 /// 获取列表
/// </summary> /// </summary>
...@@ -42,6 +41,5 @@ namespace Edu.Repository.OKR ...@@ -42,6 +41,5 @@ namespace Edu.Repository.OKR
string sql = $@" select * from RB_OKR_Matter where {where} order by Id desc"; string sql = $@" select * from RB_OKR_Matter where {where} order by Id desc";
return Get<RB_OKR_Matter>(sql).ToList(); return Get<RB_OKR_Matter>(sql).ToList();
} }
} }
} }
\ No newline at end of file
...@@ -29,7 +29,6 @@ namespace Edu.Repository.OKR ...@@ -29,7 +29,6 @@ namespace Edu.Repository.OKR
{ {
where += $@" and {nameof(RB_OKR_PeriodConfig_ViewModel.Group_Id)} ={demodel.Group_Id}"; where += $@" and {nameof(RB_OKR_PeriodConfig_ViewModel.Group_Id)} ={demodel.Group_Id}";
} }
string sql = $@" select * from RB_OKR_PeriodConfig where {where} order by Id desc"; string sql = $@" select * from RB_OKR_PeriodConfig where {where} order by Id desc";
return GetPage<RB_OKR_PeriodConfig_ViewModel>(pageIndex, pageSize, out rowsCount, sql).ToList(); return GetPage<RB_OKR_PeriodConfig_ViewModel>(pageIndex, pageSize, out rowsCount, sql).ToList();
} }
...@@ -46,7 +45,6 @@ namespace Edu.Repository.OKR ...@@ -46,7 +45,6 @@ namespace Edu.Repository.OKR
{ {
where += $@" and {nameof(RB_OKR_PeriodConfig_ViewModel.Group_Id)} ={demodel.Group_Id}"; where += $@" and {nameof(RB_OKR_PeriodConfig_ViewModel.Group_Id)} ={demodel.Group_Id}";
} }
string sql = $@" select * from RB_OKR_PeriodConfig where {where} order by Id desc"; string sql = $@" select * from RB_OKR_PeriodConfig where {where} order by Id desc";
return Get<RB_OKR_PeriodConfig_ViewModel>(sql).ToList(); return Get<RB_OKR_PeriodConfig_ViewModel>(sql).ToList();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment