Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
孙龙
/
golang-queue-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
0efd3c63
authored
May 22, 2020
by
孙龙
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
up
parent
8a639d01
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
7 deletions
dal/db/db.go
erp/main.go
dal/db/db.go
View file @
0efd3c63
...
...
@@ -28,16 +28,13 @@ func Init(dns string) error {
}
func
InitLabelDB
(
dns
string
)
error
{
fmt
.
Println
(
666
)
var
err
error
LabelDB
,
err
=
sqlx
.
Open
(
"mysql"
,
dns
)
fmt
.
Println
(
err
)
if
err
!=
nil
{
return
err
}
err
=
LabelDB
.
Ping
()
fmt
.
Println
(
err
)
if
err
!=
nil
{
return
err
}
...
...
@@ -63,8 +60,6 @@ func InitCmslDB(dns string) error{
}
func
CreateDB
(
action
string
,
dns
string
)
error
{
fmt
.
Println
(
action
)
fmt
.
Println
(
dns
)
var
err
error
switch
action
{
case
"Init"
:
...
...
erp/main.go
View file @
0efd3c63
...
...
@@ -24,7 +24,6 @@ type RecvPro struct {
//// 实现消费者 消费消息失败 自动进入延时尝试 尝试3次之后入库db
func
(
t
*
RecvPro
)
Consumer
(
dataByte
[]
byte
)
error
{
logger
.
Info
(
string
(
dataByte
))
fmt
.
Println
(
string
(
dataByte
))
error
:=
label
.
AddTemplateRelations
(
dataByte
)
return
error
}
...
...
@@ -88,7 +87,6 @@ func main() {
initDb
(
"InitCmsDB"
,
util
.
Configs
.
Liexincms_databases
.
Dns
)
t
:=
&
RecvPro
{}
fmt
.
Println
(
"123"
)
rabbitmq
.
Recv
(
rabbitmq
.
QueueExchange
{
util
.
Configs
.
Rabbitmq_erp_label
.
QueueName
,
...
...
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