Ver Código Fonte

添加消息状态更新接口

mengjie 5 anos atrás
pai
commit
2c6b1cc064

+ 22 - 0
代码/TVShoppingCallCenter_ZLJ/Controllers/Customer/CusMsgController.cs

@@ -144,5 +144,27 @@ namespace TVShoppingCallCenter_ZLJ.Controllers.Customer
144 144
             }
145 145
             return Success("获取成功!", model);
146 146
         }
147
+
148
+        /// <summary>
149
+        /// 更新消息状态
150
+        /// </summary>
151
+        /// <param name="ids"></param>
152
+        /// <returns></returns>
153
+        [HttpPost("updatescore")]
154
+        public async Task<IActionResult> UpdateScore(int id,int state)
155
+        {
156
+            if (id <= 0)
157
+                return Error("参数错误");
158
+                var ml = await _cus_msgRepository.GetSingle(x => x.F_ID == id);
159
+                ml.F_State = state;
160
+                
161
+                if (_cus_msgRepository.Update(ml).Result)
162
+                {
163
+                    return Success("状态更新成功");
164
+                }
165
+                else
166
+                    return Error("状态更新失败");
167
+            
168
+        }
147 169
     }
148 170
 }