feat 修改包路径
This commit is contained in:
10
app/app.go
10
app/app.go
@@ -2,11 +2,11 @@ package app
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"git.hlsq.asia/mmorpg/service-common/discover/common"
|
"git.hlsq.asia/alex/service-common/discover/common"
|
||||||
"git.hlsq.asia/mmorpg/service-common/log"
|
"git.hlsq.asia/alex/service-common/log"
|
||||||
"git.hlsq.asia/mmorpg/service-common/module"
|
"git.hlsq.asia/alex/service-common/module"
|
||||||
"git.hlsq.asia/mmorpg/service-qgdzs/config"
|
"git.hlsq.asia/alex/service-qgdzs/config"
|
||||||
"git.hlsq.asia/mmorpg/service-qgdzs/internal/grpcserver"
|
"git.hlsq.asia/alex/service-qgdzs/internal/grpcserver"
|
||||||
"github.com/judwhite/go-svc"
|
"github.com/judwhite/go-svc"
|
||||||
"sync"
|
"sync"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package app
|
package app
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.hlsq.asia/mmorpg/service-common/module"
|
"git.hlsq.asia/alex/service-common/module"
|
||||||
"git.hlsq.asia/mmorpg/service-qgdzs/internal/timer"
|
"git.hlsq.asia/alex/service-qgdzs/internal/timer"
|
||||||
"sync"
|
"sync"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package config
|
package config
|
||||||
|
|
||||||
import "git.hlsq.asia/mmorpg/service-common/config"
|
import "git.hlsq.asia/alex/service-common/config"
|
||||||
|
|
||||||
const path = "./config"
|
const path = "./config"
|
||||||
|
|
||||||
|
|||||||
2
deploy/Jenkinsfile
vendored
2
deploy/Jenkinsfile
vendored
@@ -3,7 +3,7 @@ pipeline {
|
|||||||
|
|
||||||
environment {
|
environment {
|
||||||
// 仓库
|
// 仓库
|
||||||
REPO_URL = 'https://git.hlsq.asia/mmorpg/service-qgdzs.git'
|
REPO_URL = 'https://git.hlsq.asia/alex/service-qgdzs.git'
|
||||||
REPO_CREDENTIALS_ID = '80805ba2-f4ac-4d84-aee6-d4cce5fc0a96'
|
REPO_CREDENTIALS_ID = '80805ba2-f4ac-4d84-aee6-d4cce5fc0a96'
|
||||||
|
|
||||||
// Registry
|
// Registry
|
||||||
|
|||||||
4
go.mod
4
go.mod
@@ -1,9 +1,9 @@
|
|||||||
module git.hlsq.asia/mmorpg/service-qgdzs
|
module git.hlsq.asia/alex/service-qgdzs
|
||||||
|
|
||||||
go 1.24.0
|
go 1.24.0
|
||||||
|
|
||||||
require (
|
require (
|
||||||
git.hlsq.asia/mmorpg/service-common v0.0.0-20260211064821-558677bc3a2e
|
git.hlsq.asia/alex/service-common v0.0.0-20260211064821-558677bc3a2e
|
||||||
github.com/judwhite/go-svc v1.2.1
|
github.com/judwhite/go-svc v1.2.1
|
||||||
github.com/robfig/cron/v3 v3.0.1
|
github.com/robfig/cron/v3 v3.0.1
|
||||||
google.golang.org/grpc v1.77.0
|
google.golang.org/grpc v1.77.0
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package ai
|
package ai
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.hlsq.asia/mmorpg/service-common/log"
|
"git.hlsq.asia/alex/service-common/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Client struct {
|
type Client struct {
|
||||||
|
|||||||
@@ -2,9 +2,9 @@ package repository
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"git.hlsq.asia/mmorpg/service-common/db/redis"
|
"git.hlsq.asia/alex/service-common/db/redis"
|
||||||
"git.hlsq.asia/mmorpg/service-qgdzs/internal/dao/model"
|
"git.hlsq.asia/alex/service-qgdzs/internal/dao/model"
|
||||||
"git.hlsq.asia/mmorpg/service-qgdzs/internal/dao/query"
|
"git.hlsq.asia/alex/service-qgdzs/internal/dao/query"
|
||||||
)
|
)
|
||||||
|
|
||||||
type CategoryDao struct {
|
type CategoryDao struct {
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ package repository
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"git.hlsq.asia/mmorpg/service-common/db/mysql"
|
"git.hlsq.asia/alex/service-common/db/mysql"
|
||||||
"git.hlsq.asia/mmorpg/service-qgdzs/internal/dao/query"
|
"git.hlsq.asia/alex/service-qgdzs/internal/dao/query"
|
||||||
)
|
)
|
||||||
|
|
||||||
var dbName mysql.DBName = "qgdzs_db"
|
var dbName mysql.DBName = "qgdzs_db"
|
||||||
|
|||||||
@@ -3,10 +3,10 @@ package repository
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"errors"
|
"errors"
|
||||||
"git.hlsq.asia/mmorpg/service-common/db/redis"
|
"git.hlsq.asia/alex/service-common/db/redis"
|
||||||
"git.hlsq.asia/mmorpg/service-common/utils"
|
"git.hlsq.asia/alex/service-common/utils"
|
||||||
"git.hlsq.asia/mmorpg/service-qgdzs/internal/dao/model"
|
"git.hlsq.asia/alex/service-qgdzs/internal/dao/model"
|
||||||
"git.hlsq.asia/mmorpg/service-qgdzs/internal/dao/query"
|
"git.hlsq.asia/alex/service-qgdzs/internal/dao/query"
|
||||||
)
|
)
|
||||||
|
|
||||||
type PointCardDao struct {
|
type PointCardDao struct {
|
||||||
|
|||||||
@@ -3,10 +3,10 @@ package repository
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"errors"
|
"errors"
|
||||||
"git.hlsq.asia/mmorpg/service-common/db/redis"
|
"git.hlsq.asia/alex/service-common/db/redis"
|
||||||
"git.hlsq.asia/mmorpg/service-common/utils"
|
"git.hlsq.asia/alex/service-common/utils"
|
||||||
"git.hlsq.asia/mmorpg/service-qgdzs/internal/dao/model"
|
"git.hlsq.asia/alex/service-qgdzs/internal/dao/model"
|
||||||
"git.hlsq.asia/mmorpg/service-qgdzs/internal/dao/query"
|
"git.hlsq.asia/alex/service-qgdzs/internal/dao/query"
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -2,10 +2,10 @@ package repository
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"git.hlsq.asia/mmorpg/service-common/db/redis"
|
"git.hlsq.asia/alex/service-common/db/redis"
|
||||||
"git.hlsq.asia/mmorpg/service-common/utils"
|
"git.hlsq.asia/alex/service-common/utils"
|
||||||
"git.hlsq.asia/mmorpg/service-qgdzs/internal/dao/model"
|
"git.hlsq.asia/alex/service-qgdzs/internal/dao/model"
|
||||||
"git.hlsq.asia/mmorpg/service-qgdzs/internal/dao/query"
|
"git.hlsq.asia/alex/service-qgdzs/internal/dao/query"
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -2,9 +2,9 @@ package repository
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"git.hlsq.asia/mmorpg/service-common/db/redis"
|
"git.hlsq.asia/alex/service-common/db/redis"
|
||||||
"git.hlsq.asia/mmorpg/service-qgdzs/internal/dao/model"
|
"git.hlsq.asia/alex/service-qgdzs/internal/dao/model"
|
||||||
"git.hlsq.asia/mmorpg/service-qgdzs/internal/dao/query"
|
"git.hlsq.asia/alex/service-qgdzs/internal/dao/query"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -3,10 +3,10 @@ package grpcserver
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"git.hlsq.asia/mmorpg/service-common/db/kafka"
|
"git.hlsq.asia/alex/service-common/db/kafka"
|
||||||
"git.hlsq.asia/mmorpg/service-common/proto/rs/rspb"
|
"git.hlsq.asia/alex/service-common/proto/rs/rspb"
|
||||||
"git.hlsq.asia/mmorpg/service-common/utils"
|
"git.hlsq.asia/alex/service-common/utils"
|
||||||
"git.hlsq.asia/mmorpg/service-qgdzs/internal/dao/repository"
|
"git.hlsq.asia/alex/service-qgdzs/internal/dao/repository"
|
||||||
)
|
)
|
||||||
|
|
||||||
// 玩法 - 类目答题
|
// 玩法 - 类目答题
|
||||||
|
|||||||
@@ -3,9 +3,9 @@ package grpcserver
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
"git.hlsq.asia/mmorpg/service-common/proto/rs/rspb"
|
"git.hlsq.asia/alex/service-common/proto/rs/rspb"
|
||||||
"git.hlsq.asia/mmorpg/service-common/utils"
|
"git.hlsq.asia/alex/service-common/utils"
|
||||||
"git.hlsq.asia/mmorpg/service-qgdzs/internal/ai"
|
"git.hlsq.asia/alex/service-qgdzs/internal/ai"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (s *Server) CustomAnswerQuestion(ctx context.Context, req *rspb.CustomAnswerQuestionReq) (*rspb.CustomAnswerQuestionResp, error) {
|
func (s *Server) CustomAnswerQuestion(ctx context.Context, req *rspb.CustomAnswerQuestionReq) (*rspb.CustomAnswerQuestionResp, error) {
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
package grpcserver
|
package grpcserver
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.hlsq.asia/mmorpg/service-common/config"
|
"git.hlsq.asia/alex/service-common/config"
|
||||||
"git.hlsq.asia/mmorpg/service-common/discover/common"
|
"git.hlsq.asia/alex/service-common/discover/common"
|
||||||
"git.hlsq.asia/mmorpg/service-common/net/grpc/service"
|
"git.hlsq.asia/alex/service-common/net/grpc/service"
|
||||||
"git.hlsq.asia/mmorpg/service-common/proto/rs/rspb"
|
"git.hlsq.asia/alex/service-common/proto/rs/rspb"
|
||||||
"git.hlsq.asia/mmorpg/service-qgdzs/internal/dao/query"
|
"git.hlsq.asia/alex/service-qgdzs/internal/dao/query"
|
||||||
"git.hlsq.asia/mmorpg/service-qgdzs/internal/dao/repository"
|
"git.hlsq.asia/alex/service-qgdzs/internal/dao/repository"
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package grpcserver
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"git.hlsq.asia/mmorpg/service-common/db/redis"
|
"git.hlsq.asia/alex/service-common/db/redis"
|
||||||
)
|
)
|
||||||
|
|
||||||
// 答题总数排行榜
|
// 答题总数排行榜
|
||||||
|
|||||||
@@ -2,10 +2,10 @@ package grpcserver
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"git.hlsq.asia/mmorpg/service-common/net/http/httpresp"
|
"git.hlsq.asia/alex/service-common/net/http/httpresp"
|
||||||
"git.hlsq.asia/mmorpg/service-common/proto/rs/rspb"
|
"git.hlsq.asia/alex/service-common/proto/rs/rspb"
|
||||||
"git.hlsq.asia/mmorpg/service-common/utils"
|
"git.hlsq.asia/alex/service-common/utils"
|
||||||
"git.hlsq.asia/mmorpg/service-qgdzs/internal/dao/repository"
|
"git.hlsq.asia/alex/service-qgdzs/internal/dao/repository"
|
||||||
)
|
)
|
||||||
|
|
||||||
// 模块 - 学识分
|
// 模块 - 学识分
|
||||||
|
|||||||
@@ -5,13 +5,13 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"git.hlsq.asia/mmorpg/service-common/db/redis"
|
"git.hlsq.asia/alex/service-common/db/redis"
|
||||||
"git.hlsq.asia/mmorpg/service-common/log"
|
"git.hlsq.asia/alex/service-common/log"
|
||||||
"git.hlsq.asia/mmorpg/service-common/proto/rs/rspb"
|
"git.hlsq.asia/alex/service-common/proto/rs/rspb"
|
||||||
"git.hlsq.asia/mmorpg/service-common/utils"
|
"git.hlsq.asia/alex/service-common/utils"
|
||||||
"git.hlsq.asia/mmorpg/service-qgdzs/internal/ai"
|
"git.hlsq.asia/alex/service-qgdzs/internal/ai"
|
||||||
"git.hlsq.asia/mmorpg/service-qgdzs/internal/dao/model"
|
"git.hlsq.asia/alex/service-qgdzs/internal/dao/model"
|
||||||
"git.hlsq.asia/mmorpg/service-qgdzs/internal/dao/repository"
|
"git.hlsq.asia/alex/service-qgdzs/internal/dao/repository"
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -3,10 +3,10 @@ package grpcserver
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"git.hlsq.asia/mmorpg/service-common/db/kafka"
|
"git.hlsq.asia/alex/service-common/db/kafka"
|
||||||
"git.hlsq.asia/mmorpg/service-common/proto/rs/rspb"
|
"git.hlsq.asia/alex/service-common/proto/rs/rspb"
|
||||||
"git.hlsq.asia/mmorpg/service-common/utils"
|
"git.hlsq.asia/alex/service-common/utils"
|
||||||
"git.hlsq.asia/mmorpg/service-qgdzs/internal/dao/repository"
|
"git.hlsq.asia/alex/service-qgdzs/internal/dao/repository"
|
||||||
)
|
)
|
||||||
|
|
||||||
// 玩法 - 随机答题
|
// 玩法 - 随机答题
|
||||||
|
|||||||
@@ -3,10 +3,10 @@ package grpcserver
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"git.hlsq.asia/mmorpg/service-common/db/kafka"
|
"git.hlsq.asia/alex/service-common/db/kafka"
|
||||||
"git.hlsq.asia/mmorpg/service-common/proto/rs/rspb"
|
"git.hlsq.asia/alex/service-common/proto/rs/rspb"
|
||||||
"git.hlsq.asia/mmorpg/service-common/utils"
|
"git.hlsq.asia/alex/service-common/utils"
|
||||||
"git.hlsq.asia/mmorpg/service-qgdzs/internal/dao/repository"
|
"git.hlsq.asia/alex/service-qgdzs/internal/dao/repository"
|
||||||
)
|
)
|
||||||
|
|
||||||
// 玩法 - 随机答题
|
// 玩法 - 随机答题
|
||||||
|
|||||||
@@ -3,10 +3,10 @@ package grpcserver
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"git.hlsq.asia/mmorpg/service-common/net/http/httpresp"
|
"git.hlsq.asia/alex/service-common/net/http/httpresp"
|
||||||
"git.hlsq.asia/mmorpg/service-common/proto/rs/rspb"
|
"git.hlsq.asia/alex/service-common/proto/rs/rspb"
|
||||||
"git.hlsq.asia/mmorpg/service-common/utils"
|
"git.hlsq.asia/alex/service-common/utils"
|
||||||
"git.hlsq.asia/mmorpg/service-qgdzs/internal/dao/repository"
|
"git.hlsq.asia/alex/service-qgdzs/internal/dao/repository"
|
||||||
)
|
)
|
||||||
|
|
||||||
// 模块 - 答题记录
|
// 模块 - 答题记录
|
||||||
|
|||||||
@@ -3,11 +3,11 @@ package timer
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"errors"
|
"errors"
|
||||||
"git.hlsq.asia/mmorpg/service-common/db/kafka"
|
"git.hlsq.asia/alex/service-common/db/kafka"
|
||||||
"git.hlsq.asia/mmorpg/service-common/log"
|
"git.hlsq.asia/alex/service-common/log"
|
||||||
"git.hlsq.asia/mmorpg/service-common/utils"
|
"git.hlsq.asia/alex/service-common/utils"
|
||||||
"git.hlsq.asia/mmorpg/service-qgdzs/internal/dao/model"
|
"git.hlsq.asia/alex/service-qgdzs/internal/dao/model"
|
||||||
"git.hlsq.asia/mmorpg/service-qgdzs/internal/dao/repository"
|
"git.hlsq.asia/alex/service-qgdzs/internal/dao/repository"
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
4
main.go
4
main.go
@@ -2,8 +2,8 @@ package main
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"git.hlsq.asia/mmorpg/service-qgdzs/app"
|
"git.hlsq.asia/alex/service-qgdzs/app"
|
||||||
"git.hlsq.asia/mmorpg/service-qgdzs/config"
|
"git.hlsq.asia/alex/service-qgdzs/config"
|
||||||
"github.com/judwhite/go-svc"
|
"github.com/judwhite/go-svc"
|
||||||
"syscall"
|
"syscall"
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user