| | |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.sms.smsUtils; |
| | | import com.smartor.common.MtSubmitSmUtil; |
| | | import com.smartor.common.ShiyiSmsUtil; |
| | | import com.smartor.domain.ServiceOutPath; |
| | | import com.smartor.domain.ShiyiSmsRequest; |
| | | import com.smartor.domain.ShiyiSmsResponse; |
| | | import com.smartor.domain.smsVO; |
| | | import com.smartor.mapper.UtilsMapper; |
| | | import com.smartor.service.IServiceOutPathService; |
| | |
| | | @Autowired |
| | | private MtSubmitSmUtil mtSubmitSmUtil; |
| | | |
| | | @Autowired |
| | | private ShiyiSmsUtil shiyiSmsUtil; |
| | | |
| | | @Value("${xhsmsAccount}") |
| | | private String xhsmsAccount; |
| | | |
| | |
| | | public AjaxResult send(@RequestBody smsVO vo) { |
| | | String sendMsg = smsUtils.sendSms(xhsmsPath, xhsmsAccount, xhsmsPwd, vo.getPhone(), vo.getContent()); |
| | | return AjaxResult.success(sendMsg); |
| | | } |
| | | |
| | | @ApiOperation("市一HIS短信XML测试") |
| | | @PostMapping("/sendShiyiTest") |
| | | public AjaxResult sendShiyiTest(@RequestBody ShiyiSmsRequest request) { |
| | | try { |
| | | ShiyiSmsResponse response = shiyiSmsUtil.sendSms(request); |
| | | return AjaxResult.success(response); |
| | | } catch (Exception e) { |
| | | log.error("市一HIS短信XML测试失败", e); |
| | | return AjaxResult.error("市一HIS短信XML测试失败: " + e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | return AjaxResult.success(sendMsg); |
| | | } |
| | | |
| | | |
| | | } |