Documentation ¶
Index ¶
- Constants
- func RequestParams(c *gin.Context) map[string]interface{}
- func ResBadRequest(c *gin.Context, msg string)
- func ResBadRequest1(c *gin.Context, msg string)
- func ResBadRequestByApc(c *gin.Context, msg string)
- func ResBadRequestMsg(c *gin.Context, msg string, v interface{})
- func ResBusinessButSuccessP(c *gin.Context, msg string)
- func ResBusinessCustom(c *gin.Context, code int, msg string, v interface{})
- func ResBusinessP(c *gin.Context, msg string)
- func ResDataErrorMsg(c *gin.Context, msg string, v interface{})
- func ResDataSuccessMsg(c *gin.Context, msg string, v interface{})
- func ResErrCli(c *gin.Context, err error)
- func ResErrSrv(c *gin.Context)
- func ResJSON(c *gin.Context, status int, v interface{})
- func ResPermission(c *gin.Context, msg string)
- func ResReturnCode(c *gin.Context, v interface{})
- func ResSuccess(c *gin.Context, v interface{})
- func ResSuccessMsg(c *gin.Context, msg string)
- func ResSuccessMsgByApc(c *gin.Context, msg, flag string, v interface{})
- func ResSuccessMsgOfNullErr(c *gin.Context, msg string, v interface{})
- func ResSuccessMsgWithData(c *gin.Context, msg string, data interface{})
- func ResSuccessPage(c *gin.Context, indexPage orm.IndexPage, list interface{})
- func ResXML(c *gin.Context, status int, v interface{})
- func ResXmlBadRes(c *gin.Context, v interface{})
- func ResXmlSuccessReS(c *gin.Context, v interface{})
- type IdsReq
- type KnowledgeListReq
- type ListReq
- type ListReqAddOth
- type ListReqForApc
- type ListRequest
- type Paginator
- type Param
- type ResponseModel
- type ResponseModel1
- type ResponseModelByApc
- type ResponsePage
- type ResponsePageData
- type ReturnCode
Constants ¶
View Source
const ( // code.SUCCESS_CODE = 0 //成功的状态码 // BAD_LOGIN = 10001 //登录失败 // BAD_REQUEST = 10002 //参数错误 // PERMISSION_ERR = 10003 //权限校验错误 // FAIL_CODE = 20001 //失败的状态码 BUSINESS_ERR = 20002 //业务错误 // NULL_ERR = 20003 //无数据错误 // DATABASE_ERR = 20004 //数据库异常 // CACHE_ERR = 20005 //缓存异常 USER_UID_KEY = "UID" //页面UUID键名 SUPER_ADMIN_ID = "10" //超级管理员 ReqSelKeyLimitLang int = 38 //首页搜索字数限制 )
View Source
const ReturnSuccess = "S0000001"
Variables ¶
This section is empty.
Functions ¶
func RequestParams ¶
func ResBadRequestByApc ¶
ResBadRequestByApc 参数错误-只针对 采购推荐系统
func ResBusinessCustom ¶ added in v1.2.5
响应错误-自定义错误类型
func ResReturnCode ¶
func ResSuccessMsgByApc ¶
ResSuccessMsgByApc 响应成功-只针对 采购推荐系统
func ResSuccessMsgOfNullErr ¶
响应成功-无数据
func ResSuccessMsgWithData ¶ added in v1.2.2
响应成功
func ResSuccessPage ¶
响应成功-分页数据
Types ¶
type KnowledgeListReq ¶
type KnowledgeListReq struct { ListReq Guid string `json:"guid" form:"guid"` // cm_proc_plan_in 专用 Type string `json:"type" form:"type"` // 搜索类型 }
func (*KnowledgeListReq) GetListQueryV3 ¶
组装阿里云搜索sql(首页)
type ListReq ¶
type ListReq struct { Page int `json:"page" form:"page" ` //页数 Num int `json:"num" form:"num" ` //数量 Key string `json:"key" form:"key" ` //搜索关键字 Sort string `json:"sort" form:"sort"` //排序字段 OrderType string `json:"orderType" form:"orderType"` //排序规则 BeginAt string `json:"beginAt" form:"beginAt" ` //开始时间 EndAt string `json:"endAt" form:"endAt" ` //结束时间 }
type ListReqAddOth ¶
type ListReqAddOth struct { ListReq Guid string `json:"guid" form:"guid"` ProjectCode string `json:"project_code" form:"project_code"` }
func (*ListReqAddOth) GetListQueryV4 ¶
func (l *ListReqAddOth) GetListQueryV4(c *gin.Context) (err error)
type ListReqForApc ¶
type ListReqForApc struct { Num int `json:"num" form:"num" ` //数量 Page int `json:"page" form:"page" ` //页数 BeginAt string `json:"beginAt" form:"beginAt" ` //开始时间 EndAt string `json:"endAt" form:"endAt" ` //结束时间 PlanInDetailID int64 `json:"plan_in_detail_id" form:"plan_in_detail_id"` // 采购详情ID }
func (*ListReqForApc) GetListQuery ¶
func (l *ListReqForApc) GetListQuery(c *gin.Context) (err error)
type ListRequest ¶
type Paginator ¶
type ResponseModel ¶
type ResponseModel1 ¶
type ResponseModelByApc ¶
type ResponseModelByApc struct { ResponseModel Flag string `json:"flag"` }
返回结果只针对 采购推荐可视化 的 电信短信返回值
type ResponsePage ¶
type ResponsePage struct { Code int `json:"code"` Message string `json:"msg"` Data ResponsePageData `json:"data"` }
type ResponsePageData ¶
Click to show internal directories.
Click to hide internal directories.