Commit f238237a by huangchengyi

1.0

parent 8bca3fdf
set MICRO_REGISTRY=etcd set MICRO_REGISTRY=etcd
set MICRO_REGISTRY_ADDRESS=192.168.2.232:2379 set MICRO_REGISTRY_ADDRESS=192.168.2.232:2379
go run ../cmd/goods_machining.go -config=../conf/config.ini go run ../cmd/go_sku_server.go -config=../conf/config.ini
\ No newline at end of file \ No newline at end of file
package boot package boot
import ( import (
"goods_machining/pkg/config" "go_sku_server/pkg/config"
"goods_machining/pkg/gredis" "go_sku_server/pkg/gredis"
"goods_machining/pkg/logger" "go_sku_server/pkg/logger"
"goods_machining/pkg/mongo" "go_sku_server/pkg/mongo"
"goods_machining/pkg/mysql" "go_sku_server/pkg/mysql"
) )
func Boot(configPath string) (err error) { func Boot(configPath string) (err error) {
......
...@@ -2,8 +2,8 @@ package main ...@@ -2,8 +2,8 @@ package main
import ( import (
"flag" "flag"
"goods_machining/boot" "go_sku_server/boot"
"goods_machining/service" "go_sku_server/service"
) )
//定时任务计算系数价格 //定时任务计算系数价格
......
...@@ -4,10 +4,9 @@ import ( ...@@ -4,10 +4,9 @@ import (
"flag" "flag"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/micro/go-micro/v2/web" "github.com/micro/go-micro/v2/web"
"goods_machining/boot" "go_sku_server/boot"
//_ "goods_machining/controller" "go_sku_server/pkg/config"
"goods_machining/pkg/config" "go_sku_server/routes"
"goods_machining/routes"
) )
func main() { func main() {
......
...@@ -4,8 +4,8 @@ import ( ...@@ -4,8 +4,8 @@ import (
"encoding/json" "encoding/json"
"flag" "flag"
"fmt" "fmt"
"goods_machining/boot" "go_sku_server/boot"
"goods_machining/service/query" "go_sku_server/service/query"
"os" "os"
"github.com/tidwall/gjson" "github.com/tidwall/gjson"
......
...@@ -3,8 +3,8 @@ package controller ...@@ -3,8 +3,8 @@ package controller
import ( import (
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"net/http" "net/http"
"goods_machining/framework/gin_" "go_sku_server/framework/gin_"
"goods_machining/pkg/config" "go_sku_server/pkg/config"
) )
//放 通用中间件 //放 通用中间件
......
...@@ -3,8 +3,8 @@ package controller ...@@ -3,8 +3,8 @@ package controller
import ( import (
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/syyongx/php2go" "github.com/syyongx/php2go"
"goods_machining/pkg/common" "go_sku_server/pkg/common"
"goods_machining/service" "go_sku_server/service"
"sync" "sync"
) )
......
...@@ -6,8 +6,8 @@ import ( ...@@ -6,8 +6,8 @@ import (
log "github.com/sirupsen/logrus" log "github.com/sirupsen/logrus"
"github.com/syyongx/php2go" "github.com/syyongx/php2go"
"reflect" "reflect"
"goods_machining/boot" "go_sku_server/boot"
"goods_machining/service" "go_sku_server/service"
) )
func StrRandom(lenNum int) string { func StrRandom(lenNum int) string {
......
...@@ -3,7 +3,7 @@ package main ...@@ -3,7 +3,7 @@ package main
import ( import (
"fmt" "fmt"
"encoding/json" "encoding/json"
"goods_machining/model" "go_sku_server/model"
) )
func main() { func main() {
......
...@@ -5,9 +5,9 @@ import ( ...@@ -5,9 +5,9 @@ import (
"github.com/imroc/req" "github.com/imroc/req"
"github.com/syyongx/php2go" "github.com/syyongx/php2go"
"github.com/tidwall/gjson" "github.com/tidwall/gjson"
"goods_machining/middleware" "go_sku_server/middleware"
"goods_machining/model" "go_sku_server/model"
"goods_machining/pkg/common" "go_sku_server/pkg/common"
"strconv" "strconv"
"time" "time"
) )
......
module goods_machining module go_sku_server
go 1.14 go 1.14
...@@ -37,6 +37,7 @@ require ( ...@@ -37,6 +37,7 @@ require (
github.com/tidwall/gjson v1.6.1 github.com/tidwall/gjson v1.6.1
github.com/tidwall/sjson v1.1.1 github.com/tidwall/sjson v1.1.1
github.com/uniplaces/carbon v0.1.6 github.com/uniplaces/carbon v0.1.6
go.etcd.io/bbolt v1.3.4
go.mongodb.org/mongo-driver v1.3.5 // indirect go.mongodb.org/mongo-driver v1.3.5 // indirect
go.uber.org/zap v1.14.1 // indirect go.uber.org/zap v1.14.1 // indirect
golang.org/x/tools v0.0.0-20191216173652-a0e659d51361 golang.org/x/tools v0.0.0-20191216173652-a0e659d51361
......
...@@ -3,7 +3,7 @@ package middleware ...@@ -3,7 +3,7 @@ package middleware
import ( import (
"github.com/gin-contrib/cors" "github.com/gin-contrib/cors"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"goods_machining/pkg/config" "go_sku_server/pkg/config"
"time" "time"
) )
......
...@@ -17,8 +17,8 @@ import ( ...@@ -17,8 +17,8 @@ import (
"math/rand" "math/rand"
"reflect" "reflect"
"regexp" "regexp"
"goods_machining/pkg/config" "go_sku_server/pkg/config"
"goods_machining/pkg/vars" "go_sku_server/pkg/vars"
"sort" "sort"
"strconv" "strconv"
"strings" "strings"
......
...@@ -4,8 +4,8 @@ import ( ...@@ -4,8 +4,8 @@ import (
"github.com/gomodule/redigo/redis" "github.com/gomodule/redigo/redis"
"github.com/syyongx/php2go" "github.com/syyongx/php2go"
"github.com/tidwall/gjson" "github.com/tidwall/gjson"
"goods_machining/pkg/config" "go_sku_server/pkg/config"
"goods_machining/pkg/gredis" "go_sku_server/pkg/gredis"
"strings" "strings"
) )
......
...@@ -6,9 +6,9 @@ import ( ...@@ -6,9 +6,9 @@ import (
"github.com/gomodule/redigo/redis" "github.com/gomodule/redigo/redis"
"github.com/ichunt2019/logger" "github.com/ichunt2019/logger"
log "github.com/sirupsen/logrus" log "github.com/sirupsen/logrus"
"goods_machining/pkg/config" "go_sku_server/pkg/config"
"goods_machining/pkg/gredis" "go_sku_server/pkg/gredis"
"goods_machining/pkg/message" "go_sku_server/pkg/message"
"os" "os"
"strconv" "strconv"
"strings" "strings"
......
...@@ -4,7 +4,7 @@ import ( ...@@ -4,7 +4,7 @@ import (
"github.com/imroc/req" "github.com/imroc/req"
"math/rand" "math/rand"
"net/http" "net/http"
"goods_machining/pkg/config" "go_sku_server/pkg/config"
) )
type Response struct { type Response struct {
......
...@@ -3,7 +3,7 @@ package gredis ...@@ -3,7 +3,7 @@ package gredis
import ( import (
"fmt" "fmt"
"github.com/gomodule/redigo/redis" "github.com/gomodule/redigo/redis"
"goods_machining/pkg/config" "go_sku_server/pkg/config"
"time" "time"
) )
......
...@@ -4,7 +4,7 @@ import ( ...@@ -4,7 +4,7 @@ import (
"encoding/json" "encoding/json"
"github.com/imroc/req" "github.com/imroc/req"
"github.com/tidwall/gjson" "github.com/tidwall/gjson"
"goods_machining/pkg/config" "go_sku_server/pkg/config"
"strings" "strings"
) )
......
...@@ -6,7 +6,7 @@ import ( ...@@ -6,7 +6,7 @@ import (
"github.com/syyongx/php2go" "github.com/syyongx/php2go"
"net/http" "net/http"
"net/url" "net/url"
"goods_machining/pkg/config" "go_sku_server/pkg/config"
"strconv" "strconv"
"time" "time"
) )
......
...@@ -2,7 +2,7 @@ package mq ...@@ -2,7 +2,7 @@ package mq
import ( import (
"github.com/ichunt2019/go-rabbitmq/utils/rabbitmq" "github.com/ichunt2019/go-rabbitmq/utils/rabbitmq"
"goods_machining/pkg/config" "go_sku_server/pkg/config"
) )
func PushMsg(listName string, data string) { func PushMsg(listName string, data string) {
......
...@@ -4,8 +4,8 @@ import ( ...@@ -4,8 +4,8 @@ import (
"fmt" "fmt"
_ "github.com/go-sql-driver/mysql" _ "github.com/go-sql-driver/mysql"
"github.com/go-xorm/xorm" "github.com/go-xorm/xorm"
"goods_machining/pkg/config" "go_sku_server/pkg/config"
"goods_machining/pkg/e" "go_sku_server/pkg/e"
) )
var DatabaseConMap map[string]*xorm.Engine var DatabaseConMap map[string]*xorm.Engine
......
...@@ -2,7 +2,7 @@ package requests ...@@ -2,7 +2,7 @@ package requests
import ( import (
"github.com/syyongx/php2go" "github.com/syyongx/php2go"
"goods_machining/pkg/config" "go_sku_server/pkg/config"
) )
type QuoteIndexRequest struct { type QuoteIndexRequest struct {
......
...@@ -2,7 +2,7 @@ package routes ...@@ -2,7 +2,7 @@ package routes
import ( import (
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"goods_machining/controller" "go_sku_server/controller"
) )
//初始化路由 //初始化路由
......
#!/bin/bash #!/bin/bash
cd /data/gocode/goods_machining cd /data/gocode/go_sku_server
git pull origin dev git pull origin dev
cp /data/gocode/goods_machining/conf/prod/config.ini.prod /data/gocode/goods_machining/conf/config.ini cp /data/gocode/go_sku_server/conf/prod/config.ini.prod /data/gocode/go_sku_server/conf/config.ini
cp /data/gocode/goods_machining/conf/prod/database.ini.prod /data/gocode/goods_machining/conf/database.ini cp /data/gocode/go_sku_server/conf/prod/database.ini.prod /data/gocode/go_sku_server/conf/database.ini
cp /data/gocode/goods_machining/conf/prod/message.ini.prod /data/gocode/goods_machining/conf/message.ini cp /data/gocode/go_sku_server/conf/prod/message.ini.prod /data/gocode/go_sku_server/conf/message.ini
cp /data/gocode/goods_machining/conf/prod/rabmq_key.ini.prod /data/gocode/goods_machining/conf/rabmq_key.ini cp /data/gocode/go_sku_server/conf/prod/rabmq_key.ini.prod /data/gocode/go_sku_server/conf/rabmq_key.ini
cp /data/gocode/goods_machining/conf/prod/redis_config.ini.prod /data/gocode/goods_machining/conf/redis_config.ini cp /data/gocode/go_sku_server/conf/prod/redis_config.ini.prod /data/gocode/go_sku_server/conf/redis_config.ini
cp /data/gocode/goods_machining/conf/prod/redis_key.ini.prod /data/gocode/goods_machining/conf/redis_key.ini cp /data/gocode/go_sku_server/conf/prod/redis_key.ini.prod /data/gocode/go_sku_server/conf/redis_key.ini
cp /data/gocode/goods_machining/conf/prod/search.ini.prod /data/gocode/goods_machining/conf/search.ini cp /data/gocode/go_sku_server/conf/prod/search.ini.prod /data/gocode/go_sku_server/conf/search.ini
go build -o ./cmd/search_http_server ./cmd/search_http_server.go go build -o ./cmd/search_http_server ./cmd/search_http_server.go
supervisorctl restart goods_machining supervisorctl restart go_sku_server
...@@ -6,8 +6,8 @@ import ( ...@@ -6,8 +6,8 @@ import (
"github.com/iancoleman/orderedmap" "github.com/iancoleman/orderedmap"
"github.com/syyongx/php2go" "github.com/syyongx/php2go"
"github.com/tidwall/gjson" "github.com/tidwall/gjson"
"goods_machining/model" "go_sku_server/model"
"goods_machining/pkg/gredis" "go_sku_server/pkg/gredis"
"strings" "strings"
"sync" "sync"
) )
......
...@@ -5,9 +5,9 @@ import ( ...@@ -5,9 +5,9 @@ import (
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/iancoleman/orderedmap" "github.com/iancoleman/orderedmap"
"github.com/tidwall/gjson" "github.com/tidwall/gjson"
"goods_machining/model" "go_sku_server/model"
"goods_machining/pkg/common" "go_sku_server/pkg/common"
"goods_machining/pkg/gredis" "go_sku_server/pkg/gredis"
"strings" "strings"
"sync" "sync"
) )
......
...@@ -6,9 +6,9 @@ import ( ...@@ -6,9 +6,9 @@ import (
"github.com/iancoleman/orderedmap" "github.com/iancoleman/orderedmap"
"github.com/syyongx/php2go" "github.com/syyongx/php2go"
"github.com/tidwall/gjson" "github.com/tidwall/gjson"
"goods_machining/model" "go_sku_server/model"
"goods_machining/pkg/common" "go_sku_server/pkg/common"
"goods_machining/pkg/gredis" "go_sku_server/pkg/gredis"
) )
//自营公共函数类 //自营公共函数类
/* /*
......
...@@ -6,10 +6,10 @@ import ( ...@@ -6,10 +6,10 @@ import (
"github.com/gomodule/redigo/redis" "github.com/gomodule/redigo/redis"
"github.com/syyongx/php2go" "github.com/syyongx/php2go"
"github.com/tidwall/gjson" "github.com/tidwall/gjson"
"goods_machining/pkg/common" "go_sku_server/pkg/common"
"goods_machining/pkg/gredis" "go_sku_server/pkg/gredis"
"goods_machining/pkg/logger" "go_sku_server/pkg/logger"
"goods_machining/pkg/mysql" "go_sku_server/pkg/mysql"
"sort" "sort"
) )
......
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 sign in to comment