Browse Source

编写商邀费用删除方法

wangh 1 year ago
parent
commit
a5a4550bac
1 changed files with 25 additions and 2 deletions
  1. 25 2
      OASystem/OASystem.Api/Controllers/GroupsController.cs

+ 25 - 2
OASystem/OASystem.Api/Controllers/GroupsController.cs

@@ -1817,10 +1817,33 @@ namespace OASystem.API.Controllers
                 throw;
             }
         }
-
+        /// <summary>
+        /// 商邀删除
+        /// </summary>
+        /// <param name="dto"></param>
+        /// <returns></returns>
+        [HttpPost]
+        [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
+        public async Task<IActionResult> DelInvitationOfficialActivities(DelBaseDto dto)
+        {
+            try
+            {
+                var res = await _InvitationOfficialActivitiesRep.SoftDeleteByIdAsync<Grp_InvitationOfficialActivities>(dto.Id.ToString(), dto.DeleteUserId);
+                if (!res)
+                {
+                    return Ok(JsonView(false, "删除失败"));
+                }
+                return Ok(JsonView(true, "删除成功!"));
+            }
+            catch (Exception ex)
+            {
+                return Ok(JsonView(false, "程序错误!"));
+                throw;
+            }
+        }
 
         #endregion
 
-       
+
     }
 }