Commit 408e39a6 by Joneq

增加日志记录

parent 8538905f
...@@ -3,7 +3,7 @@ package main ...@@ -3,7 +3,7 @@ package main
import "kaopu-server/internal/logic" import "kaopu-server/internal/logic"
func main() { func main() {
logic.HttpGet("北京百度网讯科技有限公司") logic.NetBasicHttpGet(logic.COMPANYINFOURL,"深圳市禾田普达科技有限公司")
} }
......
...@@ -7,4 +7,5 @@ require ( ...@@ -7,4 +7,5 @@ require (
github.com/ichunt2019/go-msgserver v0.0.0-20191205082056-967d5dbbe7cd github.com/ichunt2019/go-msgserver v0.0.0-20191205082056-967d5dbbe7cd
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/pkg/errors v0.8.1 github.com/pkg/errors v0.8.1
github.com/prometheus/common v0.6.0
) )
...@@ -2,9 +2,9 @@ package dao ...@@ -2,9 +2,9 @@ package dao
import ( import (
"context" "context"
"fmt"
"github.com/pkg/errors"
"github.com/bilibili/kratos/pkg/database/sql" "github.com/bilibili/kratos/pkg/database/sql"
"github.com/pkg/errors"
"kaopu-server/internal/logic"
) )
//通过UID获取用户加分信息 //通过UID获取用户加分信息
...@@ -20,10 +20,8 @@ func (d *dao) GetCompanyAddSoreByCid(c context.Context, companyId int64) (res [] ...@@ -20,10 +20,8 @@ func (d *dao) GetCompanyAddSoreByCid(c context.Context, companyId int64) (res []
defer rows.Close() defer rows.Close()
if err != nil{
fmt.Println("select fail,err:",err) logic.CheckErr(err)
return
}
return GetAllParam(rows) return GetAllParam(rows)
} }
\ No newline at end of file
...@@ -2,9 +2,9 @@ package dao ...@@ -2,9 +2,9 @@ package dao
import ( import (
"context" "context"
"fmt"
"github.com/pkg/errors" "github.com/pkg/errors"
"github.com/bilibili/kratos/pkg/database/sql" "github.com/bilibili/kratos/pkg/database/sql"
"kaopu-server/internal/logic"
) )
//通过UID获取用户信息 //通过UID获取用户信息
...@@ -20,10 +20,8 @@ func (d *dao) GetBasicInfoByCid(c context.Context, erp_company_code string) (res ...@@ -20,10 +20,8 @@ func (d *dao) GetBasicInfoByCid(c context.Context, erp_company_code string) (res
defer rows.Close() defer rows.Close()
if err != nil{ logic.CheckErr(err)
fmt.Println("select fail,err:",err)
return
}
twoMap,err := GetAllParam(rows) twoMap,err := GetAllParam(rows)
......
...@@ -2,11 +2,9 @@ package dao ...@@ -2,11 +2,9 @@ package dao
import ( import (
"context" "context"
"fmt"
"github.com/pkg/errors"
"github.com/bilibili/kratos/pkg/database/sql" "github.com/bilibili/kratos/pkg/database/sql"
"github.com/pkg/errors"
"kaopu-server/internal/logic" "kaopu-server/internal/logic"
"github.com/bilibili/kratos/pkg/log"
) )
...@@ -23,10 +21,8 @@ func (d *dao) GetCompanyBaseInfoByCid(c context.Context, companyId int64) (res m ...@@ -23,10 +21,8 @@ func (d *dao) GetCompanyBaseInfoByCid(c context.Context, companyId int64) (res m
defer rows.Close() defer rows.Close()
if err != nil{ logic.CheckErr(err)
fmt.Println("select fail,err:",err)
return
}
twoMap,err := GetAllParam(rows) twoMap,err := GetAllParam(rows)
...@@ -53,10 +49,7 @@ func (d *dao)UpdateCompanyBaseInfoForTyc(c context.Context,updateInfo map[string ...@@ -53,10 +49,7 @@ func (d *dao)UpdateCompanyBaseInfoForTyc(c context.Context,updateInfo map[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` = ?, `com_address` = ?, `legal_representative` = ? ,com_organization = ? 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` = ? ,com_organization = ? 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_address"],updateInfo["legal_representative"],updateInfo["com_organization"],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_organization"],updateInfo["com_credits_id"])
if err != nil { logic.CheckErr(err)
log.Error("updateScoresdb.DemoExec.Exec(%s) error(%v)", execSql, err)
}
affectNum,err := row.RowsAffected() affectNum,err := row.RowsAffected()
......
...@@ -22,10 +22,8 @@ func (d *dao) GetCompanyCresitsList(ctx context.Context) (res []map[string]strin ...@@ -22,10 +22,8 @@ func (d *dao) GetCompanyCresitsList(ctx context.Context) (res []map[string]strin
defer rows.Close() defer rows.Close()
if err != nil{ logic.CheckErr(err)
fmt.Println("select fail,err:",err)
return
}
return GetAllParam(rows) return GetAllParam(rows)
} }
...@@ -39,9 +37,7 @@ func (d *dao) UpdateStaticSumScores(ctx context.Context,com_credits model.ComCre ...@@ -39,9 +37,7 @@ func (d *dao) UpdateStaticSumScores(ctx context.Context,com_credits model.ComCre
execSql = "update `lie_com_credits` set `static_credit_score` = ? where id = ? " execSql = "update `lie_com_credits` set `static_credit_score` = ? where id = ? "
row,err := d.db.Exec(ctx,execSql,com_credits.StaticCreditScore,com_credits.Id) row,err := d.db.Exec(ctx,execSql,com_credits.StaticCreditScore,com_credits.Id)
if err != nil { logic.CheckErr(err)
log.Error("UpdateStaticSumScoresdb.DemoExec.Exec(%s) error(%v)", execSql, err)
}
d.UpdateComCredits(ctx,com_credits) d.UpdateComCredits(ctx,com_credits)
......
package dao package dao
import ( import (
"context" "context"
"fmt"
"github.com/pkg/errors"
"github.com/bilibili/kratos/pkg/database/sql" "github.com/bilibili/kratos/pkg/database/sql"
"github.com/pkg/errors"
"kaopu-server/internal/logic"
) )
...@@ -23,13 +21,12 @@ func (d *dao) GetCompanyScoreFieldsByCid(c context.Context, companyId int64) (re ...@@ -23,13 +21,12 @@ func (d *dao) GetCompanyScoreFieldsByCid(c context.Context, companyId int64) (re
defer rows.Close() defer rows.Close()
if err != nil{
fmt.Println("select fail,err:",err) logic.CheckErr(err)
return
}
twoMap,err := GetAllParam(rows) twoMap,err := GetAllParam(rows)
logic.CheckErr(err)
for _,v:=range twoMap{ for _,v:=range twoMap{
res = v res = v
break break
......
...@@ -4,9 +4,9 @@ package dao ...@@ -4,9 +4,9 @@ package dao
import ( import (
"context" "context"
"fmt"
"github.com/pkg/errors" "github.com/pkg/errors"
"github.com/bilibili/kratos/pkg/database/sql" "github.com/bilibili/kratos/pkg/database/sql"
"kaopu-server/internal/logic"
) )
//通过projectId获取该项信息 //通过projectId获取该项信息
...@@ -22,10 +22,8 @@ func (d *dao) GetCompanyModelByProjectid(c context.Context, projectId int64) (re ...@@ -22,10 +22,8 @@ func (d *dao) GetCompanyModelByProjectid(c context.Context, projectId int64) (re
defer rows.Close() defer rows.Close()
if err != nil{ logic.CheckErr(err)
fmt.Println("select fail,err:",err)
return
}
twoMap,err := GetAllParam(rows) twoMap,err := GetAllParam(rows)
......
...@@ -7,6 +7,7 @@ import ( ...@@ -7,6 +7,7 @@ import (
"fmt" "fmt"
"github.com/pkg/errors" "github.com/pkg/errors"
"github.com/bilibili/kratos/pkg/database/sql" "github.com/bilibili/kratos/pkg/database/sql"
"kaopu-server/internal/logic"
) )
//通过projectId获取该项信息 //通过projectId获取该项信息
...@@ -51,10 +52,8 @@ func (d *dao) GetCompanyModelItemsByProjectidWitchString(c context.Context, proj ...@@ -51,10 +52,8 @@ func (d *dao) GetCompanyModelItemsByProjectidWitchString(c context.Context, proj
defer rows.Close() defer rows.Close()
if err != nil{ logic.CheckErr(err)
fmt.Println("select fail,err:",err)
return
}
twoMap,err := GetAllParam(rows) twoMap,err := GetAllParam(rows)
......
...@@ -3,9 +3,9 @@ package dao ...@@ -3,9 +3,9 @@ package dao
import ( import (
"context" "context"
"fmt"
"github.com/pkg/errors" "github.com/pkg/errors"
"github.com/bilibili/kratos/pkg/database/sql" "github.com/bilibili/kratos/pkg/database/sql"
"kaopu-server/internal/logic"
) )
//通过projectId获取该项信息 //通过projectId获取该项信息
...@@ -21,10 +21,8 @@ func (d *dao) GetModelTopsetByProjectId(c context.Context, projectId int64) (res ...@@ -21,10 +21,8 @@ func (d *dao) GetModelTopsetByProjectId(c context.Context, projectId int64) (res
defer rows.Close() defer rows.Close()
if err != nil{ logic.CheckErr(err)
fmt.Println("select fail,err:",err)
return
}
twoMap,err := GetAllParam(rows) twoMap,err := GetAllParam(rows)
......
...@@ -2,12 +2,10 @@ package dao ...@@ -2,12 +2,10 @@ package dao
import ( import (
"context" "context"
"fmt" "github.com/bilibili/kratos/pkg/database/sql"
"github.com/bilibili/kratos/pkg/log"
"kaopu-server/internal/logic" "kaopu-server/internal/logic"
"kaopu-server/internal/model" "kaopu-server/internal/model"
"time" "time"
"github.com/bilibili/kratos/pkg/database/sql"
) )
//增加或者修改记录 //增加或者修改记录
...@@ -24,10 +22,8 @@ func (d *dao) InsertScores(ctx context.Context,score model.Scores) (insertId int ...@@ -24,10 +22,8 @@ func (d *dao) InsertScores(ctx context.Context,score model.Scores) (insertId int
defer rows.Close() defer rows.Close()
if err != nil{ logic.CheckErr(err)
fmt.Println("select fail,err:",err)
return
}
twoMap,err := GetAllParam(rows) twoMap,err := GetAllParam(rows)
...@@ -41,7 +37,7 @@ func (d *dao) InsertScores(ctx context.Context,score model.Scores) (insertId int ...@@ -41,7 +37,7 @@ func (d *dao) InsertScores(ctx context.Context,score model.Scores) (insertId int
execSql = "INSERT INTO `lie_scores` (`type`, `project_pid`, `project_id`, `total_score`, `current_score`, `weight`, `final_score`, `com_credits_id`, `create_time`)VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?)" execSql = "INSERT INTO `lie_scores` (`type`, `project_pid`, `project_id`, `total_score`, `current_score`, `weight`, `final_score`, `com_credits_id`, `create_time`)VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?)"
row,err := d.db.Exec(ctx,execSql,score.Type,score.ProjectPid,score.ProjectId,score.TotalScore,score.CurrentScore,score.Weight,score.FinalScore,score.ComCreditsId,time.Now().Unix()) row,err := d.db.Exec(ctx,execSql,score.Type,score.ProjectPid,score.ProjectId,score.TotalScore,score.CurrentScore,score.Weight,score.FinalScore,score.ComCreditsId,time.Now().Unix())
if err != nil { if err != nil {
log.Error("InsertScoresdb.DemoExec.Exec(%s) error(%v)", execSql, err) logic.CheckErr(err)
}else{ }else{
affectNum,_ = row.LastInsertId() affectNum,_ = row.LastInsertId()
} }
...@@ -50,7 +46,7 @@ func (d *dao) InsertScores(ctx context.Context,score model.Scores) (insertId int ...@@ -50,7 +46,7 @@ func (d *dao) InsertScores(ctx context.Context,score model.Scores) (insertId int
execSql = "update `lie_scores` set `type` = ?, `project_pid` = ?, `project_id` = ?, `total_score` = ?, `current_score` = ?, `weight` = ?, `final_score` = ?, `update_time` = ? where `type` = ? and project_pid = ? and project_id = ? and com_credits_id = ?" execSql = "update `lie_scores` set `type` = ?, `project_pid` = ?, `project_id` = ?, `total_score` = ?, `current_score` = ?, `weight` = ?, `final_score` = ?, `update_time` = ? where `type` = ? and project_pid = ? and project_id = ? and com_credits_id = ?"
row,err := d.db.Exec(ctx,execSql,score.Type,score.ProjectPid,score.ProjectId,score.TotalScore,score.CurrentScore,score.Weight,score.FinalScore,time.Now().Unix(),score.Type,score.ProjectPid,score.ProjectId,score.ComCreditsId) row,err := d.db.Exec(ctx,execSql,score.Type,score.ProjectPid,score.ProjectId,score.TotalScore,score.CurrentScore,score.Weight,score.FinalScore,time.Now().Unix(),score.Type,score.ProjectPid,score.ProjectId,score.ComCreditsId)
if err != nil { if err != nil {
log.Error("updateScoresdb.DemoExec.Exec(%s) error(%v)", execSql, err) logic.CheckErr(err)
}else{ }else{
affectNum,_ = row.RowsAffected() affectNum,_ = row.RowsAffected()
} }
...@@ -84,7 +80,7 @@ func (d *dao) InsertScores2(ctx context.Context,score model.Scores,month_six_zi ...@@ -84,7 +80,7 @@ func (d *dao) InsertScores2(ctx context.Context,score model.Scores,month_six_zi
execSql = "INSERT INTO `lie_scores` (`type`, `project_pid`, `project_id`, `total_score`, `current_score`, `weight`, `final_score`, `com_credits_id`, `create_time`,`current_rate`,`month`,`remark`)VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?,?,?,?)" execSql = "INSERT INTO `lie_scores` (`type`, `project_pid`, `project_id`, `total_score`, `current_score`, `weight`, `final_score`, `com_credits_id`, `create_time`,`current_rate`,`month`,`remark`)VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?,?,?,?)"
row,err := d.db.Exec(ctx,execSql,score.Type,score.ProjectPid,score.ProjectId,score.TotalScore,score.CurrentScore,score.Weight,score.FinalScore,score.ComCreditsId,time.Now().Unix(),score.Current_rate,score.Month,score.Remark) row,err := d.db.Exec(ctx,execSql,score.Type,score.ProjectPid,score.ProjectId,score.TotalScore,score.CurrentScore,score.Weight,score.FinalScore,score.ComCreditsId,time.Now().Unix(),score.Current_rate,score.Month,score.Remark)
if err != nil { if err != nil {
log.Error("InsertScoresdb.DemoExec.Exec(%s) error(%v)", execSql, err) logic.CheckErr(err)
}else{ }else{
affectNum,_ = row.LastInsertId() affectNum,_ = row.LastInsertId()
} }
...@@ -93,7 +89,7 @@ func (d *dao) InsertScores2(ctx context.Context,score model.Scores,month_six_zi ...@@ -93,7 +89,7 @@ func (d *dao) InsertScores2(ctx context.Context,score model.Scores,month_six_zi
execSql = "update `lie_scores` set `type` = ?, `project_pid` = ?, `project_id` = ?, `total_score` = ?, `current_score` = ?, `weight` = ?, `final_score` = ?, `update_time` = ?, `current_rate` = ?, `remark` = ? where `type` = ? and project_pid = ? and project_id = ? and com_credits_id = ? and month = ?" execSql = "update `lie_scores` set `type` = ?, `project_pid` = ?, `project_id` = ?, `total_score` = ?, `current_score` = ?, `weight` = ?, `final_score` = ?, `update_time` = ?, `current_rate` = ?, `remark` = ? where `type` = ? and project_pid = ? and project_id = ? and com_credits_id = ? and month = ?"
row,err := d.db.Exec(ctx,execSql,score.Type,score.ProjectPid,score.ProjectId,score.TotalScore,score.CurrentScore,score.Weight,score.FinalScore,time.Now().Unix(), score.Current_rate,score.Remark,score.Type,score.ProjectPid,score.ProjectId,score.ComCreditsId,month_six_zi) row,err := d.db.Exec(ctx,execSql,score.Type,score.ProjectPid,score.ProjectId,score.TotalScore,score.CurrentScore,score.Weight,score.FinalScore,time.Now().Unix(), score.Current_rate,score.Remark,score.Type,score.ProjectPid,score.ProjectId,score.ComCreditsId,month_six_zi)
if err != nil { if err != nil {
log.Error("updateScoresdb.DemoExec.Exec(%s) error(%v)", execSql, err) logic.CheckErr(err)
}else{ }else{
affectNum,_ = row.RowsAffected() affectNum,_ = row.RowsAffected()
} }
......
...@@ -55,6 +55,13 @@ func LogWrite(log1 string,log_pre string,is_write int) { ...@@ -55,6 +55,13 @@ func LogWrite(log1 string,log_pre string,is_write int) {
Loginfo(log1,log_pre) Loginfo(log1,log_pre)
} }
func CheckErr(err error) {
if err != nil {
Loginfo(err.Error(),"error")
}
}
/** /**
from: http://www.isharey.com/?p=143 from: http://www.isharey.com/?p=143
*/ */
......
...@@ -136,4 +136,24 @@ func BasicHttpGet(url,name string)(respBody []byte) { ...@@ -136,4 +136,24 @@ func BasicHttpGet(url,name string)(respBody []byte) {
log.Print(err) log.Print(err)
} }
return body return body
}
//内网访问
func NetBasicHttpGet(url,name string)(respBody []byte) {
req, err := http.NewRequest("GET", "http://localhost/tyc_turn.php", nil)
q := req.URL.Query()
q.Add("pageNum","1")
q.Add("name",name)
q.Add("url",url)
q.Add("token",TIANYANCHATOKEN)
req.URL.RawQuery = q.Encode()
var resp *http.Response
resp, err = http.DefaultClient.Do(req)
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
log.Print(err)
}
return body
} }
\ No newline at end of file
...@@ -5,6 +5,7 @@ import ( ...@@ -5,6 +5,7 @@ import (
"github.com/bilibili/kratos/pkg/conf/paladin" "github.com/bilibili/kratos/pkg/conf/paladin"
"github.com/pkg/errors" "github.com/pkg/errors"
"kaopu-server/internal/dao" "kaopu-server/internal/dao"
"kaopu-server/internal/logic"
"kaopu-server/internal/model" "kaopu-server/internal/model"
) )
...@@ -64,7 +65,7 @@ func (s *Service) GetCompanyCresitsList(c context.Context) (res []map[string]str ...@@ -64,7 +65,7 @@ func (s *Service) GetCompanyCresitsList(c context.Context) (res []map[string]str
//调用DB方法,获取会员数据 //调用DB方法,获取会员数据
res, err = s.dao.GetCompanyCresitsList(c) res, err = s.dao.GetCompanyCresitsList(c)
//fmt.Print(err) logic.CheckErr(err)
return return
} }
...@@ -73,7 +74,7 @@ func (s *Service) GetCompanyBaseInfoByCid(c context.Context, companyId int64) (r ...@@ -73,7 +74,7 @@ func (s *Service) GetCompanyBaseInfoByCid(c context.Context, companyId int64) (r
//调用DB方法,获取会员数据 //调用DB方法,获取会员数据
res, err = s.dao.GetCompanyBaseInfoByCid(c,companyId) res, err = s.dao.GetCompanyBaseInfoByCid(c,companyId)
//fmt.Print(err) logic.CheckErr(err)
return return
} }
...@@ -82,7 +83,7 @@ func (s *Service) GetCompanyScoreFieldsByCid(c context.Context, companyId int64) ...@@ -82,7 +83,7 @@ func (s *Service) GetCompanyScoreFieldsByCid(c context.Context, companyId int64)
//调用DB方法,获取会员数据 //调用DB方法,获取会员数据
res, err = s.dao.GetCompanyScoreFieldsByCid(c,companyId) res, err = s.dao.GetCompanyScoreFieldsByCid(c,companyId)
//fmt.Print(err) logic.CheckErr(err)
return return
} }
...@@ -91,7 +92,7 @@ func (s *Service) GetBasicInfoByCid(c context.Context, erpCompanyCode string) (r ...@@ -91,7 +92,7 @@ func (s *Service) GetBasicInfoByCid(c context.Context, erpCompanyCode string) (r
//调用DB方法,获取会员数据 //调用DB方法,获取会员数据
res, err = s.dao.GetBasicInfoByCid(c,erpCompanyCode) res, err = s.dao.GetBasicInfoByCid(c,erpCompanyCode)
//fmt.Print(err) logic.CheckErr(err)
return return
} }
...@@ -100,7 +101,7 @@ func (s *Service) GetCompanyModelByProjectid(c context.Context, projectId int64) ...@@ -100,7 +101,7 @@ func (s *Service) GetCompanyModelByProjectid(c context.Context, projectId int64)
//调用DB方法,获取会员数据 //调用DB方法,获取会员数据
res, err = s.dao.GetCompanyModelByProjectid(c,projectId) res, err = s.dao.GetCompanyModelByProjectid(c,projectId)
//fmt.Print(err) logic.CheckErr(err)
return return
} }
...@@ -110,19 +111,21 @@ func (s *Service) GetCompanyAddSore(c context.Context, companyId int64) (res []m ...@@ -110,19 +111,21 @@ func (s *Service) GetCompanyAddSore(c context.Context, companyId int64) (res []m
//调用DB方法,获取会员数据 //调用DB方法,获取会员数据
res, err = s.dao.GetCompanyAddSoreByCid(c,companyId) res, err = s.dao.GetCompanyAddSoreByCid(c,companyId)
//fmt.Print(err) logic.CheckErr(err)
return return
} }
//获取模型的详细数据 //获取模型的详细数据
func (s *Service)GetCompanyModelItemsByProjectidWitchString(c context.Context, project_id int64 , stringVal string) (res map[string]string, err error){ func (s *Service)GetCompanyModelItemsByProjectidWitchString(c context.Context, project_id int64 , stringVal string) (res map[string]string, err error){
res,err = s.dao.GetCompanyModelItemsByProjectidWitchString(c, project_id , stringVal) res,err = s.dao.GetCompanyModelItemsByProjectidWitchString(c, project_id , stringVal)
logic.CheckErr(err)
return return
} }
//获取模型的头部信息 //获取模型的头部信息
func (s *Service)GetModelTopsetByProjectId(c context.Context, companyId int64) (res map[string]string, err error){ func (s *Service)GetModelTopsetByProjectId(c context.Context, companyId int64) (res map[string]string, err error){
res,err = s.dao.GetModelTopsetByProjectId(c,companyId) res,err = s.dao.GetModelTopsetByProjectId(c,companyId)
logic.CheckErr(err)
return return
} }
...@@ -138,7 +141,7 @@ func (s *Service) UpdateStaticSumScores(c context.Context,com_credits model.ComC ...@@ -138,7 +141,7 @@ func (s *Service) UpdateStaticSumScores(c context.Context,com_credits model.ComC
//调用DB方法,获取会员数据 //调用DB方法,获取会员数据
res, err = s.dao.UpdateStaticSumScores(c,com_credits) res, err = s.dao.UpdateStaticSumScores(c,com_credits)
//fmt.Print(err) logic.CheckErr(err)
return return
} }
...@@ -147,7 +150,7 @@ func (s *Service) InsertScores(c context.Context,score model.Scores) (res int64, ...@@ -147,7 +150,7 @@ func (s *Service) InsertScores(c context.Context,score model.Scores) (res int64,
//调用DB方法,获取会员数据 //调用DB方法,获取会员数据
res, err = s.dao.InsertScores(c,score) res, err = s.dao.InsertScores(c,score)
//fmt.Print(err) logic.CheckErr(err)
return return
} }
...@@ -155,7 +158,7 @@ func (s *Service) InsertScores(c context.Context,score model.Scores) (res int64, ...@@ -155,7 +158,7 @@ func (s *Service) InsertScores(c context.Context,score model.Scores) (res int64,
func (s *Service)GetCompanyAddSoreByCid(c context.Context, companyId int64) (res []map[string]string, err error){ func (s *Service)GetCompanyAddSoreByCid(c context.Context, companyId int64) (res []map[string]string, err error){
//调用DB方法,获取会员数据 //调用DB方法,获取会员数据
res, err = s.dao.GetCompanyAddSoreByCid(c,companyId) res, err = s.dao.GetCompanyAddSoreByCid(c,companyId)
//fmt.Print(err) logic.CheckErr(err)
return return
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment