1
0

7 Revīzijas 1ae4e3550f ... be89511113

Autors SHA1 Ziņojums Datums
  DuGuYang be89511113 限制补全 6 mēneši atpakaļ
  DuGuYang 1a6f488c8e 商户进件去重添加银联BrandId区分 6 mēneši atpakaļ
  DuGuYang bf5f66a9f3 调整参数 6 mēneši atpakaļ
  DuGuYang c97bc31620 添加参数 6 mēneši atpakaļ
  DuGuYang 5603d401da 补全 6 mēneši atpakaļ
  DuGuYang cc145b4a8d 调整,添加返回字段:BrandId品牌(0 银联 1 好哒) 6 mēneši atpakaļ
  DuGuYang 65d2c3aa03 完成,待测试 6 mēneši atpakaļ

+ 2 - 2
Areas/Api/Controllers/Main/ConsumerOrdersController.cs

@@ -143,7 +143,7 @@ namespace MySystem.Areas.Api.Controllers.v1
             ConsumerOrderForNoUtil.AddConsumerOrderForNo(OrderNo, int.Parse(infos.Data.ToString()));
             if (PayMode == 1)
             {
-                string backString = HaoDaHelper.Instance.Alipay(merchantAdd.OutMchtNo, merchantAdd.StoreNo, OrderNo, PayMoney, SpHost + "/api/alipay/hdnotice", openid, function.get_Random(4), ledgerModel);
+                string backString = HaoDaHelper.Instance.Alipay(merchantAdd.OutMchtNo, merchantAdd.StoreNo, OrderNo, PayMoney, SpHost + "/api/alipay/hdnotice", openid, function.get_Random(4), ledgerModel, merchant.BrandId);
                 JsonData obj = JsonMapper.ToObject(backString);
                 if (obj["resultCode"].ToString() == "1")
                 {
@@ -164,7 +164,7 @@ namespace MySystem.Areas.Api.Controllers.v1
             }
             else if (PayMode == 2)
             {
-                var dic = JsonMapper.ToObject(HaoDaHelper.Instance.WeChatPay(merchantAdd.OutMchtNo, merchantAdd.StoreNo, OrderNo, PayMoney, SpHost + "/api/wechat/hdnotice", openid, function.get_Random(4), AppConfig.WeChat.AppId, "MINI_PROGRAM", ledgerModel));
+                var dic = JsonMapper.ToObject(HaoDaHelper.Instance.WeChatPay(merchantAdd.OutMchtNo, merchantAdd.StoreNo, OrderNo, PayMoney, SpHost + "/api/wechat/hdnotice", openid, function.get_Random(4), AppConfig.WeChat.AppId, "MINI_PROGRAM", ledgerModel, merchant.BrandId));
                 if (dic["resultCode"].ToString() == "1")
                 {
                     Obj.Add("appId", dic["payInfo"]["appId"].ToString()); //微信小程序appid

+ 12 - 4
Areas/Api/Controllers/Main/MerchantAddInfoController.cs

@@ -101,6 +101,13 @@ namespace MySystem.Areas.Api.Controllers.v1
 
             int PlaceType = int.Parse(function.CheckInt(data.getItem("PlaceType").ToString())); // 小微商户经营场所类型(0 固定场所 1 流动动摊贩)
 
+            //添加银联进件品牌选择
+            int BrandId = 0;
+            if (!string.IsNullOrEmpty(data.getItem("BrandId").ToString()))
+            {
+                BrandId = int.Parse(function.CheckInt(data.getItem("BrandId").ToString())); // 品牌(0 银联 1 好哒)
+            }
+
 
             // string ContactName = data["ContactName"].ToString(); //管理员姓名
             // string ContactIdNumber = data["ContactIdNumber"].ToString(); //管理员身份证件号码
@@ -198,7 +205,7 @@ namespace MySystem.Areas.Api.Controllers.v1
                 if (SubjectType == "SUBJECT_TYPE_SMALL")
                 {
                     // CertMerchantName += function.MD5_16(Guid.NewGuid().ToString("N"));
-                    var check = MerchantAddInfoService.Query(" CertMerchantName like '" + CertMerchantName + "%' and Status<1 and QueryCount<1");
+                    var check = MerchantAddInfoService.Query(" CertMerchantName like '" + CertMerchantName + "%' and Status<1 and QueryCount<1 and BrandId=" + BrandId);
                     if (check.Id > 0)
                     {
                         return new AppResultJson() { Status = "-1", Info = "该商户已暂存或进件,勿重复进件!", Data = Obj };
@@ -207,7 +214,7 @@ namespace MySystem.Areas.Api.Controllers.v1
                 }
                 else
                 {
-                    var query = MerchantAddInfoService.Query(" CertMerchantName='" + CertMerchantName + "'");
+                    var query = MerchantAddInfoService.Query(" CertMerchantName='" + CertMerchantName + "' and BrandId=" + BrandId);
                     if (query.Id == 0)
                     {
                         Dictionary<string, object> Fiel = new Dictionary<string, object>();
@@ -243,7 +250,7 @@ namespace MySystem.Areas.Api.Controllers.v1
             // MerchantAddInfoUtil.EditMerchantAddInfo(query.Id, ContactName, ContactIdNumber, MobilePhone, ContactEmail, SubjectType, LicenseCopy, LicenseNumber, CertLegalPerson, CertMerchantName, CertLegalPerson, ServicePhone, BizStoreName, BizAddressCode, BizStoreAddress, StoreEntrancePic, IndoorPic, QualificationType, SettlementId, BankAccountType, AccountName, AccountBank, BankAddressCode, BankName, BankBranchId, AccountNumber, IdCardCopy, IdCardNational, IdCardName, IdCardNumber, IdCardAddress, CardPeriodBegin, CardPeriodEnd, MerchantShortname, Qualifications, ActivitiesId, ActivitiesRate, AlipayAccount, AlipayMccCode, ChannelKind, SalesScenesType, OpenAccountLicenses, RentAgreement, OperatorMcht, AgentProtocol, SignaturePicture, Support, CheckstandImg, ProductImg, Agreement, TaxImage, OrganizationCopy, IndustryLicense1, FaceRecognition, Extra1, BankCard, PersonWithIdCard, TakeCreditCard, MchtNo);
 
             Fields.Add("LicenseCopy", LicenseCopy); //- 营业执照
-            if(!Fields.ContainsKey("CertMerchantName")) Fields.Add("CertMerchantName", CertMerchantName); //- 商户名称
+            if (!Fields.ContainsKey("CertMerchantName")) Fields.Add("CertMerchantName", CertMerchantName); //- 商户名称
             Fields.Add("LicenseNumber", LicenseNumber); //- 商户信用代码
             Fields.Add("SubjectType", SubjectType); //- 主体类型
             var LicenceType = "";
@@ -315,7 +322,8 @@ namespace MySystem.Areas.Api.Controllers.v1
             Fields.Add("industryLicense1", IndustryLicense1); //- 特殊资质照片组
             Fields.Add("ResserveMobile", ResserveMobile); //银行预留手机号
             Fields.Add("PlaceType", PlaceType); // 小微商户经营场所类型(0 固定场所 1 流动动摊贩)
-            MerchantAddInfoId = (int)MerchantInfoUtil.EditMerchantInfo(MerchantAddInfoId, UserId, CertMerchantName, MobilePhone, BizAddressCode, BizStoreAddress, BindStatus).Data;
+            Fields.Add("BrandId", BrandId); // 品牌(0 银联 1 好哒)
+            MerchantAddInfoId = (int)MerchantInfoUtil.EditMerchantInfo(MerchantAddInfoId, UserId, CertMerchantName, MobilePhone, BizAddressCode, BizStoreAddress, BindStatus, BrandId).Data;
             MerchantAddInfoUtil.EditMerchantAddInfo(Fields, MerchantAddInfoId);
             if (Finish == 1)
             {

+ 23 - 0
Areas/Api/Controllers/Main/MerchantInfoController.cs

@@ -40,9 +40,15 @@ namespace MySystem.Areas.Api.Controllers.v1
             string SearchKey = data.getItem("SearchKey").ToString();
             int Status = int.Parse(function.CheckInt(data.getItem("Status").ToString()));
             int UserId = int.Parse(function.CheckInt(data.getItem("UserId").ToString())); //所属创客
+            int BrandId = 0; //品牌(0 银联 1 好哒)
             int PageSize = int.Parse(function.CheckInt(data.getItem("PageSize").ToString()));
             int PageNum = int.Parse(function.CheckInt(data.getItem("PageNum").ToString()));
             StringBuilder condition = new StringBuilder();
+            if (!string.IsNullOrEmpty(data.getItem("BrandId").ToString()))
+            {
+                BrandId = int.Parse(function.CheckInt(data.getItem("BrandId").ToString())); //品牌(0 银联 1 好哒)
+            }
+            condition.Condition("BrandId", BrandId);
             condition.Condition("UserId", UserId);
             condition.Condition("Sort", 1);
             if (Status > 0)
@@ -65,6 +71,7 @@ namespace MySystem.Areas.Api.Controllers.v1
                 Dictionary<string, object> curData = new Dictionary<string, object>();
                 curData.Add("Name", subdata["Name"]); //名称
                 curData.Add("Id", subdata["Id"]); //Id
+                curData.Add("BrandId", subdata["BrandId"]); //品牌(0 银联 1 好哒)
                 curData.Add("CreateDate", subdata["CreateDate"]); //CreateDate
                 curData.Add("Status", subdata["Status"]); //Status
                 curData.Add("SubjectType", AddInfo.SubjectType); //主体类型
@@ -253,11 +260,18 @@ namespace MySystem.Areas.Api.Controllers.v1
             int Kind = int.Parse(function.CheckInt(data.getItem("Kind").ToString()));
             string TradeSort = data.getItem("TradeSort").ToString(); //排序
             string DateSort = data.getItem("DateSort").ToString(); //排序
+            int BrandId = 0; //品牌(0 银联 1 好哒)
             int PageSize = int.Parse(function.CheckInt(data.getItem("PageSize").ToString()));
             int PageNum = int.Parse(function.CheckInt(data.getItem("PageNum").ToString()));
             List<Dictionary<string, object>> dataList = new List<Dictionary<string, object>>();
             IQueryable<MerchantInfo> query = maindb.MerchantInfo.Where(m => m.UserId == UserId && (m.Status == 2 || m.QueryCount == 2));
             DateTime today = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd") + " 00:00:00");
+
+            if (!string.IsNullOrEmpty(data.getItem("BrandId").ToString()))
+            {
+                BrandId = int.Parse(function.CheckInt(data.getItem("BrandId").ToString())); //品牌(0 银联 1 好哒)
+            }
+            query = query.Where(m => m.BrandId == BrandId);
             if (!string.IsNullOrEmpty(SearchKey))
             {
                 query = query.Where(m => m.Name.Contains(SearchKey));
@@ -325,6 +339,7 @@ namespace MySystem.Areas.Api.Controllers.v1
                 curData.Add("MerchantName", item.Name); //商户姓名
                 curData.Add("KqRegTime", item.CreateDate == null ? "" : item.CreateDate.Value.ToString("yyyy-MM-dd")); //渠道注册时间
                 curData.Add("Id", item.Id); //Id
+                curData.Add("BrandId", item.BrandId); //品牌(0 银联 1 好哒)
                 curData.Add("TotalAmount", item.TotalAmount.ToString("f2")); //交易额
                 curData.Add("TodayTrade", MerchantTradeStat.Instance.Amount(item.Id, DateTime.Now.ToString("yyyyMMdd")).ToString("f2")); //今日交易额
                 curData.Add("TradeCount", item.TotalConsumeCount); //交易笔数
@@ -643,10 +658,17 @@ namespace MySystem.Areas.Api.Controllers.v1
         {
             JsonData data = JsonMapper.ToObject(value);
             int UserId = int.Parse(function.CheckInt(data["UserId"].ToString())); //所属创客
+            int BrandId = 0; //品牌(0 银联 1 好哒)
             int PageSize = int.Parse(function.CheckInt(data["PageSize"].ToString()));
             int PageNum = int.Parse(function.CheckInt(data["PageNum"].ToString()));
             List<Dictionary<string, object>> dataList = new List<Dictionary<string, object>>();
             IQueryable<MerchantInfo> query = maindb.MerchantInfo.Where(m => m.UserId == UserId && m.Sort == 0);
+
+            if (!string.IsNullOrEmpty(data["BrandId"].ToString()))
+            {
+                BrandId = int.Parse(function.CheckInt(data["BrandId"].ToString())); //品牌(0 银联 1 好哒)
+            }
+            query = query.Where(m => m.BrandId == BrandId);
             if (PageNum == 1)
             {
                 query = query.Take(PageSize);
@@ -661,6 +683,7 @@ namespace MySystem.Areas.Api.Controllers.v1
                 Dictionary<string, object> curData = new Dictionary<string, object>();
                 curData.Add("Name", subdata.Name); //名称
                 curData.Add("Id", subdata.Id); //Id
+                curData.Add("BrandId", subdata.BrandId); //品牌(0 银联 1 好哒)
                 curData.Add("CreateDate", subdata.CreateDate == null ? "" : subdata.CreateDate.Value.ToString("yyyy-MM-dd HH:mm:ss")); //CreateDate
                 curData.Add("SubjectType", 1); //主体类型
                 dataList.Add(curData);

+ 70 - 0
Areas/Api/Controllers/TestController.cs

@@ -0,0 +1,70 @@
+/*
+ * 测试
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.AspNetCore.Http;
+using Microsoft.Extensions.Logging;
+using Microsoft.Extensions.Options;
+using Microsoft.AspNetCore.Authorization;
+using MySystem.Service.Main;
+using System.Web;
+using MySystem.Models.Main;
+using LitJson;
+using Library;
+using System.Text.RegularExpressions;
+namespace MySystem.Areas.Api.Controllers.v1
+{
+    [Area("Api")]
+    [Route("/v1/kxsmain/[controller]/[action]")]
+    public class TestController : BaseController
+    {
+        public TestController(IHttpContextAccessor accessor) : base(accessor)
+        {
+        }
+
+        #region 测试方法
+
+        /// <summary>
+        /// 产品库列表
+        /// </summary>
+        /// <returns></returns>
+        // [HttpPost]
+        // [Authorize]
+        [Route("/main/test/all")]
+        public JsonResult List(string value)
+        {
+            value = PublicFunction.DesDecrypt(value);
+            JsonData data = JsonMapper.ToObject(value);
+            // SystemToolUtil.CheckMachineDo("ceshi", "K00132726", "00005702230118388360", 1, 0);
+            // var userInfo = UsersService.Query(598);
+            // var OrderCount = OrdersService.Count(" UserId=" + userInfo.Id + " and PayStatus=1 and TotalPrice=600");
+            // string[] ParentNavList = userInfo.ParentNav.Trim(',').Replace(",,", ",").Split(',');
+            // var topUserInfo = new Users();
+            // var topUserInfo1 = new Users();
+            // if (ParentNavList.Length > 1)
+            // {
+            //     topUserInfo = BaseClass.GetTopUserInfo(userInfo.ParentNav, 1);
+            //     topUserInfo1 = UsersService.Query(int.Parse(ParentNavList[1]));
+            // }
+            // else
+            // {
+            //     topUserInfo = BaseClass.GetTopUserInfo(userInfo.ParentNav, 0);
+            //     topUserInfo1 = UsersService.Query(int.Parse(ParentNavList[0]));
+            // }
+            // var TopUserInfo = topUserInfo.MakerCode + " " + topUserInfo.RealName;
+            // var TopUserInfo1 = topUserInfo1.MakerCode + " " + topUserInfo1.RealName;
+            // BaseClass.AddAccountRecord(598, 1, 100, "+BalanceAmount,+TotalAmount", 0);
+            var CertMerchantName = "四川睿行文化传播有限公司";
+            var BrandId = 1;
+            var check = MerchantAddInfoService.Query(" CertMerchantName like '" + CertMerchantName + "%' and Status<1 and QueryCount<1 and BrandId=" + BrandId);
+            return Json(new AppResultJson() { Status = "1", Info = "" });
+        }
+
+        #endregion
+
+    }
+}

+ 20 - 0
Models/Main/ChangeSettlementCardAuditRecord.cs

@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Main
+{
+    public partial class ChangeSettlementCardAuditRecord
+    {
+        public int Id { get; set; }
+        public int Sort { get; set; }
+        public int Status { get; set; }
+        public int Version { get; set; }
+        public DateTime? CreateDate { get; set; }
+        public DateTime? UpdateDate { get; set; }
+        public int AuditStatus { get; set; }
+        public string MchtNo { get; set; }
+        public int MerchantId { get; set; }
+        public int TaskId { get; set; }
+        public string Remark { get; set; }
+    }
+}

+ 1 - 0
Models/Main/MerchantAddInfo.cs

@@ -149,5 +149,6 @@ namespace MySystem.Models.Main
         public ulong HdBindWeChat { get; set; }
         public string MerchantType { get; set; }
         public int PlaceType { get; set; }
+        public int BrandId { get; set; }
     }
 }

+ 37 - 0
Models/Main/MerchantChangeSettlementCardRecord.cs

@@ -0,0 +1,37 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Main
+{
+    public partial class MerchantChangeSettlementCardRecord
+    {
+        public int Id { get; set; }
+        public int Sort { get; set; }
+        public int Status { get; set; }
+        public int Version { get; set; }
+        public DateTime? CreateDate { get; set; }
+        public DateTime? UpdateDate { get; set; }
+        public string HoldAgentProtocol { get; set; }
+        public string AgentIdCardBack { get; set; }
+        public string AgentIdCardFront { get; set; }
+        public string AgentProtocol { get; set; }
+        public string PriLicAgreement { get; set; }
+        public string OpenAccountLicenses { get; set; }
+        public string BankCard { get; set; }
+        public int TaskId { get; set; }
+        public DateTime? AgentCardEndDate { get; set; }
+        public DateTime? AgentCardStartDate { get; set; }
+        public string IdCard { get; set; }
+        public string AcctZbankCode { get; set; }
+        public int AlterType { get; set; }
+        public string ZbankNo { get; set; }
+        public string AccountNo { get; set; }
+        public string AccountName { get; set; }
+        public string MchtNo { get; set; }
+        public string Operator { get; set; }
+        public int AccountType { get; set; }
+        public string Remark { get; set; }
+        public string MerchantName { get; set; }
+        public int MerchantId { get; set; }
+    }
+}

+ 1 - 0
Models/Main/MerchantInfo.cs

@@ -55,5 +55,6 @@ namespace MySystem.Models.Main
         public int Popularity { get; set; }
         public decimal Latitude { get; set; }
         public decimal Longitude { get; set; }
+        public int BrandId { get; set; }
     }
 }

+ 210 - 0
Models/Main/WebCMSEntities.cs

@@ -42,6 +42,7 @@ namespace MySystem.Models.Main
         public virtual DbSet<BusinessScope> BusinessScope { get; set; }
         public virtual DbSet<BusinessScopeType> BusinessScopeType { get; set; }
         public virtual DbSet<BusinessTradeSummary> BusinessTradeSummary { get; set; }
+        public virtual DbSet<ChangeSettlementCardAuditRecord> ChangeSettlementCardAuditRecord { get; set; }
         public virtual DbSet<Col> Col { get; set; }
         public virtual DbSet<ConsumerOpenIds> ConsumerOpenIds { get; set; }
         public virtual DbSet<ConsumerOrderForNo> ConsumerOrderForNo { get; set; }
@@ -92,6 +93,7 @@ namespace MySystem.Models.Main
         public virtual DbSet<MerchantAdmin> MerchantAdmin { get; set; }
         public virtual DbSet<MerchantAmountSummay> MerchantAmountSummay { get; set; }
         public virtual DbSet<MerchantAuth> MerchantAuth { get; set; }
+        public virtual DbSet<MerchantChangeSettlementCardRecord> MerchantChangeSettlementCardRecord { get; set; }
         public virtual DbSet<MerchantClass> MerchantClass { get; set; }
         public virtual DbSet<MerchantCol> MerchantCol { get; set; }
         public virtual DbSet<MerchantComment> MerchantComment { get; set; }
@@ -2290,6 +2292,57 @@ namespace MySystem.Models.Main
                 entity.Property(e => e.VipFlag).HasColumnType("int(11)");
             });
 
+            modelBuilder.Entity<ChangeSettlementCardAuditRecord>(entity =>
+            {
+                entity.HasComment("商户修改结算卡审核表");
+
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.AuditStatus)
+                    .HasColumnType("int(11)")
+                    .HasComment("审核状态");
+
+                entity.Property(e => e.CreateDate)
+                    .HasColumnType("datetime")
+                    .HasComment("创建时间");
+
+                entity.Property(e => e.MchtNo)
+                    .HasColumnType("varchar(50)")
+                    .HasComment("收款商户号")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.MerchantId)
+                    .HasColumnType("int(11)")
+                    .HasComment("申请商户Id");
+
+                entity.Property(e => e.Remark)
+                    .HasColumnType("varchar(200)")
+                    .HasComment("备注")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Sort)
+                    .HasColumnType("int(11)")
+                    .HasComment("排序序号");
+
+                entity.Property(e => e.Status)
+                    .HasColumnType("int(11)")
+                    .HasComment("状态");
+
+                entity.Property(e => e.TaskId)
+                    .HasColumnType("int(11)")
+                    .HasComment("申请任务Id");
+
+                entity.Property(e => e.UpdateDate)
+                    .HasColumnType("datetime")
+                    .HasComment("修改时间");
+
+                entity.Property(e => e.Version)
+                    .HasColumnType("int(11)")
+                    .HasComment("版本号");
+            });
+
             modelBuilder.Entity<Col>(entity =>
             {
                 entity.Property(e => e.Id).HasColumnType("int(11)");
@@ -5549,6 +5602,10 @@ namespace MySystem.Models.Main
                     .HasCharSet("utf8")
                     .HasCollation("utf8_general_ci");
 
+                entity.Property(e => e.BrandId)
+                    .HasColumnType("int(11)")
+                    .HasComment("品牌");
+
                 entity.Property(e => e.BusinessCode)
                     .HasColumnType("varchar(50)")
                     .HasCharSet("utf8")
@@ -6353,6 +6410,155 @@ namespace MySystem.Models.Main
                 entity.Property(e => e.Version).HasColumnType("int(11)");
             });
 
+            modelBuilder.Entity<MerchantChangeSettlementCardRecord>(entity =>
+            {
+                entity.HasComment("商户修改结算卡记录表");
+
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.AccountName)
+                    .HasColumnType("varchar(50)")
+                    .HasComment("开户名")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.AccountNo)
+                    .HasColumnType("varchar(50)")
+                    .HasComment("卡号")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.AccountType)
+                    .HasColumnType("int(11)")
+                    .HasComment("账户类型");
+
+                entity.Property(e => e.AcctZbankCode)
+                    .HasColumnName("AcctZBankCode")
+                    .HasColumnType("varchar(50)")
+                    .HasComment("开户支行地区码")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.AgentCardEndDate)
+                    .HasColumnType("datetime")
+                    .HasComment("非法人身份证有效结束时间");
+
+                entity.Property(e => e.AgentCardStartDate)
+                    .HasColumnType("datetime")
+                    .HasComment("非法人身份证有效开始时间");
+
+                entity.Property(e => e.AgentIdCardBack)
+                    .HasColumnType("varchar(200)")
+                    .HasComment("被委托人身份证国徽面")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.AgentIdCardFront)
+                    .HasColumnType("varchar(200)")
+                    .HasComment("被委托人身份证人像面")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.AgentProtocol)
+                    .HasColumnType("varchar(200)")
+                    .HasComment("委托结算授权书")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.AlterType)
+                    .HasColumnType("int(11)")
+                    .HasComment("结算类型");
+
+                entity.Property(e => e.BankCard)
+                    .HasColumnType("varchar(200)")
+                    .HasComment("银行卡正面照片")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.CreateDate)
+                    .HasColumnType("datetime")
+                    .HasComment("创建时间");
+
+                entity.Property(e => e.HoldAgentProtocol)
+                    .HasColumnType("varchar(200)")
+                    .HasComment("法人手持委托结算授权书")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.IdCard)
+                    .HasColumnType("varchar(18)")
+                    .HasComment("非法人身份证号")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.MchtNo)
+                    .HasColumnType("varchar(50)")
+                    .HasComment("商户号")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.MerchantId)
+                    .HasColumnType("int(11)")
+                    .HasComment("商户Id");
+
+                entity.Property(e => e.MerchantName)
+                    .HasColumnType("varchar(200)")
+                    .HasComment("商户名称")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.OpenAccountLicenses)
+                    .HasColumnType("varchar(200)")
+                    .HasComment("开户许可证")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Operator)
+                    .HasColumnType("varchar(50)")
+                    .HasComment("操作人")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.PriLicAgreement)
+                    .HasColumnType("varchar(200)")
+                    .HasComment("企业法人对私授权书")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Remark)
+                    .HasColumnType("varchar(200)")
+                    .HasComment("审核备注")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Sort)
+                    .HasColumnType("int(11)")
+                    .HasComment("排序序号");
+
+                entity.Property(e => e.Status)
+                    .HasColumnType("int(11)")
+                    .HasComment("状态");
+
+                entity.Property(e => e.TaskId)
+                    .HasColumnType("int(11)")
+                    .HasComment("任务Id");
+
+                entity.Property(e => e.UpdateDate)
+                    .HasColumnType("datetime")
+                    .HasComment("修改时间");
+
+                entity.Property(e => e.Version)
+                    .HasColumnType("int(11)")
+                    .HasComment("版本号");
+
+                entity.Property(e => e.ZbankNo)
+                    .HasColumnName("ZBankNo")
+                    .HasColumnType("varchar(50)")
+                    .HasComment("支行号")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+            });
+
             modelBuilder.Entity<MerchantClass>(entity =>
             {
                 entity.Property(e => e.Id).HasColumnType("int(11)");
@@ -6961,6 +7167,10 @@ namespace MySystem.Models.Main
 
                 entity.Property(e => e.BindStatus).HasColumnType("int(11)");
 
+                entity.Property(e => e.BrandId)
+                    .HasColumnType("int(11)")
+                    .HasComment("品牌");
+
                 entity.Property(e => e.BriefIntroduction)
                     .HasColumnType("longtext")
                     .HasComment("简介")

+ 2 - 0
Service/Main/MerchantAddInfoService.cs

@@ -32,6 +32,7 @@ namespace MySystem.Service.Main
             fields.Add("CreateDate"); //添加时间
             fields.Add("Status"); //状态
             fields.Add("ApplymentState"); //申请单状态
+            fields.Add("BrandId"); //品牌(0 银联 1 好哒)
 
             Dictionary<string, object> obj = new DbService(AppConfig.Base.mainTables, _conn).IndexData("MerchantAddInfo", relationData, orderBy, page, limit, condition, fields);
             List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
@@ -45,6 +46,7 @@ namespace MySystem.Service.Main
             fields.Add("CreateDate"); //添加时间
             fields.Add("Status"); //状态
             fields.Add("ApplymentState"); //申请单状态
+            fields.Add("BrandId"); //品牌(0 银联 1 好哒)
 
             Dictionary<string, object> obj = new DbService(AppConfig.Base.mainTables, _conn).IndexData("MerchantAddInfo", relationData, orderBy, page, limit, condition, fields);
             List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;

+ 2 - 0
Service/Main/MerchantInfoService.cs

@@ -45,6 +45,7 @@ namespace MySystem.Service.Main
             fields.Add("TotalConsumeCount"); //累计消费次数
             fields.Add("LastConsumeDate"); //最后消费时间
             fields.Add("UserId"); //所属创客
+            fields.Add("BrandId"); //品牌(0 银联 1 好哒)
             fields.Add("ActivationStatus"); //激活状态
             fields.Add("ActivationDate"); //激活时间
 
@@ -73,6 +74,7 @@ namespace MySystem.Service.Main
             fields.Add("TotalConsumeCount"); //累计消费次数
             fields.Add("LastConsumeDate"); //最后消费时间
             fields.Add("UserId"); //所属创客
+            fields.Add("BrandId"); //品牌(0 银联 1 好哒)
             fields.Add("ActivationStatus"); //激活状态
             fields.Add("ActivationDate"); //激活时间
 

+ 28 - 7
Util/HaoDa/HaoDaHelper.cs

@@ -199,8 +199,11 @@ namespace MySystem
             return sign;
         }
 
-        public bool VerifySign(string toSignStr, string signStr)
+        public bool VerifySign(string toSignStr, string signStr, int BrandId = 0)
         {
+            var BoxPublicKey = HaodaParam.BoxPublicKey;
+            if (BrandId == 1) BoxPublicKey = HaodaUnionParam.BoxPublicKey;
+
             byte[] toSignByte = Encoding.Default.GetBytes(toSignStr);
             byte[] signByte = Convert.FromBase64String(signStr);
             var toKey = Convert.FromBase64String(BoxPublicKey);
@@ -216,8 +219,11 @@ namespace MySystem
             }
         }
 
-        public string SignData(string toSignStr)
+        public string SignData(string toSignStr, int BrandId = 0)
         {
+            var BoxPublicKey = HaodaParam.BoxPublicKey;
+            if (BrandId == 1) BoxPublicKey = HaodaUnionParam.BoxPublicKey;
+
             byte[] toSignByte = Encoding.UTF8.GetBytes(toSignStr);
             var toKey = Convert.FromBase64String(BoxPublicKey);
             var rsaroot = RSA.Create();
@@ -305,8 +311,11 @@ namespace MySystem
         /// <param name="subAppIdType">对应的类型,默认为公众号, SUBSCRIPTION: 公众号 MINI_PROGRAM: 小程序</param>
         /// <param name="ledgerModel">分账类型:1不分账 2分账,注意只有开通了分账才能传这个字段</param>
         /// <returns></returns>
-        public string WeChatPay(string mchtNo, string storeNo, string outOrderNo, decimal transAmount, string callbackUrl, string subOpenId, string confirmCode, string subAppId, string subAppIdType, string ledgerModel)
+        public string WeChatPay(string mchtNo, string storeNo, string outOrderNo, decimal transAmount, string callbackUrl, string subOpenId, string confirmCode, string subAppId, string subAppIdType, string ledgerModel, int BrandId = 0)
         {
+            var BoxRequestUrl = HaodaParam.BoxRequestUrl;
+            if (BrandId == 1) BoxRequestUrl = HaodaUnionParam.BoxRequestUrl;
+
             function.WriteLog(DateTime.Now.ToString(), "好哒微信公众号和小程序支付");
             Dictionary<string, object> reqdic = new Dictionary<string, object>();
             reqdic.Add("mchtNo", mchtNo); //盒子的商户编号
@@ -346,8 +355,11 @@ namespace MySystem
         /// <param name="confirmCode">支付确认码,由4位纯数字组成,每次请求时随机生成</param>
         /// <param name="ledgerModel">分账类型:1不分账 2分账,注意只有开通了分账才能传这个字段</param>
         /// <returns></returns>
-        public string Alipay(string mchtNo, string storeNo, string outOrderNo, decimal transAmount, string callbackUrl, string subOpenId, string confirmCode, string ledgerModel)
+        public string Alipay(string mchtNo, string storeNo, string outOrderNo, decimal transAmount, string callbackUrl, string subOpenId, string confirmCode, string ledgerModel, int BrandId = 0)
         {
+            var BoxRequestUrl = HaodaParam.BoxRequestUrl;
+            if (BrandId == 1) BoxRequestUrl = HaodaUnionParam.BoxRequestUrl;
+
             function.WriteLog(DateTime.Now.ToString(), "好哒支付宝服务窗支付");
             Dictionary<string, object> reqdic = new Dictionary<string, object>();
             reqdic.Add("mchtNo", mchtNo); //盒子的商户编号
@@ -385,8 +397,11 @@ namespace MySystem
         /// <param name="page">当前页数,默认1</param>
         /// <param name="rows">每页大小,默认10,最大500</param>
         /// <returns></returns>
-        public string CardInComeRecord(string mchtNo, string startTime, string endTime, string tradeMchtNo, string cardNo, string settleStatus, string page, string rows)
+        public string CardInComeRecord(string mchtNo, string startTime, string endTime, string tradeMchtNo, string cardNo, string settleStatus, string page, string rows, int BrandId = 0)
         {
+            var BoxRequestUrl = HaodaParam.BoxRequestUrl;
+            if (BrandId == 1) BoxRequestUrl = HaodaUnionParam.BoxRequestUrl;
+
             function.WriteLog(DateTime.Now.ToString(), "好哒到账记录查询");
             Dictionary<string, object> reqdic = new Dictionary<string, object>();
             reqdic.Add("mchtNo", mchtNo); //商户号
@@ -417,8 +432,11 @@ namespace MySystem
         /// <param name="mchtNo">商户号</param>
         /// <param name="id">id</param>
         /// <returns></returns>
-        public string CardInComeDetail(string mchtNo, string id)
+        public string CardInComeDetail(string mchtNo, string id, int BrandId = 0)
         {
+            var BoxRequestUrl = HaodaParam.BoxRequestUrl;
+            if (BrandId == 1) BoxRequestUrl = HaodaUnionParam.BoxRequestUrl;
+
             function.WriteLog(DateTime.Now.ToString(), "好哒到账记录详情");
             Dictionary<string, object> reqdic = new Dictionary<string, object>();
             reqdic.Add("mchtNo", mchtNo); //商户号
@@ -438,8 +456,11 @@ namespace MySystem
         }
 
 
-        public Dictionary<string, string> GetHeader(string req)
+        public Dictionary<string, string> GetHeader(string req, int BrandId = 0)
         {
+            var BoxAppSecret = HaodaParam.BoxAppSecret;
+            if (BrandId == 1) BoxAppSecret = HaodaUnionParam.BoxAppSecret;
+
             Dictionary<string, string> headdic = new Dictionary<string, string>();
             string timestamp = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
             // headdic.Add("appid", BoxAppId);//开发者id

+ 16 - 0
Util/HaoDa/HaodaParam.cs

@@ -0,0 +1,16 @@
+using System;
+using System.Collections.Generic;
+namespace MySystem
+{
+    /// <summary>
+    /// 好哒参数
+    /// </summary>
+    public static class HaodaParam
+    {
+        public static string BoxRequestUrl = "https://openapi.iboxpay.com";
+        public static string BoxAppId = "AP8322645764893728768";
+        public static string BoxAppSecret = "je1TElprp3jzWETsG3FcWqtmpreEHqZS";
+        public static string BoxPublicKey = "";
+        public static string BrhCode = "";
+    }
+}

+ 16 - 0
Util/HaoDa/HaodaUnionParam.cs

@@ -0,0 +1,16 @@
+using System;
+using System.Collections.Generic;
+namespace MySystem
+{
+    /// <summary>
+    /// 银联参数
+    /// </summary>
+    public static class HaodaUnionParam
+    {
+        public static string BoxRequestUrl = "https://openapi.iboxpay.com";
+        public static string BoxAppId = "AP7175619323825451008";
+        public static string BoxAppSecret = "hUfR53gdjyfiZTBR5bILanMqRD1dXD7y";
+        public static string BoxPublicKey = "";
+        public static string BrhCode = "030145";
+    }
+}

+ 1 - 0
Util/Main/MerchantAddInfoUtil.cs

@@ -185,6 +185,7 @@ namespace MySystem
         {
             var query = MerchantAddInfoService.Query(Id);
             Dictionary<string, object> Obj = new Dictionary<string, object>();
+            Obj.Add("BrandId", query.BrandId); //品牌(0 银联 1 好哒)
             Obj.Add("Kind", 2); //通道(1 直连 2 银联)
             Obj.Add("ContactName", query.ContactName); //管理员姓名
             Obj.Add("ContactIdNumber", query.ContactIdNumber); //管理员身份证件号码

+ 3 - 1
Util/Main/MerchantInfoUtil.cs

@@ -19,8 +19,9 @@ namespace MySystem
         /// <param name="Mobile">联系手机</param>
         /// <param name="Areas">门店省市编码</param>
         /// <param name="Address">门店地址</param>
+        /// <param name="BrandId">品牌(0 银联 1 好哒)</param>
         /// <returns></returns>
-        public static AppResultJson EditMerchantInfo(int Id, int UserId, string Name, string Mobile, string Areas, string Address, int BindStatus)
+        public static AppResultJson EditMerchantInfo(int Id, int UserId, string Name, string Mobile, string Areas, string Address, int BindStatus, int BrandId = 0)
         {
             Dictionary<string, object> Fields = new Dictionary<string, object>();
             Fields.Add("UserId", UserId);
@@ -29,6 +30,7 @@ namespace MySystem
             Fields.Add("Areas", Areas);
             Fields.Add("Address", Address);
             Fields.Add("BindStatus", BindStatus);
+            Fields.Add("BrandId", BrandId);
             AppResultJson info = new AppResultJson();
             if (Id == 0)
             {

+ 2 - 2
Util/MySelf/MySelfUtil.cs

@@ -32,7 +32,7 @@ namespace MySystem
             DateTime start = new DateTime(int.Parse(TradeMonth.Substring(0, 4)), int.Parse(TradeMonth.Substring(TradeMonth.Length - 2, 2)), 1);
             DateTime end = start.AddMonths(1).AddDays(-1);
             var merchantInfo = MerchantAddInfoService.Query(MerchantId);
-            JsonData Info = JsonMapper.ToObject(HaoDaHelper.Instance.CardInComeRecord(merchantInfo.OutMchtNo, start.ToString("yyyy-MM-dd"), end.ToString("yyyy-MM-dd"), merchantInfo.MchtNo, "", "", pageNum, pageSize));
+            JsonData Info = JsonMapper.ToObject(HaoDaHelper.Instance.CardInComeRecord(merchantInfo.OutMchtNo, start.ToString("yyyy-MM-dd"), end.ToString("yyyy-MM-dd"), merchantInfo.MchtNo, "", "", pageNum, pageSize, merchantInfo.BrandId));
             List<Dictionary<string, object>> dataList = new List<Dictionary<string, object>>();
             if (Info["code"].ToString() == "0")
             {
@@ -103,7 +103,7 @@ namespace MySystem
             }
             else
             {
-                JsonData Info = JsonMapper.ToObject(HaoDaHelper.Instance.CardInComeDetail(merchantInfo.OutMchtNo, OrderId));
+                JsonData Info = JsonMapper.ToObject(HaoDaHelper.Instance.CardInComeDetail(merchantInfo.OutMchtNo, OrderId, merchantInfo.BrandId));
                 Dictionary<string, object> obj = new Dictionary<string, object>();
                 if (Info["code"].ToString() == "0")
                 {