ef_sms_send.srf 801 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. $PBExportHeader$ef_sms_send.srf
  2. global type ef_sms_send from function_object
  3. end type
  4. forward prototypes
  5. global function string ef_sms_send (string arg_content, string arg_phone)
  6. end prototypes
  7. global function string ef_sms_send (string arg_content, string arg_phone);String rslt = ''
  8. uo_spring_send uo_send
  9. uo_send = Create uo_spring_send
  10. uo_send.commit_transaction = sqlca
  11. IF arg_phone = '' THEN
  12. rslt = '接收号码不能为空'
  13. GOTO ext
  14. END IF
  15. Long ll_sendwayid
  16. SELECT TOP 1 sendwayid
  17. INTO :ll_sendwayid
  18. From u_spring_sendway;
  19. IF sqlca.SQLCode <> 0 THEN
  20. rslt = '查询短信通道失败,' + sqlca.SQLErrText
  21. GOTO ext
  22. END IF
  23. IF uo_send.uf_sendnow(ll_sendwayid, 0, 0, '', '', arg_phone, arg_content, rslt) <> 1 THEN
  24. GOTO ext
  25. END IF
  26. ext:
  27. Destroy uo_send
  28. RETURN rslt
  29. end function