Com/Meme.cs

(开头部分) 2KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;

namespace Com
{
   public class Meme
    {
        /// <summary>
        /// 可用的积分(每年清零)
        /// </summary>
        /// <returns></returns>
        public static decimal get_coujifen(int depid, int mid)
        {
            decimal coujifen = 0;
            DateTime ntime = DateTime.Now.Date;
            string wh = "";
            if (ntime.Month<=2)
            { //去年3月份开始的积分,
                wh = string.Format("and DATEDIFF(day,'{0}',addtime)>=0 and DATEDIFF(day,'{1}',addtime)<0",ntime.AddYears(-1).Year+"-03-01", ntime.Year + "-03-01");
            }
            else
            {   // 今年3月份开始的
                wh = string.Format("and DATEDIFF(day,'{0}',addtime)>=0 and DATEDIFF(day,'{1}',addtime)<0", ntime.Year + "-03-01", ntime.AddYears(1).Year + "-03-01");

            }
            string sql=string.Format("select (sum(addjifen) - sum(usejifen)) 'coujifen'  from Coinid   with(nolock)  where  depid={0} and mid={1} {2}  ", depid, mid,wh);
            DataTable   dt = Com.Sql.getTable(sql);
            if (dt!=null)
            {
                coujifen = Com.Tool.DecimalConvert(dt.Rows[0]["coujifen"]);
            }
            return coujifen;
        }
        /// <summary>
        /// 积分抵扣金额
        /// </summary>
        /// <returns></returns>
        public static decimal get_price(decimal jifen)
        {
            
            if (jifen>0)
            {
              return  (jifen/ 100) * 5;
            }
            
            return 0;
        }
        /// <summary>
        /// 金额抵扣需要多少积分
        /// </summary>
        /// <returns></returns>
        public static decimal get_needjf(decimal price)
        {
            if (price>0)
            {
                return price * 100 / 5;
            }
后面还有 7 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。