瀏覽代碼

短信接口改造

chenweida 7 年之前
父節點
當前提交
a02a68f7e4

+ 18 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/data/DataHandlingController.java

@ -6,6 +6,7 @@ import com.yihu.wlyy.service.app.consult.ConsultTeamService;
import com.yihu.wlyy.service.app.sign.FamilyContractService;
import com.yihu.wlyy.web.BaseController;
import com.yihu.wlyy.web.third.jkedu.service.EduArticleService;
import com.yihu.wlyy.web.third.jkzl.ZBSmsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
@ -41,6 +42,8 @@ public class DataHandlingController extends BaseController {
    private com.yihu.wlyy.util.HttpUtil HttpUtil;
    @Autowired
    private EduArticleService eduArticleService;
    @Autowired
    private ZBSmsService zbSmsService;
    /**
     * 生成签约表中的行政团队的code
@ -294,4 +297,19 @@ public class DataHandlingController extends BaseController {
            return write(0, "添加数据失败!");
        }
    }
    @RequestMapping(value = "/sendZBMessage", method = RequestMethod.POST)
    @ResponseBody
    @ApiOperation("测试总部短信接口")
    public String sendZBMessage(
            @ApiParam(name = "mobile", value = "电话号码", required = true)
            @RequestParam(value = "mobile") String mobile,
            @ApiParam(name = "content", value = "短信内容", required = true)
            @RequestParam(value = "content") String content) {
        try{
            return write(200,  zbSmsService.sendMessage(mobile,content));
        }catch (Exception e){
            return write(0, "添加数据失败!");
        }
    }
}