|  |  | 
 |  |  | import javax.mail.MessagingException; | 
 |  |  | import java.io.ByteArrayOutputStream; | 
 |  |  | import java.io.IOException; | 
 |  |  | import java.nio.file.Files; | 
 |  |  | import java.util.*; | 
 |  |  |  | 
 |  |  | /** | 
 |  |  | 
 |  |  |     public void  excelDevice() throws IOException { | 
 |  |  |         String startTime = DateUtils.dateToDateString(DateUtils.addDays(new Date(),-1),DateUtils.yyyy_MM_dd_EN); | 
 |  |  |         List<DeviceExcelDTO> list = deviceService.ListDeviceExcel(startTime,null,72); | 
 |  |  |         String path = Objects.requireNonNull(this.getClass().getClassLoader().getResource("")).getPath(); | 
 |  |  |        // String path = this.getClass().getClassLoader().getResource("/data/file").getPath(); | 
 |  |  |         String path = System.getProperty("user.dir")+"/"; | 
 |  |  |         String fileName = String.format("%s疾控中心数据-%s.xlsx",path,startTime); | 
 |  |  |         ByteArrayOutputStream out = null; | 
 |  |  |         try { | 
 
 |  |  | 
 |  |  |  */ | 
 |  |  | public interface DeviceMapper extends BaseMapper<Device> { | 
 |  |  |  | 
 |  |  |     List<DeviceExcelDTO> ListDeviceExcel(@Param("startTime") String startTime,@Param("endTime") String endTime,@Param("id") int id); | 
 |  |  |     List<DeviceExcelDTO> ListDeviceExcel(@Param("startTime") String startTime,@Param("id") int id); | 
 |  |  | } | 
 
 |  |  | 
 |  |  |  | 
 |  |  |     @Override | 
 |  |  |     public List<DeviceExcelDTO> ListDeviceExcel(String startTime, String endTime, int id) { | 
 |  |  |         return this.baseMapper.ListDeviceExcel(startTime,endTime,id); | 
 |  |  |         return this.baseMapper.ListDeviceExcel(startTime,id); | 
 |  |  |     } | 
 |  |  | } | 
 
 |  |  | 
 |  |  |   application: | 
 |  |  |     name: screen-job | 
 |  |  |   redis: | 
 |  |  |     host: r-bp1xdlb9wfc6zt0msp18.redis.rds.aliyuncs.com | 
 |  |  |     host: r-bp1xdlb9wfc6zt0msppd13.redis.rds.aliyuncs.com | 
 |  |  |     port: 6379 | 
 |  |  |     password: QxPcRedis_moarl_2320 | 
 |  |  |     timeout: 30000 | 
 |  |  | 
 |  |  |         max-wait: 30000 | 
 |  |  |         min-idle: 32 | 
 |  |  |   tokenRedis: | 
 |  |  |     host: r-bp1xdlb9wfc6zt0msp18.redis.rds.aliyuncs.com | 
 |  |  |     host: r-bp1xdlb9wfc6zt0msppd13.redis.rds.aliyuncs.com | 
 |  |  |     port: 6379 | 
 |  |  |     password: QxPcRedis_moarl_2320 | 
 |  |  |     timeout: 30000 | 
 |  |  | 
 |  |  |     filters: stat | 
 |  |  |     type: com.alibaba.druid.pool.DruidDataSource | 
 |  |  |     max-wait: 60000 | 
 |  |  |     url: jdbc:mysql://rm-bp1pr3rx9m3fnkwsk18.mysql.rds.aliyuncs.com:3306/moral?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai | 
 |  |  |     url: jdbc:mysql://rm-bp1pr3rx9m3fnkwskso.mysql.rds.aliyuncs.com:3306/moral?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai | 
 |  |  |     username: moral_qx | 
 |  |  |     password: QxPcRedis_moarl_2320 | 
 |  |  |     test-on-borrow: false | 
 |  |  | 
 |  |  |       mail: | 
 |  |  |         smtp: | 
 |  |  |           auth: true  # 必须进行授权认证,它的目的就是阻止他人任意乱发邮件 | 
 |  |  |           socketFactory: | 
 |  |  |             port: 465 | 
 |  |  |             class: javax.net.ssl.SSLSocketFactory | 
 |  |  |             fallback: false | 
 |  |  |           starttls: #SMTP加密方式:连接到一个TLS保护连接 | 
 |  |  |           enable: true | 
 |  |  |           required: true | 
 |  |  |             enable: true | 
 |  |  |             required: true | 
 |  |  |     protocol: smtp | 
 |  |  |     port: 465 | 
 |  |  |     default-encoding: UTF-8 | 
 |  |  | mybatis-plus: | 
 |  |  |   mapper-locations: classpath:mapper/*.xml | 
 |  |  |   global-config: |