| | |
| | | /// <summary> |
| | | /// 更新发布数据的坐标 |
| | | /// </summary> |
| | | public static int UpdatePublishCoord(int pid, string json) |
| | | public static int UpdatePublishGeom(int pid, string geom) |
| | | { |
| | | string sql = string.Format("update lf.sys_publish set json = @json where id = {0}", pid); |
| | | DbParameter dp = new NpgsqlParameter("@json", json); |
| | | string sql = string.Format("update lf.sys_publish set geom = @geom where id = {0}", pid); |
| | | DbParameter dp = new NpgsqlParameter("@geom", geom); |
| | | |
| | | return Tools.DBHelper.ExecuteNonQuery(sql, dp); |
| | | } |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 查询发布数据 |
| | | /// </summary> |
| | | public static List<SysPublish> SelectPublishs(List<int> ids) |
| | | { |
| | | string sql = string.Format("select id, name, url, path, type, status, dirid, depid, min, max, json, create_user, create_time, update_user, update_time, st_astext(geom) geom, bak from lf.sys_publish where id in ({0}) order by id desc", string.Join(",", ids)); |
| | | DataTable dt = Tools.DBHelper.GetDataTable(sql); |
| | | List<SysPublish> list = ModelHandler.FillModel<SysPublish>(dt); |
| | | |
| | | return list; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取参数列表 |
| | | /// </summary> |
| | | public static List<DbParameter> GetParams<T>(string sql, T t) |