Commit 5e325a41 by zhengqiuyun86

初始化

parent a760158c
package PagePlus package PagePlus
import ( import (
"git.168cad.top/zhengqiuyun/rym-util/a/exception"
"git.168cad.top/zhengqiuyun/rym-util/a/page"
"git.168cad.top/zhengqiuyun/rym-util/a/util" "git.168cad.top/zhengqiuyun/rym-util/a/util"
"git.168cad.top/zhengqiuyun/rym-util/exception"
page2 "git.168cad.top/zhengqiuyun/rym-util/page"
"gorm.io/gorm" "gorm.io/gorm"
) )
func Page(params []page.Param, pageNum int, pageSize int, m interface{}, data interface{}, orderBy string, db *gorm.DB) *page.Data { func Page(params []page2.Param, pageNum int, pageSize int, m interface{}, data interface{}, orderBy string, db *gorm.DB) *page2.Data {
var page = page.Data{} var page = page2.Data{}
page.PageSize = util.IfInt(pageSize == 0, 10, pageSize) page.PageSize = util.IfInt(pageSize == 0, 10, pageSize)
page.PageNum = util.IfInt(pageNum == 0, 1, pageNum) page.PageNum = util.IfInt(pageNum == 0, 1, pageNum)
tx := db.Session(&gorm.Session{PrepareStmt: true}) tx := db.Session(&gorm.Session{PrepareStmt: true})
......
...@@ -3,7 +3,6 @@ package exception ...@@ -3,7 +3,6 @@ package exception
import ( import (
"errors" "errors"
"git.168cad.top/zhengqiuyun/rym-util/a/log" "git.168cad.top/zhengqiuyun/rym-util/a/log"
"github.com/go-playground/validator/v10"
"reflect" "reflect"
) )
......
...@@ -2,8 +2,8 @@ package catch ...@@ -2,8 +2,8 @@ package catch
import ( import (
"fmt" "fmt"
"git.168cad.top/zhengqiuyun/rym-util/a/exception" "git.168cad.top/zhengqiuyun/rym-util/exception"
"git.168cad.top/zhengqiuyun/rym-util/a/getWay" "git.168cad.top/zhengqiuyun/rym-util/getWay"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"runtime" "runtime"
"strings" "strings"
......
...@@ -3,7 +3,6 @@ package generate ...@@ -3,7 +3,6 @@ package generate
import ( import (
"fmt" "fmt"
"git.168cad.top/zhengqiuyun/rym-util/a/conf" "git.168cad.top/zhengqiuyun/rym-util/a/conf"
"github.com/deckarep/golang-set"
"github.com/iancoleman/strcase" "github.com/iancoleman/strcase"
"io" "io"
"os" "os"
......
package generate package generate
import (
"git.168cad.top/zhengqiuyun/rym-util/a/db/mysql"
)
func MysqlAllTables() []Table { func MysqlAllTables() []Table {
var tables []Table var tables []Table
//查询库中所有表 //查询库中所有表
......
package generate package generate
import (
"git.168cad.top/zhengqiuyun/rym-util/a/db/mysql"
)
func AllTables() []Table { func AllTables() []Table {
var tables []Table var tables []Table
//查询库中所有表 //查询库中所有表
......
package getWay package getWay
import ( import (
"git.168cad.top/zhengqiuyun/rym-util/a/exception" "git.168cad.top/zhengqiuyun/rym-util/exception"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
) )
......
...@@ -8,6 +8,7 @@ import ( ...@@ -8,6 +8,7 @@ import (
"git.168cad.top/zhengqiuyun/rym-util/a/db/redis" "git.168cad.top/zhengqiuyun/rym-util/a/db/redis"
"git.168cad.top/zhengqiuyun/rym-util/a/log" "git.168cad.top/zhengqiuyun/rym-util/a/log"
"git.168cad.top/zhengqiuyun/rym-util/a/log/es" "git.168cad.top/zhengqiuyun/rym-util/a/log/es"
conf2 "git.168cad.top/zhengqiuyun/rym-util/conf"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"net/http" "net/http"
"time" "time"
...@@ -85,14 +86,14 @@ func logEnd(c *gin.Context, data interface{}) { ...@@ -85,14 +86,14 @@ func logEnd(c *gin.Context, data interface{}) {
rs := string(dataJson) rs := string(dataJson)
excludeUrl := []string{""} excludeUrl := []string{""}
if esSwitch { if esSwitch {
if util.ArrayContains(excludeUrl, GetURL(c)) && len(rs) > conf.LogResponseLength { if util.ArrayContains(excludeUrl, GetURL(c)) && len(rs) > conf2.LogResponseLength {
responseStr = rs[0:conf.LogResponseLength] + "......" responseStr = rs[0:conf2.LogResponseLength] + "......"
} else { } else {
responseStr = rs responseStr = rs
} }
} else { } else {
if len(rs) > conf.LogResponseLength { if len(rs) > conf2.LogResponseLength {
responseStr = rs[0:conf.LogResponseLength] + "......" responseStr = rs[0:conf2.LogResponseLength] + "......"
} else { } else {
responseStr = rs responseStr = rs
} }
......
This diff is collapsed. Click to expand it.
...@@ -50,8 +50,8 @@ type Param interface { ...@@ -50,8 +50,8 @@ type Param interface {
} }
type ErrorRsp struct { type ErrorRsp struct {
Code Code `json:"code"` Code Code `json:"code"`
Msg string `json:"msg"` Msg string `json:"msg"`
SubCode string `json:"sub_code"` SubCode string `json:"sub_code"`
SubMsg string `json:"sub_msg"` SubMsg string `json:"sub_msg"`
} }
...@@ -77,8 +77,8 @@ func (this CertDownload) Params() map[string]string { ...@@ -77,8 +77,8 @@ func (this CertDownload) Params() map[string]string {
type CertDownloadRsp struct { type CertDownloadRsp struct {
Content struct { Content struct {
Code Code `json:"code"` Code Code `json:"code"`
Msg string `json:"msg"` Msg string `json:"msg"`
SubCode string `json:"sub_code"` SubCode string `json:"sub_code"`
SubMsg string `json:"sub_msg"` SubMsg string `json:"sub_msg"`
AliPayCertContent string `json:"alipay_cert_content"` AliPayCertContent string `json:"alipay_cert_content"`
......
...@@ -38,8 +38,8 @@ func (this SystemOauthToken) Params() map[string]string { ...@@ -38,8 +38,8 @@ func (this SystemOauthToken) Params() map[string]string {
// SystemOauthTokenRsp 换取授权访问令牌接口请求参数 // SystemOauthTokenRsp 换取授权访问令牌接口请求参数
type SystemOauthTokenRsp struct { type SystemOauthTokenRsp struct {
Content struct { Content struct {
Code Code `json:"code"` Code Code `json:"code"`
Msg string `json:"msg"` Msg string `json:"msg"`
SubCode string `json:"sub_code"` SubCode string `json:"sub_code"`
SubMsg string `json:"sub_msg"` SubMsg string `json:"sub_msg"`
UserId string `json:"user_id"` UserId string `json:"user_id"`
...@@ -77,8 +77,8 @@ func (this UserInfoShare) Params() map[string]string { ...@@ -77,8 +77,8 @@ func (this UserInfoShare) Params() map[string]string {
// UserInfoShareRsp 支付宝会员授权信息查询接口响应参数 // UserInfoShareRsp 支付宝会员授权信息查询接口响应参数
type UserInfoShareRsp struct { type UserInfoShareRsp struct {
Content struct { Content struct {
Code Code `json:"code"` Code Code `json:"code"`
Msg string `json:"msg"` Msg string `json:"msg"`
SubCode string `json:"sub_code"` SubCode string `json:"sub_code"`
SubMsg string `json:"sub_msg"` SubMsg string `json:"sub_msg"`
AuthNo string `json:"auth_no"` AuthNo string `json:"auth_no"`
......
...@@ -12,27 +12,27 @@ type TradeNotification struct { ...@@ -12,27 +12,27 @@ type TradeNotification struct {
NotifyId string `json:"notify_id"` // 通知校验ID NotifyId string `json:"notify_id"` // 通知校验ID
AppId string `json:"app_id"` // 开发者的app_id AppId string `json:"app_id"` // 开发者的app_id
Charset string `json:"charset"` // 编码格式 Charset string `json:"charset"` // 编码格式
Version string `json:"version"` // 接口版本 Version string `json:"version"` // 接口版本
SignType string `json:"sign_type"` // 签名类型 SignType string `json:"sign_type"` // 签名类型
Sign string `json:"sign"` // 签名 Sign string `json:"sign"` // 签名
TradeNo string `json:"trade_no"` // 支付宝交易号 TradeNo string `json:"trade_no"` // 支付宝交易号
OutTradeNo string `json:"out_trade_no"` // 商户订单号 OutTradeNo string `json:"out_trade_no"` // 商户订单号
OutBizNo string `json:"out_biz_no"` // 商户业务号 OutBizNo string `json:"out_biz_no"` // 商户业务号
BuyerId string `json:"buyer_id"` // 买家支付宝用户号 BuyerId string `json:"buyer_id"` // 买家支付宝用户号
BuyerLogonId string `json:"buyer_logon_id"` // 买家支付宝账号 BuyerLogonId string `json:"buyer_logon_id"` // 买家支付宝账号
SellerId string `json:"seller_id"` // 卖家支付宝用户号 SellerId string `json:"seller_id"` // 卖家支付宝用户号
SellerEmail string `json:"seller_email"` // 卖家支付宝账号 SellerEmail string `json:"seller_email"` // 卖家支付宝账号
TradeStatus TradeStatus `json:"trade_status"` // 交易状态 TradeStatus TradeStatus `json:"trade_status"` // 交易状态
TotalAmount string `json:"total_amount"` // 订单金额 TotalAmount string `json:"total_amount"` // 订单金额
ReceiptAmount string `json:"receipt_amount"` // 实收金额 ReceiptAmount string `json:"receipt_amount"` // 实收金额
InvoiceAmount string `json:"invoice_amount"` // 开票金额 InvoiceAmount string `json:"invoice_amount"` // 开票金额
BuyerPayAmount string `json:"buyer_pay_amount"` // 付款金额 BuyerPayAmount string `json:"buyer_pay_amount"` // 付款金额
PointAmount string `json:"point_amount"` // 集分宝金额 PointAmount string `json:"point_amount"` // 集分宝金额
RefundFee string `json:"refund_fee"` // 总退款金额 RefundFee string `json:"refund_fee"` // 总退款金额
Subject string `json:"subject"` // 商品的标题/交易标题/订单标题/订单关键字等,是请求时对应的参数,原样通知回来。 Subject string `json:"subject"` // 商品的标题/交易标题/订单标题/订单关键字等,是请求时对应的参数,原样通知回来。
Body string `json:"body"` // 商品描述 Body string `json:"body"` // 商品描述
GmtCreate string `json:"gmt_create"` // 交易创建时间 GmtCreate string `json:"gmt_create"` // 交易创建时间
GmtPayment string `json:"gmt_payment"` // 交易付款时间 GmtPayment string `json:"gmt_payment"` // 交易付款时间
GmtRefund string `json:"gmt_refund"` // 交易退款时间 GmtRefund string `json:"gmt_refund"` // 交易退款时间
GmtClose string `json:"gmt_close"` // 交易结束时间 GmtClose string `json:"gmt_close"` // 交易结束时间
FundBillList string `json:"fund_bill_list"` // 支付金额信息 FundBillList string `json:"fund_bill_list"` // 支付金额信息
......
...@@ -28,8 +28,8 @@ func (this TradeRefundAsync) Params() map[string]string { ...@@ -28,8 +28,8 @@ func (this TradeRefundAsync) Params() map[string]string {
// TradeRefundAsyncRsp 统一收单交易退款接口(异步)响应参数 // TradeRefundAsyncRsp 统一收单交易退款接口(异步)响应参数
type TradeRefundAsyncRsp struct { type TradeRefundAsyncRsp struct {
Content struct { Content struct {
Code Code `json:"code"` Code Code `json:"code"`
Msg string `json:"msg"` Msg string `json:"msg"`
SubCode string `json:"sub_code"` SubCode string `json:"sub_code"`
SubMsg string `json:"sub_msg"` SubMsg string `json:"sub_msg"`
TradeNo string `json:"trade_no"` // 支付宝交易号 TradeNo string `json:"trade_no"` // 支付宝交易号
......
...@@ -216,8 +216,8 @@ func (this TradeClose) Params() map[string]string { ...@@ -216,8 +216,8 @@ func (this TradeClose) Params() map[string]string {
// TradeCloseRsp 统一收单交易关闭接口响应参数 // TradeCloseRsp 统一收单交易关闭接口响应参数
type TradeCloseRsp struct { type TradeCloseRsp struct {
Content struct { Content struct {
Code Code `json:"code"` Code Code `json:"code"`
Msg string `json:"msg"` Msg string `json:"msg"`
SubCode string `json:"sub_code"` SubCode string `json:"sub_code"`
SubMsg string `json:"sub_msg"` SubMsg string `json:"sub_msg"`
OutTradeNo string `json:"out_trade_no"` OutTradeNo string `json:"out_trade_no"`
...@@ -387,8 +387,8 @@ type RoyaltyParameter struct { ...@@ -387,8 +387,8 @@ type RoyaltyParameter struct {
// TradeOrderSettleRsp 统一收单交易结算接口响应参数 // TradeOrderSettleRsp 统一收单交易结算接口响应参数
type TradeOrderSettleRsp struct { type TradeOrderSettleRsp struct {
Content struct { Content struct {
Code Code `json:"code"` Code Code `json:"code"`
Msg string `json:"msg"` Msg string `json:"msg"`
SubCode string `json:"sub_code"` SubCode string `json:"sub_code"`
SubMsg string `json:"sub_msg"` SubMsg string `json:"sub_msg"`
TradeNo string `json:"trade_no"` TradeNo string `json:"trade_no"`
...@@ -420,8 +420,8 @@ func (this TradeCreate) Params() map[string]string { ...@@ -420,8 +420,8 @@ func (this TradeCreate) Params() map[string]string {
// TradeCreateRsp 统一收单交易创建接口响应参数 // TradeCreateRsp 统一收单交易创建接口响应参数
type TradeCreateRsp struct { type TradeCreateRsp struct {
Content struct { Content struct {
Code Code `json:"code"` Code Code `json:"code"`
Msg string `json:"msg"` Msg string `json:"msg"`
SubCode string `json:"sub_code"` SubCode string `json:"sub_code"`
SubMsg string `json:"sub_msg"` SubMsg string `json:"sub_msg"`
TradeNo string `json:"trade_no"` // 支付宝交易号 TradeNo string `json:"trade_no"` // 支付宝交易号
...@@ -574,8 +574,8 @@ func (this TradePreCreate) Params() map[string]string { ...@@ -574,8 +574,8 @@ func (this TradePreCreate) Params() map[string]string {
// TradePreCreateRsp 统一收单线下交易预创建接口响应参数 // TradePreCreateRsp 统一收单线下交易预创建接口响应参数
type TradePreCreateRsp struct { type TradePreCreateRsp struct {
Content struct { Content struct {
Code Code `json:"code"` Code Code `json:"code"`
Msg string `json:"msg"` Msg string `json:"msg"`
SubCode string `json:"sub_code"` SubCode string `json:"sub_code"`
SubMsg string `json:"sub_msg"` SubMsg string `json:"sub_msg"`
OutTradeNo string `json:"out_trade_no"` // 创建交易传入的商户订单号 OutTradeNo string `json:"out_trade_no"` // 创建交易传入的商户订单号
...@@ -614,8 +614,8 @@ func (this TradeCancel) Params() map[string]string { ...@@ -614,8 +614,8 @@ func (this TradeCancel) Params() map[string]string {
// TradeCancelRsp 统一收单交易撤销接口响应参数 // TradeCancelRsp 统一收单交易撤销接口响应参数
type TradeCancelRsp struct { type TradeCancelRsp struct {
Content struct { Content struct {
Code Code `json:"code"` Code Code `json:"code"`
Msg string `json:"msg"` Msg string `json:"msg"`
SubCode string `json:"sub_code"` SubCode string `json:"sub_code"`
SubMsg string `json:"sub_msg"` SubMsg string `json:"sub_msg"`
TradeNo string `json:"trade_no"` // 支付宝交易号 TradeNo string `json:"trade_no"` // 支付宝交易号
...@@ -655,8 +655,8 @@ func (this TradeOrderInfoSync) Params() map[string]string { ...@@ -655,8 +655,8 @@ func (this TradeOrderInfoSync) Params() map[string]string {
// TradeOrderInfoSyncRsp 支付宝订单信息同步接口响应参数 // TradeOrderInfoSyncRsp 支付宝订单信息同步接口响应参数
type TradeOrderInfoSyncRsp struct { type TradeOrderInfoSyncRsp struct {
Content struct { Content struct {
Code Code `json:"code"` Code Code `json:"code"`
Msg string `json:"msg"` Msg string `json:"msg"`
SubCode string `json:"sub_code"` SubCode string `json:"sub_code"`
SubMsg string `json:"sub_msg"` SubMsg string `json:"sub_msg"`
TradeNo string `json:"trade_no"` TradeNo string `json:"trade_no"`
...@@ -706,8 +706,8 @@ type TradeSettleConfirmExtendParams struct { ...@@ -706,8 +706,8 @@ type TradeSettleConfirmExtendParams struct {
// TradeSettleConfirmRsp 统一收单确认结算接口响应参数 // TradeSettleConfirmRsp 统一收单确认结算接口响应参数
type TradeSettleConfirmRsp struct { type TradeSettleConfirmRsp struct {
Content struct { Content struct {
Code Code `json:"code"` Code Code `json:"code"`
Msg string `json:"msg"` Msg string `json:"msg"`
SubCode string `json:"sub_code"` SubCode string `json:"sub_code"`
SubMsg string `json:"sub_msg"` SubMsg string `json:"sub_msg"`
TradeNo string `json:"trade_no"` TradeNo string `json:"trade_no"`
......
...@@ -8,8 +8,8 @@ import ( ...@@ -8,8 +8,8 @@ import (
"encoding/json" "encoding/json"
"fmt" "fmt"
"git.168cad.top/zhengqiuyun/rym-util/a/conf" "git.168cad.top/zhengqiuyun/rym-util/a/conf"
"git.168cad.top/zhengqiuyun/rym-util/a/exception"
"git.168cad.top/zhengqiuyun/rym-util/a/log" "git.168cad.top/zhengqiuyun/rym-util/a/log"
"git.168cad.top/zhengqiuyun/rym-util/exception"
"io" "io"
"io/ioutil" "io/ioutil"
"net/http" "net/http"
......
package log package a
import ( import (
"bytes" "bytes"
"fmt" "fmt"
"git.168cad.top/zhengqiuyun/rym-util/a/conf" "git.168cad.top/zhengqiuyun/rym-util/conf"
"runtime" "runtime"
"strconv" "strconv"
"strings" "strings"
...@@ -44,14 +44,14 @@ func Print(tag, msg string, file string, line int) { ...@@ -44,14 +44,14 @@ func Print(tag, msg string, file string, line int) {
} }
} }
file = file[strings.LastIndex(file, "/")+1:] file = file[strings.LastIndex(file, "/")+1:]
fmt.Println(fmt.Sprintf(str, FormatDateMillTime(time.Now()), tag, GetGID(), file, line, msg)) fmt.Println(fmt.Sprintf(str, FormatDateMillTime(time.Now()), tag, getGID(), file, line, msg))
} }
func FormatDateMillTime(dataTime time.Time) string { func FormatDateMillTime(dataTime time.Time) string {
return dataTime.Format("2006-01-02 15:04:05.000000") return dataTime.Format("2006-01-02 15:04:05.000000")
} }
func GetGID() uint64 { func getGID() uint64 {
b := make([]byte, 64) b := make([]byte, 64)
b = b[:runtime.Stack(b, false)] b = b[:runtime.Stack(b, false)]
b = bytes.TrimPrefix(b, []byte("goroutine ")) b = bytes.TrimPrefix(b, []byte("goroutine "))
......
package rym_util package log
import ( import (
"git.168cad.top/zhengqiuyun/rym-util/a/conf" "git.168cad.top/zhengqiuyun/rym-util/conf"
"git.168cad.top/zhengqiuyun/rym-util/a/log" "git.168cad.top/zhengqiuyun/rym-util/log/a"
"runtime" "runtime"
"strings" "strings"
) )
...@@ -16,7 +16,7 @@ func DebugDo(f func()) { ...@@ -16,7 +16,7 @@ func DebugDo(f func()) {
func IsDebug() bool { func IsDebug() bool {
ok := false ok := false
switch strings.ToLower(conf.LogLevel) { switch strings.ToLower(conf.LogLevel) {
case strings.ToLower(log.DebugL): case strings.ToLower(a.DebugL):
ok = true ok = true
break break
} }
...@@ -26,47 +26,47 @@ func IsDebug() bool { ...@@ -26,47 +26,47 @@ func IsDebug() bool {
func Debug(msg string) { func Debug(msg string) {
ok := false ok := false
switch strings.ToLower(conf.LogLevel) { switch strings.ToLower(conf.LogLevel) {
case strings.ToLower(log.DebugL): case strings.ToLower(a.DebugL):
ok = true ok = true
break break
} }
if ok { if ok {
_, file, line, _ := runtime.Caller(1) _, file, line, _ := runtime.Caller(1)
log.Print("Debug", msg, file, line) a.Print("Debug", msg, file, line)
} }
} }
func Info(msg string) { func Info(msg string) {
ok := false ok := false
switch strings.ToLower(conf.LogLevel) { switch strings.ToLower(conf.LogLevel) {
case strings.ToLower(log.DebugL): case strings.ToLower(a.DebugL):
ok = true ok = true
break break
case strings.ToLower(log.InfoL): case strings.ToLower(a.InfoL):
ok = true ok = true
break break
} }
if ok { if ok {
_, file, line, _ := runtime.Caller(1) _, file, line, _ := runtime.Caller(1)
log.Print("Info", msg, file, line) a.Print("Info", msg, file, line)
} }
} }
func Error(msg string) { func Error(msg string) {
ok := false ok := false
switch strings.ToLower(conf.LogLevel) { switch strings.ToLower(conf.LogLevel) {
case strings.ToLower(log.DebugL): case strings.ToLower(a.DebugL):
ok = true ok = true
break break
case strings.ToLower(log.InfoL): case strings.ToLower(a.InfoL):
ok = true ok = true
break break
case strings.ToLower(log.ErrorL): case strings.ToLower(a.ErrorL):
ok = true ok = true
break break
} }
if ok { if ok {
_, file, line, _ := runtime.Caller(1) _, file, line, _ := runtime.Caller(1)
log.Print("Error", msg, file, line) a.Print("Error", msg, file, line)
} }
} }
package rym_util package util
func ArrayContains(array []string, e string) bool { func ArrayContains(array []string, e string) bool {
for _, v := range array { for _, v := range array {
......
package rym_util package util
import ( import (
"time" "time"
......
package rym_util package util
func IfInt(isTrue bool, a, b int) int { func IfInt(isTrue bool, a, b int) int {
if isTrue { if isTrue {
......
package rym_util package util
import ( import (
"encoding/base64" "encoding/base64"
......
package rym_util package util
import ( import (
"bytes" "bytes"
...@@ -9,7 +9,7 @@ import ( ...@@ -9,7 +9,7 @@ import (
"crypto/sha256" "crypto/sha256"
"encoding/base64" "encoding/base64"
"fmt" "fmt"
"git.168cad.top/zhengqiuyun/rym-util/a/exception" "git.168cad.top/zhengqiuyun/rym-util/exception"
"github.com/wechatpay-apiv3/wechatpay-go/utils" "github.com/wechatpay-apiv3/wechatpay-go/utils"
"sort" "sort"
) )
......
package rym_util package util
import ( import (
"encoding/json" "encoding/json"
"git.168cad.top/zhengqiuyun/rym-util/a/exception" "git.168cad.top/zhengqiuyun/rym-util/exception"
"net/url" "net/url"
"sort" "sort"
"strconv" "strconv"
......
package rym_util package util
import ( import (
"crypto/md5" "crypto/md5"
......
package rym_util package util
import ( import (
"os" "os"
......
package rym_util package util
func EncodePwd(loginPwd, loginPwdSalt string) string { func EncodePwd(loginPwd, loginPwdSalt string) string {
pingPwd := loginPwdSalt + loginPwd pingPwd := loginPwdSalt + loginPwd
......
package rym_util package util
import ( import (
"bytes" "bytes"
......
...@@ -11,9 +11,9 @@ type U interface{} ...@@ -11,9 +11,9 @@ type U interface{}
//流计算数据结构定义 //流计算数据结构定义
type Stream struct { type Stream struct {
Head T Head T
Tail *Stream Tail *Stream
Length int Length int
NotEmpty bool NotEmpty bool
} }
......
package rym_util package util
import ( import (
"encoding/json" "encoding/json"
"git.168cad.top/zhengqiuyun/rym-util/a/exception" "git.168cad.top/zhengqiuyun/rym-util/exception"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/shopspring/decimal" "github.com/shopspring/decimal"
"math/rand" "math/rand"
......
...@@ -2,7 +2,7 @@ package main ...@@ -2,7 +2,7 @@ package main
import ( import (
"fmt" "fmt"
util "git.168cad.top/zhengqiuyun/rym-util/a/util/aes" "git.168cad.top/zhengqiuyun/rym-util/util/aes"
) )
func main() { func main() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment