Commit f238237a by huangchengyi

1.0

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