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
2d3fd640
authored
Nov 26, 2019
by
Joneq
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
增加addscore项
parent
a24626cc
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
11 deletions
cmd/static/main.go
internal/dao/add_scores.go
internal/dao/dao.go
internal/service/service.go
cmd/static/main.go
View file @
2d3fd640
...
...
@@ -27,7 +27,7 @@ var (
//公司的逾期数据
companySoreFields
map
[
string
]
string
//公司的逾期数据
companyAddSore
map
[
string
]
string
companyAddSore
[]
map
[
string
]
string
//设置等待
wg
sync
.
WaitGroup
)
...
...
@@ -116,6 +116,7 @@ func getCompanyRunInfo(c context.Context) {
connect
:=
dao
.
New
()
companyBasicInfo
,
_
=
connect
.
GetCompanyBaseInfoByCid
(
c
,
insertScoreMsg
.
ComCreditsId
)
companySoreFields
,
_
=
connect
.
GetCompanyScoreFieldsByCid
(
c
,
insertScoreMsg
.
ComCreditsId
)
companyAddSore
,
_
=
connect
.
GetCompanyAddSoreByCid
(
c
,
insertScoreMsg
.
ComCreditsId
)
}
func
getTimeStamp
()(
timestamp
int64
)
{
...
...
internal/dao/add_scores.go
View file @
2d3fd640
...
...
@@ -8,7 +8,7 @@ import (
)
//通过UID获取用户加分信息
func
(
d
*
dao
)
Ge
AddScoresByCid
(
c
context
.
Context
,
companyId
int64
)
(
res
map
[
string
]
string
,
err
error
)
{
func
(
d
*
dao
)
Ge
tCompanyAddSoreByCid
(
c
context
.
Context
,
companyId
int64
)
(
res
[]
map
[
string
]
string
,
err
error
)
{
var
(
rows
*
sql
.
Rows
...
...
@@ -25,12 +25,5 @@ func (d *dao) GeAddScoresByCid(c context.Context, companyId int64) (res map[stri
return
}
twoMap
,
err
:=
GetAllParam
(
rows
)
for
_
,
v
:=
range
twoMap
{
res
=
v
break
}
return
return
GetAllParam
(
rows
)
}
\ No newline at end of file
internal/dao/dao.go
View file @
2d3fd640
...
...
@@ -25,6 +25,7 @@ type (
InsertScores
(
ctx
context
.
Context
,
score
model
.
Scores
)
(
insertId
int64
,
err
error
)
GetCompanyBaseInfoByCid
(
c
context
.
Context
,
companyId
int64
)
(
r
map
[
string
]
string
,
err
error
)
GetCompanyScoreFieldsByCid
(
c
context
.
Context
,
companyId
int64
)
(
r
map
[
string
]
string
,
err
error
)
GetCompanyAddSoreByCid
(
c
context
.
Context
,
companyId
int64
)
(
r
[]
map
[
string
]
string
,
err
error
)
//---静态结束
CountYuqi
(
ctx
context
.
Context
,
project_id
int
)
(
r
[]
map
[
string
]
interface
{},
err
error
)
//计算逾期
...
...
internal/service/service.go
View file @
2d3fd640
...
...
@@ -79,7 +79,7 @@ func (s *Service) GetCompanyBaseInfoByCid(c context.Context, companyId int64) (r
return
}
// 获取公司
用户列表
// 获取公司
征信信息
func
(
s
*
Service
)
GetCompanyScoreFieldsByCid
(
c
context
.
Context
,
companyId
int64
)
(
res
map
[
string
]
string
,
err
error
)
{
//调用DB方法,获取会员数据
...
...
@@ -89,4 +89,14 @@ func (s *Service) GetCompanyScoreFieldsByCid(c context.Context, companyId int64)
}
// 获取公司加分项
func
(
s
*
Service
)
GetCompanyAddSore
(
c
context
.
Context
,
companyId
int64
)
(
res
[]
map
[
string
]
string
,
err
error
)
{
//调用DB方法,获取会员数据
res
,
err
=
s
.
dao
.
GetCompanyAddSoreByCid
(
c
,
companyId
)
fmt
.
Print
(
err
)
return
}
//----------静态结束
\ No newline at end of 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