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
f540ba69
authored
Dec 12, 2019
by
Joneq
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
增加法人和公司地址的记录
parent
8ca9f219
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
internal/dao/com_basicinfos.go
internal/logic/tianyancha.go
internal/dao/com_basicinfos.go
View file @
f540ba69
...
@@ -50,8 +50,8 @@ func (d *dao)UpdateCompanyBaseInfoForTyc(c context.Context,updateInfo map[string
...
@@ -50,8 +50,8 @@ func (d *dao)UpdateCompanyBaseInfoForTyc(c context.Context,updateInfo map[string
var
(
var
(
execSql
string
execSql
string
)
)
execSql
=
"update `lie_com_basicinfos` set `customer_property` = ?, `establishment_time` = ?, `five_legal_change` = ?, `registered_capital` = ?, `social_security_participants` = ?, `two_years_no_lawsuit` = ? , `tyc_select_num` = ? , `tianyancha_json` = ? where com_credits_id = ? "
execSql
=
"update `lie_com_basicinfos` set `customer_property` = ?, `establishment_time` = ?, `five_legal_change` = ?, `registered_capital` = ?, `social_security_participants` = ?, `two_years_no_lawsuit` = ? , `tyc_select_num` = ? , `tianyancha_json` = ?
, `com_address` = ?, `legal_representative` = ?
where com_credits_id = ? "
row
,
err
:=
d
.
db
.
Exec
(
c
,
execSql
,
updateInfo
[
"customer_property"
],
updateInfo
[
"establishment_time"
],
updateInfo
[
"five_legal_change"
],
updateInfo
[
"registered_capital"
],
updateInfo
[
"social_security_participants"
],
updateInfo
[
"two_years_no_lawsuit"
],
updateInfo
[
"tyc_select_num"
],
updateInfo
[
"tianyancha_json"
],
updateInfo
[
"com_credits_id"
])
row
,
err
:=
d
.
db
.
Exec
(
c
,
execSql
,
updateInfo
[
"customer_property"
],
updateInfo
[
"establishment_time"
],
updateInfo
[
"five_legal_change"
],
updateInfo
[
"registered_capital"
],
updateInfo
[
"social_security_participants"
],
updateInfo
[
"two_years_no_lawsuit"
],
updateInfo
[
"tyc_select_num"
],
updateInfo
[
"tianyancha_json"
],
updateInfo
[
"com_
address"
],
updateInfo
[
"legal_representative"
],
updateInfo
[
"com_
credits_id"
])
if
err
!=
nil
{
if
err
!=
nil
{
log
.
Error
(
"updateScoresdb.DemoExec.Exec(%s) error(%v)"
,
execSql
,
err
)
log
.
Error
(
"updateScoresdb.DemoExec.Exec(%s) error(%v)"
,
execSql
,
err
)
}
}
...
...
internal/logic/tianyancha.go
View file @
f540ba69
...
@@ -14,6 +14,8 @@ type TianYanChaCompanyInfo struct {
...
@@ -14,6 +14,8 @@ type TianYanChaCompanyInfo struct {
CompanyOrgType
string
`json:"companyOrgType"`
CompanyOrgType
string
`json:"companyOrgType"`
SocialStaffNum
float64
`json:"socialStaffNum"`
SocialStaffNum
float64
`json:"socialStaffNum"`
RegCapital
string
`json:"regCapital"`
RegCapital
string
`json:"regCapital"`
LegalPersonName
string
`json:"legalPersonName"`
RegLocation
string
`json:"regLocation"`
}
}
type
ResultStruct
struct
{
type
ResultStruct
struct
{
...
@@ -46,6 +48,8 @@ func HttpGet(companyName string)(returnDatas map[string]string) {
...
@@ -46,6 +48,8 @@ func HttpGet(companyName string)(returnDatas map[string]string) {
returnData
:=
make
(
map
[
string
]
string
)
returnData
:=
make
(
map
[
string
]
string
)
//成立时间
//成立时间
returnData
[
"establishment_time"
]
=
strconv
.
FormatFloat
((
companyTycInfo
.
Result
.
EstiblishTime
/
1000
),
'f'
,
-
1
,
64
)
returnData
[
"establishment_time"
]
=
strconv
.
FormatFloat
((
companyTycInfo
.
Result
.
EstiblishTime
/
1000
),
'f'
,
-
1
,
64
)
returnData
[
"legal_representative"
]
=
companyTycInfo
.
Result
.
LegalPersonName
returnData
[
"com_address"
]
=
companyTycInfo
.
Result
.
RegLocation
returnData
[
"tianyancha_json"
]
=
string
(
respBody
)
returnData
[
"tianyancha_json"
]
=
string
(
respBody
)
//公司性质
//公司性质
var
companyOrgType
string
var
companyOrgType
string
...
...
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