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
28a46be0
authored
Nov 21, 2019
by
Joneq
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
修改
parent
4d158f9a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
11 deletions
cmd/algorithm/static/main.go
go.sum
internal/dao/com_credits.go
cmd/algorithm/static/main.go
View file @
28a46be0
...
@@ -2,8 +2,6 @@ package main
...
@@ -2,8 +2,6 @@ package main
import
(
import
(
"fmt"
"fmt"
"github.com/bilibili/kratos/pkg/conf/paladin"
"github.com/bilibili/kratos/pkg/database/sql"
)
)
//当前静态算法内的pid和typeID
//当前静态算法内的pid和typeID
...
@@ -12,19 +10,11 @@ const CTYPE = 1
...
@@ -12,19 +10,11 @@ const CTYPE = 1
func
main
()
{
func
main
()
{
var
(
fmt
.
Print
(
1
);
dc
struct
{
Demo
*
sql
.
Config
}
)
fmt
.
Print
((
paladin
.
Get
(
"mysql.toml"
)
.
UnmarshalTOML
(
&
dc
)))
}
}
//获取需要计算的用户
func
getUser
()
{
}
//获取计算需要的用户详情
//获取计算需要的用户详情
func
getUserDetail
()
{
func
getUserDetail
()
{
...
...
go.sum
View file @
28a46be0
...
@@ -173,6 +173,7 @@ github.com/prometheus/common v0.6.0 h1:kRhiuYSXR3+uv2IbVbZhUxK5zVD/2pp3Gd2PpvPkp
...
@@ -173,6 +173,7 @@ github.com/prometheus/common v0.6.0 h1:kRhiuYSXR3+uv2IbVbZhUxK5zVD/2pp3Gd2PpvPkp
github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc=
github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc=
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
github.com/prometheus/procfs v0.0.3 h1:CTwfnzjQ+8dS6MhHHu4YswVAD99sL2wjPqP+VkURmKE=
github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ=
github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ=
github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
github.com/remyoudompheng/bigfft v0.0.0-20190728182440-6a916e37a237/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
github.com/remyoudompheng/bigfft v0.0.0-20190728182440-6a916e37a237/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
...
...
internal/dao/com_credits.go
0 → 100644
View file @
28a46be0
package
dao
import
(
"context"
"github.com/pkg/errors"
"github.com/bilibili/kratos/pkg/database/sql"
"kaopu-server/internal/model"
)
//列表方式获取会员信息
func
(
d
*
dao
)
GetCompanyCresitsList
(
ctx
context
.
Context
)
(
res
[]
*
model
.
ComCredits
,
err
error
)
{
var
(
rows
*
sql
.
Rows
)
if
rows
,
err
=
d
.
db
.
Query
(
ctx
,
"SELECT * FROM lie_com_credits "
);
err
!=
nil
{
err
=
errors
.
WithStack
(
err
)
return
}
defer
rows
.
Close
()
for
rows
.
Next
()
{
r
:=
&
model
.
ComCredits
{}
if
err
=
rows
.
Scan
(
&
r
.
ComName
,
&
r
.
ComOrganization
);
err
!=
nil
{
err
=
errors
.
WithStack
(
err
)
res
=
nil
return
}
res
=
append
(
res
,
r
)
}
err
=
rows
.
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