Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
杨树贤
/
go_supplier_sever
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
85ddf52f
authored
Mar 23, 2021
by
mushishixian
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
修改名称
parent
792cad52
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
21 additions
and
21 deletions
app/controller/demo_controller.go
app/dao/dao.go
app/dao/supplier_sync.go
app/queue/supplier.go
app/service/service.go
app/service/supplier_sync.go
boot/boot.go
cmd/main.go
config/dev/proxy.toml
go.mod
middleware/recovery.go
middleware/request_log.go
middleware/response.go
router/httpserver.go
router/route.go
util/lib/mysql.go
util/log.go
app/controller/demo_controller.go
View file @
85ddf52f
...
@@ -5,8 +5,8 @@ import (
...
@@ -5,8 +5,8 @@ import (
"github.com/gin-gonic/gin"
"github.com/gin-gonic/gin"
"github.com/ichunt2019/cfg/lib"
"github.com/ichunt2019/cfg/lib"
xlog
"github.com/ichunt2019/lxLog/log"
xlog
"github.com/ichunt2019/lxLog/log"
common
"go
-supplier-sync
/app/common/function"
common
"go
_supplier_sever
/app/common/function"
"go
-supplier-sync
/app/service"
"go
_supplier_sever
/app/service"
)
)
func
Ping
(
ctx
*
gin
.
Context
)
{
func
Ping
(
ctx
*
gin
.
Context
)
{
...
...
app/dao/dao.go
View file @
85ddf52f
...
@@ -4,7 +4,7 @@ import (
...
@@ -4,7 +4,7 @@ import (
"github.com/go-redis/redis/v7"
"github.com/go-redis/redis/v7"
_
"github.com/go-sql-driver/mysql"
_
"github.com/go-sql-driver/mysql"
"github.com/ichunt2019/cfg/lib"
"github.com/ichunt2019/cfg/lib"
"go
-supplier-sync
/app/common/config"
"go
_supplier_sever
/app/common/config"
"time"
"time"
"xorm.io/xorm"
"xorm.io/xorm"
...
...
app/dao/supplier_sync.go
View file @
85ddf52f
package
dao
package
dao
import
(
import
(
"go
-supplier-sync
/app/model"
"go
_supplier_sever
/app/model"
"time"
"time"
)
)
...
...
app/queue/supplier.go
View file @
85ddf52f
...
@@ -5,7 +5,7 @@ import (
...
@@ -5,7 +5,7 @@ import (
"github.com/ichunt2019/cfg/lib"
"github.com/ichunt2019/cfg/lib"
"github.com/ichunt2019/go-rabbitmq/utils/rabbitmq"
"github.com/ichunt2019/go-rabbitmq/utils/rabbitmq"
"github.com/tidwall/gjson"
"github.com/tidwall/gjson"
"go
-supplier-sync
/app/service"
"go
_supplier_sever
/app/service"
)
)
type
RecvPro
struct
{
type
RecvPro
struct
{
...
...
app/service/service.go
View file @
85ddf52f
package
service
package
service
import
"go
-supplier-sync
/app/dao"
import
"go
_supplier_sever
/app/dao"
func
GetData
(){
func
GetData
(){
dao
.
GetUser
()
dao
.
GetUser
()
...
...
app/service/supplier_sync.go
View file @
85ddf52f
package
service
package
service
import
"go
-supplier-sync
/app/dao"
import
"go
_supplier_sever
/app/dao"
func
AddSupplierSync
(
supplierCode
,
erpSupplierCode
,
erpSupplierName
string
)
(
err
error
)
{
func
AddSupplierSync
(
supplierCode
,
erpSupplierCode
,
erpSupplierName
string
)
(
err
error
)
{
return
dao
.
AddSupplierSync
(
supplierCode
,
erpSupplierCode
,
erpSupplierName
)
return
dao
.
AddSupplierSync
(
supplierCode
,
erpSupplierCode
,
erpSupplierName
)
...
...
boot/boot.go
View file @
85ddf52f
...
@@ -3,7 +3,7 @@ package boot
...
@@ -3,7 +3,7 @@ package boot
import
(
import
(
"github.com/ichunt2019/cfg/lib"
"github.com/ichunt2019/cfg/lib"
xlog
"github.com/ichunt2019/lxLog/log"
xlog
"github.com/ichunt2019/lxLog/log"
"go
-supplier-sync
/app/dao"
"go
_supplier_sever
/app/dao"
)
)
func
Init
(
configPath
string
,
logPath
string
)
(
err
error
)
{
func
Init
(
configPath
string
,
logPath
string
)
(
err
error
)
{
...
...
cmd/main.go
View file @
85ddf52f
...
@@ -2,8 +2,8 @@ package main
...
@@ -2,8 +2,8 @@ package main
import
(
import
(
"flag"
"flag"
"go
-supplier-sync
/app/queue"
"go
_supplier_sever
/app/queue"
"go
-supplier-sync
/boot"
"go
_supplier_sever
/boot"
)
)
var
(
var
(
configPath
string
configPath
string
...
...
config/dev/proxy.toml
View file @
85ddf52f
#服务注册名称
#服务注册名称
micro_service_name
=
"go
-supplier-sync
"
micro_service_name
=
"go
_supplier_sever
"
#etcd配置信息 etcd服务的ip端口用户密码
#etcd配置信息 etcd服务的ip端口用户密码
[etcd_config]
[etcd_config]
...
...
go.mod
View file @
85ddf52f
module go
-supplier-sync
module go
_supplier_sever
go 1.14
go 1.14
...
...
middleware/recovery.go
View file @
85ddf52f
...
@@ -4,8 +4,8 @@ import (
...
@@ -4,8 +4,8 @@ import (
"errors"
"errors"
"fmt"
"fmt"
"github.com/gin-gonic/gin"
"github.com/gin-gonic/gin"
common
"go
-supplier-sync
/app/common/function"
common
"go
_supplier_sever
/app/common/function"
"go
-supplier-sync
/util"
"go
_supplier_sever
/util"
"github.com/ichunt2019/cfg/lib"
"github.com/ichunt2019/cfg/lib"
"runtime/debug"
"runtime/debug"
)
)
...
...
middleware/request_log.go
View file @
85ddf52f
...
@@ -3,8 +3,8 @@ package middleware
...
@@ -3,8 +3,8 @@ package middleware
import
(
import
(
"bytes"
"bytes"
"github.com/gin-gonic/gin"
"github.com/gin-gonic/gin"
"go
-supplier-sync
/util"
"go
_supplier_sever
/util"
"go
-supplier-sync
/util/lib"
"go
_supplier_sever
/util/lib"
"io/ioutil"
"io/ioutil"
"time"
"time"
)
)
...
...
middleware/response.go
View file @
85ddf52f
...
@@ -3,7 +3,7 @@ package middleware
...
@@ -3,7 +3,7 @@ package middleware
import
(
import
(
"encoding/json"
"encoding/json"
"fmt"
"fmt"
"go
-supplier-sync
/util/lib"
"go
_supplier_sever
/util/lib"
"github.com/gin-gonic/gin"
"github.com/gin-gonic/gin"
"strings"
"strings"
)
)
...
...
router/httpserver.go
View file @
85ddf52f
...
@@ -4,7 +4,7 @@ import (
...
@@ -4,7 +4,7 @@ import (
"context"
"context"
"github.com/gin-gonic/gin"
"github.com/gin-gonic/gin"
cfg
"github.com/ichunt2019/cfg/lib"
cfg
"github.com/ichunt2019/cfg/lib"
"go
-supplier-sync
/middleware"
"go
_supplier_sever
/middleware"
"log"
"log"
"net/http"
"net/http"
"time"
"time"
...
...
router/route.go
View file @
85ddf52f
...
@@ -2,7 +2,7 @@ package router
...
@@ -2,7 +2,7 @@ package router
import
(
import
(
"github.com/gin-gonic/gin"
"github.com/gin-gonic/gin"
"go
-supplier-sync
/app/controller"
"go
_supplier_sever
/app/controller"
)
)
func
InitRouter
(
middlewares
...
gin
.
HandlerFunc
)
*
gin
.
Engine
{
func
InitRouter
(
middlewares
...
gin
.
HandlerFunc
)
*
gin
.
Engine
{
...
...
util/lib/mysql.go
View file @
85ddf52f
...
@@ -3,7 +3,7 @@ package lib
...
@@ -3,7 +3,7 @@ package lib
import
(
import
(
_
"github.com/go-sql-driver/mysql"
_
"github.com/go-sql-driver/mysql"
"github.com/ichunt2019/cfg/lib"
"github.com/ichunt2019/cfg/lib"
"go
-supplier-sync
/app/common/config"
"go
_supplier_sever
/app/common/config"
"xorm.io/xorm"
"xorm.io/xorm"
)
)
...
...
util/log.go
View file @
85ddf52f
...
@@ -3,7 +3,7 @@ package util
...
@@ -3,7 +3,7 @@ package util
import
(
import
(
"context"
"context"
"go
-supplier-sync
/util/lib"
"go
_supplier_sever
/util/lib"
"github.com/gin-gonic/gin"
"github.com/gin-gonic/gin"
)
)
...
...
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