You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
package com.example.demo.controller.cash;
import com.example.demo.domain.vo.cash.CashCollection; import com.example.demo.domain.vo.coin.Result; import com.example.demo.service.cash.CashCollectionService; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*;
/** * @program: gold-java * @ClassName CashCollectionController * @description: * @author: Ethan * @create: 2025−09-26 10:22 * @Version 1.0 **/ @RestController @RequestMapping("/cashCollection") @RequiredArgsConstructor @Slf4j @CrossOrigin public class CashCollectionController { @Autowired private CashCollectionService cashCollectionService;
@PostMapping("/add") public Result add(@RequestBody CashCollection cashCollection) { try { return cashCollectionService.add(cashCollection); } catch (Exception e) { return Result.error("请检查数据的格式"); } } }
|