| | |
| | | type DepartmentController struct{} |
| | | |
| | | // Add |
| | | // @Tags 部门信息 |
| | | // @Summary 添加部门信息 |
| | | // @Produce application/json |
| | | // @Param object body request.AddDepartment true "部门信息信息" |
| | | // @Success 200 {object} util.Response "成功" |
| | | // @Router /api-s/v1/organize/department [post] |
| | | // |
| | | // @Tags 部门信息 |
| | | // @Summary 添加部门信息 |
| | | // @Produce application/json |
| | | // @Param object body request.AddDepartment true "部门信息信息" |
| | | // @Success 200 {object} util.Response "成功" |
| | | // @Router /api-wms/v1/organize/department [post] |
| | | func (slf DepartmentController) Add(c *gin.Context) { |
| | | var reqParams request.AddDepartment |
| | | var params models.Department |
| | |
| | | } |
| | | |
| | | // Update |
| | | // @Tags 部门信息 |
| | | // @Summary 编辑部门信息 |
| | | // @Produce application/json |
| | | // @Param object body request.UpdateDepartment true "部门信息信息" |
| | | // @Success 200 {object} util.Response "成功" |
| | | // @Router /api-s/v1/organize/department/{id} [put] |
| | | // |
| | | // @Tags 部门信息 |
| | | // @Summary 编辑部门信息 |
| | | // @Produce application/json |
| | | // @Param object body request.UpdateDepartment true "部门信息信息" |
| | | // @Success 200 {object} util.Response "成功" |
| | | // @Router /api-wms/v1/organize/department/{id} [put] |
| | | func (slf DepartmentController) Update(c *gin.Context) { |
| | | idStr := c.Param("id") |
| | | if idStr == "0" || idStr == "" { |
| | |
| | | } |
| | | |
| | | // List |
| | | // @Tags 部门信息 |
| | | // @Summary 查询部门信息列表 |
| | | // @Produce application/json |
| | | // @Param object query request.GetDepartmentList true "查询参数" |
| | | // @Success 200 {object} util.ResponseList{data=[]models.Department} "成功" |
| | | // @Router /api-s/v1/organize/department [get] |
| | | // |
| | | // @Tags 部门信息 |
| | | // @Summary 查询部门信息列表 |
| | | // @Produce application/json |
| | | // @Param object query request.GetDepartmentList true "查询参数" |
| | | // @Success 200 {object} util.ResponseList{data=[]models.Department} "成功" |
| | | // @Router /api-wms/v1/organize/department [get] |
| | | func (slf DepartmentController) List(c *gin.Context) { |
| | | var params request.GetDepartmentList |
| | | if err := c.ShouldBindQuery(¶ms); err != nil { |
| | |
| | | } |
| | | |
| | | // Delete |
| | | // @Tags 部门信息 |
| | | // @Summary 编辑部门信息 |
| | | // @Produce application/json |
| | | // @Param object body request.UpdateDepartment true "部门信息信息" |
| | | // @Success 200 {object} util.Response "成功" |
| | | // @Router /api-s/v1/organize/department/{id} [delete] |
| | | // |
| | | // @Tags 部门信息 |
| | | // @Summary 编辑部门信息 |
| | | // @Produce application/json |
| | | // @Param object body request.UpdateDepartment true "部门信息信息" |
| | | // @Success 200 {object} util.Response "成功" |
| | | // @Router /api-wms/v1/organize/department/{id} [delete] |
| | | func (slf DepartmentController) Delete(c *gin.Context) { |
| | | idStr := c.Param("id") |
| | | if idStr == "0" || idStr == "" { |