Commit ec5d43cb by 王军业

564654956

1 parent 3c3aafa2
...@@ -2,9 +2,12 @@ package com.vion.financial.controller; ...@@ -2,9 +2,12 @@ package com.vion.financial.controller;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.vion.financial.entity.Customer;
import com.vion.financial.service.CustomerService; import com.vion.financial.service.CustomerService;
@RestController @RestController
...@@ -18,4 +21,12 @@ public class CustomerController extends BaseController { ...@@ -18,4 +21,12 @@ public class CustomerController extends BaseController {
public Object queryCustomers() { public Object queryCustomers() {
return customerService.queryCustomer(); return customerService.queryCustomer();
} }
@PostMapping(value="/customers")
@ResponseBody
public Object addCustomers(@RequestBody Customer customer) {
return customerService.addCustomer(customer);
}
} }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!