|
@@ -0,0 +1,44 @@
|
|
|
+using System;
|
|
|
+using System.Collections.Generic;
|
|
|
+using System.Data.SqlClient;
|
|
|
+using JLHHJSvr.Com;
|
|
|
+using JLHHJSvr.Com.Model;
|
|
|
+using LJLib.Net.SPI.Server;
|
|
|
+
|
|
|
+namespace JLHHJSvr.Excutor
|
|
|
+{
|
|
|
+ internal sealed class JLH_FetchPriceExcutor:ExcutorBase<JLH_FetchPriceRequest, JLH_FetchPriceResponse>
|
|
|
+ {
|
|
|
+ protected override void ExcuteInternal(JLH_FetchPriceRequest request, object state, JLH_FetchPriceResponse rslt)
|
|
|
+ {
|
|
|
+ if (request.token != "7DEA6FF3-3E81-4EDA-8A02-1F56073A45FD")
|
|
|
+ {
|
|
|
+ rslt.ErrMsg = "会话已经中断,请重新登录";
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ using (var con = new SqlConnection(GlobalVar.ConnectionString))
|
|
|
+ using (var cmd = con.CreateCommand())
|
|
|
+ {
|
|
|
+ con.Open();
|
|
|
+
|
|
|
+ rslt.list = new List<u_configure_codemx>();
|
|
|
+
|
|
|
+ cmd.CommandText = "SELECT '' AS mtrlcode, 123 AS price";
|
|
|
+ cmd.Parameters.Clear();
|
|
|
+
|
|
|
+ using (var reader = cmd.ExecuteReader())
|
|
|
+ {
|
|
|
+ while (reader.Read())
|
|
|
+ {
|
|
|
+ rslt.list.Add(new u_configure_codemx()
|
|
|
+ {
|
|
|
+ mtrlcode = Convert.ToString(reader["mtrlcode"]).Trim(),
|
|
|
+ price = Convert.ToDecimal(reader["price"]),
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|