22 lines
573 B
22 lines
573 B
using System;
|
|
using System.Collections.Generic;
|
|
using PetaPoco;
|
|
using Pingchuan.BeijingSafeguard.Model;
|
|
|
|
namespace Pingchuan.BeijingSafeguard.DAL
|
|
{
|
|
public class ConfigDAL : BaseDAL
|
|
{
|
|
public static int Update(Config config)
|
|
{
|
|
return db.Update(config);
|
|
}
|
|
|
|
public static List<Config> Query(int pageIndex, int pageSize)
|
|
{
|
|
string sql = $@"select * from configs order by id desc";
|
|
Page<Config> page = db.Page<Config>(pageIndex, pageSize, sql);
|
|
return page.Items;
|
|
}
|
|
}
|
|
}
|