Commit 3f326da6 authored by solho's avatar solho

feat:revert some code

parent 903fd819
...@@ -74,16 +74,15 @@ namespace WebAPI.Controllers ...@@ -74,16 +74,15 @@ namespace WebAPI.Controllers
string input = param.Input.ToString(); string input = param.Input.ToString();
try try
{ {
JObject obj_input = JObject.Parse(input.ToString());
using (SqlConnection Conn = new SqlConnection(connString)) using (SqlConnection Conn = new SqlConnection(connString))
{ {
SqlCommand cmd = new SqlCommand("", Conn) SqlCommand cmd = new SqlCommand("", Conn)
{ {
CommandText = @"select a.customer_name,a.customer_id,case when isnull(b.customer_id,'')!='' then 1 else 0 end isSelect from c_customer a CommandText = @"
left join (select request_customer_id as customer_id from essen_customer a1 where a1.customer_id=@customer_id) b on a.customer_id=b.customer_id select customer_name,customer_id from c_customer a
where a.is_enabled=1 "
where a.is_enabled=1 "
}; };
cmd.Parameters.AddWithValue("@customer_id", obj_input["customer_id"] == null ? "" : obj_input["customer_id"].ToString());
DataTable dt = SqlToDt(cmd); DataTable dt = SqlToDt(cmd);
response.Msg = JsonConvert.SerializeObject(dt); response.Msg = JsonConvert.SerializeObject(dt);
response.Code = "1"; response.Code = "1";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment