feat(app): update
This commit is contained in:
2
go.mod
2
go.mod
@ -1,4 +1,4 @@
|
|||||||
module servicebase
|
module gitea.ddegame.cn/open/servicebase
|
||||||
|
|
||||||
go 1.24.0
|
go 1.24.0
|
||||||
|
|
||||||
|
|||||||
3
pkg/cache/redis_client.go
vendored
3
pkg/cache/redis_client.go
vendored
@ -2,7 +2,8 @@ package cache
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
logs "servicebase/pkg/log"
|
|
||||||
|
logs "gitea.ddegame.cn/open/servicebase/pkg/log"
|
||||||
|
|
||||||
redis "github.com/redis/go-redis/v9"
|
redis "github.com/redis/go-redis/v9"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
|
|||||||
3
pkg/cache/redis_lock.go
vendored
3
pkg/cache/redis_lock.go
vendored
@ -2,8 +2,9 @@ package cache
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
"servicebase/pkg/log"
|
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"gitea.ddegame.cn/open/servicebase/pkg/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Lock(key string) (e error) {
|
func Lock(key string) (e error) {
|
||||||
|
|||||||
5
pkg/cache/user/user.go
vendored
5
pkg/cache/user/user.go
vendored
@ -2,11 +2,12 @@ package cache_user
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"servicebase/pkg/cache"
|
|
||||||
"servicebase/pkg/tools"
|
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"gitea.ddegame.cn/open/servicebase/pkg/cache"
|
||||||
|
"gitea.ddegame.cn/open/servicebase/pkg/tools"
|
||||||
|
|
||||||
"github.com/anxpp/beego/logs"
|
"github.com/anxpp/beego/logs"
|
||||||
"github.com/anxpp/common-utils/str"
|
"github.com/anxpp/common-utils/str"
|
||||||
)
|
)
|
||||||
|
|||||||
@ -1,11 +1,12 @@
|
|||||||
package http_api
|
package http_api
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"servicebase/pkg/log"
|
|
||||||
"servicebase/pkg/res"
|
|
||||||
"servicebase/pkg/utils"
|
|
||||||
"errors"
|
"errors"
|
||||||
|
|
||||||
|
"gitea.ddegame.cn/open/servicebase/pkg/log"
|
||||||
|
"gitea.ddegame.cn/open/servicebase/pkg/res"
|
||||||
|
"gitea.ddegame.cn/open/servicebase/pkg/utils"
|
||||||
|
|
||||||
"github.com/go-resty/resty/v2"
|
"github.com/go-resty/resty/v2"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -4,7 +4,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"servicebase/pkg/common/req"
|
"gitea.ddegame.cn/open/servicebase/pkg/common/req"
|
||||||
|
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
"go.mongodb.org/mongo-driver/bson"
|
"go.mongodb.org/mongo-driver/bson"
|
||||||
|
|||||||
@ -1,12 +1,13 @@
|
|||||||
package Netease
|
package Netease
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"servicebase/pkg/common/HyTools"
|
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"net/url"
|
"net/url"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
Netease "servicebase/pkg/common/netease"
|
"gitea.ddegame.cn/open/servicebase/pkg/common/HyTools"
|
||||||
|
|
||||||
|
Netease "gitea.ddegame.cn/open/servicebase/pkg/common/netease"
|
||||||
|
|
||||||
"github.com/anxpp/beego"
|
"github.com/anxpp/beego"
|
||||||
"github.com/anxpp/beego/logs"
|
"github.com/anxpp/beego/logs"
|
||||||
|
|||||||
@ -2,7 +2,8 @@ package Netease
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"servicebase/pkg/log"
|
|
||||||
|
"gitea.ddegame.cn/open/servicebase/pkg/log"
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
|
|||||||
@ -10,12 +10,13 @@ import (
|
|||||||
"math/rand"
|
"math/rand"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
"servicebase/pkg/log"
|
|
||||||
"sort"
|
"sort"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"gitea.ddegame.cn/open/servicebase/pkg/log"
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
"github.com/tjfoc/gmsm/sm3"
|
"github.com/tjfoc/gmsm/sm3"
|
||||||
|
|||||||
@ -2,7 +2,8 @@ package client
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"servicebase/pkg/tools"
|
|
||||||
|
"gitea.ddegame.cn/open/servicebase/pkg/tools"
|
||||||
|
|
||||||
rtctokenbuilder "github.com/AgoraIO/Tools/DynamicKey/AgoraDynamicKey/go/src/rtctokenbuilder2"
|
rtctokenbuilder "github.com/AgoraIO/Tools/DynamicKey/AgoraDynamicKey/go/src/rtctokenbuilder2"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
|
|||||||
@ -3,10 +3,11 @@ package client
|
|||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"servicebase/pkg/helper"
|
|
||||||
"servicebase/pkg/log"
|
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
|
"gitea.ddegame.cn/open/servicebase/pkg/helper"
|
||||||
|
"gitea.ddegame.cn/open/servicebase/pkg/log"
|
||||||
|
|
||||||
openapi "github.com/alibabacloud-go/darabonba-openapi/v2/client"
|
openapi "github.com/alibabacloud-go/darabonba-openapi/v2/client"
|
||||||
dysmsapi20170525 "github.com/alibabacloud-go/dysmsapi-20170525/v3/client"
|
dysmsapi20170525 "github.com/alibabacloud-go/dysmsapi-20170525/v3/client"
|
||||||
util "github.com/alibabacloud-go/tea-utils/v2/service"
|
util "github.com/alibabacloud-go/tea-utils/v2/service"
|
||||||
|
|||||||
@ -1,13 +1,14 @@
|
|||||||
package ess
|
package ess
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"servicebase/pkg/common/es/document"
|
|
||||||
"servicebase/pkg/common/messages"
|
|
||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"reflect"
|
"reflect"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"gitea.ddegame.cn/open/servicebase/pkg/common/es/document"
|
||||||
|
"gitea.ddegame.cn/open/servicebase/pkg/common/messages"
|
||||||
|
|
||||||
"github.com/anxpp/beego/logs"
|
"github.com/anxpp/beego/logs"
|
||||||
"github.com/olivere/elastic/v7"
|
"github.com/olivere/elastic/v7"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
|
|||||||
@ -1,11 +1,12 @@
|
|||||||
package ess
|
package ess
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"servicebase/pkg/common/messages"
|
|
||||||
"context"
|
"context"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"gitea.ddegame.cn/open/servicebase/pkg/common/messages"
|
||||||
|
|
||||||
"github.com/anxpp/beego/logs"
|
"github.com/anxpp/beego/logs"
|
||||||
"github.com/olivere/elastic/v7"
|
"github.com/olivere/elastic/v7"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
package response
|
package response
|
||||||
|
|
||||||
import "servicebase/pkg/common/http/dto"
|
import "gitea.ddegame.cn/open/servicebase/pkg/common/http/dto"
|
||||||
|
|
||||||
type CommonResponse struct {
|
type CommonResponse struct {
|
||||||
Code string
|
Code string
|
||||||
|
|||||||
@ -4,13 +4,14 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"servicebase/pkg/common"
|
|
||||||
"servicebase/pkg/common/HyTools"
|
|
||||||
yunxin "servicebase/pkg/common/netease/dto"
|
|
||||||
"servicebase/pkg/htools"
|
|
||||||
"servicebase/pkg/log"
|
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"gitea.ddegame.cn/open/servicebase/pkg/common"
|
||||||
|
"gitea.ddegame.cn/open/servicebase/pkg/common/HyTools"
|
||||||
|
yunxin "gitea.ddegame.cn/open/servicebase/pkg/common/netease/dto"
|
||||||
|
"gitea.ddegame.cn/open/servicebase/pkg/htools"
|
||||||
|
"gitea.ddegame.cn/open/servicebase/pkg/log"
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/spf13/cast"
|
"github.com/spf13/cast"
|
||||||
|
|
||||||
@ -501,7 +502,6 @@ func (client *ImClient) ChangeChatroomStat(parameters map[string]string) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
//{"desc":"parameter roomid should be long","code":414}
|
|
||||||
var resData struct {
|
var resData struct {
|
||||||
Code int `json:"code"`
|
Code int `json:"code"`
|
||||||
Desc string `json:"desc"`
|
Desc string `json:"desc"`
|
||||||
|
|||||||
@ -1,9 +1,10 @@
|
|||||||
package util
|
package util
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"servicebase/pkg/common"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"gitea.ddegame.cn/open/servicebase/pkg/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Test_processTimeStr(t *testing.T) {
|
func Test_processTimeStr(t *testing.T) {
|
||||||
|
|||||||
@ -1,12 +1,13 @@
|
|||||||
package datasource
|
package datasource
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"servicebase/pkg/log"
|
|
||||||
"servicebase/pkg/repo"
|
|
||||||
"servicebase/pkg/utils"
|
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"gitea.ddegame.cn/open/servicebase/pkg/log"
|
||||||
|
"gitea.ddegame.cn/open/servicebase/pkg/repo"
|
||||||
|
"gitea.ddegame.cn/open/servicebase/pkg/utils"
|
||||||
|
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
"gorm.io/driver/mysql"
|
"gorm.io/driver/mysql"
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
|
|||||||
@ -8,9 +8,10 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
"servicebase/pkg/common/HyTools"
|
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"gitea.ddegame.cn/open/servicebase/pkg/common/HyTools"
|
||||||
|
|
||||||
"github.com/anxpp/beego/logs"
|
"github.com/anxpp/beego/logs"
|
||||||
"github.com/dgrijalva/jwt-go"
|
"github.com/dgrijalva/jwt-go"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
|
|||||||
@ -6,15 +6,16 @@ import (
|
|||||||
"encoding/xml"
|
"encoding/xml"
|
||||||
"errors"
|
"errors"
|
||||||
"net/http"
|
"net/http"
|
||||||
"servicebase/pkg/common"
|
|
||||||
"servicebase/pkg/htools"
|
|
||||||
"servicebase/pkg/log"
|
|
||||||
"servicebase/pkg/partner/wxpay_utility"
|
|
||||||
"sort"
|
"sort"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"gitea.ddegame.cn/open/servicebase/pkg/common"
|
||||||
|
"gitea.ddegame.cn/open/servicebase/pkg/htools"
|
||||||
|
"gitea.ddegame.cn/open/servicebase/pkg/log"
|
||||||
|
"gitea.ddegame.cn/open/servicebase/pkg/partner/wxpay_utility"
|
||||||
|
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
"github.com/wechatpay-apiv3/wechatpay-go/core"
|
"github.com/wechatpay-apiv3/wechatpay-go/core"
|
||||||
"github.com/wechatpay-apiv3/wechatpay-go/core/auth/verifiers"
|
"github.com/wechatpay-apiv3/wechatpay-go/core/auth/verifiers"
|
||||||
|
|||||||
@ -7,11 +7,12 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
"servicebase/pkg/common/HyTools"
|
|
||||||
"sort"
|
"sort"
|
||||||
"strconv"
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"gitea.ddegame.cn/open/servicebase/pkg/common/HyTools"
|
||||||
|
|
||||||
"github.com/anxpp/beego/logs"
|
"github.com/anxpp/beego/logs"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
)
|
)
|
||||||
|
|||||||
@ -4,7 +4,8 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
"net/url"
|
"net/url"
|
||||||
"servicebase/pkg/htools"
|
|
||||||
|
"gitea.ddegame.cn/open/servicebase/pkg/htools"
|
||||||
|
|
||||||
"github.com/anxpp/beego/logs"
|
"github.com/anxpp/beego/logs"
|
||||||
)
|
)
|
||||||
|
|||||||
@ -2,9 +2,10 @@ package ali_auth
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"servicebase/pkg/log"
|
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"gitea.ddegame.cn/open/servicebase/pkg/log"
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
|
|
||||||
|
|||||||
@ -1,12 +1,13 @@
|
|||||||
package mq_http
|
package mq_http
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"servicebase/pkg/htools"
|
|
||||||
"servicebase/pkg/partner/mq/message"
|
|
||||||
"servicebase/pkg/partner/mq/pusher"
|
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
|
"gitea.ddegame.cn/open/servicebase/pkg/htools"
|
||||||
|
"gitea.ddegame.cn/open/servicebase/pkg/partner/mq/message"
|
||||||
|
"gitea.ddegame.cn/open/servicebase/pkg/partner/mq/pusher"
|
||||||
|
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -1,14 +1,15 @@
|
|||||||
package mq
|
package mq
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"servicebase/pkg/common/HyTools"
|
|
||||||
mq_http "servicebase/pkg/partner/mq/http"
|
|
||||||
message2 "servicebase/pkg/partner/mq/message"
|
|
||||||
"servicebase/pkg/partner/mq/pusher"
|
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"gitea.ddegame.cn/open/servicebase/pkg/common/HyTools"
|
||||||
|
mq_http "gitea.ddegame.cn/open/servicebase/pkg/partner/mq/http"
|
||||||
|
message2 "gitea.ddegame.cn/open/servicebase/pkg/partner/mq/message"
|
||||||
|
"gitea.ddegame.cn/open/servicebase/pkg/partner/mq/pusher"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
package pusher
|
package pusher
|
||||||
|
|
||||||
import "servicebase/pkg/partner/mq/message"
|
import "gitea.ddegame.cn/open/servicebase/pkg/partner/mq/message"
|
||||||
|
|
||||||
type PushClient interface {
|
type PushClient interface {
|
||||||
PushRegisterMessage(m message.RegisterMessage) (e error)
|
PushRegisterMessage(m message.RegisterMessage) (e error)
|
||||||
|
|||||||
@ -1,15 +1,16 @@
|
|||||||
package rocket
|
package rocket
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"servicebase/pkg/common"
|
|
||||||
"servicebase/pkg/partner/mq/message"
|
|
||||||
"servicebase/pkg/partner/mq/pusher"
|
|
||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
|
"gitea.ddegame.cn/open/servicebase/pkg/common"
|
||||||
|
"gitea.ddegame.cn/open/servicebase/pkg/partner/mq/message"
|
||||||
|
"gitea.ddegame.cn/open/servicebase/pkg/partner/mq/pusher"
|
||||||
|
|
||||||
"github.com/anxpp/beego/logs"
|
"github.com/anxpp/beego/logs"
|
||||||
"github.com/apache/rocketmq-client-go/v2"
|
"github.com/apache/rocketmq-client-go/v2"
|
||||||
"github.com/apache/rocketmq-client-go/v2/primitive"
|
"github.com/apache/rocketmq-client-go/v2/primitive"
|
||||||
|
|||||||
@ -1,11 +1,12 @@
|
|||||||
package mq
|
package mq
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"servicebase/pkg/common"
|
|
||||||
"servicebase/pkg/partner/mq/message"
|
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"gitea.ddegame.cn/open/servicebase/pkg/common"
|
||||||
|
"gitea.ddegame.cn/open/servicebase/pkg/partner/mq/message"
|
||||||
|
|
||||||
"github.com/anxpp/beego"
|
"github.com/anxpp/beego"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -1,13 +1,14 @@
|
|||||||
package recommend
|
package recommend
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"servicebase/pkg/cache"
|
|
||||||
"bytes"
|
"bytes"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"gitea.ddegame.cn/open/servicebase/pkg/cache"
|
||||||
|
|
||||||
"github.com/anxpp/beego"
|
"github.com/anxpp/beego"
|
||||||
"github.com/anxpp/beego/logs"
|
"github.com/anxpp/beego/logs"
|
||||||
redis "github.com/redis/go-redis/v9"
|
redis "github.com/redis/go-redis/v9"
|
||||||
|
|||||||
@ -2,9 +2,10 @@ package submail
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"servicebase/pkg/utils"
|
|
||||||
"sort"
|
"sort"
|
||||||
|
|
||||||
|
"gitea.ddegame.cn/open/servicebase/pkg/utils"
|
||||||
|
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -16,7 +16,7 @@ import (
|
|||||||
|
|
||||||
"gorm.io/plugin/dbresolver"
|
"gorm.io/plugin/dbresolver"
|
||||||
|
|
||||||
"servicebase/pkg/model"
|
"gitea.ddegame.cn/open/servicebase/pkg/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
func newAdminPrivilege(db *gorm.DB, opts ...gen.DOOption) adminPrivilege {
|
func newAdminPrivilege(db *gorm.DB, opts ...gen.DOOption) adminPrivilege {
|
||||||
|
|||||||
@ -16,7 +16,7 @@ import (
|
|||||||
|
|
||||||
"gorm.io/plugin/dbresolver"
|
"gorm.io/plugin/dbresolver"
|
||||||
|
|
||||||
"servicebase/pkg/model"
|
"gitea.ddegame.cn/open/servicebase/pkg/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
func newAdminRole(db *gorm.DB, opts ...gen.DOOption) adminRole {
|
func newAdminRole(db *gorm.DB, opts ...gen.DOOption) adminRole {
|
||||||
|
|||||||
@ -16,7 +16,7 @@ import (
|
|||||||
|
|
||||||
"gorm.io/plugin/dbresolver"
|
"gorm.io/plugin/dbresolver"
|
||||||
|
|
||||||
"servicebase/pkg/model"
|
"gitea.ddegame.cn/open/servicebase/pkg/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
func newAdminRolePrivilege(db *gorm.DB, opts ...gen.DOOption) adminRolePrivilege {
|
func newAdminRolePrivilege(db *gorm.DB, opts ...gen.DOOption) adminRolePrivilege {
|
||||||
|
|||||||
@ -16,7 +16,7 @@ import (
|
|||||||
|
|
||||||
"gorm.io/plugin/dbresolver"
|
"gorm.io/plugin/dbresolver"
|
||||||
|
|
||||||
"servicebase/pkg/model"
|
"gitea.ddegame.cn/open/servicebase/pkg/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
func newAdminUser(db *gorm.DB, opts ...gen.DOOption) adminUser {
|
func newAdminUser(db *gorm.DB, opts ...gen.DOOption) adminUser {
|
||||||
|
|||||||
@ -16,7 +16,7 @@ import (
|
|||||||
|
|
||||||
"gorm.io/plugin/dbresolver"
|
"gorm.io/plugin/dbresolver"
|
||||||
|
|
||||||
"servicebase/pkg/model"
|
"gitea.ddegame.cn/open/servicebase/pkg/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
func newAdminUserRole(db *gorm.DB, opts ...gen.DOOption) adminUserRole {
|
func newAdminUserRole(db *gorm.DB, opts ...gen.DOOption) adminUserRole {
|
||||||
|
|||||||
@ -16,7 +16,7 @@ import (
|
|||||||
|
|
||||||
"gorm.io/plugin/dbresolver"
|
"gorm.io/plugin/dbresolver"
|
||||||
|
|
||||||
"servicebase/pkg/model"
|
"gitea.ddegame.cn/open/servicebase/pkg/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
func newDataAttach(db *gorm.DB, opts ...gen.DOOption) dataAttach {
|
func newDataAttach(db *gorm.DB, opts ...gen.DOOption) dataAttach {
|
||||||
|
|||||||
@ -16,7 +16,7 @@ import (
|
|||||||
|
|
||||||
"gorm.io/plugin/dbresolver"
|
"gorm.io/plugin/dbresolver"
|
||||||
|
|
||||||
"servicebase/pkg/model"
|
"gitea.ddegame.cn/open/servicebase/pkg/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
func newGame(db *gorm.DB, opts ...gen.DOOption) game {
|
func newGame(db *gorm.DB, opts ...gen.DOOption) game {
|
||||||
|
|||||||
@ -16,7 +16,7 @@ import (
|
|||||||
|
|
||||||
"gorm.io/plugin/dbresolver"
|
"gorm.io/plugin/dbresolver"
|
||||||
|
|
||||||
"servicebase/pkg/model"
|
"gitea.ddegame.cn/open/servicebase/pkg/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
func newTradeCommodity(db *gorm.DB, opts ...gen.DOOption) tradeCommodity {
|
func newTradeCommodity(db *gorm.DB, opts ...gen.DOOption) tradeCommodity {
|
||||||
|
|||||||
@ -16,7 +16,7 @@ import (
|
|||||||
|
|
||||||
"gorm.io/plugin/dbresolver"
|
"gorm.io/plugin/dbresolver"
|
||||||
|
|
||||||
"servicebase/pkg/model"
|
"gitea.ddegame.cn/open/servicebase/pkg/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
func newUser(db *gorm.DB, opts ...gen.DOOption) user {
|
func newUser(db *gorm.DB, opts ...gen.DOOption) user {
|
||||||
|
|||||||
@ -16,7 +16,7 @@ import (
|
|||||||
|
|
||||||
"gorm.io/plugin/dbresolver"
|
"gorm.io/plugin/dbresolver"
|
||||||
|
|
||||||
"servicebase/pkg/model"
|
"gitea.ddegame.cn/open/servicebase/pkg/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
func newUserGameRole(db *gorm.DB, opts ...gen.DOOption) userGameRole {
|
func newUserGameRole(db *gorm.DB, opts ...gen.DOOption) userGameRole {
|
||||||
|
|||||||
@ -16,7 +16,7 @@ import (
|
|||||||
|
|
||||||
"gorm.io/plugin/dbresolver"
|
"gorm.io/plugin/dbresolver"
|
||||||
|
|
||||||
"servicebase/pkg/model"
|
"gitea.ddegame.cn/open/servicebase/pkg/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
func newUserGameRoleProp(db *gorm.DB, opts ...gen.DOOption) userGameRoleProp {
|
func newUserGameRoleProp(db *gorm.DB, opts ...gen.DOOption) userGameRoleProp {
|
||||||
|
|||||||
@ -1,10 +1,11 @@
|
|||||||
package req
|
package req
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"servicebase/pkg/constant"
|
|
||||||
"servicebase/pkg/tools"
|
|
||||||
"errors"
|
"errors"
|
||||||
|
|
||||||
|
"gitea.ddegame.cn/open/servicebase/pkg/constant"
|
||||||
|
"gitea.ddegame.cn/open/servicebase/pkg/tools"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
package req
|
package req
|
||||||
|
|
||||||
import "servicebase/pkg/datasource/fields"
|
import "gitea.ddegame.cn/open/servicebase/pkg/datasource/fields"
|
||||||
|
|
||||||
type News struct {
|
type News struct {
|
||||||
ID string `gorm:"column:id;type:char(32);not null;uniqueIndex:id,priority:1;comment:业务ID" json:"id"` // 业务ID
|
ID string `gorm:"column:id;type:char(32);not null;uniqueIndex:id,priority:1;comment:业务ID" json:"id"` // 业务ID
|
||||||
|
|||||||
@ -2,7 +2,8 @@ package req
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
"servicebase/pkg/datasource/fields"
|
|
||||||
|
"gitea.ddegame.cn/open/servicebase/pkg/datasource/fields"
|
||||||
)
|
)
|
||||||
|
|
||||||
type SystemSettingPageReq struct {
|
type SystemSettingPageReq struct {
|
||||||
|
|||||||
@ -2,7 +2,8 @@ package req
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
"servicebase/pkg/datasource/fields"
|
|
||||||
|
"gitea.ddegame.cn/open/servicebase/pkg/datasource/fields"
|
||||||
)
|
)
|
||||||
|
|
||||||
// 登录请求对象
|
// 登录请求对象
|
||||||
|
|||||||
@ -2,7 +2,8 @@ package req
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
"servicebase/pkg/datasource/fields"
|
|
||||||
|
"gitea.ddegame.cn/open/servicebase/pkg/datasource/fields"
|
||||||
|
|
||||||
"github.com/shopspring/decimal"
|
"github.com/shopspring/decimal"
|
||||||
)
|
)
|
||||||
|
|||||||
@ -3,7 +3,8 @@ package req
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"errors"
|
"errors"
|
||||||
"servicebase/pkg/log"
|
|
||||||
|
"gitea.ddegame.cn/open/servicebase/pkg/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
type CommonAuthReq struct {
|
type CommonAuthReq struct {
|
||||||
|
|||||||
@ -3,9 +3,10 @@ package res
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
"servicebase/pkg/cerrors"
|
|
||||||
"servicebase/pkg/log"
|
"gitea.ddegame.cn/open/servicebase/pkg/cerrors"
|
||||||
"servicebase/pkg/req"
|
"gitea.ddegame.cn/open/servicebase/pkg/log"
|
||||||
|
"gitea.ddegame.cn/open/servicebase/pkg/req"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
package res
|
package res
|
||||||
|
|
||||||
import "servicebase/pkg/datasource/fields"
|
import "gitea.ddegame.cn/open/servicebase/pkg/datasource/fields"
|
||||||
|
|
||||||
type ActNewsAll struct {
|
type ActNewsAll struct {
|
||||||
ListType []ActNewsType `gorm:"-" json:"list_type"`
|
ListType []ActNewsType `gorm:"-" json:"list_type"`
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
package res
|
package res
|
||||||
|
|
||||||
import "servicebase/pkg/datasource/fields"
|
import "gitea.ddegame.cn/open/servicebase/pkg/datasource/fields"
|
||||||
|
|
||||||
type News struct {
|
type News struct {
|
||||||
ID string `gorm:"column:id;type:char(32);not null;uniqueIndex:id,priority:1;comment:业务ID" json:"id"` // 业务ID
|
ID string `gorm:"column:id;type:char(32);not null;uniqueIndex:id,priority:1;comment:业务ID" json:"id"` // 业务ID
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
package res
|
package res
|
||||||
|
|
||||||
import "servicebase/pkg/datasource/fields"
|
import "gitea.ddegame.cn/open/servicebase/pkg/datasource/fields"
|
||||||
|
|
||||||
type UserGameRole struct {
|
type UserGameRole struct {
|
||||||
ID string `gorm:"column:id;type:char(32);not null;uniqueIndex:id,priority:1;comment:业务ID" json:"id"` // 业务ID
|
ID string `gorm:"column:id;type:char(32);not null;uniqueIndex:id,priority:1;comment:业务ID" json:"id"` // 业务ID
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
package res
|
package res
|
||||||
|
|
||||||
import "servicebase/pkg/datasource/fields"
|
import "gitea.ddegame.cn/open/servicebase/pkg/datasource/fields"
|
||||||
|
|
||||||
type UserRes struct {
|
type UserRes struct {
|
||||||
IDBody
|
IDBody
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
package res
|
package res
|
||||||
|
|
||||||
import "servicebase/pkg/datasource/fields"
|
import "gitea.ddegame.cn/open/servicebase/pkg/datasource/fields"
|
||||||
|
|
||||||
type UserClanRes struct {
|
type UserClanRes struct {
|
||||||
ID string `gorm:"column:id;type:char(32);not null;uniqueIndex:id,priority:1;comment:ID" json:"id"`
|
ID string `gorm:"column:id;type:char(32);not null;uniqueIndex:id,priority:1;comment:ID" json:"id"`
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
package res
|
package res
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"servicebase/pkg/datasource/fields"
|
"gitea.ddegame.cn/open/servicebase/pkg/datasource/fields"
|
||||||
|
|
||||||
"github.com/shopspring/decimal"
|
"github.com/shopspring/decimal"
|
||||||
)
|
)
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
package res
|
package res
|
||||||
|
|
||||||
import "servicebase/pkg/datasource/fields"
|
import "gitea.ddegame.cn/open/servicebase/pkg/datasource/fields"
|
||||||
|
|
||||||
type UserFriendRes struct {
|
type UserFriendRes struct {
|
||||||
ID string `gorm:"column:id;type:char(32);not null;uniqueIndex:id,priority:1;comment:ID" json:"id"`
|
ID string `gorm:"column:id;type:char(32);not null;uniqueIndex:id,priority:1;comment:ID" json:"id"`
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
package res
|
package res
|
||||||
|
|
||||||
import "servicebase/pkg/datasource/fields"
|
import "gitea.ddegame.cn/open/servicebase/pkg/datasource/fields"
|
||||||
|
|
||||||
type UserMomentRes struct {
|
type UserMomentRes struct {
|
||||||
ID string `gorm:"column:id;type:char(32);not null;uniqueIndex:id,priority:1;comment:ID" json:"id"`
|
ID string `gorm:"column:id;type:char(32);not null;uniqueIndex:id,priority:1;comment:ID" json:"id"`
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
package res
|
package res
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"servicebase/pkg/datasource/fields"
|
"gitea.ddegame.cn/open/servicebase/pkg/datasource/fields"
|
||||||
|
|
||||||
"github.com/shopspring/decimal"
|
"github.com/shopspring/decimal"
|
||||||
)
|
)
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
package res
|
package res
|
||||||
|
|
||||||
import "servicebase/pkg/datasource/fields"
|
import "gitea.ddegame.cn/open/servicebase/pkg/datasource/fields"
|
||||||
|
|
||||||
type CategoryTreeRes struct {
|
type CategoryTreeRes struct {
|
||||||
IDBody
|
IDBody
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
package res
|
package res
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"servicebase/pkg/datasource/fields"
|
"gitea.ddegame.cn/open/servicebase/pkg/datasource/fields"
|
||||||
)
|
)
|
||||||
|
|
||||||
type AdminUserAuthRes struct {
|
type AdminUserAuthRes struct {
|
||||||
|
|||||||
@ -3,16 +3,17 @@ package picture
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
//cache "ServiceAll/modules/company/internal/client/redis"
|
//cache "ServiceAll/modules/company/internal/client/redis"
|
||||||
"servicebase/pkg/datasource"
|
|
||||||
"servicebase/pkg/log"
|
|
||||||
"servicebase/pkg/repo"
|
|
||||||
"servicebase/pkg/tools"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"gitea.ddegame.cn/open/servicebase/pkg/datasource"
|
||||||
|
"gitea.ddegame.cn/open/servicebase/pkg/log"
|
||||||
|
"gitea.ddegame.cn/open/servicebase/pkg/repo"
|
||||||
|
"gitea.ddegame.cn/open/servicebase/pkg/tools"
|
||||||
|
|
||||||
"github.com/disintegration/imaging"
|
"github.com/disintegration/imaging"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
|
|||||||
@ -1,11 +1,12 @@
|
|||||||
package picture
|
package picture
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"servicebase/pkg/datasource"
|
|
||||||
"servicebase/pkg/log"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"gitea.ddegame.cn/open/servicebase/pkg/datasource"
|
||||||
|
"gitea.ddegame.cn/open/servicebase/pkg/log"
|
||||||
|
|
||||||
"github.com/disintegration/imaging"
|
"github.com/disintegration/imaging"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
)
|
)
|
||||||
|
|||||||
@ -2,7 +2,8 @@ package tools
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"runtime/debug"
|
"runtime/debug"
|
||||||
"servicebase/pkg/log"
|
|
||||||
|
"gitea.ddegame.cn/open/servicebase/pkg/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Recover(cleanups ...func()) {
|
func Recover(cleanups ...func()) {
|
||||||
|
|||||||
@ -5,11 +5,12 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"servicebase/pkg/constant"
|
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"gitea.ddegame.cn/open/servicebase/pkg/constant"
|
||||||
|
|
||||||
"github.com/anxpp/common-utils/str"
|
"github.com/anxpp/common-utils/str"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user