yzh
2022-03-14 9f5df1b277c9f72f0aeb847de042de4934286f60
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
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;
        }
    }
}