Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
孙龙
/
kaopu-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
f605ae1a
authored
Sep 23, 2020
by
Joneq
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
增加日志几率
parent
7f8d94fd
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
http/internal/server/http/erp/company.go
http/internal/server/http/erp/company.go
View file @
f605ae1a
...
...
@@ -55,13 +55,13 @@ func GetCompanyInfo(c *bm.Context) {
companyName
,
_
:=
c
.
Params
.
Get
(
"company_name"
)
db
,
closedb
,
err
:=
dao
.
NewDB
()
if
err
!=
nil
{
fmt
.
Println
(
err
)
log
.
Error
(
err
.
Error
()
)
}
err
=
db
.
QueryRow
(
c
,
SELECTERPCOMBASIC
,
companyName
)
.
Scan
(
&
erpCompanyInfo
.
ComName
,
&
erpCompanyInfo
.
ComOrganization
,
&
erpCompanyInfo
.
EstanlishmentTime
,
&
erpCompanyInfo
.
CustomerProperty
,
&
erpCompanyInfo
.
RegisteredCapital
,
&
erpCompanyInfo
.
LegalRepresentative
,
&
erpCompanyInfo
.
TianyanchaJson
,
&
erpCompanyInfo
.
ComAddress
)
if
err
!=
nil
{
fmt
.
Println
(
err
)
log
.
Error
(
err
.
Error
()
)
}
jsonArr
:=
strings
.
Split
(
erpCompanyInfo
.
TianyanchaJson
,
"||||"
)
...
...
@@ -98,14 +98,14 @@ func PushCompanyMq(c *bm.Context,companyName string) {
currentTime
:=
time
.
Now
()
.
Unix
()
sqlResult
,
err
:=
db
.
Exec
(
c
,
member
.
INSERTCOMPANY
,
companyName
,
currentTime
,
currentTime
)
lastid
,
_
:=
sqlResult
.
LastInsertId
()
lastid
,
err
:=
sqlResult
.
LastInsertId
()
//如果添加没问题,就继续添加
if
err
!=
nil
{
fmt
.
Println
(
err
)
log
.
Error
(
err
.
Error
()
)
}
else
{
_
,
err
=
db
.
Exec
(
c
,
member
.
INSERTCOMPANYBASICINFO
,
lastid
,
companyName
,
currentTime
)
if
err
!=
nil
{
fmt
.
Println
(
err
)
log
.
Error
(
err
.
Error
()
)
}
}
...
...
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