SourceCode/RFrameGenerate.BLL/ShopSlideManage.cs

(开头部分) 2KB

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

using RFrameGenerate.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace RFrameGenerate.BLL
{
    public class ShopSlideManage
    {
        public static List<T_BAS_ShopSlide> GetPageList(GridModel gridModel)
        {
            using (var query = Factory.CreateT_BAS_ShopSlide())
            {
                return query.GetPageList(gridModel);
            }
        }

        public static Result SaveOrUpdate(T_BAS_ShopSlide entity)
        {
            if (entity == null) return new Result(false, "保存对象不能为空!");

            using (var query = Factory.CreateT_BAS_ShopSlide())
            {
                //新增
                if (entity.ShopSlideGuid == Guid.Empty)
                {
                    entity.ShopSlideGuid = Guid.NewGuid();
                    entity.MerchantGuid = RFrameGenerate.Common.CurrentManage.MerchantGuid;

                    query.Add(entity);
                }
                else
                {
                    //更新
                    if (query.IsExist(m => m.ShopSlideGuid == entity.ShopSlideGuid))
                    {
                        query.Update(m => new object[]{
                            m.MerchantGuid == RFrameGenerate.Common.CurrentManage.MerchantGuid,
                            m.SlideImg == entity.SlideImg,
                            m.SlideUrl == entity.SlideUrl,
                        }, v => v.ShopSlideGuid == entity.ShopSlideGuid);
                    }
                    //新增
                    else
                    {
                        entity.ShopSlideGuid = Guid.NewGuid();
                        entity.MerchantGuid = RFrameGenerate.Common.CurrentManage.MerchantGuid;

                        query.Add(entity);
                    }
                }
                return new Result(true); 
            }
        }

        public static Result Delete(Guid shopSlideGuid)
        {
            if (shopSlideGuid == Guid.Empty) return new Result(false, "ID不能为空!");

后面还有 19 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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