Explorar el Código

通过sn获取商户详情接口增加DiviPercent字段

lcl hace 1 año
padre
commit
ec40fc2f0f
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  1. 2 0
      Areas/Api/Controllers/v1/MainServer/MerchantInfoController.cs

+ 2 - 0
Areas/Api/Controllers/v1/MainServer/MerchantInfoController.cs

@@ -768,10 +768,12 @@ namespace MySystem.Areas.Api.Controllers.v1
             string Sn = data["Sn"].ToString();
             MerchantQrCode code = MerchantQrCodeDbconn.Instance.Get(Sn) ?? new MerchantQrCode();
             MerchantInfo query = MerchantInfoDbconn.Instance.Get(code.MerchantId) ?? new MerchantInfo();
+            MerchantParamSet set = maindb.MerchantParamSet.FirstOrDefault(m => m.Id == code.MerchantId) ?? new MerchantParamSet();
             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);
             return Obj;
         }
         #endregion