1 Star 0 Fork 0

tomatomeatman / GolangRepository

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
TableKeyService.go 1.21 KB
一键复制 编辑 原始数据 按行查看 历史
laowei 提交于 2024-05-14 10:02 . 加入多线程处理
package bridge
import (
. "gitee.com/tomatomeatman/golang-repository/bricks/model"
. "gitee.com/tomatomeatman/golang-repository/bricks/utils/function/app"
)
/**
* 记录编号序列管理表TableKey表基本业务操作结构体
*/
type TableKeyService struct {
CommonService
}
/**
* 初始化
*/
func init() {
if (AppUtil{}.IsNotCloudSystem()) { //禁用桥接
return
}
go GlobalVariable{}.RegisterVariable("TableKeyService", TableKeyService{})
}
/**
* 取各表(或序列)的新Id
* @param formatLong 格式化长度(不足长度+0)
* @param seriesName 表名或序列名
* @return
*/
func (this TableKeyService) GetNewId(formatLong int, seriesName string) string {
return TableKeyDao{}.GetNewId(formatLong, seriesName)
}
/**
* 取各表的一批新Id
* @param formatLong 格式化长度(不足长度+0)
* @param seriesName 表名或序列名
* @param size 数量
* @return
*/
func (this TableKeyService) GetNewIds(formatLong int, seriesName string, size int) []string {
return TableKeyDao{}.GetNewIds(formatLong, seriesName, size)
}
/**
* 重置
* @param seriesName 表名或序列名
* @return
*/
func (this TableKeyService) Reset(seriesName string) string {
return TableKeyDao{}.Reset(seriesName)
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/tomatomeatman/golang-repository.git
git@gitee.com:tomatomeatman/golang-repository.git
tomatomeatman
golang-repository
GolangRepository
1a0844a34204

搜索帮助

Bbcd6f05 5694891 0cc6727d 5694891