Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
黄成意
/
go_sku_server
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
f238237a
authored
Oct 10, 2020
by
huangchengyi
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
1.0
parent
8bca3fdf
Hide whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
64 additions
and
64 deletions
bat/searchGrpc.bat
boot/app.go
cmd/cron_server.go → cmd/cron/cron_server.go
cmd/http_server.go
cmd/test1.go1
controller/middleware_controller.go
controller/sku_controller.go
doc/test/test.go
doc/test/test3.go
doc/test/tme.go
go.mod
middleware/cors.go
pkg/common/function.go
pkg/common/goods.go
pkg/common/log_report.go
pkg/es/es.go
pkg/gredis/redis.go
pkg/message/dingding.go
pkg/message/sms.go
pkg/mq/mq.go
pkg/mysql/mysql.go
requests/quote_request.go
routes/router.go
server.bash
service/service_ly.go
service/service_zy.go
service/service_zy_common.go
service/service_zy_cron.go
bat/searchGrpc.bat
View file @
f238237a
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
boot/app.go
View file @
f238237a
package
boot
import
(
"go
ods_machining
/pkg/config"
"go
ods_machining
/pkg/gredis"
"go
ods_machining
/pkg/logger"
"go
ods_machining
/pkg/mongo"
"go
ods_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
)
{
...
...
cmd/cron_server.go
→
cmd/cron
/cron
_server.go
View file @
f238237a
...
...
@@ -2,8 +2,8 @@ package main
import
(
"flag"
"go
ods_machining
/boot"
"go
ods_machining
/service"
"go
_sku_server
/boot"
"go
_sku_server
/service"
)
//定时任务计算系数价格
...
...
cmd/http_server.go
View file @
f238237a
...
...
@@ -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
()
{
...
...
cmd/test1.go1
View file @
f238237a
...
...
@@ -4,8 +4,8 @@ import (
"encoding/json"
"flag"
"fmt"
"go
ods_machining
/boot"
"go
ods_machining
/service/query"
"go
_sku_server
/boot"
"go
_sku_server
/service/query"
"os"
"github.com/tidwall/gjson"
...
...
controller/middleware_controller.go
View file @
f238237a
...
...
@@ -3,8 +3,8 @@ package controller
import
(
"github.com/gin-gonic/gin"
"net/http"
"go
ods_machining
/framework/gin_"
"go
ods_machining
/pkg/config"
"go
_sku_server
/framework/gin_"
"go
_sku_server
/pkg/config"
)
//放 通用中间件
...
...
controller/sku_controller.go
View file @
f238237a
...
...
@@ -3,8 +3,8 @@ package controller
import
(
"github.com/gin-gonic/gin"
"github.com/syyongx/php2go"
"go
ods_machining
/pkg/common"
"go
ods_machining
/service"
"go
_sku_server
/pkg/common"
"go
_sku_server
/service"
"sync"
)
...
...
doc/test/test.go
View file @
f238237a
...
...
@@ -6,8 +6,8 @@ import (
log
"github.com/sirupsen/logrus"
"github.com/syyongx/php2go"
"reflect"
"go
ods_machining
/boot"
"go
ods_machining
/service"
"go
_sku_server
/boot"
"go
_sku_server
/service"
)
func
StrRandom
(
lenNum
int
)
string
{
...
...
doc/test/test3.go
View file @
f238237a
...
...
@@ -3,7 +3,7 @@ package main
import
(
"fmt"
"encoding/json"
"go
ods_machining
/model"
"go
_sku_server
/model"
)
func
main
()
{
...
...
doc/test/tme.go
View file @
f238237a
...
...
@@ -5,9 +5,9 @@ import (
"github.com/imroc/req"
"github.com/syyongx/php2go"
"github.com/tidwall/gjson"
"go
ods_machining
/middleware"
"go
ods_machining
/model"
"go
ods_machining
/pkg/common"
"go
_sku_server
/middleware"
"go
_sku_server
/model"
"go
_sku_server
/pkg/common"
"strconv"
"time"
)
...
...
go.mod
View file @
f238237a
module go
ods_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
...
...
middleware/cors.go
View file @
f238237a
...
...
@@ -3,7 +3,7 @@ package middleware
import
(
"github.com/gin-contrib/cors"
"github.com/gin-gonic/gin"
"go
ods_machining
/pkg/config"
"go
_sku_server
/pkg/config"
"time"
)
...
...
pkg/common/function.go
View file @
f238237a
...
...
@@ -17,8 +17,8 @@ import (
"math/rand"
"reflect"
"regexp"
"go
ods_machining
/pkg/config"
"go
ods_machining
/pkg/vars"
"go
_sku_server
/pkg/config"
"go
_sku_server
/pkg/vars"
"sort"
"strconv"
"strings"
...
...
pkg/common/goods.go
View file @
f238237a
...
...
@@ -4,8 +4,8 @@ import (
"github.com/gomodule/redigo/redis"
"github.com/syyongx/php2go"
"github.com/tidwall/gjson"
"go
ods_machining
/pkg/config"
"go
ods_machining
/pkg/gredis"
"go
_sku_server
/pkg/config"
"go
_sku_server
/pkg/gredis"
"strings"
)
...
...
pkg/common/log_report.go
View file @
f238237a
...
...
@@ -6,9 +6,9 @@ import (
"github.com/gomodule/redigo/redis"
"github.com/ichunt2019/logger"
log
"github.com/sirupsen/logrus"
"go
ods_machining
/pkg/config"
"go
ods_machining
/pkg/gredis"
"go
ods_machining
/pkg/message"
"go
_sku_server
/pkg/config"
"go
_sku_server
/pkg/gredis"
"go
_sku_server
/pkg/message"
"os"
"strconv"
"strings"
...
...
pkg/es/es.go
View file @
f238237a
...
...
@@ -4,7 +4,7 @@ import (
"github.com/imroc/req"
"math/rand"
"net/http"
"go
ods_machining
/pkg/config"
"go
_sku_server
/pkg/config"
)
type
Response
struct
{
...
...
pkg/gredis/redis.go
View file @
f238237a
...
...
@@ -3,7 +3,7 @@ package gredis
import
(
"fmt"
"github.com/gomodule/redigo/redis"
"go
ods_machining
/pkg/config"
"go
_sku_server
/pkg/config"
"time"
)
...
...
pkg/message/dingding.go
View file @
f238237a
...
...
@@ -4,7 +4,7 @@ import (
"encoding/json"
"github.com/imroc/req"
"github.com/tidwall/gjson"
"go
ods_machining
/pkg/config"
"go
_sku_server
/pkg/config"
"strings"
)
...
...
pkg/message/sms.go
View file @
f238237a
...
...
@@ -6,7 +6,7 @@ import (
"github.com/syyongx/php2go"
"net/http"
"net/url"
"go
ods_machining
/pkg/config"
"go
_sku_server
/pkg/config"
"strconv"
"time"
)
...
...
pkg/mq/mq.go
View file @
f238237a
...
...
@@ -2,7 +2,7 @@ package mq
import
(
"github.com/ichunt2019/go-rabbitmq/utils/rabbitmq"
"go
ods_machining
/pkg/config"
"go
_sku_server
/pkg/config"
)
func
PushMsg
(
listName
string
,
data
string
)
{
...
...
pkg/mysql/mysql.go
View file @
f238237a
...
...
@@ -4,8 +4,8 @@ import (
"fmt"
_
"github.com/go-sql-driver/mysql"
"github.com/go-xorm/xorm"
"go
ods_machining
/pkg/config"
"go
ods_machining
/pkg/e"
"go
_sku_server
/pkg/config"
"go
_sku_server
/pkg/e"
)
var
DatabaseConMap
map
[
string
]
*
xorm
.
Engine
...
...
requests/quote_request.go
View file @
f238237a
...
...
@@ -2,7 +2,7 @@ package requests
import
(
"github.com/syyongx/php2go"
"go
ods_machining
/pkg/config"
"go
_sku_server
/pkg/config"
)
type
QuoteIndexRequest
struct
{
...
...
routes/router.go
View file @
f238237a
...
...
@@ -2,7 +2,7 @@ package routes
import
(
"github.com/gin-gonic/gin"
"go
ods_machining
/controller"
"go
_sku_server
/controller"
)
//初始化路由
...
...
server.bash
View file @
f238237a
#!/bin/bash
cd
/data/gocode/go
ods_machining
cd
/data/gocode/go
_sku_server
git pull origin dev
cp /data/gocode/go
ods_machining/conf/prod/config.ini.prod /data/gocode/goods_machining
/conf/config.ini
cp /data/gocode/go
ods_machining/conf/prod/database.ini.prod /data/gocode/goods_machining
/conf/database.ini
cp /data/gocode/go
ods_machining/conf/prod/message.ini.prod /data/gocode/goods_machining
/conf/message.ini
cp /data/gocode/go
ods_machining/conf/prod/rabmq_key.ini.prod /data/gocode/goods_machining
/conf/rabmq_key.ini
cp /data/gocode/go
ods_machining/conf/prod/redis_config.ini.prod /data/gocode/goods_machining
/conf/redis_config.ini
cp /data/gocode/go
ods_machining/conf/prod/redis_key.ini.prod /data/gocode/goods_machining
/conf/redis_key.ini
cp /data/gocode/go
ods_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 go
ods_machining
supervisorctl restart go
_sku_server
service/service_ly.go
View file @
f238237a
...
...
@@ -6,8 +6,8 @@ import (
"github.com/iancoleman/orderedmap"
"github.com/syyongx/php2go"
"github.com/tidwall/gjson"
"go
ods_machining
/model"
"go
ods_machining
/pkg/gredis"
"go
_sku_server
/model"
"go
_sku_server
/pkg/gredis"
"strings"
"sync"
)
...
...
service/service_zy.go
View file @
f238237a
...
...
@@ -5,9 +5,9 @@ import (
"github.com/gin-gonic/gin"
"github.com/iancoleman/orderedmap"
"github.com/tidwall/gjson"
"go
ods_machining
/model"
"go
ods_machining
/pkg/common"
"go
ods_machining
/pkg/gredis"
"go
_sku_server
/model"
"go
_sku_server
/pkg/common"
"go
_sku_server
/pkg/gredis"
"strings"
"sync"
)
...
...
service/service_zy_common.go
View file @
f238237a
...
...
@@ -6,9 +6,9 @@ import (
"github.com/iancoleman/orderedmap"
"github.com/syyongx/php2go"
"github.com/tidwall/gjson"
"go
ods_machining
/model"
"go
ods_machining
/pkg/common"
"go
ods_machining
/pkg/gredis"
"go
_sku_server
/model"
"go
_sku_server
/pkg/common"
"go
_sku_server
/pkg/gredis"
)
//自营公共函数类
/*
...
...
service/service_zy_cron.go
View file @
f238237a
...
...
@@ -6,10 +6,10 @@ import (
"github.com/gomodule/redigo/redis"
"github.com/syyongx/php2go"
"github.com/tidwall/gjson"
"go
ods_machining
/pkg/common"
"go
ods_machining
/pkg/gredis"
"go
ods_machining
/pkg/logger"
"go
ods_machining
/pkg/mysql"
"go
_sku_server
/pkg/common"
"go
_sku_server
/pkg/gredis"
"go
_sku_server
/pkg/logger"
"go
_sku_server
/pkg/mysql"
"sort"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment