using Edu.Model.Entity.WeChat; using Edu.Model.ViewModel.WeChat; using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Edu.Repository.WeChat { /// /// 企业微信APP /// public class RB_WeChat_APPRepository : BaseRepository { private const string TABLE_NAME = nameof(RB_WeChat_APP); /// /// 获取指定代号的应用 /// /// /// /// public RB_WeChat_APP_ViewModel GetAPPConfigByCodeAndParent(int parentId, string code) { var sql = $"select Id,ParentId,AppId,Secret,Code from {TABLE_NAME} where ParentId={parentId} and Code='{code}'"; var result = Get(sql).ToList(); return result.FirstOrDefault(); } } }