mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-12-08 17:00:26 +08:00
refactor: 代码重构、分页数据组件支持多选
This commit is contained in:
@@ -53,10 +53,16 @@ func QueryInt(g *gin.Context, qm string, defaultInt int) int {
|
||||
|
||||
// 获取路径参数
|
||||
func PathParamInt(g *gin.Context, pm string) int {
|
||||
value, _ := strconv.Atoi(g.Param(pm))
|
||||
value, err := strconv.Atoi(g.Param(pm))
|
||||
biz.ErrIsNilAppendErr(err, "string类型转换int异常: %s")
|
||||
return value
|
||||
}
|
||||
|
||||
// 获取路径参数
|
||||
func PathParam(g *gin.Context, pm string) string {
|
||||
return g.Param(pm)
|
||||
}
|
||||
|
||||
// 文件下载
|
||||
func Download(g *gin.Context, reader io.Reader, filename string) {
|
||||
g.Header("Content-Type", "application/octet-stream")
|
||||
|
||||
Reference in New Issue
Block a user