智慧保安后台管理-外网
Administrator
2022-06-16 8b375fe00a241b3a769b82fe3dac8d1c9dce8a02
src/main/java/org/springblade/modules/accreditation/controller/AccreditationRecordsController.java
@@ -29,6 +29,7 @@
import org.springblade.modules.accreditation.entity.AccreditationRecords;
import org.springblade.modules.accreditation.service.AccreditationRecordsService;
import org.springblade.modules.accreditation.vo.AccreditationRecordsVo;
import org.springblade.modules.system.service.MyAsyncService;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;
import org.springframework.web.bind.annotation.*;
@@ -56,7 +57,7 @@
   private final AccreditationRecordsService accreditationRecordsService;
   private final IUserService userService;
   private final MyAsyncService myAsyncService;
   /**
    * 自定义分页
@@ -101,7 +102,8 @@
      "update blade_user set user_type = " + "'" + user.getUserType() + "'" +
         ",update_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(user.getUpdateTime()) + "'" +
         " " + "where id = " + "'" + user.getId() + "'";
      FtpUtil.sqlFileUpload(s);
      //FtpUtil.sqlFileUpload(s);
      myAsyncService.FTP(s);
      return R.data(save);
   }
@@ -156,7 +158,8 @@
                  "update blade_user set user_type = " + user.getUserType() + "" +
                  ",update_time = " + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(user.getUpdateTime()) + "" +
                  "where id = " + "'" + user.getId() + "'";
            FtpUtil.sqlFileUpload(s);
            //FtpUtil.sqlFileUpload(s);
            myAsyncService.FTP(s);
         }else {
            //内网同步
            String s =
@@ -165,7 +168,8 @@
                  ",audit_time = " + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(accreditationRecords.getAuditTime()) + "" +
                  ",audit_user = " + accreditationRecords.getAuditUser() + " " +
                  "where id = " + "'" + accreditationRecords.getId() + "'";
            FtpUtil.sqlFileUpload(s);
            //FtpUtil.sqlFileUpload(s);
            myAsyncService.FTP(s);
         }
      }else {
         //内网同步
@@ -175,7 +179,8 @@
               ",audit_time = " + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(accreditationRecords.getAuditTime()) + "" +
               ",audit_user = " + accreditationRecords.getAuditUser() + " " +
               "where id = " + "'" + accreditationRecords.getId() + "'";
         FtpUtil.sqlFileUpload(s);
         //FtpUtil.sqlFileUpload(s);
         myAsyncService.FTP(s);
      }
      //返回
      return R.status(b);
@@ -217,7 +222,8 @@
                     "update blade_user set user_type = " + user.getUserType() + "" +
                     ",update_time = " + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(user.getUpdateTime()) + "" +
                     "where id = " + "'" + user.getId() + "'";
               FtpUtil.sqlFileUpload(s);
               //FtpUtil.sqlFileUpload(s);
               myAsyncService.FTP(s);
            }else {
               //内网同步
               String s =
@@ -226,7 +232,8 @@
                     ",audit_time = " + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(accreditationRecords.getAuditTime()) + "" +
                     ",audit_user = " + accreditationRecords.getAuditUser() + " " +
                     "where id = " + "'" + accreditationRecords.getId() + "'";
               FtpUtil.sqlFileUpload(s);
               //FtpUtil.sqlFileUpload(s);
               myAsyncService.FTP(s);
            }
         }else {
            //内网同步
@@ -236,7 +243,8 @@
                  ",audit_time = " + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(accreditationRecords.getAuditTime()) + "" +
                  ",audit_user = " + accreditationRecords.getAuditUser() + " " +
                  "where id = " + "'" + accreditationRecords.getId() + "'";
            FtpUtil.sqlFileUpload(s);
            //FtpUtil.sqlFileUpload(s);
            myAsyncService.FTP(s);
         }
      });
      //返回