| | |
| | | package com.ard.alarm.apponekey.controller; |
| | | |
| | | import com.ard.utils.http.AjaxResult; |
| | | import com.ard.utils.minio.MinioUtils; |
| | | import com.ard.utils.minio.MinioUtil; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.ard.alarm.apponekey.domain.ArdAlarmApponekey; |
| | | import com.ard.alarm.apponekey.service.IArdAlarmApponekeyService; |
| | |
| | | public class ArdAlarmApponekeyController { |
| | | @Resource |
| | | private IArdAlarmApponekeyService ardAlarmApponekeyService; |
| | | @Resource |
| | | private MinioUtils minioUtil; |
| | | |
| | | /** |
| | | * 新增app一键报警 |
| | | */ |
| | | @PostMapping |
| | | public AjaxResult add(String userId,String name, Double longitude,Double latitude,Double altitude,MultipartFile file) { |
| | | String url = minioUtil.putObjectAndGetUrl("record", file); |
| | | String url = MinioUtil.putObjectAndGetUrl("record", file); |
| | | ArdAlarmApponekey ardAlarmApponekey =new ArdAlarmApponekey(); |
| | | ardAlarmApponekey.setUserId(userId); |
| | | ardAlarmApponekey.setName(name); |