Documentation ¶
Index ¶
- type TableKeyLocal
- type TableKeyLocalBase
- func (TableKeyLocalBase) BaseColumnNames() string
- func (TableKeyLocalBase) BaseEntity() dbinfo.Entity
- func (TableKeyLocalBase) GetDataInfo(name string) *dbinfo.DataInfo
- func (TableKeyLocalBase) New() dbinfo.Entity
- func (TableKeyLocalBase) OwnerName() string
- func (TableKeyLocalBase) OwnerTable() string
- func (TableKeyLocalBase) TableName() string
- type TableKeyLocalController
- func (control TableKeyLocalController) Add(ctx ginutil.Context) interface{}
- func (control TableKeyLocalController) CheckRepeatAlone() map[string]int
- func (control TableKeyLocalController) Del(ctx ginutil.Context) interface{}
- func (control TableKeyLocalController) Edit(ctx ginutil.Context) interface{}
- func (control TableKeyLocalController) FindAll(ctx ginutil.Context) interface{}
- func (control TableKeyLocalController) FindByDate(ctx ginutil.Context) interface{}
- func (control TableKeyLocalController) FindById(ctx ginutil.Context) interface{}
- func (control TableKeyLocalController) FindByKey(ctx ginutil.Context) interface{}
- func (control TableKeyLocalController) FindByPage(ctx ginutil.Context) interface{}
- func (control TableKeyLocalController) FindByRow(ctx ginutil.Context) interface{}
- func (control TableKeyLocalController) GetNewId(ctx ginutil.Context) interface{}
- func (control TableKeyLocalController) GetNewIds(ctx ginutil.Context) interface{}
- func (control TableKeyLocalController) RegisterUrl()
- func (control TableKeyLocalController) Reset(ctx ginutil.Context) interface{}
- type TableKeyLocalDao
- type TableKeyLocalService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TableKeyLocal ¶
type TableKeyLocal struct {
TableKeyLocalBase
}
*
- 记录编号序列管理表'TableKeyLocal'表结构体
- 警告:非数据库字段禁止在此添加,应该创建扩展结构体中添加
- @author HuangXinBian
type TableKeyLocalBase ¶
type TableKeyLocalBase struct { GiId int64 `json:"iId" gorm:"column:iId; type:bigint; NOT NULL; DEFAULT '0'; primary_key"` //记录编号(非自增长) GsType string `json:"sType" gorm:"column:sType; type:varchar; NOT NULL"` //类型 GsValue string `json:"sValue" gorm:"column:sValue; type:varchar; NOT NULL"` //值 GiIndex int `json:"iIndex" gorm:"column:iIndex; type:int; DEFAULT '0'"` //序号 GiVersion int `json:"iVersion" gorm:"column:iVersion; type:int; NOT NULL; DEFAULT '1'"` //版本号 }
*
- 记录编号序列管理表'TableKeyLocal'表结构体
- 警告:非数据库字段禁止在此添加,应该创建扩展结构体中添加
- @author HuangXinBian
func (TableKeyLocalBase) BaseColumnNames ¶
func (TableKeyLocalBase) BaseColumnNames() string
*
- 结构体映射表的字段名串
func (TableKeyLocalBase) BaseEntity ¶
func (TableKeyLocalBase) BaseEntity() dbinfo.Entity
*
- 取基础实体,用于在子类(嵌套结构体)时同样获得基类
func (TableKeyLocalBase) GetDataInfo ¶
func (TableKeyLocalBase) GetDataInfo(name string) *dbinfo.DataInfo
*
- 取数据结构信息
- name 字段名
func (TableKeyLocalBase) OwnerName ¶
func (TableKeyLocalBase) OwnerName() string
*
- 结构体映射库名,去除'Dev_'等前缀
- @return
func (TableKeyLocalBase) OwnerTable ¶
func (TableKeyLocalBase) OwnerTable() string
*
- 结构体映射表名,无库名
- @return
func (TableKeyLocalBase) TableName ¶
func (TableKeyLocalBase) TableName() string
*
- 结构体映射表名,处理结构体名称与表名不一致的情况
type TableKeyLocalController ¶
type TableKeyLocalController struct { app.ControllerBaseFunc //通用控制层接口方法 ModuleEntity TableKeyLocal //对应模块数据实体 ModuleService TableKeyLocalService //对应模块业务实体 }
@Controller 记录编号序列管理表控制器
func (TableKeyLocalController) Add ¶
func (control TableKeyLocalController) Add(ctx ginutil.Context) interface{}
#region @Api {title=新增} @param {name=data dataType=json paramType=body explain=TableKeyLocal结构数据 explainType=TableKeyLocal required=true} @return {type=json explainType=MsgEntity<TableKeyLocal> explain=返回对象} @RequestMapping {name=Add type=POST value=/table/key/add} #endregion
func (TableKeyLocalController) CheckRepeatAlone ¶
func (control TableKeyLocalController) CheckRepeatAlone() map[string]int
-- 检查待新增内容是否存在重复数据(单独字段重复即重复)集合,注意:int必须是1、10、100、1000 --//
func (TableKeyLocalController) Del ¶
func (control TableKeyLocalController) Del(ctx ginutil.Context) interface{}
#region @Api {title=删除数据} @param {name=iId dataType=int64 paramType=query explain=记录编号 required=true} @param {name=iVersion dataType=int paramType=query explain=版本号 required=true} @return {type=json explainType=MsgEntity<int> explain=返回影响数} @RequestMapping {name=Del type=POST value=/table/key/del} #endregion
func (TableKeyLocalController) Edit ¶
func (control TableKeyLocalController) Edit(ctx ginutil.Context) interface{}
#region @Api {title=修改数据} @param {name=data dataType=json paramType=body explain=TableKeyLocal结构数据 explainType=TableKeyLocal required=true} @return {type=json explainType=MsgEntity<int> explain=返回码值} @RequestMapping {name=Edit type=POST value=/table/key/edit} #endregion
func (TableKeyLocalController) FindAll ¶
func (control TableKeyLocalController) FindAll(ctx ginutil.Context) interface{}
#region @Api {title=查询全部} @param {name=data dataType=json paramType=body explain=map[string]interface结构数据 explainType=TableKeyLocal required=true} @return {type=json explainType=MsgEntity<TableKeyLocal> explain=返回数组[]map[string]interface} @RequestMapping {name=FindAll type=POST value=/table/key/find/all} #endregion
func (TableKeyLocalController) FindByDate ¶
func (control TableKeyLocalController) FindByDate(ctx ginutil.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=MsgEntity<TableKeyLocal> explain=返回数组[]map[string]interface} @RequestMapping {name=FindByDate type=POST value=/table/key/find/date} #endregion
func (TableKeyLocalController) FindById ¶
func (control TableKeyLocalController) FindById(ctx ginutil.Context) interface{}
#region @Api {title=根据记录编号取对象} @param {name=iId dataType=int64 paramType=query explain=记录编号 required=true} @return {type=json explainType=MsgEntity<TableKeyLocal> explain=返回对象} @RequestMapping {name=FindById type=POST value=/table/key/find/id} #endregion
func (TableKeyLocalController) FindByKey ¶
func (control TableKeyLocalController) FindByKey(ctx ginutil.Context) interface{}
#region @Api {title=根据关键值取对象集合} @param {name=data dataType=json paramType=body explain=TableKeyLocal结构数据 explainType=TableKeyLocal required=true} @return {type=json explainType=MsgEntity<TableKeyLocal> explain=返回数组[]map[string]interface} @RequestMapping {name=FindByKey type=POST value=/table/key/find/key} #endregion
func (TableKeyLocalController) FindByPage ¶
func (control TableKeyLocalController) FindByPage(ctx ginutil.Context) interface{}
#region @Api {title=查询分页数据} @param {name=data dataType=json paramType=body explain=FindByPageParam结构数据 explainType=FindByPageParam<TableKeyLocal> required=true} @return {type=json explainType=MsgEntity<Page<TableKeyLocal>> explain=返回分页数据} @RequestMapping {name=FindByPage type=POST value=/table/key/find/page} #endregion
func (TableKeyLocalController) FindByRow ¶
func (control TableKeyLocalController) FindByRow(ctx ginutil.Context) interface{}
#region @Api {title=根据记录编号查询符合分页数据的某条记录} @param {name=iId dataType=int64 paramType=query explain=记录编号 required=true} @return {type=json explainType=MsgEntity<TableKeyLocal> explain=返回数组[]map[string]interface} @RequestMapping {name=FindByRow type=POST value=/table/key/find/page/row} #endregion
func (TableKeyLocalController) GetNewId ¶
func (control TableKeyLocalController) GetNewId(ctx ginutil.Context) interface{}
#region @Api {title=取指定表(或序列)的新Id} @param {name=formatLong dataType=int paramType=query explain=格式化长度(不足长度+0) required=true} @param {name=seriesName dataType=string paramType=query explain=表名或序列名 required=true} @return {type=json explainType=string explain=返回新序列值} @RequestMapping {name=GetNewId type=POST value=/table/key/new} #endregion
func (TableKeyLocalController) GetNewIds ¶
func (control TableKeyLocalController) GetNewIds(ctx ginutil.Context) interface{}
#region @Api {title=取指定表的一批新Id} @param {name=formatLong dataType=int paramType=query explain=格式化长度(不足长度+0) required=true} @param {name=seriesName dataType=string paramType=query explain=表名或序列名 required=true} @param {name=size dataType=int paramType=query explain=数量 required=true} @return {type=json explainType=string explain=返回新序列值} @RequestMapping {name=GetNewIds type=POST value=/table/key/news} #endregion
func (TableKeyLocalController) RegisterUrl ¶
func (control TableKeyLocalController) RegisterUrl()
接口注册
func (TableKeyLocalController) Reset ¶
func (control TableKeyLocalController) Reset(ctx ginutil.Context) interface{}
#region @Api {title=重置指定表序号} @param {name=seriesName dataType=string paramType=query explain=表名或序列名 required=true} @return {type=json explainType=MsgEntity<int> explain=返回码值} @RequestMapping {name=Reset type=POST value=/table/key/reset} #endregion
type TableKeyLocalDao ¶
type TableKeyLocalDao struct { }
*
- 记录编号序列管理表TableKeyLocal表基本业务操作结构体
func (TableKeyLocalDao) GetNewId ¶
func (o TableKeyLocalDao) GetNewId(formatLong int, seriesName string) string
*
- 取各表(或序列)的新Id
- @param formatLong 格式化长度(不足长度+0)
- @param seriesName 表名或序列名
- @return
func (TableKeyLocalDao) GetNewIds ¶
func (o TableKeyLocalDao) GetNewIds(formatLong int, seriesName string, size int) []string
*
- 取各表的一批新Id
- @param formatLong 格式化长度(不足长度+0)
- @param seriesName 表名或序列名
- @param size 数量
- @return
func (TableKeyLocalDao) Reset ¶
func (o TableKeyLocalDao) Reset(seriesName string) string
*
- 重置
- @param seriesName 表名或序列名
- @return
type TableKeyLocalService ¶
type TableKeyLocalService struct {
app.ServiceBaseFunc
}
*
- 记录编号序列管理表TableKeyLocal表基本业务操作结构体
func (TableKeyLocalService) GetNewId ¶
func (TableKeyLocalService) GetNewId(formatLong int, seriesName string) string
*
- 取各表(或序列)的新Id
- @param formatLong 格式化长度(不足长度+0)
- @param seriesName 表名或序列名
- @return
func (TableKeyLocalService) GetNewIds ¶
func (TableKeyLocalService) GetNewIds(formatLong int, seriesName string, size int) []string
*
- 取各表的一批新Id
- @param formatLong 格式化长度(不足长度+0)
- @param seriesName 表名或序列名
- @param size 数量
- @return
func (TableKeyLocalService) Reset ¶
func (TableKeyLocalService) Reset(seriesName string) string
*
- 重置
- @param seriesName 表名或序列名
- @return