New file |
| | |
| | | package com.example.erp.controller.sd; |
| | | |
| | | import com.example.erp.common.Result; |
| | | import com.example.erp.entity.sd.BasicData; |
| | | import com.example.erp.service.sd.BasicOtherMoneyService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | @RequestMapping("/basicOtherMoney") |
| | | public class BasicOtherMoneyController { |
| | | private final BasicOtherMoneyService basicOtherMoneyService; |
| | | |
| | | public BasicOtherMoneyController(BasicOtherMoneyService basicOtherMoneyService) { |
| | | this.basicOtherMoneyService = basicOtherMoneyService; |
| | | } |
| | | |
| | | @GetMapping("findAll") |
| | | @PostMapping("findAll") |
| | | public Result findAll(){ |
| | | return Result.seccess(basicOtherMoneyService.findAll()); |
| | | } |
| | | |
| | | @PostMapping("deleteById/{id}") |
| | | public Result deleteById(@PathVariable("id") Integer id){ |
| | | return Result.seccess(basicOtherMoneyService.deleteById(id)); |
| | | } |
| | | |
| | | @PostMapping("save") |
| | | public Result save(@RequestBody Map<String,String> alias){ |
| | | return Result.seccess(basicOtherMoneyService.save(alias.get("alias"))); |
| | | } |
| | | |
| | | } |