| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- using BizCom;
- using System;
- using System.Collections.Generic;
- using System.Data;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ErpServer
- {
- public class taobaoTmcTest
- {
- private static bool isGet = false;
- public static void getInfo()
- {
- if (isGet) return;
- isGet = true;
- try
- {
- string sql = "select top 25 * from S_TaoBaoTmc2 order by id asc";
- DataTable dt = SqlHelper.ExecuteDataset(sql).Tables[0];
- List<string> idLst = new List<string>();
- foreach (DataRow dr in dt.Rows)
- {
- idLst.Add(dr["id"].ToString());
- try
- {
- tmcHelper.Api_TmcTradeMsg(dr["message"].ToString());
- }
- catch (Exception ex)
- {
- XLog.SaveLog(0, dr["message"].ToString()+"------"+ex.Message);
- //tmcHelper.Api_TmcTradeMsg(dr["message"].ToString());
- }
- }
- if (idLst.Count > 0)
- {
- sql = "delete from S_TaoBaoTmc2 where id in (" + string.Join(",", idLst.ToArray()) + ") ;";
- SqlHelper.ExecuteNonQuery(sql);
- }
- }
- catch (Exception ex)
- {
- XLog.SaveLog(0, ex.Message);
- }
- finally
- {
- isGet = false;
- }
- }
- }
- }
|