Commit 2b45bb71 authored by solho's avatar solho

fix:標準版取得LIST修改

parent a388db43
......@@ -74,15 +74,16 @@ namespace WebAPI.Controllers
string input = param.Input.ToString();
try
{
JObject obj_input = JObject.Parse(input.ToString());
using (SqlConnection Conn = new SqlConnection(connString))
{
SqlCommand cmd = new SqlCommand("", Conn)
{
CommandText = @"
select customer_name,customer_id from c_customer a
CommandText = @"select a.customer_name,a.customer_id,case when isnull(b.customer_id,'')!='' then 1 else 0 end isSelect from c_customer a
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
where a.is_enabled=1 "
};
cmd.Parameters.AddWithValue("@customer_id", obj_input["customer_id"] == null ? "" : obj_input["customer_id"].ToString());
DataTable dt = SqlToDt(cmd);
response.Msg = JsonConvert.SerializeObject(dt);
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