|
@@ -40,25 +40,44 @@ namespace MySystem.Areas.Api.Controllers.v1
|
|
|
string sn = data["sn"].ToString();
|
|
string sn = data["sn"].ToString();
|
|
|
string serviceFee = data["serviceFee"].ToString();
|
|
string serviceFee = data["serviceFee"].ToString();
|
|
|
|
|
|
|
|
- WebCMSEntities db = new WebCMSEntities();
|
|
|
|
|
- PosMachinesTwo pos = db.PosMachinesTwo.FirstOrDefault(m => m.PosSn == sn);
|
|
|
|
|
- if(pos != null)
|
|
|
|
|
|
|
+ Dictionary<string, object> req = new Dictionary<string, object>();
|
|
|
|
|
+ string PosSn = data["sn"].ToString();
|
|
|
|
|
+ req.Add("PosSn", PosSn);
|
|
|
|
|
+ req.Add("BrandId", "12");
|
|
|
|
|
+ req.Add("Deposit", data["serviceFee"].ToString());
|
|
|
|
|
+ string UserId = "0";
|
|
|
|
|
+ if(requestMes.Contains("\"userId\""))
|
|
|
{
|
|
{
|
|
|
- Dictionary<string, object> req = new Dictionary<string, object>();
|
|
|
|
|
- req.Add("PosSnId", pos.Id);
|
|
|
|
|
- req.Add("BrandId", 12);
|
|
|
|
|
- req.Add("Deposit", serviceFee);
|
|
|
|
|
- RedisDbconn.Instance.AddList("ChangePosFeeQueue", Newtonsoft.Json.JsonConvert.SerializeObject(req));
|
|
|
|
|
- result.Add("code", 0);
|
|
|
|
|
- result.Add("status", "success");
|
|
|
|
|
- result.Add("msg", "成功");
|
|
|
|
|
|
|
+ UserId = data["userId"].ToString();
|
|
|
}
|
|
}
|
|
|
- else
|
|
|
|
|
|
|
+ req.Add("UserId", UserId);
|
|
|
|
|
+ string CallBackUrl = "";
|
|
|
|
|
+ if(requestMes.Contains("\"callBackUrl\""))
|
|
|
{
|
|
{
|
|
|
- result.Add("code", 1);
|
|
|
|
|
- result.Add("status", "fail");
|
|
|
|
|
- result.Add("msg", "机具号不存在");
|
|
|
|
|
|
|
+ CallBackUrl = data["callBackUrl"].ToString();
|
|
|
}
|
|
}
|
|
|
|
|
+ req.Add("CallBackUrl", CallBackUrl);
|
|
|
|
|
+ RedisDbconn.Instance.AddList("ChangePosFeeQueue", Newtonsoft.Json.JsonConvert.SerializeObject(req));
|
|
|
|
|
+
|
|
|
|
|
+ // WebCMSEntities db = new WebCMSEntities();
|
|
|
|
|
+ // PosMachinesTwo pos = db.PosMachinesTwo.FirstOrDefault(m => m.PosSn == sn);
|
|
|
|
|
+ // if(pos != null)
|
|
|
|
|
+ // {
|
|
|
|
|
+ // Dictionary<string, object> req = new Dictionary<string, object>();
|
|
|
|
|
+ // req.Add("PosSnId", pos.Id);
|
|
|
|
|
+ // req.Add("BrandId", 12);
|
|
|
|
|
+ // req.Add("Deposit", serviceFee);
|
|
|
|
|
+ // RedisDbconn.Instance.AddList("ChangePosFeeQueue", Newtonsoft.Json.JsonConvert.SerializeObject(req));
|
|
|
|
|
+ // result.Add("code", 0);
|
|
|
|
|
+ // result.Add("status", "success");
|
|
|
|
|
+ // result.Add("msg", "成功");
|
|
|
|
|
+ // }
|
|
|
|
|
+ // else
|
|
|
|
|
+ // {
|
|
|
|
|
+ // result.Add("code", 1);
|
|
|
|
|
+ // result.Add("status", "fail");
|
|
|
|
|
+ // result.Add("msg", "机具号不存在");
|
|
|
|
|
+ // }
|
|
|
}
|
|
}
|
|
|
catch(Exception ex)
|
|
catch(Exception ex)
|
|
|
{
|
|
{
|