|
|
@@ -70,7 +70,7 @@ func SmsSend(engine *xorm.Engine, args map[string]interface{}) error { |
|
|
|
where = map[string]interface{}{ |
|
|
|
"appkey": args["smsmsg_key"], |
|
|
|
"zone": args["zone"], |
|
|
|
"phone": args["phone"], |
|
|
|
"phone": args["mobile"], |
|
|
|
"templateCode": args["templateCode"], |
|
|
|
} |
|
|
|
send, err = SmsMobApiSend(where) |
|
|
@@ -122,9 +122,12 @@ func SmsSend(engine *xorm.Engine, args map[string]interface{}) error { |
|
|
|
SmsType: args["sms_type"].(string), |
|
|
|
} |
|
|
|
engine.InsertOne(&record) |
|
|
|
sql := `UPDATE sms_num_list set num=num-%d WHERE uid=%s and type=%s;` |
|
|
|
sql := `UPDATE sms_num_list set num=num-%d WHERE uid=%s and type='%s';` |
|
|
|
sql = fmt.Sprintf(sql, count*int(contentLen), args["uid"], args["sms_type"]) |
|
|
|
db.QueryNativeString(engine, sql) |
|
|
|
fmt.Println(sql) |
|
|
|
nativeString, err := db.QueryNativeString(engine, sql) |
|
|
|
fmt.Println(nativeString) |
|
|
|
fmt.Println(err) |
|
|
|
return nil |
|
|
|
} |
|
|
|
|
|
|
@@ -154,7 +157,7 @@ func SmsApiSend(engine *xorm.Engine, method string, args map[string]interface{}) |
|
|
|
} |
|
|
|
func SmsMobApiSend(args map[string]interface{}) (string, error) { |
|
|
|
thisUrl := "https://webapi.sms.mob.com/sms/sendmsg" |
|
|
|
post, err := zhios_third_party_utils.CurlPost(thisUrl, zhios_third_party_utils.SerializeStr(args), nil) |
|
|
|
post, err := zhios_third_party_utils.CurlPost(thisUrl, args, nil) |
|
|
|
fmt.Println(string(post)) |
|
|
|
fmt.Println(err) |
|
|
|
return string(post), err |
|
|
|