|
@@ -31,9 +31,6 @@ type SupplierSmsReq struct {
|
|
|
|
|
|
func SendSmsNotify(phone string, info *SupplierSmsReq, wg *sync.WaitGroup) error {
|
|
|
defer wg.Done()
|
|
|
- // TODO dev
|
|
|
- // return errors.New("待配置短信模板")
|
|
|
- phone = "13408547823"
|
|
|
client, _err := createSmsClient()
|
|
|
if _err != nil {
|
|
|
log.Error(_err)
|
|
@@ -57,9 +54,13 @@ func SendSmsNotify(phone string, info *SupplierSmsReq, wg *sync.WaitGroup) error
|
|
|
if *resp.Body.Code == "OK" {
|
|
|
return nil
|
|
|
}
|
|
|
+ reserr := fmt.Errorf("code err %s", *resp.Body.Code)
|
|
|
+ log.Error(reserr)
|
|
|
|
|
|
- return fmt.Errorf("code err %s", *resp.Body.Code)
|
|
|
+ return reserr
|
|
|
}
|
|
|
+
|
|
|
+// todo test
|
|
|
func SendSmsNotify1(phone string, info *SupplierSmsReq) error {
|
|
|
client, _err := createSmsClient()
|
|
|
if _err != nil {
|