|
@@ -412,10 +412,12 @@ public class PublicServiceImpl implements PublicService {
|
|
|
public String getfsma(String phone) {
|
|
|
Random random = new Random(System.currentTimeMillis());
|
|
|
String fsma="";
|
|
|
+ List<ItfMessagehuifangentity> r = new ArrayList<>();
|
|
|
|
|
|
|
|
|
// 同一用户最近两个月内产生的发送码不能相同 itfMessagehuifangentityService
|
|
|
while (Boolean.TRUE){
|
|
|
+ r.clear();
|
|
|
fsma = String.valueOf(random.nextInt(10000));
|
|
|
if (fsma.length()<4){
|
|
|
if (fsma.length()==3){
|
|
@@ -429,11 +431,12 @@ public class PublicServiceImpl implements PublicService {
|
|
|
if (StringUtils.isEmpty(phone.trim())){
|
|
|
break;
|
|
|
}
|
|
|
- List<ItfMessagehuifangentity> r = itfMessagehuifangentityService.lambdaQuery()
|
|
|
+ r = itfMessagehuifangentityService.lambdaQuery()
|
|
|
.eq(ItfMessagehuifangentity::getSjid,phone)
|
|
|
.eq(ItfMessagehuifangentity::getFsma,fsma)
|
|
|
.ge(ItfMessagehuifangentity::getCrdt,stepMonth(new Date(),-2)).list();
|
|
|
if (CollectionUtils.isEmpty(r)){
|
|
|
+ r.clear();
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
@@ -782,7 +785,7 @@ public class PublicServiceImpl implements PublicService {
|
|
|
return Boolean.TRUE;
|
|
|
}
|
|
|
// 一个工单只能有一次预约信息,改约可以多个
|
|
|
- if (rea.getFlag()==1){
|
|
|
+ if (rea.getFlag().equals(1)){
|
|
|
FaOrderSms r = faOrderSmsService.lambdaQuery()
|
|
|
.eq(FaOrderSms::getSynTaskNo,rea.getId())
|
|
|
.last("limit 1")
|
|
@@ -1425,8 +1428,10 @@ public class PublicServiceImpl implements PublicService {
|
|
|
private String getFaOrderSmsfsma(String phone) {
|
|
|
Random random = new Random(System.currentTimeMillis());
|
|
|
String fsma="";
|
|
|
+ List<FaOrderSms> fos = new ArrayList<>();
|
|
|
// 同一用户最近两个月内产生的发送码不能相同
|
|
|
while (Boolean.TRUE){
|
|
|
+ fos.clear();
|
|
|
fsma = String.valueOf(random.nextInt(10000));
|
|
|
if (fsma.length()<4){
|
|
|
if (fsma.length()==3){
|
|
@@ -1437,11 +1442,12 @@ public class PublicServiceImpl implements PublicService {
|
|
|
fsma = fsma + "`999";
|
|
|
}
|
|
|
}
|
|
|
- List<FaOrderSms> r = faOrderSmsService.lambdaQuery()
|
|
|
+ fos = faOrderSmsService.lambdaQuery()
|
|
|
.eq(FaOrderSms::getSjid,phone)
|
|
|
.eq(FaOrderSms::getFsma,fsma)
|
|
|
.ge(FaOrderSms::getCrdt,stepMonth(new Date(),-2)).list();
|
|
|
- if (CollectionUtils.isEmpty(r)){
|
|
|
+ if (CollectionUtils.isEmpty(fos)){
|
|
|
+ fos.clear();
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
@@ -1464,7 +1470,8 @@ public class PublicServiceImpl implements PublicService {
|
|
|
record.setPhone(rea.getUserMobile());
|
|
|
if (record.getType()==1){
|
|
|
record.setContent(String.format(ALISMS_RESERVE,
|
|
|
- sdf.format(rea.getOldAppointmentTime()),getSHWDPhone(rea.getWebsitId())));
|
|
|
+ rea.getOldAppointmentTime()==null ? sdf.format(rea.getNewAppointmentTime()):sdf.format(rea.getOldAppointmentTime()),
|
|
|
+ getSHWDPhone(rea.getWebsitId())));
|
|
|
} else {
|
|
|
record.setContent(String.format(ALISMS_RESERVE,
|
|
|
sdf.format(rea.getNewAppointmentTime()),getSHWDPhone(rea.getWebsitId())));
|