Commit a6efa346 by Joneq

判断sql插入限制

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