zhangqian
2024-03-11 7d4f02f6a8066018911d09bad42c5c540abaa66b
controllers/product_controller.go
@@ -761,3 +761,19 @@
   m["userName"] = userInfo.Username
   util.ResponseFormat(c, code.Success, m)
}
// GetUnitInfo
//
//   @Tags      产品
//   @Summary   获取单位信息
//   @Produce   application/json
//   @Success   200   {object}   util.ResponseList{data=[]models.UnitDict}   "成功"
//   @Router      /api-wms/v1/product/getUnitInfo [get]
func (slf ProductController) GetUnitInfo(c *gin.Context) {
   dicts, total, err := models.NewUnitDictSearch().Find()
   if err != nil {
      util.ResponseFormat(c, code.RequestParamError, "查询出错")
      return
   }
   util.ResponseFormatList(c, code.Success, dicts, int(total))
}