Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
杨树贤
/
scm_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
512c844d
authored
May 15, 2020
by
mushishixian
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
修复
parent
a642e408
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
23 deletions
cmd/source/customer/customer.go
cmd/source/goods/goods.go
cmd/source/main.go
cmd/source/supplier/supplier.go
cmd/source/customer/customer.go
View file @
512c844d
...
...
@@ -15,15 +15,6 @@ import (
var
Exchange
rabbitmq
.
QueueExchange
//导入委托方的信息(excel导入)
func
init
()
{
Exchange
=
rabbitmq
.
QueueExchange
{
"store_customer"
,
"store_customer"
,
"store"
,
"direct"
,
configs
.
RABBITMQDSN
,
}
}
func
Import
(
wg
*
sync
.
WaitGroup
)
{
defer
func
()
{
if
err
:=
recover
();
err
!=
nil
{
...
...
@@ -31,6 +22,13 @@ func Import(wg *sync.WaitGroup) {
}
wg
.
Done
()
}()
Exchange
=
rabbitmq
.
QueueExchange
{
"store_customer"
,
"store_customer"
,
"store"
,
"direct"
,
configs
.
RABBITMQDSN
,
}
var
(
excelFileName
string
xlFile
*
xlsx
.
File
...
...
cmd/source/goods/goods.go
View file @
512c844d
...
...
@@ -14,7 +14,7 @@ import (
var
Exchange
rabbitmq
.
QueueExchange
//导入委托方的信息(excel导入)
func
init
(
)
{
func
Import
(
wg
*
sync
.
WaitGroup
)
{
Exchange
=
rabbitmq
.
QueueExchange
{
"store_goods"
,
"store_goods"
,
...
...
@@ -22,10 +22,6 @@ func init() {
"direct"
,
configs
.
RABBITMQDSN
,
}
}
//导入委托方的信息(excel导入)
func
Import
(
wg
*
sync
.
WaitGroup
)
{
defer
func
()
{
if
err
:=
recover
();
err
!=
nil
{
service
.
SendDingTalkRobotToApi
(
fmt
.
Sprintf
(
"%s"
,
err
))
...
...
cmd/source/main.go
View file @
512c844d
package
main
import
(
"flag"
"scm_server/cmd/source/customer"
"scm_server/cmd/source/goods"
"scm_server/cmd/source/supplier"
"scm_server/configs"
"sync"
)
func
main
()
{
var
path
string
flag
.
StringVar
(
&
path
,
"config"
,
"conf/config.ini"
,
"conf/config.ini"
)
flag
.
Parse
()
configs
.
Setup
(
path
)
var
wg
sync
.
WaitGroup
wg
.
Add
(
3
)
go
supplier
.
Import
(
&
wg
)
...
...
cmd/source/supplier/supplier.go
View file @
512c844d
...
...
@@ -15,15 +15,6 @@ import (
var
Exchange
rabbitmq
.
QueueExchange
//导入委托方的信息(excel导入)
func
init
()
{
Exchange
=
rabbitmq
.
QueueExchange
{
"store_supplier"
,
"store_supplier"
,
"store"
,
"direct"
,
configs
.
RABBITMQDSN
,
}
}
//导入委托方的信息(excel导入)
func
Import
(
wg
*
sync
.
WaitGroup
)
{
...
...
@@ -33,6 +24,13 @@ func Import(wg *sync.WaitGroup) {
}
wg
.
Done
()
}()
Exchange
=
rabbitmq
.
QueueExchange
{
"store_supplier"
,
"store_supplier"
,
"store"
,
"direct"
,
configs
.
RABBITMQDSN
,
}
var
(
excelFileName
string
xlFile
*
xlsx
.
File
...
...
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