Selaa lähdekoodia

Merge branch 'dev' of trick9191/patient-co-management into dev

trick9191 7 vuotta sitten
vanhempi
commit
6af1d6d36a

+ 8 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/common/sms/SMSController.java

@ -1,7 +1,10 @@
package com.yihu.wlyy.web.common.sms;
import com.yihu.wlyy.service.app.prescription.PrescriptionInfoService;
import io.swagger.annotations.Api;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
@ -25,6 +28,8 @@ import java.util.List;
@Api(description = "短信")
public class SMSController extends BaseController {
	private static final Logger logger = LoggerFactory.getLogger(PrescriptionInfoService.class);
	@Autowired
	public SMSService smsService;
	@Autowired
@ -98,6 +103,7 @@ public class SMSController extends BaseController {
	@ResponseBody
	public String send2(String mobile, int type, @RequestParam(required = false) String captchaToken) {
		try {
			logger.info("in checkCaptcha");
			if (type > 10 || type < 1) {
				return error(-1, "无效的请求!");
			}
@ -132,8 +138,10 @@ public class SMSController extends BaseController {
			String res = null;
			//内网发送 通过redis的队列
			if("local".equals(springProfiles)){
				logger.info("sendToNeiWang");
				res = smsService.sendToNeiWang(mobile, ip, type);
			}else {
				logger.info("smsService.send");
				res = smsService.send(mobile, ip, type, getRepUID());
			}
			if (StringUtils.equals(res, "ok")) {