web/.vs/Web/v16/.suo | 补丁 | 查看 | 原始文档 | blame | 历史 | |
web/Dao/Dao.csproj | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
web/Dao/GwClientProductDao.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
web/Dao/GwProductDao.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
web/Dao/obj/Debug/Dao.csproj.AssemblyReference.cache | 补丁 | 查看 | 原始文档 | blame | 历史 | |
web/Model/Model.csproj | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
web/Model/Model/GwClientProduct.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
web/Model/obj/Debug/Model.csproj.AssemblyReference.cache | 补丁 | 查看 | 原始文档 | blame | 历史 | |
web/web/GwClient.ashx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
web/.vs/Web/v16/.suoBinary files differ
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" /> web/Dao/GwClientProductDao.cs
New file @@ -0,0 +1,40 @@ using 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; } } } web/Dao/GwProductDao.cs
New file @@ -0,0 +1,53 @@ using 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; } } } web/Dao/obj/Debug/Dao.csproj.AssemblyReference.cacheBinary files differ
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" /> web/Model/Model/GwClientProduct.cs
New file @@ -0,0 +1,29 @@ using 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; } } } web/Model/obj/Debug/Model.csproj.AssemblyReference.cacheBinary files differ
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, "创建账户成功!"); } }