Просмотр исходного кода

refactor:重命名人员删除接口

liuchuanwei 7 месяцев назад
Родитель
Сommit
aa6e3399dd

+ 2 - 2
src/main/java/com/anyway/favor/controller/PersonController.java

@@ -190,8 +190,8 @@ public class PersonController {
      * @return
      */
     @ResponseBody
-    @RequestMapping("/del/{id}")
-    public R del(@PathVariable Long id) {
+    @RequestMapping("/delete/{id}")
+    public R delete(@PathVariable Long id) {
         int c = personService.delete(id);
         return  c > 0? R.ok() : R.fail("删除失败");
     }

+ 1 - 1
src/main/webapp/WEB-INF/pages/person/list.jsp

@@ -210,7 +210,7 @@
             } else if (obj.event === 'del') {
                 //eg1
                 layer.confirm('确定要删除?<br/><i>会删掉相关人员的配偶、父母等</i>', {icon: 3, title:'提示'}, function(index){
-                    let url = "${pageContext.request.contextPath}/person/del/" + data.id;
+                    let url = "${pageContext.request.contextPath}/person/delete/" + data.id;
                     $.ajax({
                         url:url,
                         type:"POST",