MallController.java
1.04 KB
package vion.controller.monitor;
import cn.dev33.satoken.annotation.SaCheckPermission;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import vion.dto.monitor.MallDTO;
import vion.service.monitor.IMallService;
import vion.vo.monitor.MallVO;
/**
* mall 信息
*/
@RestController
@RequestMapping("/api/mall")
@RequiredArgsConstructor
public class MallController {
private final IMallService mallService;
@GetMapping
@SaCheckPermission(value = "mall:list", orRole = "admin")
public Page<MallVO> list(MallDTO dto) {
return mallService.list(dto);
}
@GetMapping("/{id}")
@SaCheckPermission(value = "mall:get", orRole = "admin")
public MallVO get(@PathVariable Long id) {
return mallService.get(id);
}
}