Himall.Web/Areas/Admin/Controllers/MobileTopicController.cs

(开头部分) 3KB

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

using Himall.Core;
using Himall.IServices;
using Himall.IServices.QueryModel;
using Himall.Model;
using Himall.Web.Areas.Admin.Models;
using Himall.Web.Framework;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Web;
using System.Web.Mvc;

namespace Himall.Web.Areas.Admin.Controllers
{
	public class MobileTopicController : BaseAdminController
	{
		public MobileTopicController()
		{
		}

		[HttpPost]
		[UnAuthorize]
		public JsonResult Add(string topicJson)
		{
			JsonSerializerSettings jsonSerializerSetting = new JsonSerializerSettings()
			{
				MissingMemberHandling = MissingMemberHandling.Ignore,
				NullValueHandling = NullValueHandling.Ignore
			};
			TopicInfo topicInfo = JsonConvert.DeserializeObject<TopicInfo>(topicJson, jsonSerializerSetting);
			TopicInfo topicInfo1 = ServiceHelper.Create<ITopicService>().GetTopicInfo(topicInfo.Id);
			topicInfo.PlatForm = PlatformType.Mobile;
			topicInfo.BackgroundImage = (topicInfo1 == null ? string.Empty : topicInfo1.BackgroundImage);
			topicInfo.FrontCoverImage = (topicInfo1 == null ? string.Empty : topicInfo1.FrontCoverImage);
			if (topicInfo.Id <= 0)
			{
				ServiceHelper.Create<ITopicService>().AddTopic(topicInfo);
			}
			else
			{
				ServiceHelper.Create<ITopicService>().UpdateTopic(topicInfo);
			}
			return Json(new { success = true });
		}

		[HttpPost]
		[UnAuthorize]
		public JsonResult Delete(long id)
		{
			Result result = new Result();
			ServiceHelper.Create<ITopicService>().DeleteTopic(id);
			result.success = true;
			return Json(result);
		}

		[HttpPost]
		[UnAuthorize]
		public JsonResult List(int page, int rows, string titleKeyword, string tagsKeyword)
后面还有 40 行代码,购买后查看完整代码

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

AI 解读

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

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