SourceCode/jiouosdp/Areas/Distribution/Models/ContributionModel.cs
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using RFrameGenerate.BLL;
using RFrameGenerate.Common;
using RFrameGenerate.Model;
using RFramework.SQLQuery.SQLExpands;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Web;
namespace jiouosdp.Areas.Distribution.Models
{
public class ContributionModel
{
#region 属性
private int _topNum = -1;
protected int TopNum
{
get
{
var value = RFrameGenerate.BLL.ParameterManage.GetParamValue(ParameterName.DistributeContribute.TopNum);
if (string.IsNullOrEmpty(value))
{
_topNum = 5;
return _topNum;
}
if (!int.TryParse(value, out _topNum))
{
_topNum = 5;
return _topNum;
}
if (_topNum <= 0)
{
_topNum = 5;
return _topNum;
}
return _topNum;
}
}
public string HeadImgUrl { get; set; }
public string DistributionName { get; set; }
public DateTime? JoinTime { get; set; }
public bool IsEnable { get; set; }
public decimal TotalAmount { get; set; }
public string DistributionTypeName { get; set; }
#endregion
public List<ContributionModel> ToContributionList()
{
using (var sql = new SqlModel<T_BAS_DistributionProp, T_BAS_Member, T_BAS_DistributionType>())
{
var list = sql.SqlPage((a, b, c) => new { b.HeadImgUrl, a.DistributionName, a.JoinDateTime, a.IsEnable, a.ContributeValue, c.Name }, 1, this.TopNum)
.SqlJionInner((a, b, c) => b).SqlOn((a, b, c) => a.MemberGuid == b.MemberGuid)
.SqlJionLeft((a, b, c) => c).SqlOn((a, b, c) => a.DistributionTypeGuid == c.DistributionTypeGuid)
.SqlWhere((a, b, c) => b.MerchantGuid == CurrentManage.MerchantGuid)
.SqlOrderDescBy(m => m.ContributeValue)
.ToPageList();
后面还有 22 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。