|
@@ -126,26 +126,26 @@ namespace MySystem.Areas.Api.Controllers.v1
|
|
|
// SnNo = SnNo,
|
|
|
// }).Entity;
|
|
|
// maindb.SaveChanges();
|
|
|
- string DataId = query.Id + "_0";
|
|
|
- MachineForQrCode forQrCode = maindb.MachineForQrCode.FirstOrDefault(m => m.DataId == DataId);
|
|
|
- if (forQrCode == null)
|
|
|
- {
|
|
|
- forQrCode = maindb.MachineForQrCode.Add(new MachineForQrCode(){
|
|
|
- DataId = DataId,
|
|
|
- SnNo = SnNo,
|
|
|
- // MachineSnNo = MachineNo,
|
|
|
- BindDate = DateTime.Now,
|
|
|
- MerchantId = MerchantId,
|
|
|
- }).Entity;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- forQrCode.SnNo = SnNo;
|
|
|
- // forQrCode.MachineSnNo = MachineNo;
|
|
|
- forQrCode.BindDate = DateTime.Now;
|
|
|
- forQrCode.MerchantId = MerchantId;
|
|
|
- }
|
|
|
- maindb.SaveChanges();
|
|
|
+ // string DataId = query.Id + "_0";
|
|
|
+ // MachineForQrCode forQrCode = maindb.MachineForQrCode.FirstOrDefault(m => m.DataId == DataId);
|
|
|
+ // if (forQrCode == null)
|
|
|
+ // {
|
|
|
+ // forQrCode = maindb.MachineForQrCode.Add(new MachineForQrCode(){
|
|
|
+ // DataId = DataId,
|
|
|
+ // SnNo = SnNo,
|
|
|
+ // // MachineSnNo = MachineNo,
|
|
|
+ // BindDate = DateTime.Now,
|
|
|
+ // MerchantId = MerchantId,
|
|
|
+ // }).Entity;
|
|
|
+ // }
|
|
|
+ // else
|
|
|
+ // {
|
|
|
+ // forQrCode.SnNo = SnNo;
|
|
|
+ // // forQrCode.MachineSnNo = MachineNo;
|
|
|
+ // forQrCode.BindDate = DateTime.Now;
|
|
|
+ // forQrCode.MerchantId = MerchantId;
|
|
|
+ // }
|
|
|
+ // maindb.SaveChanges();
|
|
|
fields = new Dictionary<string, object>();
|
|
|
fields.Add("BuyUserId", merchant.UserId);
|
|
|
fields.Add("UserId", merchant.UserId);
|