| | |
| | | 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)) |
| | | } |