Quellcode durchsuchen

更新短信发送状态对标字典

liyanbo vor 1 Woche
Ursprung
Commit
7cbc461caf

+ 1 - 1
byzs-module-system/src/main/java/cn/iocoder/byzs/module/system/dal/dataobject/invitecode/InviteCodeDO.java

@@ -72,7 +72,7 @@ public class InviteCodeDO extends BaseDO {
 
     /**
      * 通知状态
-     * 0:未通知,1:通知成功,2:通知失败
+     * 0:未通知,10:通知成功,20:通知失败
      */
     private String notifyStatus;
 

+ 5 - 5
byzs-module-system/src/main/java/cn/iocoder/byzs/module/system/service/invitecode/InviteCodeServiceImpl.java

@@ -407,7 +407,7 @@ public class InviteCodeServiceImpl implements InviteCodeService {
             // 校验手机号是否为空
             if (inviteCode.getOnlyPhone() == null || inviteCode.getOnlyPhone().isEmpty()) {
                 // 手机号为空,不发送短信
-                inviteCode.setNotifyStatus("2");
+                inviteCode.setNotifyStatus("20");
                 inviteCode.setNotifyTime(LocalDateTime.now());
                 inviteCodeMapper.updateById(inviteCode);
                 return;
@@ -423,7 +423,7 @@ public class InviteCodeServiceImpl implements InviteCodeService {
             Long smsLogId = smsSendService.sendSingleSmsToAdmin(inviteCode.getOnlyPhone(), null, ALY_MEMBER_PUSH_INVITATION_CODE.getTemplateCode(), templateParams);
             if (smsLogId == null) {
                 // 更新通知状态为失败
-                inviteCode.setNotifyStatus("2");
+                inviteCode.setNotifyStatus("20");
                 inviteCode.setNotifyTime(LocalDateTime.now());
                 return;
             }
@@ -431,17 +431,17 @@ public class InviteCodeServiceImpl implements InviteCodeService {
             SmsLogDO smsLog = smsLogService.getSmsLogById(smsLogId);
             if (smsLog == null) {
                 // 更新通知状态为失败
-                inviteCode.setNotifyStatus("2");
+                inviteCode.setNotifyStatus("20");
                 inviteCode.setNotifyTime(LocalDateTime.now());
                 return;
             }
 
             // 更新通知状态为成功
-            inviteCode.setNotifyStatus(String.valueOf(smsLog.getSendStatus()));
+            inviteCode.setNotifyStatus("10");
             inviteCode.setNotifyTime(smsLog.getSendTime());
         } catch (Exception e) {
             // 更新通知状态为失败
-            inviteCode.setNotifyStatus("2");
+            inviteCode.setNotifyStatus("20");
             inviteCode.setNotifyTime(LocalDateTime.now());
         } finally {
             // 更新邀请码记录