liding
2025-05-08 602a2d4fd650ded48e8f4cd1a48f0e6de3b98053
src/main/java/com/ruoyi/basic/controller/CustomerController.java
@@ -8,7 +8,6 @@
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
@@ -82,7 +81,7 @@
     * 修改客户档案
     */
    @Log(title = "客户档案", businessType = BusinessType.UPDATE)
    @PutMapping ("/updateCustomer")
    @PostMapping("/updateCustomer")
    public AjaxResult edit(@RequestBody Customer customer) {
        return toAjax(customerService.updateCustomer(customer));
    }
@@ -91,8 +90,19 @@
     * 删除客户档案
     */
    @Log(title = "客户档案", businessType = BusinessType.DELETE)
    @DeleteMapping("/{ids}")
    public AjaxResult remove(@PathVariable Long[] ids) {
    @DeleteMapping("/delCustomer")
    public AjaxResult remove(@RequestBody Long[] ids) {
        if (ids == null || ids.length == 0) {
            return AjaxResult.error("请传入要删除的ID");
        }
        return toAjax(customerService.deleteCustomerByIds(ids));
    }
    /**
     * 查询客户
     */
    @GetMapping("/customerList")
    public List customerList(Customer customer) {
       return  customerService.customerList(customer);
    }
}