lixiaojun
2024-07-18 644a8b70b8ca49f6dc08d922ff18bf7509af9b07
Application/HStation.Application.Xhs.Core/01-project/XhsProject_Controller.cs
@@ -47,7 +47,7 @@
            return vmList;
        }
        #endregion Query
        #endregion
        #region Insert
@@ -66,23 +66,12 @@
                }
            }
            var model = input.Adapt<AddXhsProjectInput, Model.XhsProject>();
            model.SortCode = _service.GetMaxSortCode() + 1;
            model.SortCode = _service.GetMaxSortCode(0) + 1;
            var id = _service.Insert(model);
            return id;
        }
        /*        /// <summary>
                /// 插入拓展
                /// </summary>
                [Route("InsertEx@V1.0")]
                [HttpPost]
                public long InsertsEx(ProjectInputs text)
                {
                    var id = _service.InsertsEx(project, Item, Model, Map);
                    return id;
                }*/
        #endregion Insert
        #endregion
        #region Update
@@ -179,13 +168,32 @@
        }
        /// <summary>
        /// 更新 UseStatus
        ///  发布
        /// </summary>
        [Route("UpdateUseStatus@V1.0")]
        [Route("Publish@V1.0")]
        [HttpPut]
        public bool UpdateUseStatus([Required] UpdateUseStatusInput input)
        public bool Publish([Required] IDInput input)
        {
            var bol = _service.UpdateUseStatus(input.ID, (Yw.Model.eUseStatus)input.UseStatus);
            var bol = _service.Publish(input.ID, out string Msg);
            if (!bol)
            {
                throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.V001, Msg);
            }
            return bol;
        }
        /// <summary>
        /// 弃用(谨慎操作)
        /// </summary>
        [Route("Deprecate@V1.0")]
        [HttpPut]
        public bool Deprecate([Required] IDInput input)
        {
            var bol = _service.Deprecate(input.ID, out string Msg);
            if (!bol)
            {
                throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.V001, Msg);
            }
            return bol;
        }