123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- using Attribute;
- using Dto;
- using Vo;
- using Model;
- using Model.Base;
- using Repository;
- using Service;
- using Microsoft.AspNetCore.Mvc;
- using Common;
- namespace Services
- {
- /// <summary>
- /// app底部导航Service业务层处理
- /// </summary>
- [AppService(ServiceType = typeof(IAppBottomNavsService), ServiceLifetime = LifeTime.Transient)]
- public class AppBottomNavsService : BaseService<AppBottomNavs>, IAppBottomNavsService
- {
- /// <summary>
- /// app底部导航-列表
- /// </summary>
- /// <param name="parm">请求参数</param>
- /// <returns>app底部导航列表</returns>
- public PagedInfo<AppBottomNavsListVo> List([FromQuery] AppBottomNavsListDto parm)
- {
- //开始拼装查询条件
- var predicate = Expressionable.Create<AppBottomNavs>();
- predicate = predicate.AndIF(!string.IsNullOrEmpty(parm.kind), m => m.kind.Contains(parm.kind));
- var response = Queryable()
- .Where(predicate.ToExpression())
- .OrderByDescending(m => m.id)
- .ToPage<AppBottomNavs, AppBottomNavsListVo>(new PagerInfo());
- return response;
- }
- /// <summary>
- /// 生成APP配置文件
- /// </summary>
- /// <param name="parm">请求参数</param>
- /// <returns>生成APP配置文件</returns>
- public string makeAppInitData(string kind)
- {
- var obj = GetList(m => m.kind == kind);
- string str = Newtonsoft.Json.JsonConvert.SerializeObject(obj);
- return Dbconn.Encrypt3DES(str, "*ga34|^7");
- }
- }
- }
|