|
@@ -0,0 +1,103 @@
|
|
|
+package com.miaxis.app.controller.userInfo;
|
|
|
+
|
|
|
+import com.miaxis.common.annotation.Log;
|
|
|
+import com.miaxis.common.constant.Constants;
|
|
|
+import com.miaxis.common.core.controller.BaseController;
|
|
|
+import com.miaxis.common.core.domain.Response;
|
|
|
+import com.miaxis.common.enums.BusinessTypeEnum;
|
|
|
+import com.miaxis.common.utils.PrivateKeyUtil;
|
|
|
+import com.miaxis.sms.SendSms;
|
|
|
+import com.miaxis.sms.SendSmsSync;
|
|
|
+import com.miaxis.sms.domain.SmsInfo;
|
|
|
+import com.miaxis.sms.domain.SmsToUser;
|
|
|
+import com.miaxis.tms.dto.TmsCoachInfoIdDTO;
|
|
|
+import com.miaxis.userInfo.domain.UserVip;
|
|
|
+import com.miaxis.userInfo.service.IUserVipService;
|
|
|
+import com.miaxis.userInfo.vo.UserVipTFVO;
|
|
|
+import com.miaxis.userInfo.vo.UserVipVO;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+import io.swagger.annotations.ApiParam;
|
|
|
+import org.springframework.beans.BeanUtils;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+
|
|
|
+import java.security.KeyFactory;
|
|
|
+import java.security.PrivateKey;
|
|
|
+import java.security.Signature;
|
|
|
+import java.security.spec.PKCS8EncodedKeySpec;
|
|
|
+import java.util.Base64;
|
|
|
+import java.util.Date;
|
|
|
+import java.util.HashMap;
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 【会员信息】Controller
|
|
|
+ *
|
|
|
+ * @author miaxis
|
|
|
+ * @date 2022-06-02
|
|
|
+ */
|
|
|
+@RestController
|
|
|
+@RequestMapping("/userInfo/sms")
|
|
|
+@Api(tags = {"【app-学员短信通知】"})
|
|
|
+public class UserSmsController extends BaseController {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private SendSmsSync sendSmsSync;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private SendSms sendSms;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 发送短信至学员
|
|
|
+ *
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @GetMapping(value = "/sendSms")
|
|
|
+ @ApiOperation("发送短信至学员")
|
|
|
+ public Response sendSms(SmsToUser smsToUser) throws Exception {
|
|
|
+
|
|
|
+ //参数处理
|
|
|
+// String param = "{\"name\":\"" + smsToUser.getName() + "\",\"idcard\":\"" + smsToUser.getIdcard() + "\",\"password\":\"" + smsToUser.getPassword() + "\"}";
|
|
|
+// SmsInfo smsInfo = new SmsInfo();
|
|
|
+// smsInfo.setPhone(smsToUser.getPhone());
|
|
|
+// smsInfo.setParam(param);
|
|
|
+// smsInfo.setSignName("极速驾培");
|
|
|
+// smsInfo.setTemplateCode("SMS_463607185"); //帐号密码模板
|
|
|
+// sendSmsSync.sendSms(smsInfo);
|
|
|
+
|
|
|
+
|
|
|
+// SmsInfo smsDown = new SmsInfo();
|
|
|
+// smsDown.setPhone(smsToUser.getPhone());
|
|
|
+// smsDown.setParam(null);
|
|
|
+// smsDown.setSignName("极速驾培");
|
|
|
+// smsDown.setTemplateCode("SMS_463677149"); //下载通知
|
|
|
+// sendSmsSync.sendSms(smsDown);
|
|
|
+
|
|
|
+
|
|
|
+ String param = "{\"name\":\"" + smsToUser.getName() + "\",\"idcard\":\"" + smsToUser.getIdcard() + "\",\"password\":\"" + smsToUser.getPassword() + "\"}";
|
|
|
+ SmsInfo smsInfo = new SmsInfo();
|
|
|
+ smsInfo.setPhone(smsToUser.getPhone());
|
|
|
+ smsInfo.setParam(param);
|
|
|
+ smsInfo.setSignName("极速驾培");
|
|
|
+ smsInfo.setTemplateCode("SMS_463607185"); //帐号密码模板
|
|
|
+ sendSms.sendSms(smsInfo);
|
|
|
+
|
|
|
+
|
|
|
+ SmsInfo smsDown = new SmsInfo();
|
|
|
+ smsDown.setPhone(smsToUser.getPhone());
|
|
|
+ smsDown.setParam(null);
|
|
|
+ smsDown.setSignName("极速驾培");
|
|
|
+ smsDown.setTemplateCode("SMS_463677149"); //下载通知
|
|
|
+ sendSms.sendSms(smsDown);
|
|
|
+
|
|
|
+ return Response.success();
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+}
|