Commit 9ac40a0f by 邓实川

优化

parent 72f1b511
...@@ -150,6 +150,7 @@ public class LoginController { ...@@ -150,6 +150,7 @@ public class LoginController {
remainder = quantity.getRemainder(); remainder = quantity.getRemainder();
date = quantity.getExpireDate(); date = quantity.getExpireDate();
} }
if (entRegisterDto.getTc() != 4) { //如果不是注册,则判断套餐余额
if (quantity == null || remainder == null || remainder <= 0) { // 判断充了钱没 if (quantity == null || remainder == null || remainder <= 0) { // 判断充了钱没
return ResultUtil.error("请充值后使用短信功能!"); return ResultUtil.error("请充值后使用短信功能!");
} }
...@@ -157,6 +158,7 @@ public class LoginController { ...@@ -157,6 +158,7 @@ public class LoginController {
System.err.println("企业 " + orgCode + " :短信套餐已过期"); System.err.println("企业 " + orgCode + " :短信套餐已过期");
return ResultUtil.error("短信套餐已到期!"); return ResultUtil.error("短信套餐已到期!");
} }
}
// 6位随机数验证码 // 6位随机数验证码
try { try {
...@@ -179,9 +181,9 @@ public class LoginController { ...@@ -179,9 +181,9 @@ public class LoginController {
.getJSONObject("SmsSendDetailDTOs").getJSONArray("SmsSendDetailDTO").get(0); .getJSONObject("SmsSendDetailDTOs").getJSONArray("SmsSendDetailDTO").get(0);
String phoneNum = jsonObject.getString("PhoneNum"); String phoneNum = jsonObject.getString("PhoneNum");
String content = jsonObject.getString("Content"); String content = jsonObject.getString("Content");
// String templateCode = jsonObject.getString("TemplateCode"); // String templateCode = jsonObject.getString("TemplateCode");
// String sendStatus = jsonObject.getString("SendStatus"); // String sendStatus = jsonObject.getString("SendStatus");
// String sendDate = jsonObject.getString("SendDate"); // String sendDate = jsonObject.getString("SendDate");
QyzxSms qyzxSms = new QyzxSms(); QyzxSms qyzxSms = new QyzxSms();
qyzxSms.setContent(content); qyzxSms.setContent(content);
......
...@@ -78,6 +78,7 @@ public class AliyunSMS { ...@@ -78,6 +78,7 @@ public class AliyunSMS {
Date date = quantity.getExpireDate(); Date date = quantity.getExpireDate();
String orderNo = quantity.getOrderNo(); String orderNo = quantity.getOrderNo();
if (templateCode != 4) {
if (quantity == null || remainder == null || remainder <= 0) { if (quantity == null || remainder == null || remainder <= 0) {
System.err.println("企业 " + orgCode + " :套餐余额不足,请充钱"); System.err.println("企业 " + orgCode + " :套餐余额不足,请充钱");
return null; return null;
...@@ -86,6 +87,7 @@ public class AliyunSMS { ...@@ -86,6 +87,7 @@ public class AliyunSMS {
System.err.println("企业 " + orgCode + " :短信套餐已过期"); System.err.println("企业 " + orgCode + " :短信套餐已过期");
return null; return null;
} }
}
QyzxUseRecord qyzxUseRecord = new QyzxUseRecord(); QyzxUseRecord qyzxUseRecord = new QyzxUseRecord();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment