Kaynağa Gözat

消息提醒

duhongyu 5 yıl önce
ebeveyn
işleme
2641f010e2

+ 21 - 0
代码/System.Model/T_SMS_InternalMessages.cs

13
         private string _sms_sendusercode;
13
         private string _sms_sendusercode;
14
         private int? _sms_isread;
14
         private int? _sms_isread;
15
         private DateTime? _sms_sendtime;
15
         private DateTime? _sms_sendtime;
16
+        private DateTime? _sms_remindertime;
16
         private DateTime? _sms_readtime;
17
         private DateTime? _sms_readtime;
17
         private DateTime? _sms_deletetime;
18
         private DateTime? _sms_deletetime;
18
         private int? _sms_isdelete;
19
         private int? _sms_isdelete;
21
         private int? _sms_type;
22
         private int? _sms_type;
22
         private int? _sms_receivingtype;
23
         private int? _sms_receivingtype;
23
         private int? _sms_deptid;
24
         private int? _sms_deptid;
25
+        private int? _f_id;
26
+
27
+        //
24
         /// <summary>
28
         /// <summary>
25
         /// id,自增
29
         /// id,自增
26
         /// </summary>
30
         /// </summary>
30
             get { return _sms_id; }
34
             get { return _sms_id; }
31
         }
35
         }
32
         /// <summary>
36
         /// <summary>
37
+        /// 
38
+        /// </summary>
39
+        public int? F_ID
40
+        {
41
+            set { _f_id = value; }
42
+            get { return _f_id; }
43
+        }
44
+        /// <summary>
33
         /// 短信标题
45
         /// 短信标题
34
         /// </summary>
46
         /// </summary>
35
         public string SMS_Title
47
         public string SMS_Title
87
             get { return _sms_sendtime; }
99
             get { return _sms_sendtime; }
88
         }
100
         }
89
         /// <summary>
101
         /// <summary>
102
+        /// 提醒时间
103
+        /// </summary>
104
+        public DateTime? SMS_Remindertime
105
+        {
106
+            set { _sms_remindertime = value; }
107
+            get { return _sms_remindertime; }
108
+        }
109
+        
110
+        /// <summary>
90
         /// 阅读时间
111
         /// 阅读时间
91
         /// </summary>
112
         /// </summary>
92
         public DateTime? SMS_ReadTime
113
         public DateTime? SMS_ReadTime

+ 9 - 4
代码/TVShoppingCallCenter_ZLJ/Controllers/InternalMessages/InternalMessagesController.cs

94
         /// <param name="pagesize"></param>
94
         /// <param name="pagesize"></param>
95
         /// <returns></returns>
95
         /// <returns></returns>
96
         [HttpGet("getMsg")]
96
         [HttpGet("getMsg")]
97
-        public async Task<IActionResult> GetListMark(int smstype=-1,int isread=-1, int pageindex = 0, int pagesize = 0)
97
+        public async Task<IActionResult> GetListMark(int istop=-1,int smstype=-1,int isread=-1, int pageindex = 0, int pagesize = 0)
98
         {
98
         {
99
-            string user = User.Claims.FirstOrDefault(c => c.Type == ClaimTypes.Sid).Value;
99
+           // string user = "8000";
100
+          string user = User.Claims.FirstOrDefault(c => c.Type == ClaimTypes.Sid).Value;
100
             List<IConditionalModel> conModels = new List<IConditionalModel>();
101
             List<IConditionalModel> conModels = new List<IConditionalModel>();
101
             #region 条件筛选
102
             #region 条件筛选
102
             conModels.Add(new ConditionalModel() { FieldName = "SMS_IsDelete", ConditionalType = ConditionalType.Equal, FieldValue = ((int)EnumUserCountState.Enabled).ToString() });
103
             conModels.Add(new ConditionalModel() { FieldName = "SMS_IsDelete", ConditionalType = ConditionalType.Equal, FieldValue = ((int)EnumUserCountState.Enabled).ToString() });
126
                 conModels.Add(new ConditionalModel() { FieldName = "SMS_ReceiveUserCode", ConditionalType = ConditionalType.Equal, FieldValue = user });
127
                 conModels.Add(new ConditionalModel() { FieldName = "SMS_ReceiveUserCode", ConditionalType = ConditionalType.Equal, FieldValue = user });
127
             }
128
             }
128
             conModels.Add(new ConditionalModel() { FieldName = "SMS_Remindertime", ConditionalType = ConditionalType.LessThanOrEqual, FieldValue = DateTime .Now .ToString () });
129
             conModels.Add(new ConditionalModel() { FieldName = "SMS_Remindertime", ConditionalType = ConditionalType.LessThanOrEqual, FieldValue = DateTime .Now .ToString () });
130
+            if (istop >-1)
131
+            {
132
+                conModels.Add(new ConditionalModel() { FieldName = "SMS_IsTop", ConditionalType = ConditionalType.Equal , FieldValue = istop.ToString () });
133
+            }
129
             #endregion
134
             #endregion
130
             int recordCount = 0;
135
             int recordCount = 0;
131
             if (pageindex > 0 && pagesize > 0)
136
             if (pageindex > 0 && pagesize > 0)
132
             {
137
             {
133
-                var list = await _sys_internalMessagesrepository.GetListByPage(conModels, new MyPageModel() { PageIndex = pageindex, PageSize = pagesize, PageCount = recordCount }, "order by SMS_IsTop desc, SMS_SendTime  desc") ;
138
+                var list = await _sys_internalMessagesrepository.GetListByPage(conModels, new MyPageModel() { PageIndex = pageindex, PageSize = pagesize, PageCount = recordCount }, "  SMS_SendTime  desc") ;
134
                 var row = list!=null ? list.Rows.Where(x => (x.SMS_ReceivingType == 0 && x.SMS_Deptid == dept) || (x.SMS_ReceivingType == 1 && x.SMS_ReceiveUserCode == user)):null ;
139
                 var row = list!=null ? list.Rows.Where(x => (x.SMS_ReceivingType == 0 && x.SMS_Deptid == dept) || (x.SMS_ReceivingType == 1 && x.SMS_ReceiveUserCode == user)):null ;
135
                 var obj = new
140
                 var obj = new
136
                 {
141
                 {
143
             }
148
             }
144
             else
149
             else
145
             {
150
             {
146
-                var list = await _sys_internalMessagesrepository.GetListALL(conModels, "order by SMS_IsTop desc, SMS_SendTime  desc");
151
+                var list = await _sys_internalMessagesrepository.GetListALL(conModels, " SMS_SendTime  desc");
147
                 var row = list!=null ? list.Where(x => (x.SMS_ReceivingType == 0 && x.SMS_Deptid == dept) || (x.SMS_ReceivingType == 1 && x.SMS_ReceiveUserCode == user)):null ;
152
                 var row = list!=null ? list.Where(x => (x.SMS_ReceivingType == 0 && x.SMS_Deptid == dept) || (x.SMS_ReceivingType == 1 && x.SMS_ReceiveUserCode == user)):null ;
148
                 var obj = new
153
                 var obj = new
149
                 {
154
                 {