Explorar o código

获取商户信息bug

lcl hai 1 ano
pai
achega
28ac484cde
Modificáronse 1 ficheiros con 22 adicións e 8 borrados
  1. 22 8
      Areas/Api/Controllers/v1/MainServer/MerchantInfoController.cs

+ 22 - 8
Areas/Api/Controllers/v1/MainServer/MerchantInfoController.cs

@@ -822,14 +822,28 @@ namespace MySystem.Areas.Api.Controllers.v1
             else
             {
                 PosMachines machine = new PosMachinesService().Query(Sn);
-                MainModels2.MerchantInfo query = new MerchantInfo2Service().Query(machine.BindMerchantId);
-                MainModels2.MerchantParamSet set = new MerchantParamSet2Service().Query(machine.BindMerchantId);
-                Obj.Add("Name", query.Name); //名称
-                Obj.Add("Mobile", query.Mobile); //手机号
-                Obj.Add("IsAuth", query.IsAuth); //是否认证
-                Obj.Add("Logo", DefaultPic(query.Logo)); //Logo图片
-                Obj.Add("DiviPercent", set.IsAll == 1 ? 0M : set.DiviPercent);
-                Obj.Add("MinPayMoney", set.MinPayMoney);
+                if(machine.DeviceKind == "1")
+                {
+                    MerchantInfo query = new MerchantInfoService().Query(machine.BindMerchantId);
+                    MerchantParamSet set = new MerchantParamSetService().Query(machine.BindMerchantId);
+                    Obj.Add("Name", query.Name); //名称
+                    Obj.Add("Mobile", query.Mobile); //手机号
+                    Obj.Add("IsAuth", query.IsAuth); //是否认证
+                    Obj.Add("Logo", DefaultPic(query.Logo)); //Logo图片
+                    Obj.Add("DiviPercent", set.IsAll == 1 ? 0M : set.DiviPercent);
+                    Obj.Add("MinPayMoney", set.MinPayMoney);
+                }
+                else
+                {
+                    MainModels2.MerchantInfo query = new MerchantInfo2Service().Query(machine.BindMerchantId);
+                    MainModels2.MerchantParamSet set = new MerchantParamSet2Service().Query(machine.BindMerchantId);
+                    Obj.Add("Name", query.Name); //名称
+                    Obj.Add("Mobile", query.Mobile); //手机号
+                    Obj.Add("IsAuth", query.IsAuth); //是否认证
+                    Obj.Add("Logo", DefaultPic(query.Logo)); //Logo图片
+                    Obj.Add("DiviPercent", set.IsAll == 1 ? 0M : set.DiviPercent);
+                    Obj.Add("MinPayMoney", set.MinPayMoney);
+                }
             }
             return Obj;
         }