|
@@ -70,7 +70,7 @@ namespace MySystem.Areas.Api.Controllers.v1
|
|
|
|
|
|
|
|
|
#region 商户-绑定收款码
|
|
|
- [Authorize]
|
|
|
+ // [Authorize]
|
|
|
public JsonResult Bind(string value)
|
|
|
{
|
|
|
value = DesDecrypt(value);
|
|
@@ -83,7 +83,18 @@ namespace MySystem.Areas.Api.Controllers.v1
|
|
|
JsonData data = JsonMapper.ToObject(value);
|
|
|
int MerchantId = int.Parse(function.CheckInt(data["MerchantId"].ToString())); //商户
|
|
|
string SnNo = data["SnNo"].ToString(); //Sn编号
|
|
|
- string MachineNo = data["Machine"].ToString(); //音箱码
|
|
|
+ // string MachineNo = data["Machine"].ToString(); //音箱码
|
|
|
+ if(SnNo.Length > 20)
|
|
|
+ {
|
|
|
+ SnNo = System.Web.HttpUtility.UrlDecode(SnNo);
|
|
|
+ if(!SnNo.EndsWith("="))
|
|
|
+ {
|
|
|
+ SnNo += "=";
|
|
|
+ }
|
|
|
+ SnNo = dbconn.Decrypt3DES(SnNo, "l2k0b2#3");
|
|
|
+ SnNo = SnNo.TrimEnd('\0');
|
|
|
+ SnNo = SnNo.Substring(0, SnNo.Length - 8);
|
|
|
+ }
|
|
|
Dictionary<string, object> Obj = new Dictionary<string, object>();
|
|
|
MerchantQrCode query = new MerchantQrCodeService().Query(SnNo);
|
|
|
PosMachinesTwo pos = new PosMachinesTwoService().Query(SnNo);
|
|
@@ -122,7 +133,7 @@ namespace MySystem.Areas.Api.Controllers.v1
|
|
|
forQrCode = maindb.MachineForQrCode.Add(new MachineForQrCode(){
|
|
|
DataId = DataId,
|
|
|
SnNo = SnNo,
|
|
|
- MachineSnNo = MachineNo,
|
|
|
+ // MachineSnNo = MachineNo,
|
|
|
BindDate = DateTime.Now,
|
|
|
MerchantId = MerchantId,
|
|
|
}).Entity;
|
|
@@ -130,7 +141,7 @@ namespace MySystem.Areas.Api.Controllers.v1
|
|
|
else
|
|
|
{
|
|
|
forQrCode.SnNo = SnNo;
|
|
|
- forQrCode.MachineSnNo = MachineNo;
|
|
|
+ // forQrCode.MachineSnNo = MachineNo;
|
|
|
forQrCode.BindDate = DateTime.Now;
|
|
|
forQrCode.MerchantId = MerchantId;
|
|
|
}
|