方法名统一

This commit is contained in:
myh 2023-10-26 11:43:45 +08:00
parent 37d4834ad2
commit 309a5c8df9
2 changed files with 2 additions and 3 deletions

View File

@ -5,7 +5,6 @@ import com.example.springdemo.service.MerchantsService;
import jakarta.annotation.Resource; import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Optional; import java.util.Optional;
@RestController @RestController
@ -15,7 +14,7 @@ public class MerchantsController {
private MerchantsService merchantsService; private MerchantsService merchantsService;
@PostMapping("/add") @PostMapping("/add")
public Merchants saveMerchants(@RequestBody Merchants merchants) { public Merchants addMerchants(@RequestBody Merchants merchants) {
return merchantsService.addMerchants(merchants); return merchantsService.addMerchants(merchants);
} }

View File

@ -15,7 +15,7 @@ public class UsersController {
private UsersService usersService; private UsersService usersService;
@PostMapping("/add") @PostMapping("/add")
public Users saveUsers(@RequestBody Users users) { public Users addUsers(@RequestBody Users users) {
return usersService.addUsers(users); return usersService.addUsers(users);
} }