public static Dictionary<string, string> getDicByRec(IDataContext dataContext, string dbCode, int sysid)
{
var sql = $"select rec from update_task where dbcode='{dbCode}' and sysId={sysid} ";
int count = 1;
var data = dataContext.ExecuteSqlByMySQLClient(sql, 1, 1, out count);
var dic = new Dictionary<String, String>();
if (data != null && data.Rows.Count > 0)
{
var rec = data.Rows[0][0].ToString();
var list = rec.Replace("<REC>", "");
var arr = list.Split(new string[] { @">=" }, StringSplitOptions.RemoveEmptyEntries);
var key = arr[0].TrimStart('<');
for (int i = 1; i < arr.Length; i = i + 1)
{
if (i != arr.Length - 1)
{
var nextKey = arr[i].Split('<').Last();
var value = arr[i].Replace("<" + nextKey,"");
dic.Add(key, value);
key = nextKey;
}
else
{
dic.Add(key, arr[i]);
}
}
}
return dic;
}