|
|
@ -0,0 +1,41 @@ |
|
|
|
package com.example.demo.controller; |
|
|
|
|
|
|
|
import com.example.demo.domain.vo.Consume; |
|
|
|
import com.example.demo.domain.vo.Result; |
|
|
|
import com.example.demo.service.ConsumeService; |
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.web.bind.annotation.CrossOrigin; |
|
|
|
import org.springframework.web.bind.annotation.GetMapping; |
|
|
|
import org.springframework.web.bind.annotation.RequestMapping; |
|
|
|
import org.springframework.web.bind.annotation.RestController; |
|
|
|
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
/** |
|
|
|
* @program: gold-java |
|
|
|
* @ClassName ConsumeController |
|
|
|
* @description:消费模块 |
|
|
|
* @author: Double |
|
|
|
* @create: 2025−06-23 13:06 |
|
|
|
* @Version 1.0 |
|
|
|
**/ |
|
|
|
|
|
|
|
@RestController |
|
|
|
@RequestMapping("/consume") |
|
|
|
@RequiredArgsConstructor |
|
|
|
@Slf4j |
|
|
|
@CrossOrigin |
|
|
|
public class ConsumeController { |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private ConsumeService consumeService; |
|
|
|
|
|
|
|
@GetMapping("/selectAll") |
|
|
|
public Result selcetAll() |
|
|
|
{ |
|
|
|
List<Consume> consumes = consumeService.selectAll(); |
|
|
|
return Result.success(consumes); |
|
|
|
} |
|
|
|
} |