public object GetShengYinList(string uid) { string sql_s = "select sid,txt,fenlei from fanyijilu where uid=$_uid or uid='admin' "; ZmParameterList parameters = new ZmParameterList(); parameters.AddParam("uid", uid); return(MySqlHelper.ExecuteDataTable(sql_s, parameters.ParamList).ToObj()); }
public static string getSid(string txt) { string sql_s = "select sid from fanyijilu where txt=$_txt "; ZmParameterList zm = new ZmParameterList(); zm.AddParam("txt", txt); string sid = MySqlHelper.GetOneString(sql_s, zm.ParamList); return(sid); }
private ZmJieGuo AddShengYin(string txt, string uid, string fenlei) { AliTtsOption ao = new AliTtsOption(); ao.text = txt; ZmJieGuo jg = AliTTSHelper.txt2ShengYin(ao); if (jg.isOk) { ZmParameterList parameters = new ZmParameterList(); parameters.AddParam("uid", uid); parameters.AddParam("sid", jg.data.ToString()); parameters.AddParam("txt", ao.text); parameters.AddParam("fenlei", fenlei); int i_jg = MySqlHelper.InsertTab("fanyijilu", parameters.ParamList); if (i_jg != 1) { return(jg.Error("翻译成功,插入数据库失败")); } } return(jg); }