| 1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- /**
- * @Author: zou.yingbin
- * @Create : 2021/1/13 11:15
- * @Modify : 2021/1/13 11:15
- */
- package ermcp
- import (
- "github.com/gin-gonic/gin"
- "mtp2_if/global/app"
- "mtp2_if/global/e"
- "mtp2_if/models"
- "mtp2_if/mtpcache"
- "net/http"
- )
- //查询现货商品请求
- type QryWrStandardReq struct {
- }
- //查询现货商品响应
- type QryWrStandardRsp models.ErmcpWrstandard
- // QueryWrStandard 企业风险管理查询现货商品
- // @Summary 查询现货商品
- // @Produce json
- // @Security ApiKeyAuth
- // @Success 200 {array} QryWrStandardRsp
- // @Failure 500 {object} app.Response
- // @Router /Ermcp/QueryWrStandard [get]
- // @Tags 企业风险管理(app)
- func QueryWrStandard(c *gin.Context) {
- appG := app.Gin{C: c}
- var m models.ErmcpWrstandard
- if d, err := m.GetData(); err == nil {
- for i := range d {
- d[i].EnumdicName = mtpcache.GetEnumDicitemName(d[i].UNITID)
- }
- appG.Response(http.StatusOK, e.SUCCESS, d)
- } else {
- appG.Response(http.StatusBadRequest, e.ERROR_QUERY_FAIL, nil)
- }
- }
|