From d2e07afb3de3aabe6da09d93524e273f249ec5ec Mon Sep 17 00:00:00 2001 From: wzp <2880584989@qq.com> Date: 星期二, 28 九月 2021 10:43:30 +0800 Subject: [PATCH] 更新 --- web/Dao/Dao.csproj | 2 web/web/GwClient.ashx | 22 ++++++- web/Model/Model.csproj | 9 ++ web/Dao/obj/Debug/Dao.csproj.AssemblyReference.cache | 0 web/.vs/Web/v16/.suo | 0 web/Dao/GwProductDao.cs | 53 +++++++++++++++++ web/Model/obj/Debug/Model.csproj.AssemblyReference.cache | 0 web/Dao/GwClientProductDao.cs | 40 +++++++++++++ web/Model/Model/GwClientProduct.cs | 29 +++++++++ 9 files changed, 150 insertions(+), 5 deletions(-) diff --git a/web/.vs/Web/v16/.suo b/web/.vs/Web/v16/.suo index 4763df0..3f66110 100644 --- a/web/.vs/Web/v16/.suo +++ b/web/.vs/Web/v16/.suo Binary files differ diff --git a/web/Dao/Dao.csproj b/web/Dao/Dao.csproj index 3d78b9c..37bd015 100644 --- a/web/Dao/Dao.csproj +++ b/web/Dao/Dao.csproj @@ -75,8 +75,10 @@ <Compile Include="GwClientCertificationDao.cs" /> <Compile Include="GwClientPayLogDao.cs" /> <Compile Include="GwClientPayMentDao.cs" /> + <Compile Include="GwClientProductDao.cs" /> <Compile Include="GwMobileAreaDao.cs" /> <Compile Include="GwMoRouteDao.cs" /> + <Compile Include="GwProductDao.cs" /> <Compile Include="GwRmResendDao.cs" /> <Compile Include="GwSpPrePattern.cs" /> <Compile Include="GwSpPrePatternDao.cs" /> diff --git a/web/Dao/GwClientProductDao.cs b/web/Dao/GwClientProductDao.cs new file mode 100644 index 0000000..8c5dca2 --- /dev/null +++ b/web/Dao/GwClientProductDao.cs @@ -0,0 +1,40 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Common; +using Model; +using Oracle.DataAccess.Client; + +namespace Dao +{ + /// <summary> + /// 瀹㈡埛浜у搧鎿嶄綔绫� + /// </summary> + public class GwClientProductDao + { + private static GwClientProductDao _instance; + public static GwClientProductDao Instance + { + get { + if (_instance == null) + { + _instance = new GwClientProductDao(); + } + return _instance; + } + } + + /// <summary> + /// 娣诲姞璐︽埛榛樿浜у搧璁板綍 + /// </summary> + /// <param name="gcp"></param> + /// <returns></returns> + public bool Add(GwClientProduct gcp) + { + return OracleHelper.ExecuteSql("insert into GW_OP(id,client_id,product_id) values(:id,:client_id,:product_id,)", OracleHelper.Connection, new OracleParameter(":id", (object)gcp.Id), new OracleParameter(":client_id", (object)gcp.ClientId), new OracleParameter(":product_id", (object)gcp.ProductId)) > 0; + } + + + } +} diff --git a/web/Dao/GwProductDao.cs b/web/Dao/GwProductDao.cs new file mode 100644 index 0000000..62e7880 --- /dev/null +++ b/web/Dao/GwProductDao.cs @@ -0,0 +1,53 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Model; +using Common; +using Oracle.DataAccess.Client; +using System.Data.Common; + +namespace Dao +{ + /// <summary> + /// 浜у搧鎿嶄綔 + /// </summary> + public class GwProductDao + { + + private static GwProductDao _instance; + public static GwProductDao Instance + { + get { + if (_instance == null) + { + _instance = new GwProductDao(); + } + return _instance; + } + } + + /// <summary> + /// 鏌ヨ鍚敤鐨勯粯璁ょ殑浜у搧 + /// </summary> + /// <param name="clientID"></param> + /// <returns></returns> + public List<string> GetDefaultProduct() + { + List<string> list = new List<string>(); + using (OracleDataReader reader = OracleHelper.ExecuteReader(string.Format("select id from GW_PRODUCT t where is_default=1 and is_enable=1 and classes=1"), OracleHelper.Connection)) + { + while (((DbDataReader)reader).Read()) + { + string id = reader.GetString(0); + if(!string.IsNullOrEmpty(id)) + { + list.Add(id); + } + + } + } + return list; + } + } +} diff --git a/web/Dao/obj/Debug/Dao.csproj.AssemblyReference.cache b/web/Dao/obj/Debug/Dao.csproj.AssemblyReference.cache index 9c540e4..801be48 100644 --- a/web/Dao/obj/Debug/Dao.csproj.AssemblyReference.cache +++ b/web/Dao/obj/Debug/Dao.csproj.AssemblyReference.cache Binary files differ diff --git a/web/Model/Model.csproj b/web/Model/Model.csproj index 3f53208..3136973 100644 --- a/web/Model/Model.csproj +++ b/web/Model/Model.csproj @@ -64,6 +64,7 @@ <Compile Include="Model\GwClientCertification.cs" /> <Compile Include="Model\GwClientPayLog.cs" /> <Compile Include="Model\GwClientPayMent.cs" /> + <Compile Include="Model\GwClientProduct.cs" /> <Compile Include="Model\GwMobileArea.cs" /> <Compile Include="Model\GwMoRoute.cs" /> <Compile Include="Model\GwOpGroupItem.cs" /> @@ -78,8 +79,12 @@ <Compile Include="Model\SysOperationLog.cs" /> <Compile Include="PageHandler.cs" /> <Compile Include="PageContext.cs" /> - <Compile Include="MasterPageBase.cs" /> - <Compile Include="PageBase.cs" /> + <Compile Include="MasterPageBase.cs"> + <SubType>ASPXCodeBehind</SubType> + </Compile> + <Compile Include="PageBase.cs"> + <SubType>ASPXCodeBehind</SubType> + </Compile> <Compile Include="Model\GwAp.cs" /> <Compile Include="Model\SysMenu.cs" /> <Compile Include="Model\SysUserMenu.cs" /> diff --git a/web/Model/Model/GwClientProduct.cs b/web/Model/Model/GwClientProduct.cs new file mode 100644 index 0000000..31f2bb6 --- /dev/null +++ b/web/Model/Model/GwClientProduct.cs @@ -0,0 +1,29 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Model +{ + /// <summary> + /// 瀹㈡埛浜у搧绫� + /// </summary> + public class GwClientProduct + { + private string _id; + private string _clientId; + private string _spId; + private string _productId; + private int _activateStatus;/// + + public string Id { get => _id; set => _id = value; } + public string ClientId { get => _clientId; set => _clientId = value; } + public string SpId { get => _spId; set => _spId = value; } + public string ProductId { get => _productId; set => _productId = value; } + + /// <summary> + /// 婵�娲荤姸鎬� + /// </summary> + public int ActivateStatus { get => _activateStatus; set => _activateStatus = value; } + } +} diff --git a/web/Model/obj/Debug/Model.csproj.AssemblyReference.cache b/web/Model/obj/Debug/Model.csproj.AssemblyReference.cache index 112743c..7212fec 100644 --- a/web/Model/obj/Debug/Model.csproj.AssemblyReference.cache +++ b/web/Model/obj/Debug/Model.csproj.AssemblyReference.cache Binary files differ diff --git a/web/web/GwClient.ashx b/web/web/GwClient.ashx index 40e0def..617bcaf 100644 --- a/web/web/GwClient.ashx +++ b/web/web/GwClient.ashx @@ -2,6 +2,7 @@ using System; using System.Web; using Dao; +using Model; using Common; using System.Collections.Generic; using System.Configuration; @@ -85,9 +86,9 @@ { string Certification_StatusResult = "鏈璇�"; if (item.Certification_Status == 1) - { - Certification_StatusResult = "宸茶璇�"; - } + { + Certification_StatusResult = "宸茶璇�"; + } str += @"<tr ><td>" + item.ClientID + "</td><td>" + item.Company + "</td><td>" + item.ClientName + "</td><td>" + item.Telephone + "</td><td>" + item.Top_up_Amount_Total + "鍏�</td><td>" + item.Agent + "</td><td>" + Certification_StatusResult + "</td>"; str += @"<td>"; @@ -357,6 +358,21 @@ client.Company = company; _Dao.Add(client);//鎻掑叆鏁版嵁搴撱�傚垱寤鸿处鎴� + //淇濆瓨浜у搧璁板綍 + //鑾峰彇鍚敤鐨勯粯璁ょ殑浜у搧 + List<string> defaultProductList = GwProductDao.Instance.GetDefaultProduct(); + if (defaultProductList.Count > 0) + { + foreach (string productId in defaultProductList) + { + GwClientProduct gcp = new GwClientProduct(); + gcp.Id = Guid.NewGuid().ToString(); + gcp.ClientId = clientID; + gcp.ProductId = productId; + GwClientProductDao.Instance.Add(gcp); + } + } + return new JsonPageResult(true, "鍒涘缓璐︽埛鎴愬姛锛�"); } } -- Gitblit v1.9.1