| | |
| | | package org.dromara.demo.controller; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import lombok.RequiredArgsConstructor; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import jakarta.validation.constraints.*; |
| | | import cn.dev33.satoken.annotation.SaCheckPermission; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.dromara.common.idempotent.annotation.RepeatSubmit; |
| | | import org.dromara.common.log.annotation.Log; |
| | | import org.dromara.common.web.core.BaseController; |
| | | import org.dromara.common.mybatis.core.page.PageQuery; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import jakarta.validation.constraints.NotEmpty; |
| | | import jakarta.validation.constraints.NotNull; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.dromara.common.core.domain.R; |
| | | import org.dromara.common.core.validate.AddGroup; |
| | | import org.dromara.common.core.validate.EditGroup; |
| | | import org.dromara.common.log.enums.BusinessType; |
| | | import org.dromara.common.excel.utils.ExcelUtil; |
| | | import org.dromara.demo.domain.vo.RsTrafficIndexVo; |
| | | import org.dromara.demo.domain.bo.RsTrafficIndexBo; |
| | | import org.dromara.demo.service.IRsTrafficIndexService; |
| | | import org.dromara.common.idempotent.annotation.RepeatSubmit; |
| | | import org.dromara.common.log.annotation.Log; |
| | | import org.dromara.common.log.enums.BusinessType; |
| | | import org.dromara.common.mybatis.core.page.PageQuery; |
| | | import org.dromara.common.mybatis.core.page.TableDataInfo; |
| | | import org.dromara.common.web.core.BaseController; |
| | | import org.dromara.demo.domain.bo.RsTrafficIndexBo; |
| | | import org.dromara.demo.domain.vo.RsTrafficIndexVo; |
| | | import org.dromara.demo.service.IRsTrafficIndexService; |
| | | import org.dromara.system.domain.SysOss; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 交通指数 |
| | |
| | | */ |
| | | @SaCheckPermission("rs:trafficIndex:list") |
| | | @GetMapping("/icon") |
| | | public List<Map<String, String>> icon() { |
| | | public List<SysOss> icon() { |
| | | return rsTrafficIndexService.icon(); |
| | | } |
| | | |
| | |
| | | @PathVariable Long[] ids) { |
| | | return toAjax(rsTrafficIndexService.deleteWithValidByIds(List.of(ids), true)); |
| | | } |
| | | |
| | | /** |
| | | * 上传图标 |
| | | * @param list 图标 |
| | | * @return 结果 |
| | | */ |
| | | @PostMapping("/uploadIcon") |
| | | public R<String> uploadIcon(@RequestBody List<SysOss> list) { |
| | | return rsTrafficIndexService.uploadIcon(list); |
| | | } |
| | | |
| | | } |