Dao/ShopMenuFunctionRepository.cs
(开头部分) 18KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using Domain;
using IDao;
using Entity.Common;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using Common;
using PWMIS.DataMap.Entity;
using System.Data;
using System.Data.SqlClient;
using System.Collections;
namespace Dao
{
/// <summary>
/// 角色菜单功能管理表 仓储
/// </summary>
public class ShopMenuFunctionRepository : Repository<ShopMenuFunctionMdl>, IShopMenuFunctionRepository
{
public List<ShopMenuFunctionMdl> GetDynamicPagination(ShopMenuFunctionMdl option, CommonQueryOption cqo, out int totalcount)
{
ShopMenuFunctionMdl mol = new ShopMenuFunctionMdl();
OQL q = new OQL(mol);
OQLCompareFunc cmpFun = cmp =>
{
OQLCompare cmpResult = new OQLCompare(q);
cmpResult = cmp.Comparer(mol.ID, OQLCompare.CompareType.NotEqual, 0);
if (!string.IsNullOrEmpty(option.Menu_ID.ToStr()))
cmpResult = cmpResult & cmp.Comparer(mol.Menu_ID, "=", option.Menu_ID);
return cmpResult;
};
var query = q.Limit(cqo.limit, cqo.pageNumber).Select().Where(cmpFun).END;
var lstMol = EntityQuery<ShopMenuFunctionMdl>.QueryList(query).ToList();
OQL qCount = new OQL(mol);
var queyCount = qCount.Select().Count(mol.ID, "ID").Where(cmpFun).END;
mol = EntityQuery<ShopMenuFunctionMdl>.QueryObject(queyCount);
totalcount = mol.ID.To<int>();
return EntityQuery<ShopMenuFunctionMdl>.QueryList(query).ToList();
}
/// <summary>
/// 多条件获取店铺权限功能数据
/// </summary>
/// <param name="option"></param>
/// <param name="cqo"></param>
/// <returns></returns>
public List<ShopMenuFunctionMdl> GetDynamicList(ShopMenuFunctionMdl option, CommonQueryOption cqo)
{
ShopMenuFunctionMdl mol = new ShopMenuFunctionMdl();
OQL q = new OQL(mol);
OQLCompareFunc cmpFun = cmp =>
{
OQLCompare cmpResult = new OQLCompare(q);
cmpResult = cmp.Comparer(mol.ID, OQLCompare.CompareType.NotEqual, 0);
if (!string.IsNullOrEmpty(cqo._ShopID))
cmpResult = cmpResult & cmp.Comparer(mol.Shop_Id, "=", cqo._ShopID);
return cmpResult;
};
var query = q.Select().Where(cmpFun).END;
后面还有 361 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
