|  |  |  | 
|---|
|  |  |  | package com.ard.alarm.apponekey.controller; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.ard.utils.hiksdk.util.minio.MinioUtils; | 
|---|
|  |  |  | import com.ard.utils.http.AjaxResult; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
|---|
|  |  |  | import com.ard.utils.minio.MinioUtils; | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.*; | 
|---|
|  |  |  | import com.ard.alarm.apponekey.domain.ArdAlarmApponekey; | 
|---|
|  |  |  | import com.ard.alarm.apponekey.service.IArdAlarmApponekeyService; | 
|---|
|  |  |  | import org.springframework.web.multipart.MultipartFile; | 
|---|
|  |  |  | import javax.annotation.Resource; | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | 
|---|
|  |  |  | @RestController | 
|---|
|  |  |  | @RequestMapping("/alarm/apponekey") | 
|---|
|  |  |  | public class ArdAlarmApponekeyController { | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | @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 = MinioUtils.putObjectAndGetUrl("record", file); | 
|---|
|  |  |  | String url = minioUtil.putObjectAndGetUrl("record", file); | 
|---|
|  |  |  | ArdAlarmApponekey ardAlarmApponekey =new ArdAlarmApponekey(); | 
|---|
|  |  |  | ardAlarmApponekey.setUserId(userId); | 
|---|
|  |  |  | ardAlarmApponekey.setName(name); | 
|---|