| 1234567891011121314151617181920212223242526272829303132333435363738394041 |
- package common.md;
- import com.alibaba.fastjson.JSONObject;
- import org.springframework.stereotype.Controller;
- import org.springframework.web.bind.annotation.GetMapping;
- import org.springframework.web.bind.annotation.RequestMapping;
- import org.springframework.web.bind.annotation.RequestParam;
- import org.springframework.web.bind.annotation.ResponseBody;
- import utility.sms.Sms;
- @Controller
- @RequestMapping("/rest/md")
- public class md {
- @RequestMapping("/yjhx")
- @GetMapping
- @ResponseBody
- public Object yjhx(@RequestParam("phonenumber") String phonenumber, @RequestParam(value = "formdata") String formdata) {
- String content = "尊敬的用户,您提交的以旧换新补贴申请美大总部已审核通过!友情提醒:该补贴金额仅限扫码门店使用,且产品安装地址与申请地址须保持一致。详情咨询当地美大门店。期待为您提供优质服务!";
- JSONObject resultObject = new JSONObject();
- try {
- new Thread(() -> {
- try {
- Thread.sleep(60 * 1000L);
- new Sms().sendout(Sms.SmsType.Notice, "MD", phonenumber, "浙江美大", content);
- } catch (Exception e) {
- e.printStackTrace();
- }
- }).start();
- resultObject.put("msg", "成功");
- resultObject.put("status", 1);
- return resultObject;
- } catch (Exception e) {
- e.printStackTrace();
- }
- resultObject.put("msg", "失败");
- resultObject.put("status", 0);
- return resultObject;
- }
- }
|