guoyuji
2024-04-24 c6eb867d69f7cb2faf3818984bbe12316a692396
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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")));
    }
 
}