Documentation ¶
Index ¶
- type IgnoreURLController
- func (control IgnoreURLController) Add(ctx *gin.Context) interface{}
- func (control IgnoreURLController) CheckIgnoreUrl(ctx *gin.Context) interface{}
- func (control IgnoreURLController) ClearCache(ctx *gin.Context) interface{}
- func (control IgnoreURLController) Del(ctx *gin.Context) interface{}
- func (control IgnoreURLController) Edit(ctx *gin.Context) interface{}
- func (control IgnoreURLController) FindAll(ctx *gin.Context) interface{}
- func (control IgnoreURLController) FindByDate(ctx *gin.Context) interface{}
- func (control IgnoreURLController) FindById(ctx *gin.Context) interface{}
- func (control IgnoreURLController) FindByKey(ctx *gin.Context) interface{}
- func (control IgnoreURLController) FindByPage(ctx *gin.Context) interface{}
- func (control IgnoreURLController) FindByRow(ctx *gin.Context) interface{}
- type IgnoreURLService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IgnoreURLController ¶
type IgnoreURLController struct { CommonController //通用控制层 ModuleEntity IgnoreURL //对应模块数据实体 ModuleService IgnoreURLService //对应模块业务实体 }
@Controller 拦截器忽略路径控制器
func (IgnoreURLController) Add ¶
func (control IgnoreURLController) Add(ctx *gin.Context) interface{}
#region @Api {title=新增} @param {name=data dataType=json paramType=body explain=IgnoreURL结构数据 explainType=IgnoreURL required=true} @return {type=json explainType=MsgEmity<IgnoreURL> explain=返回对象} @RequestMapping {name=Add type=POST value=/ignore/url/add} #endregion
func (IgnoreURLController) CheckIgnoreUrl ¶
func (control IgnoreURLController) CheckIgnoreUrl(ctx *gin.Context) interface{}
#region @Api {title=验证指定url是否在可忽略的访问路径中(给内部拦截器用,直接返回Boolean)} @param {name=sUrl dataType=string paramType=query explain=待检验的url required=true} @param {name=sUserType dataType=string paramType=query explain=待检验的用户类型 required=false} @param {name=iMustLogin dataType=int paramType=query explain=是否必须登录,1:是;2:否 required=false} @return {type=bool explain=返回是否在可忽略的访问路径中} @RequestMapping {name=FindByPage type=POST value=/ignore/url/check} #endregion
func (IgnoreURLController) ClearCache ¶
func (control IgnoreURLController) ClearCache(ctx *gin.Context) interface{}
#region @Api {title=清理缓存 explain=直接操作数据库的情况下需要手工更新缓存} @return {type=MsgEmity explain=返回分页数据} @RequestMapping {name=FindByPage type=POST value=/ignore/url/clear/cache} #endregion
func (IgnoreURLController) Del ¶
func (control IgnoreURLController) Del(ctx *gin.Context) interface{}
#region @Api {title=删除数据} @param {name=sId dataType=string paramType=query explain=记录编号 required=true} @param {name=iVersion dataType=int paramType=query explain=版本号 required=true} @return {type=json explainType=MsgEmity<int> explain=返回影响数} @RequestMapping {name=Del type=POST value=/ignore/url/del} #endregion
func (IgnoreURLController) Edit ¶
func (control IgnoreURLController) Edit(ctx *gin.Context) interface{}
#region @Api {title=修改数据} @param {name=data dataType=json paramType=body explain=IgnoreURL结构数据 explainType=IgnoreURL required=true} @return {type=json explainType=MsgEmity<int> explain=返回码值} @RequestMapping {name=Edit type=POST value=/ignore/url/edit} #endregion
func (IgnoreURLController) FindAll ¶
func (control IgnoreURLController) FindAll(ctx *gin.Context) interface{}
#region @Api {title=查询全部} @param {name=data dataType=json paramType=body explain=map[string]interface结构数据 explainType=IgnoreURL required=true} @return {type=json explainType=MsgEmity<IgnoreURL> explain=返回数组[]map[string]interface} @RequestMapping {name=FindAll type=POST value=/ignore/url/find/all} #endregion
func (IgnoreURLController) FindByDate ¶
func (control IgnoreURLController) FindByDate(ctx *gin.Context) interface{}
#region @Api {title=查询指定时间内数据} @param {name=sDateSt dataType=string paramType=query explain=格式:YYYY-MM-DD HH:mm:ss required=true} @param {name=sDateEd dataType=string paramType=query explain=格式:YYYY-MM-DD HH:mm:ss required=true} @return {type=json explainType=MsgEmity<IgnoreURL> explain=返回数组[]map[string]interface} @RequestMapping {name=FindByDate type=POST value=/ignore/url/find/date} #endregion
func (IgnoreURLController) FindById ¶
func (control IgnoreURLController) FindById(ctx *gin.Context) interface{}
#region @Api {title=根据记录编号取对象} @param {name=sId dataType=string paramType=query explain=记录编号 required=true} @return {type=json explainType=MsgEmity<IgnoreURL> explain=返回对象} @RequestMapping {name=FindById type=POST value=/ignore/url/find/id} #endregion
func (IgnoreURLController) FindByKey ¶
func (control IgnoreURLController) FindByKey(ctx *gin.Context) interface{}
#region @Api {title=根据关键值取对象集合} @param {name=data dataType=json paramType=body explain=IgnoreURL结构数据 explainType=IgnoreURL required=true} @return {type=json explainType=MsgEmity<IgnoreURL> explain=返回数组[]map[string]interface} @RequestMapping {name=FindByKey type=POST value=/ignore/url/find/key} #endregion
func (IgnoreURLController) FindByPage ¶
func (control IgnoreURLController) FindByPage(ctx *gin.Context) interface{}
#region @Api {title=查询分页数据} @param {name=data dataType=json paramType=body explain=FindByPageParam结构数据 explainType=FindByPageParam<IgnoreURL> required=true} @return {type=json explainType=MsgEmity<Page<IgnoreURL>> explain=返回分页数据} @RequestMapping {name=FindByPage type=POST value=/ignore/url/find/page} #endregion
func (IgnoreURLController) FindByRow ¶
func (control IgnoreURLController) FindByRow(ctx *gin.Context) interface{}
#region @Api {title=根据记录编号查询符合分页数据的某条记录} @param {name=sId dataType=string paramType=query explain=记录编号 required=true} @return {type=json explainType=MsgEmity<IgnoreURL> explain=返回数组[]map[string]interface} @RequestMapping {name=FindByRow type=POST value=/ignore/url/find/page/row} #endregion
type IgnoreURLService ¶
type IgnoreURLService struct {
CommonService
}
*
- 拦截器忽略路径IgnoreURL表基本业务操作结构体
func (IgnoreURLService) CheckIgnoreUrl ¶
func (iu IgnoreURLService) CheckIgnoreUrl(sUrl string, isMustLogin bool, sUserType string) *MsgEmity
*
- 验证指定url是否在可忽略的访问路径中(给内部拦截器用,直接返回Boolean)
- @param sUrl 待检验的url
- @param isMustLogin 是否必须登录
- @param sUserType 待检验的用户类型
- @return
func (IgnoreURLService) ClearCache ¶
func (this IgnoreURLService) ClearCache() *MsgEmity
* * 清理缓存 * @return