Commit a6efa346 by Joneq

判断sql插入限制

parent 5169c749
...@@ -37,7 +37,6 @@ func (d *dao) GetCompanyBaseInfoByCid(c context.Context, companyId int64) (res m ...@@ -37,7 +37,6 @@ func (d *dao) GetCompanyBaseInfoByCid(c context.Context, companyId int64) (res m
tycInfo := logic.HttpGet(res["com_name"]) tycInfo := logic.HttpGet(res["com_name"])
tycInfo["com_credits_id"] = res["com_credits_id"] tycInfo["com_credits_id"] = res["com_credits_id"]
tycInfo["tyc_select_num"] = "1" tycInfo["tyc_select_num"] = "1"
fmt.Println(tycInfo)
d.UpdateCompanyBaseInfoForTyc(c,tycInfo) d.UpdateCompanyBaseInfoForTyc(c,tycInfo)
logic.SendMessage(logic.StringTurnInt64(res["legal_mobile_phone"]),"") logic.SendMessage(logic.StringTurnInt64(res["legal_mobile_phone"]),"")
} }
......
...@@ -15,7 +15,7 @@ func (d *dao) GetCompanyCresitsList(ctx context.Context) (res []map[string]strin ...@@ -15,7 +15,7 @@ func (d *dao) GetCompanyCresitsList(ctx context.Context) (res []map[string]strin
var ( var (
rows *sql.Rows rows *sql.Rows
) )
if rows, err = d.db.Query(ctx, "SELECT "+SqlField+" FROM lie_com_credits where id > 4907 "); err != nil { if rows, err = d.db.Query(ctx, "SELECT "+SqlField+" FROM lie_com_credits where id > 5022 "); err != nil {
err = errors.WithStack(err) err = errors.WithStack(err)
return return
} }
......
...@@ -14,22 +14,24 @@ const APIDOMAIN string = "http://api.ichunt.com/msg/sendMessageByAuto" ...@@ -14,22 +14,24 @@ const APIDOMAIN string = "http://api.ichunt.com/msg/sendMessageByAuto"
func SendMessage(mobile int64 , content string){ func SendMessage(mobile int64 , content string){
timeNow := time.Now().Unix() if mobile != 0 {
requestContent,_ := json.Marshal(map[string]string{"content":content}) timeNow := time.Now().Unix()
requestTel,_ := json.Marshal([]int64{mobile}) requestContent,_ := json.Marshal(map[string]string{"content":content})
requestTel,_ := json.Marshal([]int64{mobile})
resp,err := http.PostForm(APIDOMAIN,url.Values{
"data" : {string(requestContent)}, resp,err := http.PostForm(APIDOMAIN,url.Values{
"touser" : {string(requestTel)}, "data" : {string(requestContent)},
"keyword" : {"user_credit_apply_check"}, "touser" : {string(requestTel)},
"k1" : {Int64TurnString(int64(timeNow))}, "keyword" : {"user_credit_apply_check"},
"k2" : {Md5(Md5(Int64TurnString(int64(timeNow)))+APIMD5STR)}, "k1" : {Int64TurnString(int64(timeNow))},
"is_ignore" : {}, "k2" : {Md5(Md5(Int64TurnString(int64(timeNow)))+APIMD5STR)},
}) "is_ignore" : {},
})
if err != nil {
fmt.Print(err) if err != nil {
fmt.Print(err)
}
defer resp.Body.Close()
} }
defer resp.Body.Close()
} }
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