@@ -74,5 +74,16 @@ public class CustomerInfoController {
public String modifyCustomerInfo(@RequestBody CustomerInfo customerInfo){
return customerInfoService.modifyCustomerInfo(customerInfo);
}
+
+ /**
+ * 删除客户信息
+ *
+ * @param example
+ * @return
+ */
+ @PostMapping("/deleteCustomerInfo")
+ public void deleteCustomerInfo(@RequestBody CustomerInfo example) {
+ customerInfoService.deleteCustomerInfo(example.getId());
+ }
@@ -46,4 +46,9 @@ public interface ICustomerInfoService extends IService<CustomerInfo> {
* @param customerInfo
*/
String modifyCustomerInfo(CustomerInfo customerInfo);
+ * @param id
+ void deleteCustomerInfo(String id);
@@ -205,5 +205,14 @@ public class CustomerInfoServiceImpl extends ServiceImpl<CustomerInfoMapper, Cus
+ * 删除
+ @Override
+ public void deleteCustomerInfo(String id) {
+ CustomerInfo customerInfo=this.selectById(id);
+ this.deleteById(customerInfo.getId());